You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anne Thomas Manes <at...@gmail.com> on 2006/02/21 14:52:08 UTC

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

Anne

On 2/21/06, Sreenidhi N K <sr...@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 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*" xmlns:impl="*
> 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*"xmlns:wsdl
> ="*http://schemas.xmlsoap.org/wsdl/*" xmlns:wsdlsoap="*
> http://schemas.xmlsoap.org/wsdl/soap/*" xmlns:xsd="*
> 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#> <schemaelementFormDefault
> ="*qualified*" targetNamespace="*http://webservices.lms.org*" xmlns="*
> http://www.w3.org/2001/XMLSchema*">
>  * * <import namespace="*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#> <schemaelementFormDefault
> ="*qualified*" targetNamespace="*
> http://localhost:8080/lms/services/MemberService*" xmlns="*
> http://www.w3.org/2001/XMLSchema*">
>  * * <import namespace="*http://ui.member.core.lms.org*" />
>  * * <element name="*getMemberReturn*" type="*xsd:string*" />
> * * </schema>
>  *-* <http://localhost:8080/lms/services/MemberService?wsdl#> <schemaelementFormDefault
> ="*qualified*" targetNamespace="*http://ui.member.core.lms.org*" xmlns="*
> http://www.w3.org/2001/XMLSchema*">
>  *-* <http://localhost:8080/lms/services/MemberService?wsdl#> <complexTypename
> ="*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*" />
>  * * <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<FONT color=#0000f
> ...
>
> [Message clipped]