axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sreenidhi N K" <sreeni...@aztecsoft.com>
Subject RE: Axis client for document/literal or Wrapped service not working when trying to pass complex object as parameter
Date Fri, 24 Feb 2006 14:18:24 GMT

Thanks Anne for the clarification.
I want it to work in the WRAPPED style, and  call the service service.registerMember(member,mailing,nonMailing,channel)
When I do it, I get the exception
"org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize"

What would be the reason for this exception?
I attach my WSDL, WSDD, SOAP message (request) again.

Regards
Sreenidhi

 -----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com]
Sent: Friday, February 24, 2006 7:18 PM
To: axis-user@ws.apache.org
Subject: Re: Axis client for document/literal or Wrapped service not working when trying to
pass complex object as parameter



If you want to use a wrapper bean, then you should use DOCUMENT style rather than WRAPPED
style.

With WRAPPED style, Axis will generate a service interface that looks like an RPC interface,
accepting individual parameters:


service.registerMember(member,mailing,nonMailing,channel)

With DOCUMENT style, Axis will generate a service interface that accepts a bean rather than
the individual parameters:


service.registerMember(registerMember)

Anne


On 2/24/06, Sreenidhi N K < sreenidhi@aztecsoft.com> wrote:

Hi,

A follow up to my previous post.

These are the steps I followed
1. Write the web service implementation
2. Deploy the web app, that include axis & the new service
3. Deploy the Web Service (Wrapped  style) using the WSDD
4. Access the WSDL generated by Axis http://localhost:8080/lms/services/MemberService?wsdl)
5. Use WSDL2Java to generate client side code
6. Write the client using the code generated in step5.

The client side code looks similar to RPC style client that works without any issue.

            MemberVO member=populateMemberVO();
            AddressVO mailing=populateMailingAddressVO();
            AddressVO nonMailing=populateNonMailingAddressVO();
            ChannelVO channel=populateChannelVO();

            MemberServiceServiceLocator locator=new MemberServiceServiceLocator();
            MemberService service= locator.getMemberService();
            service.registerMember(member,mailing,nonMailing,channel);

Client throws the exception


"org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize"

What I understood was that in Wrapped style, the parameters need to be wrapped in a javabean
having the same name as the operation.
A javabean would be generated with the name, RegisterMember (which is the wrapper element
& operation name)
RegisterMember reg=new RegisterMember(member,mailing,nonMailing,channel);
Then call the service using this single parameter like  service.registerMember(reg);
But the generated code does not include this wrapper element & it supports only service.registerMember(member,mailing,nonMailing,channel)
syntax.
If I use the -W switch in WSDL2Java, it creates the wrapper element & supports passing
single wrapped parameter to operation.
Still it throws the same exception.

It would be great if Anne or somebody else could help me solve the problem. WSDL & SOAP
message were attached to my previoud email.

Regards,
Sree


-----Original Message-----
From: Sreenidhi N K [mailto: sreenidhi@aztecsoft.com]
Sent: Thursday, February 23, 2006 3:00 PM
To: axis-user@ws.apache.org

Subject: RE: Axis client for document/literal or Wrapped service not working when trying to
pass complex object as parameter



Hi Anne,
I attach the WSDL, SOAP message and WSDD and the java client. The classes used in the client
code was generated with the following command:
java org.apache.axis.wsdl.WSDL2Java http://localhost:8080/lms/services/MemberService?wsdl
 <http://localhost:8080/lms/services/MemberService?wsdl>

Repeating a question I asked in my previous post:

Where can I find a complete example(with source code) of passing JavaBeans to a Wrapped service
in Axis.


Regards,
Sreenidhi




-----Original Message-----
From: Anne Thomas Manes [mailto: atmanes@gmail.com]
Sent: Wednesday, February 22, 2006 8:10 PM
To: axis-user@ws.apache.org
Subject: Re: Axis client for document/literal or Wrapped service not working when trying to
pass complex object as parameter


Please get a trace of the SOAP message causing the error.
And please include both the SOAP message and the WSDL file as attachments to your email rather
than pasting them into the message.

Thanks,
Anne


On 2/22/06, Sreenidhi N K < sreenidhi@aztecsoft.com> wrote:


Anne, thanks for the response.
As you have noted, the WSDL I attached in my first message was document/literal style. I changed
to wrapped style and still it did not work. That's when I posted my previous message that
showed only some excerpts from WSDL (wrapped). It does include the following selection

   <wsdl:message name="registerMemberRequest">
      <wsdl:part element="tns1:registerMember" name="parameters"/>
   </wsdl:message>
Sorry for the confusion.
I have attached the whole WSDL(wrapped style)  at the end of this message. 
Still I get the following exception.
org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize.
Please help to figure out what's going wrong.


I did not write the WSDL by hand. I used the WSDL generated by Axis through the url   http://localhost:8080/lms/services/MemberService?wsdl...

WSDD file I used  to deploy the service
-----------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<deployment xmlns=" http://xml.apache.org/axis/wsdd/  <http://xml.apache.org/axis/wsdd/>
"

xmlns:java=" http://xml.apache.org/axis/wsdd/providers/java  <http://xml.apache.org/axis/wsdd/providers/java>
">

<service name="MemberService" provider="java:RPC" style="wrapped" usage="literal">

<parameter name="className" value="org.lms.webservices.MemberService"/>

<parameter name="allowedMethods" value="*"/>

</service>

<beanMapping languageSpecificType="java:org.lms.core.member.ui.MemberVO"

qname="ns1:MemberVO" xmlns:ns1="urn:MemberService"/>

<beanMapping languageSpecificType="java:org.lms.core.member.ui.AddressVO"

qname="ns1:AddressVO" xmlns:ns1="urn:MemberService"/>

<beanMapping languageSpecificType="java:org.lms.core.member.ui.ChannelVO"

qname="ns1:ChannelVO" xmlns:ns1="urn:MemberService"/>

<beanMapping languageSpecificType="java:org.lms.core.member.ui.ChannelVO"

qname="ns1:ChannelVO" xmlns:ns1="urn:MemberService"/>

</deployment>

WSDL Generated by Axis for the service.
-----------------------------------------------------------


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace=" http://localhost:8080/lms/services/MemberService  <http://localhost:8080/lms/services/MemberService>
" xmlns:apachesoap=" http://xml.apache.org/xml-soap" xmlns:impl="  <http://localhost:8080/lms/services/MemberService>
http://localhost:8080/lms/services/MemberService" xmlns:intf=" http://localhost:8080/lms/services/MemberService"
xmlns:tns1=" http://webservices.lms.org" xmlns:tns2="  <http://ui.member.core.lms.org>
http://ui.member.core.lms.org" xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="  <http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified" targetNamespace=" http://webservices.lms.org"
xmlns=" http://www.w3.org/2001/XMLSchema">
   <import namespace="http://ui.member.core.lms.org"/>
   <element name="getMember">
    <complexType>
     <sequence>
      <element name="in0" type="xsd:int"/>
     </sequence>
    </complexType>
   </element>
   <element name="getMemberResponse">
    <complexType>
     <sequence>
      <element name="getMemberReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="registerMember">
    <complexType>
     <sequence>
      <element name="in0" type="tns2:MemberVO"/>
      <element name="in1" type="tns2:AddressVO"/>
      <element name="in2" type="tns2:AddressVO"/>
      <element name="in3" type="tns2:ChannelVO"/>
     </sequence>
    </complexType>
   </element>
   <element name="registerMemberResponse">
    <complexType/>
   </element>

  </schema>
  <schema elementFormDefault="qualified" targetNamespace=" http://ui.member.core.lms.org"
xmlns=" http://www.w3.org/2001/XMLSchema">
   <complexType name="MemberVO">
    <sequence>
     <element name="accountNo" nillable="true" type="xsd:string"/>
     <element name="activeStatus" nillable="true" type="xsd:string"/>
     <element name="actualDob" nillable="true" type="xsd:string"/>
     <element name="actualDummyValue" nillable="true" type="xsd:string"/>
     <element name="actualFirstName" nillable="true" type="xsd:string"/>
     <element name="actualLastName" nillable="true" type="xsd:string"/>
     <element name="actualPhyCardTypeValue" nillable="true" type="xsd:string"/>
     <element name="address1" nillable="true" type="xsd:string"/>
     <element name="address2" nillable="true" type="xsd:string"/>
     <element name="altEmail" nillable="true" type="xsd:string"/>
     <element name="anniversaryDate" nillable="true" type="xsd:string"/>
     <element name="annualIncome" nillable="true" type="xsd:string"/>
     <element name="birthDate" nillable="true" type="xsd:string"/>
     <element name="cancelFlag" nillable="true" type="xsd:string"/>
     <element name="cardAccountId" nillable="true" type="xsd:string"/>
     <element name="cardDisableId" nillable="true" type="xsd:string"/>
     <element name="cardDisableRemarks" nillable="true" type="xsd:string"/>
     <element name="cardDisabledDate" nillable="true" type="xsd:string"/>
     <element name="cardState" nillable="true" type="xsd:string"/>
     <element name="cardValidFrom" nillable="true" type="xsd:string"/>
     <element name="cardValidTo" nillable="true" type="xsd:string"/>
     <element name="checkValue" nillable="true" type="xsd:string"/>
     <element name="citizenship1" nillable="true" type="xsd:string"/>
     <element name="citizenship2" nillable="true" type="xsd:string"/>
     <element name="city" nillable="true" type="xsd:string"/>
     <element name="creditCardNo" nillable="true" type="xsd:string"/>
     <element name="demographicsUpdatedDate" nillable="true" type="xsd:string"/>
     <element name="disableFlag" nillable="true" type="xsd:string"/>
     <element name="disableStatus" nillable="true" type="xsd:string"/>
     <element name="education" nillable="true" type="xsd:string"/>
     <element name="email" nillable="true" type="xsd:string"/>
     <element name="employmentStatus" nillable="true" type="xsd:string"/>
     <element name="enrolSource" nillable="true" type="xsd:string"/>
     <element name="feePaid" nillable="true" type="xsd:string"/>
     <element name="feePaymentDate" nillable="true" type="xsd:string"/>
     <element name="firstName" nillable="true" type="xsd:string"/>
     <element name="flagType" nillable="true" type="xsd:string"/>
     <element name="fullName" nillable="true" type="xsd:string"/>
     <element name="gender" nillable="true" type="xsd:string"/>
     <element name="generateCard" nillable="true" type="xsd:string"/>
     <element name="globalParam" nillable="true" type="xsd:string"/>
     <element name="groupType" nillable="true" type="xsd:string"/>
     <element name="groupTypeId" nillable="true" type="xsd:string"/>
     <element name="identificationNumber" nillable="true" type="xsd:string"/>
     <element name="identificationType" nillable="true" type="xsd:string"/>
     <element name="isCardCancelled" nillable="true" type="xsd:string"/>
     <element name="isCardDisabled" nillable="true" type="xsd:string"/>
     <element name="isCardShred" nillable="true" type="xsd:string"/>
     <element name="isDeleted" nillable="true" type="xsd:string"/>
     <element name="isDummyMember" nillable="true" type="xsd:string"/>
     <element name="isMemberDeleted" nillable="true" type="xsd:string"/>
     <element name="isMemberDisabled" nillable="true" type="xsd:string"/>
     <element name="isMemberSigned" nillable="true" type="xsd:string"/>
     <element name="lastName" nillable="true" type="xsd:string"/>
     <element name="loyCardNumber" nillable="true" type="xsd:string"/>
     <element name="loyCardType" nillable="true" type="xsd:string"/>
     <element name="maritalStatus" nillable="true" type="xsd:string"/>
     <element name="memberCardTypeDesc" nillable="true" type="xsd:string"/>
     <element name="memberCardTypeId" nillable="true" type="xsd:string"/>
     <element name="memberClass" nillable="true" type="xsd:string"/>
     <element name="memberClassId" nillable="true" type="xsd:string"/>
     <element name="memberDeleteRemarks" nillable="true" type="xsd:string"/>
     <element name="memberDeletedOn" nillable="true" type="xsd:string"/>
     <element name="memberFeeSlabId" nillable="true" type="xsd:string"/>
     <element name="memberFeeSlabName" nillable="true" type="xsd:string"/>
     <element name="memberFeeTypeId" nillable="true" type="xsd:string"/>
     <element name="memberFeeTypeName" nillable="true" type="xsd:string"/>
     <element name="memberId" nillable="true" type="xsd:string"/>
     <element name="memberName" nillable="true" type="xsd:string"/>
     <element name="memberStatus" nillable="true" type="xsd:string"/>
     <element name="middleName" nillable="true" type="xsd:string"/>
     <element name="mobileNo" nillable="true" type="xsd:string"/>
     <element name="nameDobFlag" type="xsd:boolean"/>
     <element name="nationality" nillable="true" type="xsd:string"/>
     <element name="nominee" nillable="true" type="xsd:string"/>
     <element name="nomineeRelation" nillable="true" type="xsd:string"/>
     <element name="occupationIndustry" nillable="true" type="xsd:string"/>
     <element name="occupationIndustryId" nillable="true" type="xsd:string"/>
     <element name="occupationType" nillable="true" type="xsd:string"/>
     <element name="occupationTypeId" nillable="true" type="xsd:string"/>
     <element name="pageNo" nillable="true" type="xsd:string"/>
     <element name="pageSize" nillable="true" type="xsd:string"/>
     <element name="parentCardNumber" nillable="true" type="xsd:string"/>
     <element name="parentMemberId" nillable="true" type="xsd:string"/>
     <element name="parentName" nillable="true" type="xsd:string"/>
     <element name="passportNo" nillable="true" type="xsd:string"/>
     <element name="phoneNo" nillable="true" type="xsd:string"/>
     <element name="phoneZipFlag" type="xsd:boolean"/>
     <element name="phyCardTypeValue" nillable="true" type="xsd:string"/>
     <element name="physicalCardType" nillable="true" type="xsd:string"/>
     <element name="physicalCardTypeId" nillable="true" type="xsd:string"/>
     <element name="primaryAddon" nillable="true" type="xsd:string"/>
     <element name="promotionalDesc" nillable="true" type="xsd:string"/>
     <element name="promotionalId" nillable="true" type="xsd:string"/>

     <element name="qualification" nillable="true" type="xsd:string"/>
     <element name="qualificationId" nillable="true" type="xsd:string"/>
     <element name="referenceCode" nillable="true" type="xsd:string"/>
     <element name="residentialStatus" nillable="true" type="xsd:string"/>
     <element name="residentialType" nillable="true" type="xsd:string"/>
     <element name="salutation" nillable="true" type="xsd:string"/>
     <element name="shredStatus" nillable="true" type="xsd:string"/>
     <element name="shredValue" nillable="true" type="xsd:string"/>
     <element name="signupDate" nillable="true" type="xsd:string"/>
     <element name="signupRemarks" nillable="true" type="xsd:string"/>
     <element name="sourcedAssociationId" nillable="true" type="xsd:string"/>
     <element name="spouseName" nillable="true" type="xsd:string"/>
     <element name="totalCountRequired" nillable="true" type="xsd:string"/>
     <element name="updatedOn" nillable="true" type="xsd:string"/>
     <element name="userId" nillable="true" type="xsd:string"/>
     <element name="zipCode" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="AddressVO">
    <sequence>
     <element name="actualPhone" nillable="true" type="xsd:string"/>
     <element name="actualZip" nillable="true" type="xsd:string"/>
     <element name="addressId" nillable="true" type="xsd:string"/>
     <element name="addressLine1" nillable="true" type="xsd:string"/>
     <element name="addressLine2" nillable="true" type="xsd:string"/>
     <element name="addressLine3" nillable="true" type="xsd:string"/>
     <element name="addressLine4" nillable="true" type="xsd:string"/>
     <element name="addressType" nillable="true" type="xsd:string"/>
     <element name="city" nillable="true" type="xsd:string"/>
     <element name="country" nillable="true" type="xsd:string"/>
     <element name="fax" nillable="true" type="xsd:string"/>
     <element name="flagType" nillable="true" type="xsd:string"/>
     <element name="isMailingAddress" nillable="true" type="xsd:string"/>
     <element name="landMark" nillable="true" type="xsd:string"/>
     <element name="memberId" nillable="true" type="xsd:string"/>
     <element name="nonmailAddressId" nillable="true" type="xsd:string"/>
     <element name="phone" nillable="true" type="xsd:string"/>
     <element name="phone2" nillable="true" type="xsd:string"/>
     <element name="phoneZipFlag" type="xsd:boolean"/>
     <element name="region" nillable="true" type="xsd:string"/>
     <element name="state" nillable="true" type="xsd:string"/>
     <element name="userId" nillable="true" type="xsd:string"/>
     <element name="zipCode" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="ChannelVO">
    <sequence>
     <element name="accountNumber" nillable="true" type="xsd:string"/>
     <element name="associationAccountType" nillable="true" type="xsd:string"/>
     <element name="associationFlag" type="xsd:boolean"/>
     <element name="associationValue" nillable="true" type="xsd:string"/>
     <element name="cardNumber" nillable="true" type="xsd:string"/>
     <element name="cardStatus" nillable="true" type="xsd:string"/>
     <element name="channelId" nillable="true" type="xsd:string"/>
     <element name="channelName" nillable="true" type="xsd:string"/>
     <element name="deletedOn" nillable="true" type="xsd:string"/>
     <element name="deletedRemarks" nillable="true" type="xsd:string"/>
     <element name="disableValue" nillable="true" type="xsd:string"/>
     <element name="disabledOn" nillable="true" type="xsd:string"/>
     <element name="disabledRemarks" nillable="true" type="xsd:string"/>
     <element name="extCustomerId" nillable="true" type="xsd:string"/>
     <element name="externalCustId" nillable="true" type="xsd:string"/>
     <element name="flagType" nillable="true" type="xsd:string"/>
     <element name="isDeleted" nillable="true" type="xsd:string"/>
     <element name="isDisabled" nillable="true" type="xsd:string"/>
     <element name="issuedOn" nillable="true" type="xsd:string"/>
     <element name="memberAssociationId" nillable="true" type="xsd:string"/>
     <element name="memberId" nillable="true" type="xsd:string"/>
     <element name="primaryAddon" nillable="true" type="xsd:string"/>
     <element name="primaryMemUniqueId" nillable="true" type="xsd:string"/>
     <element name="serviceDate" nillable="true" type="xsd:string"/>
     <element name="uniqueId" nillable="true" type="xsd:string"/>
     <element name="userId" nillable="true" type="xsd:string"/>
     <element name="validFrom" nillable="true" type="xsd:string"/>
     <element name="validTo" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="getMemberResponse">

      <wsdl:part element="tns1:getMemberResponse" name="parameters"/>

   </wsdl:message>

   <wsdl:message name="registerMemberResponse">

      <wsdl:part element="tns1:registerMemberResponse" name="parameters"/>
   <wsdl:message name="registerMemberRequest">

      <wsdl:part element="tns1:registerMember" name="parameters"/>

   </wsdl:message>

   </wsdl:message>


   <wsdl:message name="getMemberRequest">

      <wsdl:part element="tns1:getMember" name="parameters"/>

   </wsdl:message>

   <wsdl:portType name="MemberService">

      <wsdl:operation name="getMember">

         <wsdl:input message="impl:getMemberRequest" name="getMemberRequest"/>

         <wsdl:output message="impl:getMemberResponse" name="getMemberResponse"/>

      </wsdl:operation>

      <wsdl:operation name="registerMember">

         <wsdl:input message="impl:registerMemberRequest" name="registerMemberRequest"/>

         <wsdl:output message="impl:registerMemberResponse" name="registerMemberResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="MemberServiceSoapBinding" type="impl:MemberService">

      <wsdlsoap:binding style="document" transport=" http://schemas.xmlsoap.org/soap/http"/
 <http://schemas.xmlsoap.org/soap/http%22/> >

      <wsdl:operation name="getMember">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getMemberRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="getMemberResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="registerMember">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="registerMemberRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="registerMemberResponse">

            <wsdlsoap:body use="literal"/>


         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="MemberServiceService">

      <wsdl:port binding="impl:MemberServiceSoapBinding" name="MemberService">

         <wsdlsoap:address location=" http://localhost:8080/lms/services/MemberService"/
 <http://localhost:8080/lms/services/MemberService%22/> >

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>


Where can I find a complete example of passing JavaBeans to a Wrapped service in Axis. What
I am looking for is a comple package-Service, WSDL and Client.

Regards
Sreenidhi N.K.


-----Original Message-----
From: Anne Thomas Manes [mailto: atmanes@gmail.com]

Sent: Wednesday, February 22, 2006 6:14 PM
To: axis-user@ws.apache.org
Subject: Re: Axis client for document/literal or Wrapped service not working when trying to
pass complex object as parameter


The WSDL you included in your first post does not follow the wrapped convention. It includes
the following message description:


 <http://localhost:8080/lms/services/MemberService?wsdl#> <wsdl:message name="registerMemberRequest
">
  <wsdl:part element=" tns1:in1" name="in0" />
  <wsdl:part element="tns1:in2 " name="in1" />
  <wsdl:part element=" tns1:in3 " name="in2" />
  < wsdl:part element ="tns1:in4" name="in3" />
</wsdl:message >

You must convert this to:


<wsdl:message name="registerMemberRequest">
    <wsdl:part name="parameters" element="tns1:registerMember"/>
</wsdl:message>


Anne



On 2/22/06, Sreenidhi N K < sreenidhi@aztecsoft.com> wrote:



Thanks Anne for the quick response.

I had gone through numerous resources on the Internet (including your blogs) to learn Axis
document/literal and wrapped styles. I deployed the service as a wrapped service(WSDL attached
below). My operation name is 'registerMember' and the tool generated a wrapper complex element
with the name registerMember.
 <element name="registerMember">
    <complexType>
     <sequence>
      <element name="in0" type="tns2:MemberVO"/>
      <element name="in1" type="tns2:AddressVO"/>
      <element name="in2" type="tns2:AddressVO"/>
      <element name="in3" type="tns2:ChannelVO"/>
     </sequence>
    </complexType>
   </element>

I generated client side code using WSDL2Java. It provided me with a locator class that I used
to get hold of the service. Then I called the operation from the service method.
My client code looks like the following
            MemberVO member=populateMemberVO();
            AddressVO mailing=populateMailingAddressVO();
            AddressVO nonMailing=populateNonMailingAddressVO();
            ChannelVO channel=populateChannelVO();

            MemberServiceServiceLocator locator=new MemberServiceServiceLocator();
            MemberService service= locator.getMemberService();
            service.registerMember(member,mailing,nonMailing,channel);

This throws the exception

"org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize"

Do I need to do something special with WSDL2Java to let it know that the WSDL is that of a
"Wrapped" service? From WSDL documentation I see that
 -W, --noWrapped  --->     turn off support for "wrapped" document/literal.
Since my service is Wrapped I hope I do not need to specify this command line switch.
Please help me identify where I am going wrong

Regards
Sreenidhi N.K.




-----Original Message-----
From: Anne Thomas Manes [mailto: atmanes@gmail.com]
Sent: Tuesday, February 21, 2006 7:22 PM
To: axis-user@ws.apache.org
Subject: Re: Axis client for document/literal or Wrapped service not working when trying to
pass complex object as parameter


When using document/literal, your messages may have at most one message part. The whole idea
behind *document* style is that you are sending a *document*, not a set of parameters.

The wrapped style is a WSDL convention that allows you to design a document style message,
but to produce a Java interface that accepts parameters. It requires that you define a "wrapper"
element for your parameters. Your message part must reference this wrapper element.

See my blog entry on the wrapped style for more information:
http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html  <http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html>

Anne




On 2/21/06, Sreenidhi N K <  <mailto:sreenidhi@aztecsoft.com> sreenidhi@aztecsoft.com>
wrote:

Hi,




I have an Axis 1.3  web service with the operation name registerMember(..) that takes four
complex objects as parameters. When the service is deployed as RPC style, the client works
perfectly. When style/usage is document/literal or wrapped I get the following exception.

org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize

I have another operation that takes one String parameter & the client is able to call
it.
Does this means that I can not use document/literal or Wrapped clients passing complex objects
using Axis? I generated the client side artifacts using WSDL2JAVA.
I came across a blog http://www.jroller.com/page/aananiev?entry=hurdles_with_document_style_web
 <http://www.jroller.com/page/aananiev?entry=hurdles_with_document_style_web>  that
says that document/literal does not work with axis.

My WSDL file is attached below.

  <?xml version="1.0" encoding="UTF-8" ?>



 <http://localhost:8080/lms/services/MemberService?wsdl#> - <wsdl:definitions targetNamespace="
http://localhost:8080/lms/services/MemberService" xmlns:apachesoap=" http://xml.apache.org/xml-soap
 <http://xml.apache.org/xml-soap> " xmlns:impl="  <http://localhost:8080/lms/services/MemberService>
http://localhost:8080/lms/services/MemberService" xmlns:intf="  <http://localhost:8080/lms/services/MemberService>
http://localhost:8080/lms/services/MemberService" xmlns:tns1="  <http://webservices.lms.org>
http://webservices.lms.org " xmlns:tns2="  <http://ui.member.core.lms.org> http://ui.member.core.lms.org
" xmlns:wsdl="  <http://schemas.xmlsoap.org/wsdl/> http://schemas.xmlsoap.org/wsdl/
" xmlns:wsdlsoap="  <http://schemas.xmlsoap.org/wsdl/soap/> http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="  <http://www.w3.org/2001/XMLSchema> http://www.w3.org/2001/XMLSchema ">



 <http://localhost:8080/lms/services/MemberService?wsdl#> - <!--
WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)
  -->
 <http://localhost:8080/lms/services/MemberService?wsdl#> - <wsdl:types>



 <http://localhost:8080/lms/services/MemberService?wsdl#> - <schema elementFormDefault="qualified
" targetNamespace=" http://webservices.lms.org  <http://webservices.lms.org> " xmlns="
 <http://www.w3.org/2001/XMLSchema> http://www.w3.org/2001/XMLSchema ">
  < import namespace="  <http://ui.member.core.lms.org> http://ui.member.core.lms.org"
/>
  < element name="in0" type="xsd:int" />
  < element name="in1" type="tns2:MemberVO" />
  < element name="in2" type="tns2:AddressVO" />
  < element name="in3" type="tns2:AddressVO" />
  < element name="in4" type="tns2:ChannelVO" />
  </schema >
 <http://localhost:8080/lms/services/MemberService?wsdl#> - <schema elementFormDefault="qualified
" targetNamespace="  <http://localhost:8080/lms/services/MemberService> http://localhost:8080/lms/services/MemberService
" xmlns="  <http://www.w3.org/2001/XMLSchema> http://www.w3.org/2001/XMLSchema ">
  < import namespace="  <http://ui.member.core.lms.org> http://ui.member.core.lms.org"
/>
  < element name="getMemberReturn" type="xsd:string" />
  </schema >



 <http://localhost:8080/lms/services/MemberService?wsdl#> - <schema elementFormDefault="qualified
" targetNamespace=" http://ui.member.core.lms.org  <http://ui.member.core.lms.org> "
xmlns="  <http://www.w3.org/2001/XMLSchema> http://www.w3.org/2001/XMLSchema ">
 <http://localhost:8080/lms/services/MemberService?wsdl#> - <complexType name="MemberVO
">
 <http://localhost:8080/lms/services/MemberService?wsdl#> - <sequence>



  < element name="accountNo" nillable="true" type="xsd:string" />
  < element name="activeStatus" nillable="true" type="xsd:string" />
  < element name="actualDob" nillable="true" type="xsd:string" />
  < element name="actualDummyValue" nillable="true" type="xsd:string" />
  < element name="actualFirstName" nillable="true" type="xsd:string" />
  < element name="actualLastName" nillable="true" type="xsd:string" />
  < element name="actualPhyCardTypeValue" nillable="true" type="xsd:string" />
  < element name="address1" nillable="true" type="xsd:string" />
  < element name="address2" nillable="true" type="xsd:string" />
  < element name="altEmail" nillable="true" type="xsd:string" />
  < element name="anniversaryDate" nillable="true" type="xsd:string" />
  < element name="annualIncome" nillable="true" type="xsd:string" />
  < element name="birthDate" nillable="true" type="xsd:string" />
  < element name="cancelFlag" nillable="true" type="xsd:string" />
  < element name="cardAccountId" nillable="true" type="xsd:string" />
  < element name="cardDisableId" nillable="true" type="xsd:string" />
  < element name="cardDisableRemarks" nillable="true" type="xsd:string" />
  < element name="cardDisabledDate" nillable="true" type="xsd:string" />
  < element name="cardState" nillable="true" type="xsd:string" />
  < element name="cardValidFrom" nillable="true" type="xsd:string" />
  < element name="cardValidTo" nillable="true" type="xsd:string" />
  < element name="checkValue" nillable="true" type="xsd:string" /> </FONT

...

[Message clipped] 






**********************************************************

The information contained in, or attached to, this e-mail, contains confidential information
and is intended solely for the use of the individual or entity to whom they are addressed
and is subject to legal privilege. If you have received this e-mail in error you should notify
the sender immediately by reply e-mail, delete the message from your system and notify your
system manager. Please do not copy it for any purpose, or disclose its contents to any other
person. The views or opinions presented in this e-mail are solely those of the author and
do not necessarily represent those of the company. The recipient should check this e-mail
and any attachments for the presence of viruses. The company accepts no liability for any
damage caused, directly or indirectly, by any virus transmitted in this email

************************************************************
Mime
View raw message