• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DII client

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dynamic Invocation Interface Client
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
reply
    Bookmark Topic Watch Topic
  • New Topic