Thanks a lot for your help! It worked when I used -y WRAPPED.
The generated wsdl has an element wraps around the parameters.
<element name="authenticate">
<complexType>
<sequence>
<element name="in0" type="xsd:string"/>
<element name="in1" type="xsd:string"/>
<element name="in2" type="xsd:string"/>
<element name="in3" type="xsd:string"/>
</sequence>
</complexType>
</element>
And the soap request looks like this:
<?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>
<authenticate xmlns="http://companya.com">
<in0 xmlns="">001</in0>
<in1 xmlns="">002</in1>
<in2 xmlns="">user</in2>
<in3 xmlns="">pwd</in3>
</authenticate>
</soapenv:Body>
</soapenv:Envelope>
-----Original Message-----
From: Sanjay Krishnamurthi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 2:51 PM
To: [EMAIL PROTECTED]
Subject: RE: URGENT-serialization not working properly with document
style
As per axis document you would have to use "-y
WRAPPED". Or you could define a java bean class that
has four fields and change your authenticate method to
take the bean as input parameter.
Sanjay
--- "Xi, Keying" <[EMAIL PROTECTED]> wrote:
> I do have option "-y DOCUMENT" when generating the
> wsdl. And here is the request message:
>
> <?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>
> <in0 xmlns="http://companya.com">001</in0>
> <in1 xmlns="http://companya.com">002</in1>
> <in2 xmlns="http://companya.com">user</in2>
> <in3 xmlns="http://companya.com">pwd</in3>
> </soapenv:Body>
> </soapenv:Envelope>
>
> -----Original Message-----
> From: Sanjay Krishnamurthi
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 13, 2003 1:55 PM
> To: [EMAIL PROTECTED]
> Subject: RE: URGENT-serialization not working
> properly with document
> style
>
>
>
> As per the user guide, you would have to use -y
> wrapped option in java2wsdl.
>
> Sanjay
>
> --- Mike Perham <[EMAIL PROTECTED]> wrote:
> > My understanding is that axis is supposed to
> > generate that "wrapper" for
> > you. Your SOAP message should look something like
> > this:
> >
> > <soap:Body ...>
> > <authenticateRequest xmlns="http://companya.com">
> > <in0>blah</in0>
> > ...
> > </authenticateRequest>
> > </soap:Body>
> >
> > That's why I asked you to post your SOAP
> > request/response messages.
> > That will give us a hint as to the underlying
> > problem.
> >
> > -----Original Message-----
> > From: Xi, Keying [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 13, 2003 12:17 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: URGENT-serialization not working
> > properly with document
> > style
> >
> >
> > Thanks for your reply. The wsdl is generated by
> the
> > java2wsdl tool.
> > The authenticate method I have takes in four
> > parameters. Do u mean that
> > I should have another object that wraps the four
> > parameters?
> >
> > -----Original Message-----
> > From: Sanjay Krishnamurthi
> > [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 13, 2003 11:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: URGENT-serialization not working
> > properly with document
> > style
> >
> >
> >
> > The way your WSDL is constructed, it looks to me
> as
> > if your SOAP body would have four child elements.
> I
> > believe that Axis has a problem dealing with it.
> > Such
> > usage is also discouraged by WS-I. I would suggest
> > restructuring your
> > WSDL.
> >
> > Sanjay
> >
> > --- "Xi, Keying" <[EMAIL PROTECTED]> wrote:
> > > I am using the ServiceLocator generated by Axis
> to
> > > invoke the service. Using tcpmon, I can see the
> > > request going out has all the parameters I set.
> I
> > > then put in some debug statements in my
> > > Implementation class to print out all the
> > parameters
> > > passed in. I found out only the first parameter
> > has
> > > value, the rest three are just null.
> > >
> > >
> > > -----Original Message-----
> > > From: Mike Perham
> > [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, August 13, 2003 10:04 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: URGENT-serialization not working
> > > properly with document style
> > >
> > >
> > > The SOAP messages would be helpful. How are you
> > > invoking the service? I've found a bug in Axis
> if
> > > you are using literal and the
> Service.getPort(URL,
> > > Class) method to invoke it.
> > >
> > > -----Original Message-----
> > > From: Xi, Keying
> [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, August 13, 2003 8:43 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: URGENT-serialization not working
> properly
> > > with document style
> > >
> > >
> > >
> > > Hi all,
> > > I have a document style web service. I used
> > > wsdl2java and java2wsdl tools and the service is
> > > deployed OK. The service only has one method
> that
> > > takes four parameters.
> > >
> > > But when I call the service, it didn't work. I
> > found
> > > out that only the first parameter is
> deserialized
> > by
> > > looking at the log. It really baffled me. Is
> > there
> > > anything wrong with my wsdl?
> > >
> > > Has anyone had that happen before? Here is my
> > wsdl:
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <wsdl:definitions targetNamespace="
> > > http://companya.com xmlns="<
> > > http://schemas.xmlsoap.org/wsdl/>"
> > > xmlns:apachesoap="<
> > http://xml.apache.org/xml-soap>"
> > > xmlns:impl="< http://companya.com>" xmlns:intf="
> > > http://companya.com" xmlns:soapenc="<
> > > http://schemas.xmlsoap.org/soap/encoding/>"
> > > xmlns:wsdl="< http://schemas.xmlsoap.org/wsdl/>"
> > > xmlns:wsdlsoap="<
> > > http://schemas.xmlsoap.org/wsdl/soap/>"
> > xmlns:xsd="<
> > > http://www.w3.org/2001/XMLSchema>">
> > > <wsdl:types>
> > > <schema targetNamespace=" http://companya.com"
> > > xmlns="< http://www.w3.org/2001/XMLSchema>">
> > > <element name="in0" type="xsd:string"/>
> > > <element name="in1" type="xsd:string"/>
> > > <element name="in2" type="xsd:string"/>
> > > <element name="in3" type="xsd:string"/>
> > > <complexType name="ErrorMessage">
> > > <sequence>
> > > <element name="errorText" nillable="true"
> > > type="xsd:string"/>
> > > <element name="errorCode" nillable="true"
> > > type="xsd:string"/>
> > > </sequence>
> > > </complexType>
> > > <complexType name="ArrayOfErrorMessage">
> > > <complexContent>
> > > <restriction base="soapenc:Array">
> > > <attribute ref="soapenc:arrayType"
> > > wsdl:arrayType="impl:ErrorMessage[]"/>
> > > </restriction>
> > > </complexContent>
> > > </complexType>
> > > <complexType name="User">
> > > <sequence>
> > > <element name="id" nillable="true"
> > > type="xsd:string"/>
> > > <element name="errors" nillable="true"
> > > type="impl:ArrayOfErrorMessage"/>
> > > </sequence>
> > > </complexType>
> > > <element name="authenticateReturn"
> > > type="impl:User"/>
> > > </schema>
> > > </wsdl:types>
> > > <wsdl:message name="authenticateRequest">
> > > <wsdl:part element="intf:in0" name="in0"/>
> > > <wsdl:part element="intf:in1" name="in1"/>
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
This e-mail and any attachment is for authorised use by the intended recipient(s)
only. It may contain proprietary material, confidential information and/or be subject
to legal privilege. It should not be copied, disclosed to, retained or used by, any
other party. If you are not an intended recipient then please promptly delete this
e-mail and any attachment and all copies and inform the sender. Thank you.