Hi,
 
I have a question regarding wsdl generation from a java file.  I'm
having a problem where if I specify a return type of String[] I get the
following schema generated in my wsdl.  The problem is that the return
element has a maxOccurs="unbounded" which is what I want but this
element should also be optional meaning a value should not need to be
specified and a minOccurs="0" attribute should also be on that element.
Am I doing something wrong or is this a limitation of using axis2 to
generate your wsdl?  I am using Axis2 1.1.1
 
Java Code:
public String[] testThisService(String[] test)
{
    String[] test2 = new String[1];
    test2[0] = "test";
    return test2;
}

WSDL Schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://www.alarmpoint.com/webservices/schema";>
<xs:element name="testThisService">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="test" nillable="true"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="testThisServiceResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="return" nillable="true"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Reply via email to