Forums Register Login

DII client

+Pie Number of slices to send: Send
I am using a DII client. I want to be able to send an array of String. how do I do this.

Thanks
Imad
+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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..
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2404 times.
Similar Threads
Static Stub, Dynamic Proxy and DII
JAX-WS Client
I need to write a client for Testing the SEI implemented as stateless session bean
regarding jaxrpc clients
Ray Lai : Difference between Dynamic Proxies and Dynamic Invocation Interface
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:46:55.