Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DII client

 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a DII client. I want to be able to send an array of String. how do I do this.

Thanks
Imad
 
Peer Reynders
Bartender
Posts: 2968
6
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir

the only parameter it is adding is a String. I want to add an array

QName QNAME_TYPE_STRING =
new QName(NS_XSD, "string");

call.addParameter("String_1", QNAME_TYPE_STRING,
ParameterMode.IN);

Instead of above I want to be able to pass an array. How do I do that?
Thanks for your reply.
Imad
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops missed the "array" part.

That depends on what the web service is expecting (the WSDL should specify that). The JAX-RPC 1.1 Specification states:

The above Java array is mapped to the following schema fragment:

The following example shows another form of XML schema representation and an XML
schema instance:

<hr></blockquote>

So there is no "one way" to pass a String Array via DII. You are going to have to know the exact XML representation that the Web service is expecting.
In the "literal" case you are going to have to use the complexType expected by the web service. In the "encoded" case you need to configure a serializer that produces a soapenc:Array that the web service's de-serializer can consume.

Look at this code - it may give you some ideas
http://users.skynet.be/pascalbotte/rcx-ws-doc/dii.htm
[ February 24, 2006: Message edited by: Peer Reynders ]
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how it looks in my wsdl file. what do you think what code should i read. I am sorry being so dumb. third and fourth argument is an array of string

<message name="IntegrationDelegate_launchSession">
<part name="Integer_1" type="xsd:int"/>
<part name="String_2" type="xsd:string"/>
<part name="arrayOfString_3" type="ns3:StringArray"/>
<part name="arrayOfString_4" type="ns3:StringArray"/>
<part name="String_5" type="xsd:string"/>
<part name="Boolean_6" type="xsd:boolean"/></message>

Thanks
Imad
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the XML Schema type definition for ns3:StringArray?

What is the style attribute in the operation binding?

What is the use attribute in the input binding?

Why are you using DII?

If you have a WSDL, use generated stubs or dynamics proxies. If you are using DII because you are dynamically discovering the WSDL then you will need to acquire a much, much deeper understanding of WSDL and XML Schema - Once you have that, usage of DII will seem much clearer.

At this point I think it may actually be easier to use SAAJ to create that SOAP request.

SOAP with Attachments API for Java
Kim Topley: Java Web Services in a Nutshell; Sample Chapter: Chapter3: SAAJ
[ February 28, 2006: Message edited by: Peer Reynders ]
 
vijay rajendran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i'm also genrating a DII client by while executing the client it gives me the following error

Caught Exception in DII :JAXRPCTIE01: caught exception while handling request: deserialization error: java.lang.NumberFormatException: For input string: ""

if u need i'll sned my code too
need some ideas to proceed further..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic