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

Support string array in wsdl

 
beng shi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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!
 
Sudhir Jha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic