Kibaya,

My guess is that you have specified the exchangeRequest message as being of type xsd:anyType and Axis can't do anything except assume that it is a simple type. This means that Axis is expecting no child elements of the RequestSecurityToken element. But you have lots of child elements. As soon as the SimpleDeserializer sees a child element, it throws an exception. You'd need to define the RequestSecurityToken in an XML schema, in the <types> section of the WSDL, and refer to that type, instead of xsd:anyType.

Tony

"Kibaya E." <[EMAIL PROTECTED]> wrote on 02/12/2004 22:25:11:

> Hi folks,
> Iam still grappling with my problem, not yet solved.
> The web service is rightly deployed but on running the
> client, i keep on getting simpledeserializer error
> thrown by the server! Any ideas where i might have
> totally mesed up?
> Here is how it looks:
> ------------------------------------
> ==============
> Listen Port: 8081
> Target Host: 127.0.0.1
> Target Port: 8080
> ==== Request ====
> POST /axis/services/SecurityTokenService 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: 2611
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body><ns1:RequestSecurityToken
> ns1:Context="http://context.context"
> xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/04/trust"><ns1:
> TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
> x509-token-profile-1.0#X509v3</ns1:TokenType><ns2:TestElement
> xmlns:ns2="http://testElementNs.testElementNs"/><ns1:Lifetime
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
> wssecurity-utility-1.0.xsd"><wsu:Created
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
> wssecurity-utility-1.0.xsd">2004-12-03T05:23:33Z</wsu:Created><wsu:Expires
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
> wssecurity-utility-1.0.xsd">2004-12-03T05:27:43Z</wsu:Expires></ns1:
> Lifetime><ns1:RequestType>http://schemas.xmlsoap.
> org/ws/2004/04/security/trust/Issue</ns1:RequestType><ns1:
> Base><wsse:UsernameToken
> xmlns:wsse="WSConstants.WSSE_NS_OASIS_2003_06"><wsse:Username
> xmlns:wsse="WSConstants.WSSE_NS_OASIS_2003_06">elly</wsse:
> Username><wsse:Password
> Type="PasswordDigest"
> xmlns:wsse="WSConstants.
> WSSE_NS_OASIS_2003_06">N5s2wlHwJazdkBNjey9MMpVgDs4=</wsse:Password><wsse:Nonce
> xmlns:wsse="WSConstants.
> WSSE_NS_OASIS_2003_06">xn41UC/2Q9elnZaQGnp+GQ==</wsse:Nonce><wsu:Created
> xmlns:wsu="WSConstants.WSSE_NS_OASIS_2003_06">2004-12-03T05:23:
> 33Z</wsu:Created></wsse:UsernameToken></ns1:Base><ns1:
> Supporting><wsse:UsernameToken
> xmlns:wsse="WSConstants.WSSE_NS_OASIS_2003_06"><wsse:Username
> xmlns:wsse="WSConstants.WSSE_NS_OASIS_2003_06">martin</wsse:
> Username><wsse:Password
> Type="PasswordDigest"
> xmlns:wsse="WSConstants.
> WSSE_NS_OASIS_2003_06">rityJY94EkCPN90If83hm1OucmM=</wsse:Password><wsse:Nonce
> xmlns:wsse="WSConstants.
> WSSE_NS_OASIS_2003_06">ad49SOIUshIqz0jmt8bTzQ==</wsse:Nonce><wsu:Created
> xmlns:wsu="WSConstants.WSSE_NS_OASIS_2003_06">2004-12-03T05:23:
> 33Z</wsu:Created></wsse:UsernameToken><wsse:UsernameToken
> xmlns:wsse="WSConstants.WSSE_NS_OASIS_2003_06"><wsse:Username
> xmlns:wsse="WSConstants.WSSE_NS_OASIS_2003_06">alex</wsse:
> Username><wsse:Password
> Type="PasswordDigest"
> xmlns:wsse="WSConstants.
> WSSE_NS_OASIS_2003_06">1uhSLU1t1+b+NLNZL1ywo7gnphU=</wsse:Password><wsse:Nonce
> xmlns:wsse="WSConstants.
> WSSE_NS_OASIS_2003_06">bKg5PaAh0mPtc6cQOnwqUg==</wsse:Nonce><wsu:Created
> xmlns:wsu="WSConstants.WSSE_NS_OASIS_2003_06">2004-12-03T05:23:
> 33Z</wsu:Created></wsse:UsernameToken></ns1:Supporting></ns1:
> RequestSecurityToken>
> </soapenv:Body>
> </soapenv:Envelope>
>
> ==== Response ====
> HTTP/1.1 500 Internal Server Error
> Content-Type: text/xml; charset=utf-8
> Date: Fri, 03 Dec 2004 05:23:43 GMT
> Server: Apache Coyote/1.0
> Connection: close
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <soapenv:Fault>
>    <faultcode>soapenv:Server.userException</faultcode>
>    <faultstring>org.xml.sax.SAXException:
> SimpleDeserializer encountered a child element, which
> is NOT expected, in something it was trying to
> deserialize.</faultstring>
>    <detail/>
>   </soapenv:Fault>
>  </soapenv:Body>
> </soapenv:Envelope>
> ==============
>
> My wsdl file is here too:
> <wsdl:definitions
> targetNamespace="http://localhost:8080/axis/services/SecurityTokenService">
> -
>    <wsdl:message name="exchangeRequest">
> <wsdl:part name="in0" type="xsd:anyType"/>
> </wsdl:message>
> -
>    <wsdl:message name="exchangeResponse">
> <wsdl:part name="exchangeReturn" type="xsd:anyType"/>
> </wsdl:message>
> -
>    <wsdl:portType name="SecurityTokenService">
> -
>    <wsdl:operation name="exchange" parameterOrder="in0">
> <wsdl:input message="impl:exchangeRequest"
> name="exchangeRequest"/>
> <wsdl:output message="impl:exchangeResponse"
> name="exchangeResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> -
>    <wsdl:binding name="SecurityTokenServiceSoapBinding"
> type="impl:SecurityTokenService">
> <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> -
>    <wsdl:operation name="exchange">
> <wsdlsoap:operation soapAction=""/>
> -
>    <wsdl:input name="exchangeRequest">
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://implementation.trust2.security.ws.apache.org"
> use="encoded"/>
> </wsdl:input>
> -
>    <wsdl:output name="exchangeResponse">
> <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/services/SecurityTokenService"
> use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> -
>    <wsdl:service name="SecurityTokenServiceService">
> -
>    <wsdl:port
> binding="impl:SecurityTokenServiceSoapBinding"
> name="SecurityTokenService">
> <wsdlsoap:address
> location="http://localhost:8080/axis/services/SecurityTokenService"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> Thanks
> Kibaya

Reply via email to