You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Amichai Ungar (JIRA)" <ji...@apache.org> on 2007/07/30 09:07:55 UTC

[jira] Commented: (AXIS2-2007) SOAP requests with xsi:nil='1' are not accepted by Axis

    [ https://issues.apache.org/jira/browse/AXIS2-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516296 ] 

Amichai Ungar commented on AXIS2-2007:
--------------------------------------

because the default has been changed to be 1, there is a backward competability problem with a server before this fix (which gets only true as a value) and a client which sends 1 as default. 

> SOAP requests with xsi:nil='1' are not accepted by Axis
> -------------------------------------------------------
>
>                 Key: AXIS2-2007
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2007
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: Axis2 1.1 server and JBossWS1.0.4 as client
>            Reporter: Davide De Benedictis
>
> Axis2 doesnt recognize xsi:nil='1' as a valid representation of boolean 'true'. Axis2 expects xsi:nil='true'
> From w3c schema specs says that both 1 or true are valid instances of a boolean datatypes: http://www.w3.org/TR/xmlschema-2/#boolean
> > "...3.2.2.1 Lexical representation
> > 
> > An instance of a datatype that is defined as - boolean-  can have the
> > following legal literals {true, false, 1, 0}.
> > 3.2.2.2 Canonical representation
> > 
> > The canonical representation for boolean is the set of literals {true,
> > false}..."
> > 
> So in my case:
> This is the WSDL fragment:
>       <xs:element name="updateModel">
>         <xs:complexType>
>           <xs:sequence>
>             <xs:element name="code" nillable="true" type="xs:int"/>
>             <xs:element name="des" nillable="true" type="xs:string"/>
>             <xs:element name="link" nillable="true" type="xs:int"/>
>             <xs:element name="date" nillable="true" type="xs:string"/>
>           </xs:sequence>
>         </xs:complexType>
>       </xs:element>
> This is the SOAP envelope sent from JBoss 1.0.4WS:
> 2007-01-18 21:18:33,118 TRACE [jbossws.SOAPMessage] Outgoing SOAPMessage
> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
>  <env:Header/>
>  <env:Body>
>   <ns1:updateModel xmlns:ns1='http://core.xx.yyy.zzz.com/xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
>    <ns1:code xsi:nil='1'/>
>    <ns1:des>DUMMY</ns1:des>
>    <ns1:link xsi:nil='1'/>
>    <ns1:date xsi:nil='1'/>
>   </ns1:updateModel>
>  </env:Body>
> </env:Envelope>
> Axis2 throws an exception and reply with a fault:
> <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
>  <soapenv:Header/>
>  <soapenv:Body>
>   <env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
>    <faultcode>soapenv:Client</faultcode>
>    <faultstring>Exception occurred while trying to invoke service method updateModel</faultstring>
>    <detail/>
>   </env:Fault>
>  </soapenv:Body>
> </soapenv:Envelope>
> On my console I see this Exception:
> ERROR org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver -
> Exception occurred while trying to invoke service method updateModel
> java.lang.IllegalArgumentException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:118)
> at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)
> at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:319)
> at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:247)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
> at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
> at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
> at org.mortbay.jetty.Server.handle(Server.java:303)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:735)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:636)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:320)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org