cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1251) Error from CXF if optional method argument is missing
Date Fri, 14 Dec 2007 15:40:43 GMT

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

Daniel Kulp commented on CXF-1251:
----------------------------------


Actually, there are other related bugs.   If you try to SEND a message like that via:

findLocation("Redlands", null, "token");

it outputs:
<findOptions xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:nil="true" />
which is wrong as the element isn't nillable.   Definitely some badness going on with the
minOccurs=0 stuff.





> 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.1
>
>
> 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.


Mime
View raw message