[ 
https://issues.apache.org/jira/browse/CXF-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552539
 ] 

Tawfik Lachheb commented on CXF-1251:
-------------------------------------

Works great.  Thank you!

> Error from CXF if optional method argument is missing
> -----------------------------------------------------
>
>                 Key: CXF-1251
>                 URL: https://issues.apache.org/jira/browse/CXF-1251
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>            Reporter: Tawfik Lachheb
>            Assignee: Daniel Kulp
>            Priority: Blocker
>             Fix For: 2.0.4
>
>
> Setting the minOccurs for method parameters in the aegis mapping file does 
> not apply to the wsdl so the wsdl shows method parameters like this for 
> example (even with minOccurs set to 1):
>  
> <xsd:element name="findLocation"> 
> <xsd:complexType> 
> <xsd:sequence> 
> <xsd:element minOccurs="0" name="location" type="xsd:string"/> 
> <xsd:element minOccurs="0" name="findOptions" type="tns:FindOptions"/> 
> <xsd:element minOccurs="0" name="token" type="xsd:string"/> 
> </xsd:sequence> 
> </xsd:complexType> 
> </xsd:element> 
> With minOccurs = 0, some toolkits would send the parameters like this if the 
> findOptions parameter is null: 
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:v20="http://arcwebservices.com/v2008";> 
>    <soapenv:Body> 
>       <v20:findLocation> 
>          <v20:location>Redlands</v20:location> 
>          
> <v20:token>YXd4MmRlbW86MTE5NTE2jI3MzpGbGV4OjZjNmZlzQ21ZTljMTA4OTNVlY2NmOWF2Fl</v20:token>
>  
>       </v20:findLocation> 
>    </soapenv:Body> 
> </soapenv:Envelope> 
> Wich returns: 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> 
>    <soap:Body> 
>       <soap:Fault> 
>          <faultcode>soap:Server</faultcode> 
>          <faultstring>Current state not START_ELEMENT</faultstring> 
>       </soap:Fault> 
>    </soap:Body> 
> </soap:Envelope> 
> Not sure what the best way to fix it is but it seems like we either:
> 1- fix the code to apply the minOccurs from the aegis mapping files so 
> clients don't send this kind of request
> 2- fix the code to be able to handle the minOccurs of 0 on the server side
> Please let me know if yo need any more info.
> Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to