It should say xsi:nil="true", not xsi:nil="1".
On 1/19/07, DBDavide <[EMAIL PROTECTED]> wrote:
Newbie question: Why I'm getting this exception from Axis2 server when I send null values? WSDL states nillable='true'. Clients should omit or send NULL values with xsi:nil='1' ? 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 (that to me appears to be correct) 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) Thanks -- Davide -- View this message in context: http://www.nabble.com/xsi%3Anil%3D%271%27-Null-what-is-wrong-with-this-soap-body--tf3040150.html#a8449923 Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]