axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shiv Shankar <>
Subject Problems with optional parameters while using REST endpoint.
Date Thu, 22 Nov 2012 05:37:27 GMT

One of my service have optional elements specified. When I use SOAP and
send xml request with the optional parameter missing, it works fine. But
when I do a GET request to the REST endpoint it complains about the missing
optional parameter. If I include the optional parameter in the GET request,
the service works fine.

Is this a genuine limitation of Axis2. If not, what should I do to fix it?



<xs:element name="TestRequest">
        <xs:element name="id" type="xs:string"/>
        <xs:element minOccurs="0" name="item" type="xs:string"/>

*Case 1*


*Error *:

   <faultstring>Required element item defined in the schema can not be
found in the request; nested exception is:
org.apache.axis2.AxisFault: Required element item defined in the schema can
not be found in the request

*Case 2*


*Gives expected results*.


View raw message