*
The moose likes Web Services and the fly likes DII client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "DII client" Watch "DII client" New topic
Author

DII client

Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
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

Joined: Aug 19, 2005
Posts: 2922
    
    5
Dynamic Invocation Interface Client
Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
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

Joined: Aug 19, 2005
Posts: 2922
    
    5
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

Joined: Sep 13, 2005
Posts: 238
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

Joined: Aug 19, 2005
Posts: 2922
    
    5
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

Joined: Mar 02, 2006
Posts: 3
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: DII client
 
Similar Threads
Ray Lai : Difference between Dynamic Proxies and Dynamic Invocation Interface
regarding jaxrpc clients
JAX-WS Client
Static Stub, Dynamic Proxy and DII
I need to write a client for Testing the SEI implemented as stateless session bean