I'm generating Stubs and a deploy.wsdd file from the wsdl. I'm then directly
deploying the stubs (by changing the classname in the deploy.wsdd). I then
wrote a few lines to invoke the stub and logged the output, giving the
double LogonToConnector output.

What I'm trying to achieve is invokation of a deployed webservice, where
that deployed webservice was derived from the original WSDL.


John

On Tue, Jul 05, 2005 at 01:01:29PM -0400, Anne Thomas Manes wrote:
> According to the WSDL, there should be only one LogonToConnector
> element. The message should look like the first message you posted
> (the one generated by your Java application. I have no idea why the
> stub generates an extra LogonToConnector element, or why that message
> seems to work. I also don't know why the stub adds the xsi:type
> attribute to the <UniformLoginCredentials> element. (It shouldn't.)
> 
> Can you review for us again the sequence you went through to create
> the service and the client?
> 
> I also suggest that you edit the WSDD typeMapping to specify:
> qname="ns:DatabaseID" rather than
> qname="ns:>UniformLoginCredentialsType>DatabaseID"
> 
> Also, what version of Axis are you using?
> 
> Anne
> 
> On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> > 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 <[EMAIL PROTECTED]> 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
> > > >
> >

Reply via email to