This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

web service client with a complex datatype

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
I want to call a web service method with a complex datatype as input.
There is an approach for String type input:
http://www.java2s.com/Open-Source/Java-Document/J2EE/enhydra/samples/client/DynamicInvoker.java.htm
Is there anything which i can use as a starting point for complex datatype?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are we talking about a SOAP web service somebody else built or what?

Is this a complex structure that can be represented in XML?

Bill
 
Ranch Hand
Posts: 59
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

You can create the data structure in XSD and take this approach as a starting point. NetBeans have a practical demonstration of this kind of approach in example section.

 
Mark heningen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

William Brogden wrote:Are we talking about a SOAP web service somebody else built or what?

Is this a complex structure that can be represented in XML?

Bill


WSDL representation seems quite ok. There are other methods in wsdl those expect String type values as input and they work fine with the client i mentioned earlier.
By complex i mean a collection of objects(BusinessObjects).
I am a bit unsure about object representation in xml
 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark, A business object can be expressed as a <complexType> which is in turn a <sequence> of some <simpleType(s)> and they can be inturn defined by primitve(pre-defined) types. For a collection of objects please use "minoccurs" and "maxoccurs" for bounding. If not just treat them as arrays. This should be possible to represent pretty much any object except ofcourse non-serializable ones.
 
Mark heningen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Raja Pal wrote:Mark, A business object can be expressed as a <complexType> which is in turn a <sequence> of some <simpleType(s)> and they can be inturn defined by primitve(pre-defined) types. For a collection of objects please use "minoccurs" and "maxoccurs" for bounding. If not just treat them as arrays. This should be possible to represent pretty much any object except ofcourse non-serializable ones.


This is exactly what i have done in wsdl file( "minoccurs" and "maxoccurs" for bounding.). The problem is from Client side. Passing string won't be problem. I already pass Array of String in "normal" cases. and it works fine. Can you elaborate a bit about passing Array of Objects from client?
 
To do a great right, do a little wrong - shakepeare. twisted little ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic