axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jba...@sasami.atomised.org (John Baker)
Subject Re: Invalid element/Deserialisation
Date Tue, 05 Jul 2005 15:13:03 GMT
I should point out that the call which works is being generated by the Java
stubs generated from the WSDL, while the offending request is being
generated by another bit of Java building up it's own SOAP message (although
it seems to use the axis client libraries). I guess the major question is:
Why did the stubs use two LogonToConnector elements...

On Tue, Jul 05, 2005 at 10:58:15AM -0400, Anne Thomas Manes wrote:
> Please post the WSDL. 
> 
> There is a big difference between the two messages -- one has an extra
> <LogonToConnector> wrapper element. But if that's the problem, then
> I'd expect the error to occur on that element rather than on
> DatabaseID.
> 
> Your WSDD also looks suspect. The qname should be
> qname="ns:DatabaseID" rather than
> qname="ns:>UniformLoginCredentialsType>DatabaseID".
> 
> Anne
> 
> On 7/5/05, John Baker <jbaker@sasami.atomised.org> wrote:
> > Further to my post, I have derived that if I create Stub classes from WSDL
> > and make a WS call using Axis - to an Axis server - the client generates
> > this call:
> > 
> > <LogonToConnector xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes">
> >  <LogonToConnector>
> >    <ns1:UniformLoginCredentials xsi:type="ns1:UniformLoginCredentialsType" xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/common/connectortypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >      <ns1:DatabaseID>a</ns1:DatabaseID>
> >      <ns1:UniformUserName>b</ns1:UniformUserName>
> >      <ns1:UniformPassword>c</ns1:UniformPassword>
> >    </ns1:UniformLoginCredentials>
> >  </LogonToConnector>
> > </LogonToConnector>
> > 
> > Which is unserialised without a problem. So what is different between that
> > and this:
> > 
> > <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>
> >   <LogonToConnector xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes"
xmlns:ns1="http://www.caps-solutions.co.uk/schema/unifor
> >    <ns1:UniformLoginCredentials>
> >     <ns1:DatabaseID>a</ns1:DatabaseID>
> >     <ns1:UniformUserName>b</ns1:UniformUserName>
> >     <ns1:UniformPassword>c</ns1:UniformPassword>
> >    </ns1:UniformLoginCredentials>
> >   </LogonToConnector>
> >  </soapenv:Body>
> > </soapenv:Envelope>
> > 
> > Well I can see they are different, but what key fact makes one unserialisable?
> > 
> > Thanks,
> > 
> > 
> > John
> > 
> > On Mon, Jul 04, 2005 at 08:32:16PM +0100, John Baker wrote:
> > > Hi,
> > >
> > > I'm having a small problem when making a SOAP call and I'm getting this
> > > exception:
> > >
> > > AxisFault
> > >  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> > >   faultSubcode:
> > >    faultString: org.xml.sax.SAXException: Invalid element in
> > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > - DatabaseID
> > >  faultActor:
> > >   faultNode:
> > >    faultDetail:
> > >            {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> > > Invalid element in
> > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > - DatabaseID
> > >         at
> > > org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:255)
> > >         at
> > > org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> > >
> > > The SOAP request is as follows:
> > >
> > > <?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><LogonToConnector
> > > xmlns="http://www.xxx.co.uk/webservices/connectors/common/messagetypes"
> > > xmlns:ns1="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes"
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > >    <ns1:UniformLoginCredentials>
> > >       <ns1:DatabaseID>dbVal</ns1:DatabaseID>
> > >       <ns1:UniformUserName>userVal</ns1:UniformUserName>
> > >       <ns1:UniformPassword>passVal</ns1:UniformPassword>
> > >    </ns1:UniformLoginCredentials>
> > > </LogonToConnector>
> > >
> > > </soapenv:Body></soapenv:Envelope>
> > >
> > > And the deploy.wsdd refers to DatabaseID as follows:
> > >
> > >       <typeMapping xmlns:ns="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes"
> > >         qname="ns:>UniformLoginCredentialsType>DatabaseID"
> > >         type="java:java.lang.String"
> > >         serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
> > >         deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
> > >         encodingStyle=""
> > >        />
> > >
> > > Could someone point me in roughly the right direction? Is the SOAP request
> > > badly formed? Why has it failed to look up a method of deserialising the
> > > DatabaseID element?
> > >
> > > Thanks,
> > >
> > >
> > >
> > > John
> >

Mime
View raw message