File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Support string array in wsdl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Support string array in wsdl " Watch "Support string array in wsdl " New topic
Author

Support string array in wsdl

beng shi
Greenhorn

Joined: Dec 03, 2010
Posts: 1
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!


My free books and tutorials: http://www.slideshare.net/krizsan
Sudhir Jha
Greenhorn

Joined: Apr 08, 2011
Posts: 1
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.

 
Don't get me started about those stupid light bulbs.
 
subject: Support string array in wsdl