RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Anne I have tracked my ongoing 'SimpleDeserializer' SAX exception down to my 'wrapped/literal' web service's handling of an expected Vector-type value in the invoked web service 'addUser' method's parameter, which is of type 'HashMap'. Is there a known problem at AXIS 1.1 when 'wrapped/literal' web services have to handle Vector-type values within HashMap's ? If you could take a look at the attached 'tcpmon' trace of a request/response between the original RPC/Encoded client/service ('TSMAdapter RPC Enc addUser.log ') you will see that there is an item representing a Vector defined thus: alias http://schemas.xmlsoap.org/soap/encoding/"; xsi:type="ns3:Vector" xmlns:ns3="http://xml.apache.org/xml-soap"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";> [EMAIL PROTECTED] [EMAIL PROTECTED] If you then take a look at the attached 'tcpmon' trace of a request/response between the converted Wrapped/literal client/service ('TSMAdapter Wrapped Lit addUser.log') you will see that the equivalent item representing a Vector is defined thus: alias [EMAIL PROTECTED] [EMAIL PROTECTED] You will also then see the exception being returned in this trace. I have checked that removal of this & all other such Vector-type values from the 'hUserDtls' HashMap passed as a parameter by the client on the 'addUser' invocation prevents the 'SimpleDeserializer' SAX exception. Could you guide me as to what I need to do to get my 'wrapped/literal' web service to handle such Vector-type values ? Many Thanks, Tim -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 19 April 2005 13:23 To: Timothy Thorpe; axis-user@ws.apache.org Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Tim, The operation parameters you've specified in your WSDD are wrong. In wrapped mode, your input parameters are the same as the operation name. Anne On 4/19/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > Anne > > I have read your blogger article & the wiki reference. > > Thank you for the new WSDL. > > I have supplied it to the AXIS 1.1 version of 'WSDLToJava' generate my > client stub code, via the following command: > >java org.apache.axis.wsdl.WSDL2Java > \Tomcat\jakarta-tomcat-4.1.30\webapps\TSMAdapter_wrapped\WEB-INF\classes\net > \cp\adapter\TSMAdapter_wrapped.wsdl > > I used two versions of WSDD file (both attached) to deploy my AXIS 1.1 web > service, via the following command: > >java org.apache.axis.client.AdminClient -lhttp://localhost:9249/TSMAda > pter_wrapped/services/AdminService deploy.wsdd > Processing file deploy.wsdd > Done processing > > Note in particular this line in the first WSDD file: > > > Then a modified version of this line in the second WSDD file: > > > Unfortunately, with the web service deployed using either version of the > WSDD, I still get the same 'SimpleDeserializer' SAX exception - I have > attached 'tcpmon' output of the failing request/response (also, for good > measure, the equivalent 'tcpmon' output of the working request/response for > the RPC/Encoded version of the client/service). > > Clearly I am doing something wrong here because wrapped/literal does work > for AXIS 1.1. > > I do appreciate the help you are giving me. > > Thanks, > Tim > > > -Original Message- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 18 April 2005 23:21 > To: Timothy Thorpe > Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Here's a wrapped version of your WSDL: > > >xmlns:impl="urn:TSMAdapter" > xmlns:intf="urn:TSMAdapter" > xmlns:apachesoap="http://xml.apache.org/xml-soap"; > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; > xmlns:xsd="http://www.w3.org/2001
RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Anne I have clearly misunderstood your last point about the input parameters. I have modified my WSDD file as per the attachment - I have changed each operation 'parameter' element to have the same name as the operation. But the web service still returns the same " org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize." fault. I have tried to locate an example WSDD file for a wrapped web service on the AXIS site but have not been able to - is there one ? Tim -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 19 April 2005 13:23 To: Timothy Thorpe; axis-user@ws.apache.org Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Tim, The operation parameters you've specified in your WSDD are wrong. In wrapped mode, your input parameters are the same as the operation name. Anne On 4/19/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > Anne > > I have read your blogger article & the wiki reference. > > Thank you for the new WSDL. > > I have supplied it to the AXIS 1.1 version of 'WSDLToJava' generate my > client stub code, via the following command: > >java org.apache.axis.wsdl.WSDL2Java > \Tomcat\jakarta-tomcat-4.1.30\webapps\TSMAdapter_wrapped\WEB-INF\classes\net > \cp\adapter\TSMAdapter_wrapped.wsdl > > I used two versions of WSDD file (both attached) to deploy my AXIS 1.1 web > service, via the following command: > >java org.apache.axis.client.AdminClient -lhttp://localhost:9249/TSMAda > pter_wrapped/services/AdminService deploy.wsdd > Processing file deploy.wsdd > Done processing > > Note in particular this line in the first WSDD file: > > > Then a modified version of this line in the second WSDD file: > > > Unfortunately, with the web service deployed using either version of the > WSDD, I still get the same 'SimpleDeserializer' SAX exception - I have > attached 'tcpmon' output of the failing request/response (also, for good > measure, the equivalent 'tcpmon' output of the working request/response for > the RPC/Encoded version of the client/service). > > Clearly I am doing something wrong here because wrapped/literal does work > for AXIS 1.1. > > I do appreciate the help you are giving me. > > Thanks, > Tim > > > -----Original Message- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 18 April 2005 23:21 > To: Timothy Thorpe > Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Here's a wrapped version of your WSDL: > > >xmlns:impl="urn:TSMAdapter" > xmlns:intf="urn:TSMAdapter" > xmlns:apachesoap="http://xml.apache.org/xml-soap"; > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > xmlns="http://schemas.xmlsoap.org/wsdl/";> > > http://www.w3.org/2001/XMLSchema"; > targetNamespace="http://xml.apache.org/xml-soap";> > > > > > > > > > type="apachesoap:mapItem"/> > > > > http://www.w3.org/2001/XMLSchema"; > targetNamespace="urn:TSMAdapter"> >http://xml.apache.org/xml-soap"/> > > > > type="xsd:string"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Tim, The operation parameters you've specified in your WSDD are wrong. In wrapped mode, your input parameters are the same as the operation name. Anne On 4/19/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > Anne > > I have read your blogger article & the wiki reference. > > Thank you for the new WSDL. > > I have supplied it to the AXIS 1.1 version of 'WSDLToJava' generate my > client stub code, via the following command: > >java org.apache.axis.wsdl.WSDL2Java > \Tomcat\jakarta-tomcat-4.1.30\webapps\TSMAdapter_wrapped\WEB-INF\classes\net > \cp\adapter\TSMAdapter_wrapped.wsdl > > I used two versions of WSDD file (both attached) to deploy my AXIS 1.1 web > service, via the following command: > >java org.apache.axis.client.AdminClient -lhttp://localhost:9249/TSMAda > pter_wrapped/services/AdminService deploy.wsdd > Processing file deploy.wsdd > Done processing > > Note in particular this line in the first WSDD file: > > > Then a modified version of this line in the second WSDD file: > > > Unfortunately, with the web service deployed using either version of the > WSDD, I still get the same 'SimpleDeserializer' SAX exception - I have > attached 'tcpmon' output of the failing request/response (also, for good > measure, the equivalent 'tcpmon' output of the working request/response for > the RPC/Encoded version of the client/service). > > Clearly I am doing something wrong here because wrapped/literal does work > for AXIS 1.1. > > I do appreciate the help you are giving me. > > Thanks, > Tim > > > -----Original Message----- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 18 April 2005 23:21 > To: Timothy Thorpe > Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Here's a wrapped version of your WSDL: > > >xmlns:impl="urn:TSMAdapter" > xmlns:intf="urn:TSMAdapter" > xmlns:apachesoap="http://xml.apache.org/xml-soap"; > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > xmlns="http://schemas.xmlsoap.org/wsdl/";> > > http://www.w3.org/2001/XMLSchema"; > targetNamespace="http://xml.apache.org/xml-soap";> > > > > > > > > > type="apachesoap:mapItem"/> > > > > http://www.w3.org/2001/XMLSchema"; > targetNamespace="urn:TSMAdapter"> >http://xml.apache.org/xml-soap"/> > > > > type="xsd:string"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > message="impl:addUserResponse"/> > > > > message="impl:modifyUserRequest"/> > message="impl:modifyUserResponse"/> > > > > message="impl:deleteUserRequest"/> > message="impl:deleteUserResponse"/> > > > > message="impl:renameUserRequest"/> > message="impl:renameUserResponse"/> > > > > > >transport="http://schemas.xmlsoap.org/soap/http"/> > > > > > > >
Fwd: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Forwarding to the list... -- Forwarded message -- From: Timothy Thorpe <[EMAIL PROTECTED]> Date: Apr 19, 2005 4:16 AM Subject: RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception To: Anne Thomas Manes <[EMAIL PROTECTED]> Anne I have read your blogger article & the wiki reference. Thank you for the new WSDL. I have supplied it to the AXIS 1.1 version of 'WSDLToJava' generate my client stub code, via the following command: >java org.apache.axis.wsdl.WSDL2Java \Tomcat\jakarta-tomcat-4.1.30\webapps\TSMAdapter_wrapped\WEB-INF\classes\net \cp\adapter\TSMAdapter_wrapped.wsdl I used two versions of WSDD file (both attached) to deploy my AXIS 1.1 web service, via the following command: >java org.apache.axis.client.AdminClient -lhttp://localhost:9249/TSMAda pter_wrapped/services/AdminService deploy.wsdd Processing file deploy.wsdd Done processing Note in particular this line in the first WSDD file: Then a modified version of this line in the second WSDD file: Unfortunately, with the web service deployed using either version of the WSDD, I still get the same 'SimpleDeserializer' SAX exception - I have attached 'tcpmon' output of the failing request/response (also, for good measure, the equivalent 'tcpmon' output of the working request/response for the RPC/Encoded version of the client/service). Clearly I am doing something wrong here because wrapped/literal does work for AXIS 1.1. I do appreciate the help you are giving me. Thanks, Tim -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 23:21 To: Timothy Thorpe Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Here's a wrapped version of your WSDL: http://xml.apache.org/xml-soap"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns="http://schemas.xmlsoap.org/wsdl/";> http://www.w3.org/2001/XMLSchema"; targetNamespace="http://xml.apache.org/xml-soap";> http://www.w3.org/2001/XMLSchema"; targetNamespace="urn:TSMAdapter"> http://xml.apache.org/xml-soap"/> http://schemas.xmlsoap.org/soap/http"/> http://localhost:9249/TSMAdapter/services/TSMAdapter"/> On 4/18/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > Anne > > I have attached the original RPC/Enc WDSL - generated by JavaToWSDL. > > Tim > > -Original Message- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 18 April 2005 17:12 > To: Timothy Thorpe; axis-user@ws.apache.org > Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Please send me the original rpc/encoded WSDL. > > See my blog for info about wrapped style: > http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html > Also see the Axis wiki: > http://wiki.apache.org/ws/FrontPage/Axis/Wrapped > > There is no such thing as wsdl style="wrapped". From a wsdl > perspective, the only style options are "rpc" and "document". > > Anne > > On 4/18/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > > Anne > > > > In fact, my previous email may be misleading. > &
Fwd: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Sorry -- meant to send this to the list... -- Forwarded message -- From: Anne Thomas Manes <[EMAIL PROTECTED]> Date: Apr 18, 2005 6:21 PM Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception To: Timothy Thorpe <[EMAIL PROTECTED]> Here's a wrapped version of your WSDL: http://xml.apache.org/xml-soap"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns="http://schemas.xmlsoap.org/wsdl/";> http://www.w3.org/2001/XMLSchema"; targetNamespace="http://xml.apache.org/xml-soap";> http://www.w3.org/2001/XMLSchema"; targetNamespace="urn:TSMAdapter"> http://xml.apache.org/xml-soap"/> http://schemas.xmlsoap.org/soap/http"/> http://localhost:9249/TSMAdapter/services/TSMAdapter"/> On 4/18/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > Anne > > I have attached the original RPC/Enc WDSL - generated by JavaToWSDL. > > Tim > > -Original Message----- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 18 April 2005 17:12 > To: Timothy Thorpe; axis-user@ws.apache.org > Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Please send me the original rpc/encoded WSDL. > > See my blog for info about wrapped style: > http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html > Also see the Axis wiki: > http://wiki.apache.org/ws/FrontPage/Axis/Wrapped > > There is no such thing as wsdl style="wrapped". From a wsdl > perspective, the only style options are "rpc" and "document". > > Anne > > On 4/18/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > > Anne > > > > In fact, my previous email may be misleading. > > > > To convert the web service WSDL from 'RPC/Lit' to 'Wrapped/Lit' I did not > > use 'JavaToWSDL' but instead had simply replaced the WSDL's binding style > > "rpc" to "wrapped" at the line: > > > >> transport="http://schemas.xmlsoap.org/soap/http"/> > > > > On reflection I suspect that this would not be sufficient to generate a > true > > 'Wrapped/Lit' WSDL file from which to generate the client stub. > > > > However, my attempt to actually use Axis 1.1 "Java2WSDL -y WRAPPED -u > > LITERAL" to generate the 'Wrapped/Literal' WSDL from my Java skeleton > fails. > > > > I have attached the failure. Also the Java skeleton code. > > > > It would be great if you could tell me what has gone wrong with JavaToWSDL > > here. > > > > Many Thanks, > > Tim > > > > -Original Message- > > From: Timothy Thorpe [mailto:[EMAIL PROTECTED] > > Sent: 18 April 2005 09:05 > > To: 'axis-user@ws.apache.org'; 'Anne Thomas Manes' > > Subject: RE: Converting RPC/Enc web service to RPC/Lit - > SimpleDeserializer > > exception > > > > Anne > > > > Thank you for your response. > > > > I will try my RPC/Lit with Axis 1.2 - with a view to persuading
RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Anne I have attached the original RPC/Enc WDSL - generated by JavaToWSDL. Tim -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 17:12 To: Timothy Thorpe; axis-user@ws.apache.org Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Please send me the original rpc/encoded WSDL. See my blog for info about wrapped style: http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html Also see the Axis wiki: http://wiki.apache.org/ws/FrontPage/Axis/Wrapped There is no such thing as wsdl style="wrapped". From a wsdl perspective, the only style options are "rpc" and "document". Anne On 4/18/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > Anne > > In fact, my previous email may be misleading. > > To convert the web service WSDL from 'RPC/Lit' to 'Wrapped/Lit' I did not > use 'JavaToWSDL' but instead had simply replaced the WSDL's binding style > "rpc" to "wrapped" at the line: > >transport="http://schemas.xmlsoap.org/soap/http"/> > > On reflection I suspect that this would not be sufficient to generate a true > 'Wrapped/Lit' WSDL file from which to generate the client stub. > > However, my attempt to actually use Axis 1.1 "Java2WSDL -y WRAPPED -u > LITERAL" to generate the 'Wrapped/Literal' WSDL from my Java skeleton fails. > > I have attached the failure. Also the Java skeleton code. > > It would be great if you could tell me what has gone wrong with JavaToWSDL > here. > > Many Thanks, > Tim > > -----Original Message- > From: Timothy Thorpe [mailto:[EMAIL PROTECTED] > Sent: 18 April 2005 09:05 > To: 'axis-user@ws.apache.org'; 'Anne Thomas Manes' > Subject: RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Anne > > Thank you for your response. > > I will try my RPC/Lit with Axis 1.2 - with a view to persuading my customer > to upgrade in the near future. > > In the meantime, as 1.1 is the version in use on our 'live' system, I have > tried wrapped/literal with Axis 1.1 (JavaToWSDL to generate the WSDL, > WSDLToJava to generate the client stub) - & see the exact same failure at > the web service. > > I would be most grateful if you could look at the attached evidence (WSDL > included this time, as well as WSDDs + 2x tcpmon traces; showing a > successful RPC/Enc exchange & the unsuccessful Wrapped/Lit exchange) & > hopefully tell me what I am doing wrong ? > > Rgds, > Tim > > -Original Message- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 15 April 2005 19:41 > To: axis-user@ws.apache.org > Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Try switching to wrapped document/literal style or upgrading to Axis > 1.2. Axis 1.1 doesn't really support RPC/Literal. > > (Also, in the future, please include the WSDL file when requesting > assistance.) > > Anne > > On 4/15/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > > > > > > > > Could the problem here be that the parameter to the client method invoked > is > > of type 'java.util.HashMap' & so I have to inform the web service to use > an > > appropriate deserializer for the resultant '' node in the SOAP > > Body (otherwise it will just use a default, & inappropriate in this case, > > SimpleDeserializer) ? > > > > > > > > If so, I how do I inform the web service which deserializer to use for a > > given method parameter ? > > > > > > > > Fuller extract of client 'SoapBindingStub' generated by WSDLToJava: > > > > > > > > public TSMAdapter_RPC_Lit.TSMAdapterResponse > > addUser(java.util.HashMap hUserDtls) throws java.rmi.RemoteException, > > TSMAdapter_RPC_Lit.TSMAdapterFault { > > > > if (super.cachedEndpoint == null) { > > > > throw new > > org.apache.axis.NoEndPointException(); > > > > } > > > > org.apache.axis.client.Call _call = createCall(); > > > > _call.setOperation(_operations[0]); > > > > _call.setUseSOAPAction(true); > > > > _call.setSOAPActionURI(""); > > > > _call.setEncodingStyle(null); > > > > > > _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, > > Boolean.FALSE); > > > > > > _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS
Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Please send me the original rpc/encoded WSDL. See my blog for info about wrapped style: http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html Also see the Axis wiki: http://wiki.apache.org/ws/FrontPage/Axis/Wrapped There is no such thing as wsdl style="wrapped". From a wsdl perspective, the only style options are "rpc" and "document". Anne On 4/18/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > Anne > > In fact, my previous email may be misleading. > > To convert the web service WSDL from 'RPC/Lit' to 'Wrapped/Lit' I did not > use 'JavaToWSDL' but instead had simply replaced the WSDL's binding style > "rpc" to "wrapped" at the line: > >transport="http://schemas.xmlsoap.org/soap/http"/> > > On reflection I suspect that this would not be sufficient to generate a true > 'Wrapped/Lit' WSDL file from which to generate the client stub. > > However, my attempt to actually use Axis 1.1 "Java2WSDL -y WRAPPED -u > LITERAL" to generate the 'Wrapped/Literal' WSDL from my Java skeleton fails. > > I have attached the failure. Also the Java skeleton code. > > It would be great if you could tell me what has gone wrong with JavaToWSDL > here. > > Many Thanks, > Tim > > -----Original Message- > From: Timothy Thorpe [mailto:[EMAIL PROTECTED] > Sent: 18 April 2005 09:05 > To: 'axis-user@ws.apache.org'; 'Anne Thomas Manes' > Subject: RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Anne > > Thank you for your response. > > I will try my RPC/Lit with Axis 1.2 - with a view to persuading my customer > to upgrade in the near future. > > In the meantime, as 1.1 is the version in use on our 'live' system, I have > tried wrapped/literal with Axis 1.1 (JavaToWSDL to generate the WSDL, > WSDLToJava to generate the client stub) - & see the exact same failure at > the web service. > > I would be most grateful if you could look at the attached evidence (WSDL > included this time, as well as WSDDs + 2x tcpmon traces; showing a > successful RPC/Enc exchange & the unsuccessful Wrapped/Lit exchange) & > hopefully tell me what I am doing wrong ? > > Rgds, > Tim > > -Original Message- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 15 April 2005 19:41 > To: axis-user@ws.apache.org > Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > Try switching to wrapped document/literal style or upgrading to Axis > 1.2. Axis 1.1 doesn't really support RPC/Literal. > > (Also, in the future, please include the WSDL file when requesting > assistance.) > > Anne > > On 4/15/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > > > > > > > > Could the problem here be that the parameter to the client method invoked > is > > of type 'java.util.HashMap' & so I have to inform the web service to use > an > > appropriate deserializer for the resultant '' node in the SOAP > > Body (otherwise it will just use a default, & inappropriate in this case, > > SimpleDeserializer) ? > > > > > > > > If so, I how do I inform the web service which deserializer to use for a > > given method parameter ? > > > > > > > > Fuller extract of client 'SoapBindingStub' generated by WSDLToJava: > > > > > > > > public TSMAdapter_RPC_Lit.TSMAdapterResponse > > addUser(java.util.HashMap hUserDtls) throws java.rmi.RemoteException, > > TSMAdapter_RPC_Lit.TSMAdapterFault { > > > > if (super.cachedEndpoint == null) { > > > > throw new > > org.apache.axis.NoEndPointException(); > > > > } > > > > org.apache.axis.client.Call _call = createCall(); > > > > _call.setOperation(_operations[0]); > > > > _call.setUseSOAPAction(true); > > > > _call.setSOAPActionURI(""); > > > > _call.setEncodingStyle(null); > > > > > > _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, > > Boolean.FALSE); > > > > > > _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, > > Boolean.FALSE); > > > > > > _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); > > > > _call.setOperationName(new > > javax.xml.namespace.QName("urn:TSMAdapter_
RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Anne In fact, my previous email may be misleading. To convert the web service WSDL from 'RPC/Lit' to 'Wrapped/Lit' I did not use 'JavaToWSDL' but instead had simply replaced the WSDL's binding style "rpc" to "wrapped" at the line: http://schemas.xmlsoap.org/soap/http"/> On reflection I suspect that this would not be sufficient to generate a true 'Wrapped/Lit' WSDL file from which to generate the client stub. However, my attempt to actually use Axis 1.1 "Java2WSDL -y WRAPPED -u LITERAL" to generate the 'Wrapped/Literal' WSDL from my Java skeleton fails. I have attached the failure. Also the Java skeleton code. It would be great if you could tell me what has gone wrong with JavaToWSDL here. Many Thanks, Tim -Original Message- From: Timothy Thorpe [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 09:05 To: 'axis-user@ws.apache.org'; 'Anne Thomas Manes' Subject: RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Anne Thank you for your response. I will try my RPC/Lit with Axis 1.2 - with a view to persuading my customer to upgrade in the near future. In the meantime, as 1.1 is the version in use on our 'live' system, I have tried wrapped/literal with Axis 1.1 (JavaToWSDL to generate the WSDL, WSDLToJava to generate the client stub) - & see the exact same failure at the web service. I would be most grateful if you could look at the attached evidence (WSDL included this time, as well as WSDDs + 2x tcpmon traces; showing a successful RPC/Enc exchange & the unsuccessful Wrapped/Lit exchange) & hopefully tell me what I am doing wrong ? Rgds, Tim -Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 15 April 2005 19:41 To: axis-user@ws.apache.org Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Try switching to wrapped document/literal style or upgrading to Axis 1.2. Axis 1.1 doesn't really support RPC/Literal. (Also, in the future, please include the WSDL file when requesting assistance.) Anne On 4/15/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > > > > Could the problem here be that the parameter to the client method invoked is > of type 'java.util.HashMap' & so I have to inform the web service to use an > appropriate deserializer for the resultant '' node in the SOAP > Body (otherwise it will just use a default, & inappropriate in this case, > SimpleDeserializer) ? > > > > If so, I how do I inform the web service which deserializer to use for a > given method parameter ? > > > > Fuller extract of client 'SoapBindingStub' generated by WSDLToJava: > > > > public TSMAdapter_RPC_Lit.TSMAdapterResponse > addUser(java.util.HashMap hUserDtls) throws java.rmi.RemoteException, > TSMAdapter_RPC_Lit.TSMAdapterFault { > > if (super.cachedEndpoint == null) { > > throw new > org.apache.axis.NoEndPointException(); > > } > > org.apache.axis.client.Call _call = createCall(); > > _call.setOperation(_operations[0]); > > _call.setUseSOAPAction(true); > > _call.setSOAPActionURI(""); > > _call.setEncodingStyle(null); > > > _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, > Boolean.FALSE); > > > _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, > Boolean.FALSE); > > > _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); > > _call.setOperationName(new > javax.xml.namespace.QName("urn:TSMAdapter_RPC_Lit", "addUser")); > > > > setRequestHeaders(_call); > > setAttachments(_call); > > java.lang.Object _resp = _call.invoke(new java.lang.Object[] > {hUserDtls}); > > > > if (_resp instanceof java.rmi.RemoteException) { > > throw (java.rmi.RemoteException)_resp; > > } > > else { > > extractAttachments(_call); > > try { > > return > (TSMAdapter_RPC_Lit.TSMAdapterResponse) _resp; > > } catch (java.lang.Exception _exception) { > > return > (TSMAdapter_RPC_Lit.TSMAdapterResponse) > org.apache.axis.utils.JavaUtils.convert(_resp, > TSMAdapter_RPC_Lit.TSMAdapterResponse.class); > > } > > } > > } > > > > Tim > > > > -Original Message- > From: Timothy Thorpe [mailto:[EMAIL PROTECTED] > Sent: 15 April 2005 1
RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Anne Thank you for your response. I will try my RPC/Lit with Axis 1.2 - with a view to persuading my customer to upgrade in the near future. In the meantime, as 1.1 is the version in use on our 'live' system, I have tried wrapped/literal with Axis 1.1 (JavaToWSDL to generate the WSDL, WSDLToJava to generate the client stub) - & see the exact same failure at the web service. I would be most grateful if you could look at the attached evidence (WSDL included this time, as well as WSDDs + 2x tcpmon traces; showing a successful RPC/Enc exchange & the unsuccessful Wrapped/Lit exchange) & hopefully tell me what I am doing wrong ? Rgds, Tim -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 15 April 2005 19:41 To: axis-user@ws.apache.org Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Try switching to wrapped document/literal style or upgrading to Axis 1.2. Axis 1.1 doesn't really support RPC/Literal. (Also, in the future, please include the WSDL file when requesting assistance.) Anne On 4/15/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > > > > Could the problem here be that the parameter to the client method invoked is > of type 'java.util.HashMap' & so I have to inform the web service to use an > appropriate deserializer for the resultant '' node in the SOAP > Body (otherwise it will just use a default, & inappropriate in this case, > SimpleDeserializer) ? > > > > If so, I how do I inform the web service which deserializer to use for a > given method parameter ? > > > > Fuller extract of client 'SoapBindingStub' generated by WSDLToJava: > > > > public TSMAdapter_RPC_Lit.TSMAdapterResponse > addUser(java.util.HashMap hUserDtls) throws java.rmi.RemoteException, > TSMAdapter_RPC_Lit.TSMAdapterFault { > > if (super.cachedEndpoint == null) { > > throw new > org.apache.axis.NoEndPointException(); > > } > > org.apache.axis.client.Call _call = createCall(); > > _call.setOperation(_operations[0]); > > _call.setUseSOAPAction(true); > > _call.setSOAPActionURI(""); > > _call.setEncodingStyle(null); > > > _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, > Boolean.FALSE); > > > _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, > Boolean.FALSE); > > > _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); > > _call.setOperationName(new > javax.xml.namespace.QName("urn:TSMAdapter_RPC_Lit", "addUser")); > > > > setRequestHeaders(_call); > > setAttachments(_call); > > java.lang.Object _resp = _call.invoke(new java.lang.Object[] > {hUserDtls}); > > > > if (_resp instanceof java.rmi.RemoteException) { > > throw (java.rmi.RemoteException)_resp; > > } > > else { > > extractAttachments(_call); > > try { > > return > (TSMAdapter_RPC_Lit.TSMAdapterResponse) _resp; > > } catch (java.lang.Exception _exception) { > > return > (TSMAdapter_RPC_Lit.TSMAdapterResponse) > org.apache.axis.utils.JavaUtils.convert(_resp, > TSMAdapter_RPC_Lit.TSMAdapterResponse.class); > > } > > } > > } > > > > Tim > > > > -Original Message- > From: Timothy Thorpe [mailto:[EMAIL PROTECTED] > Sent: 15 April 2005 14:36 > To: axis-user@ws.apache.org > Subject: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > > > > Hello all > > > > My web service is running AXIS 1.1. > > > > To improve performance of my AXIS web service I have converted it, and its > client, from RPC/Encoded to RPC/Literal, in an effort to reduce message size > by dropping the 'over-the-top' multiRefs & types. > > > > Now my client (which was working with the web service fine when using > RPC/Encoded) gets the following exception back from the web service: > > --- > > Axis Fault code: > {http://schemas.xmlsoap.org/soap/envelope/}Server.userException > > Axis Fault string: org.xml.sax.SAXException: SimpleDeserializer encountered > a child element, which is NOT expected, in something it was trying t
Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Try switching to wrapped document/literal style or upgrading to Axis 1.2. Axis 1.1 doesn't really support RPC/Literal. (Also, in the future, please include the WSDL file when requesting assistance.) Anne On 4/15/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote: > > > > Could the problem here be that the parameter to the client method invoked is > of type 'java.util.HashMap' & so I have to inform the web service to use an > appropriate deserializer for the resultant '' node in the SOAP > Body (otherwise it will just use a default, & inappropriate in this case, > SimpleDeserializer) ? > > > > If so, I how do I inform the web service which deserializer to use for a > given method parameter ? > > > > Fuller extract of client 'SoapBindingStub' generated by WSDLToJava: > > > > public TSMAdapter_RPC_Lit.TSMAdapterResponse > addUser(java.util.HashMap hUserDtls) throws java.rmi.RemoteException, > TSMAdapter_RPC_Lit.TSMAdapterFault { > > if (super.cachedEndpoint == null) { > > throw new > org.apache.axis.NoEndPointException(); > > } > > org.apache.axis.client.Call _call = createCall(); > > _call.setOperation(_operations[0]); > > _call.setUseSOAPAction(true); > > _call.setSOAPActionURI(""); > > _call.setEncodingStyle(null); > > > _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, > Boolean.FALSE); > > > _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, > Boolean.FALSE); > > > _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); > > _call.setOperationName(new > javax.xml.namespace.QName("urn:TSMAdapter_RPC_Lit", "addUser")); > > > > setRequestHeaders(_call); > > setAttachments(_call); > > java.lang.Object _resp = _call.invoke(new java.lang.Object[] > {hUserDtls}); > > > > if (_resp instanceof java.rmi.RemoteException) { > > throw (java.rmi.RemoteException)_resp; > > } > > else { > > extractAttachments(_call); > > try { > > return > (TSMAdapter_RPC_Lit.TSMAdapterResponse) _resp; > > } catch (java.lang.Exception _exception) { > > return > (TSMAdapter_RPC_Lit.TSMAdapterResponse) > org.apache.axis.utils.JavaUtils.convert(_resp, > TSMAdapter_RPC_Lit.TSMAdapterResponse.class); > > } > > } > > } > > > > Tim > > > > -Original Message- > From: Timothy Thorpe [mailto:[EMAIL PROTECTED] > Sent: 15 April 2005 14:36 > To: axis-user@ws.apache.org > Subject: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer > exception > > > > > Hello all > > > > My web service is running AXIS 1.1. > > > > To improve performance of my AXIS web service I have converted it, and its > client, from RPC/Encoded to RPC/Literal, in an effort to reduce message size > by dropping the 'over-the-top' multiRefs & types. > > > > Now my client (which was working with the web service fine when using > RPC/Encoded) gets the following exception back from the web service: > > --- > > Axis Fault code: > {http://schemas.xmlsoap.org/soap/envelope/}Server.userException > > Axis Fault string: org.xml.sax.SAXException: SimpleDeserializer encountered > a child element, which is NOT expected, in something it was trying to > deserialize. > > --- > > > > I will summarise below what I have done to convert service & client from > RPC/Encoded to RPC/Literal – perhaps someone can tell me the glaringly > obvious step I have failed to do ? > > > > Many Thanks, > > Tim > > > > Step 1: I re-deployed the web service to use 'RPC/Lit' by specifying the > 'user' attribute to the node in my WSDD file, thus: > > --- > > xmlns="http://xml.apache.org/axis/wsdd/"; > > > xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> > > &
RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Could the problem here be that the parameter to the client method invoked is of type ‘java.util.HashMap’ & so I have to inform the web service to use an appropriate deserializer for the resultant ‘’ node in the SOAP Body (otherwise it will just use a default, & inappropriate in this case, SimpleDeserializer) ? If so, I how do I inform the web service which deserializer to use for a given method parameter ? Tim -Original Message- From: Timothy Thorpe [mailto:[EMAIL PROTECTED] Sent: 15 April 2005 14:36 To: axis-user@ws.apache.org Subject: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception Hello all My web service is running AXIS 1.1. To improve performance of my AXIS web service I have converted it, and its client, from RPC/Encoded to RPC/Literal, in an effort to reduce message size by dropping the ‘over-the-top’ multiRefs & types. Now my client (which was working with the web service fine when using RPC/Encoded) gets the following exception back from the web service: --- Axis Fault code: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException Axis Fault string: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. --- I will summarise below what I have done to convert service & client from RPC/Encoded to RPC/Literal – perhaps someone can tell me the glaringly obvious step I have failed to do ? Many Thanks, Tim Step 1: I re-deployed the web service to use ‘RPC/Lit’ by specifying the ‘user’ attribute to the node in my WSDD file, thus: --- xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> languageSpecificType="java:net.cp.adapter.TSMAdapterFault"/> languageSpecificType="java:net.cp.adapter.TSMAdapterResponse"/> xmlns:ns="http://content.services.hrs.harris.com/" qname="ns:ProgramContent" type="java:com.harris.hrs.services.content.ProgramContent" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> --- Step 2: I used JavaToWSDL with the “-y RPC -u LITERAL” parameters to create a new ‘RPC/Lit’ WSDL for the service. Step 3: I used WSDLToJava to build client stubs from this ‘RPC/Lit’ WSDL file. I can now see the following reassuring settings in my new client ‘SoapBindStub’: --- org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("urn:TSMAdapter_RPC_Lit", "addUser")); --- I have used the AXIS TCP monitor to check on the client’s SOAP Request and see the following, which matches the old RPC/Enc version BUT WITHOUT the multiRefs & types: --- POST /TSMAdapter_RPC_Lit/services/TSMAdapter HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.1 Host: 127.0.0.1 Cache-Control: no-cache Pragma: no-cache SOAPAction: "" Content-Length: 1826 Authorization: Basic bWVtdW06U2NvdHQxc2g= password p diskquota 2048 contextID qwerty1234_1113550647291 userID qwerty1234
Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception
Hello all My web service is running AXIS 1.1. To improve performance of my AXIS web service I have converted it, and its client, from RPC/Encoded to RPC/Literal, in an effort to reduce message size by dropping the ‘over-the-top’ multiRefs & types. Now my client (which was working with the web service fine when using RPC/Encoded) gets the following exception back from the web service: --- Axis Fault code: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException Axis Fault string: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. --- I will summarise below what I have done to convert service & client from RPC/Encoded to RPC/Literal – perhaps someone can tell me the glaringly obvious step I have failed to do ? Many Thanks, Tim Step 1: I re-deployed the web service to use ‘RPC/Lit’ by specifying the ‘user’ attribute to the node in my WSDD file, thus: --- xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> languageSpecificType="java:net.cp.adapter.TSMAdapterFault"/> languageSpecificType="java:net.cp.adapter.TSMAdapterResponse"/> xmlns:ns="http://content.services.hrs.harris.com/" qname="ns:ProgramContent" type="java:com.harris.hrs.services.content.ProgramContent" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> --- Step 2: I used JavaToWSDL with the “-y RPC -u LITERAL” parameters to create a new ‘RPC/Lit’ WSDL for the service. Step 3: I used WSDLToJava to build client stubs from this ‘RPC/Lit’ WSDL file. I can now see the following reassuring settings in my new client ‘SoapBindStub’: --- org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("urn:TSMAdapter_RPC_Lit", "addUser")); --- I have used the AXIS TCP monitor to check on the client’s SOAP Request and see the following, which matches the old RPC/Enc version BUT WITHOUT the multiRefs & types: --- POST /TSMAdapter_RPC_Lit/services/TSMAdapter HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.1 Host: 127.0.0.1 Cache-Control: no-cache Pragma: no-cache SOAPAction: "" Content-Length: 1826 Authorization: Basic bWVtdW06U2NvdHQxc2g= password p diskquota 2048 contextID qwerty1234_1113550647291 userID qwerty1234 notifyrecipients [EMAIL PROTECTED] masteralias [EMAIL PROTECTED] givenname Timothy status ENABLED clientMSISDN 46702630331 alias [EMAIL PROTECTED] [EMAIL PROTECTED] sn Thorpe cos 2903 migrate false aliasdomain dof.se domain pne.dof.mobile.se sievestatus ENABLED --- The TCP Monitor shows the following Fault being returned: ---