• 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

Support string array in wsdl

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am using soapUI to read and test my wsdl that I created by java code.

In the wsdl for supporting string of array I have



I can load it in the soapUI without any error but when I ask soupUI to create soap request sample message it gives


Whereas , it should create something like (this is created by Axis)


My definition and the Axis one are :


I am thinking something is wrong but I could not find that.
I will be thankful if you share any idea about what is the reason or how to solve that.

Thanks
Beng
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
First of all, you should really read up on the WS-I Basic Profile for web service interoperability.
Using SOAP encoding is not recommended etc.
Have you considered using the maxOccurs attribute with a value greater than 1 in the XML schema specifying the string array?
I feel this could simplify your XML schema.
Best wishes!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello EveryBody,

I am trying to retrieve an image from Db using web services.
See My Web Method:
public String[] getSignature(int A, String B, long C){

<Some Code which return an Array of String>

Web Interface:
public String[] getSignature(int A, String B, long C);

in wsdl file : i can see value comes as:

<xs:complexType name="getSignature">
<xs:sequence> <xs:element name="arg0" type="xs:int"/>
<xs:element name="arg1" type="xs:string" minOccurs="0"/>
<xs:element name="arg2" type="xs:long"/>
</xs:sequence> </xs:complexType>
<xs:complexType name="getSignatureResponse">
<xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>


while sending client request,i had sent in this way....
String sk[] = port1.getSignature(125, "xyz", 562);
But its shows that : cannot convert from List<String> to String[]

Indeed in the stub generated by webInterface has code like
List<String> getSignature

what should be done?
Please suggest me some way to do that.

 
reply
    Bookmark Topic Watch Topic
  • New Topic