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 Angus Ng <an...@gw.com.au> on 2007/08/10 06:44:59 UTC
ADBException: Unexpected subelement customerRequest
Hi,
I got an error when I try to test my webservice using Axis2 1.3
nightly build of 9 Aug 2007. I am using ADB as my binding strategy.
And I create a sample soap message and use soapUI to fire on the
webservice. I got the error as follow:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>org.apache.axis2.databinding.ADBException:
Unexpected subelement customerRequest</faultstring>
<detail>
<Exception>org.apache.axis2.AxisFault:
org.apache.axis2.databinding.ADBException: Unexpected subelement
customerRequest
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM
(CertificateCallMessageReceiverInOut.java:193)
at
landata.service.adb.CertificateCallMessageReceiverInOut.invokeBusinessLo
gic(CertificateCallMessageReceiverInOut.java:44)
at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine
ssLogic(AbstractInOutSyncMessageReceiver.java:42)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive
(AbstractMessageReceiver.java:96)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
t(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost
(AxisServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at
net.sf.springlayout.web.filter.LocalApplicationContext.doFilterInternal(
LocalApplicationContext.java:57)
at org.springframework.web.filter.OncePerRequestFilter.doFilter
(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFil
terInternal(OpenSessionInViewFilter.java:173)
at org.springframework.web.filter.OncePerRequestFilter.doFilter
(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter
(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke
(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter
(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter
(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter
(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter
(AbstractProcessingFilter.java:217)
at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter
(LogoutFilter.java:106)
at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter
(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter
(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter
(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:174)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.Exception:
org.apache.axis2.databinding.ADBException: Unexpected subelement
customerRequest
at
au.gov.vic.landata.www.certificaterequestresponse.CertificateRequest
$Factory.parse(CertificateRequest.java:440)
at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM
(CertificateCallMessageReceiverInOut.java:175)
... 52 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected
subelement customerRequest
at
au.gov.vic.landata.www.certificaterequestresponse.CertificateRequest
$Factory.parse(CertificateRequest.java:436)
... 53 more</Exception>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
And here is my sample soap message:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CertificateRequest xmlns="http://Portal1.landata.vic.gov.au/
CustodianWebservices/1.20/CertificateCall">
<customerRequest><?xml version='1.0' encoding='UTF-8'?>
<CustomerRequest>
<AgentReference>816377-017-4</AgentReference>
<Agent>LANDATA</Agent>
<MessageType>REQ</MessageType>
<CustomerReference>123456</CustomerReference>
<PropertyPfi>1033433</PropertyPfi>
<Parcels>
<Parcel>
<ParcelPfi></ParcelPfi>
<SPI></SPI>
<LotPlan>
<Lots>1</Lots>
<PlanNumber>TP422266</PlanNumber>
<Section></Section>
<Block></Block>
<ViewPlanLink></ViewPlanLink>
</LotPlan>
<CrownAllotment>
<Section></Section>
<Block></Block>
<Allotment></Allotment>
<Portion></Portion>
<SubDivision></SubDivision>
<ParishDescription></ParishDescription>
</CrownAllotment>
<Area></Area>
<Entitlement></Entitlement>
</Parcel>
</Parcels>
<SettlementDate></SettlementDate>
<CommonPropertyIndicator>N</CommonPropertyIndicator>
<PropertyAddress>
<DisplayAddress>
<StreetLocation>17</StreetLocation>
<StreetName>TAYLOR STREET</StreetName>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</DisplayAddress>
<ParsedAddress>
<UnitType></UnitType>
<UnitNumber1></UnitNumber1>
<UnitNumber2></UnitNumber2>
<FloorType></FloorType>
<FloorNumber></FloorNumber>
<PropertyName1></PropertyName1>
<PropertyName2></PropertyName2>
<LocationDescriptor></LocationDescriptor>
<StreetNumber1>17</StreetNumber1>
<StreetNumber2></StreetNumber2>
<Street>TAYLOR</Street>
<StreetType>STREET</StreetType>
<StreetSuffix></StreetSuffix>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</ParsedAddress>
</PropertyAddress>
<AlternateAddresses>
<AlternateAddress></AlternateAddress>
</AlternateAddresses>
<Municipality>CITY OF YARRA</Municipality>
<Parish>JIKA JIKA</Parish>
<Titles>
<Title>
<VolumeFolio>3870/993</VolumeFolio>
<ViewTitleLink></ViewTitleLink>
</Title>
</Titles>
<CustodianIdentifiers>
<CustodianIdentifier name="CITY OF YARRA" type="CPN">
236755</CustodianIdentifier>
</CustodianIdentifiers>
<BookMemorials>
<BookMemorial>
<Book></Book>
<Memorial></Memorial>
</BookMemorial>
</BookMemorials>
<MapReferences>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>A9</MapGrid>
</MapReference>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>B9</MapGrid>
</MapReference>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>A10</MapGrid>
</MapReference>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>B10</MapGrid>
</MapReference>
</MapReferences>
<RelatedProperties>
<RelatedProperty>
<Titles>
<Title>
<VolumeFolio></VolumeFolio>
<ViewTitleLink></ViewTitleLink>
</Title>
</Titles>
<Parcels>
<Parcel>
<ParcelPfi></ParcelPfi>
<SPI></SPI>
<LotPlan>
<Lots>1</Lots>
<PlanNumber>TP422266</PlanNumber>
<Section></Section>
<Block></Block>
<ViewPlanLink></ViewPlanLink>
</LotPlan>
<CrownAllotment>
<Section></Section>
<Block></Block>
<Allotment></Allotment>
<Portion></Portion>
<SubDivision></SubDivision>
<ParishDescription></ParishDescription>
</CrownAllotment>
<Area></Area>
<Entitlement></Entitlement>
</Parcel>
</Parcels>
<PropertyAddress>
<DisplayAddress>
<StreetLocation>17</StreetLocation>
<StreetName>TAYLOR STREET</StreetName>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</DisplayAddress>
<ParsedAddress>
<UnitType></UnitType>
<UnitNumber1></UnitNumber1>
<UnitNumber2></UnitNumber2>
<FloorType></FloorType>
<FloorNumber></FloorNumber>
<PropertyName1></PropertyName1>
<PropertyName2></PropertyName2>
<LocationDescriptor></LocationDescriptor>
<StreetNumber1>17</StreetNumber1>
<StreetNumber2></StreetNumber2>
<Street>TAYLOR</Street>
<StreetType>STREET</StreetType>
<StreetSuffix></StreetSuffix>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</ParsedAddress>
</PropertyAddress>
<BookMemorials>
<BookMemorial>
<Book></Book>
<Memorial></Memorial>
</BookMemorial>
</BookMemorials>
</RelatedProperty>
</RelatedProperties>
<Vendors>
<Vendor>
<Name></Name>
<Address1></Address1>
<Address2></Address2>
<Country></Country>
<DX></DX>
</Vendor>
</Vendors>
<Purchasers>
<Purchaser>
<Name></Name>
<Address1></Address1>
<Address2></Address2>
<Country></Country>
<DX></DX>
</Purchaser>
</Purchasers>
<BodyCorporateManager>
<Name></Name>
<Address1></Address1>
<Address2></Address2>
<Country></Country>
<DX></DX>
</BodyCorporateManager>
<ReadingDate></ReadingDate>
<ExtraInformation></ExtraInformation>
<ApplicantDetails>
<Name>Groupware -Testing WebService C/- LANDATA</
Name>
<Address1>Level 14, 570 Bourke Street</Address1>
<Address2>Melbourne</Address2>
<Country>Australia</Country>
<Phone>8636 2456</Phone>
<DX></DX>
<Fax></Fax>
<Email>test_certificates@landata.vic.gov.au</Email>
<PreferredDeliveryMethod>Email</
PreferredDeliveryMethod>
</ApplicantDetails>
<ApplicationReason></ApplicationReason>
<CertificateName code="42">Planning Certificate
Express</CertificateName>
<TimeStamp>2007-03-23T09:42:50</TimeStamp>
</CustomerRequest>
</customerRequest>
</CertificateRequest>
</soap:Body>
</soap:Envelope>
And here is my WSDL:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://
portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://
schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://
schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://
portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/
wsdl/">Custodian Certificate</wsdl:documentation>
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://
portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices">
<s:element name="CertificateRequest">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="customerRequest" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CertificateRequestResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1"
name="CertificateRequestResult" type="s:int" />
<s:element minOccurs="0" maxOccurs="1"
name="custodianResponse" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="exception"
type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded"
name="string" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="CertificateStatus">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="customerRequest" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CertificateStatusResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1"
name="CertificateStatusResult" type="s:int" />
<s:element minOccurs="0" maxOccurs="1"
name="custodianResponse" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="exception"
type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="CertificateRequestSoapIn">
<wsdl:part name="parameters" element="tns:CertificateRequest" />
</wsdl:message>
<wsdl:message name="CertificateRequestSoapOut">
<wsdl:part name="parameters"
element="tns:CertificateRequestResponse" />
</wsdl:message>
<wsdl:message name="CertificateStatusSoapIn">
<wsdl:part name="parameters" element="tns:CertificateStatus" />
</wsdl:message>
<wsdl:message name="CertificateStatusSoapOut">
<wsdl:part name="parameters"
element="tns:CertificateStatusResponse" />
</wsdl:message>
<wsdl:portType name="CertificateCall_1.20">
<wsdl:operation name="CertificateRequest">
<wsdl:input message="tns:CertificateRequestSoapIn" />
<wsdl:output message="tns:CertificateRequestSoapOut" />
</wsdl:operation>
<wsdl:operation name="CertificateStatus">
<wsdl:input message="tns:CertificateStatusSoapIn" />
<wsdl:output message="tns:CertificateStatusSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CertificateCall_1.20"
type="tns:CertificateCall_1.20">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="CertificateRequest">
<soap:operation soapAction="http://portal1.landata.vic.gov.au/
CustodianWebservices/1.20/WebServices/CertificateRequest"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CertificateStatus">
<soap:operation soapAction="http://portal1.landata.vic.gov.au/
CustodianWebservices/1.20/WebServices/CertificateStatus"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CertificateCall_1.201"
type="tns:CertificateCall_1.20">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="CertificateRequest">
<soap12:operation soapAction="http://
portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices/
CertificateRequest" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CertificateStatus">
<soap12:operation soapAction="http://
portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices/
CertificateStatus" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CertificateCall">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/
wsdl/">Custodian Certificate</wsdl:documentation>
<wsdl:port name="CertificateCall_1.20"
binding="tns:CertificateCall_1.20">
<soap:address location="http://localhost/CustodianWebservices/
1.20/CertificateCall.asmx" />
</wsdl:port>
<wsdl:port name="CertificateCall_1.201"
binding="tns:CertificateCall_1.201">
<soap12:address location="http://localhost/
CustodianWebservices/1.20/CertificateCall.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Is there any problem in my sample data, or wsdl file?
Regards,
Angus Ng
Re: ADBException: Unexpected subelement customerRequest
Posted by Amila Suriarachchi <am...@gmail.com>.
On 8/14/07, Angus Ng <an...@gw.com.au> wrote:
>
> Hi, Amila,
>
> Yup, we finally solved it as the tag sequence of sample xml is not
> correct. Thanks for that.
>
> However, (I'm not sure wether it is correct or not), I would like to point
> out that, it looks like ADB generated code will check the namespace
> compulsorily (No matter it generate code via WSDL2Java or XSD2Java). If the
> tag inside doesn't have the namespace, it will still throw the "unexpected
> subelement" since it will compare the QName using both namespaceURI and the
> tag name itself. So I end up remove all the namespaceURI to "un-tied the
> restrictions". So is there any way to generate the code which escape those
> namespace in the QName?
>
Sorry, it is not possible with adb.
As a workaround try this. put form=unqualified in all the elements. this
will unqualified the elements from the namespace.
QName = namespace + localname
So I belive, it is not logicall to remove namespace from QName. if there is
a bug in generated xmls better to fix that in there rather than writting bug
compatible code.
Thanks,
Amila.
Thanks.
>
> Angus
>
> On 13 Aug 2007, at 6:49 PM, Amila Suriarachchi wrote:
>
> hi,
>
> Did you try with the Axis2 1.3 (which is put for vote)?
>
> I tested the generated code with this class and changed xml.
>
> public class TestClass extends TestCase {
>
> public void testCertificate(){
> try {
> XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new
> FileInputStream("test.xml"));
> Object result = CertificateRequest.Factory.parse(xmlReader);
> System.out.println("OK");
> } catch (XMLStreamException e) {
> e.printStackTrace(); //To change body of catch statement use
> File | Settings | File Templates.
> } catch (FileNotFoundException e) {
> e.printStackTrace(); //To change body of catch statement use
> File | Settings | File Templates.
> } catch (Exception e) {
> e.printStackTrace(); //To change body of catch statement use
> File | Settings | File Templates.
> }
>
> }
> }
>
> <CertificateRequest xmlns="http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices
> ">
> <customerRequest><?xml version='1.0' encoding='UTF-8'?>
> <CustomerRequest>
> <AgentReference>816377-017-4</AgentReference>
> <Agent>LANDATA</Agent>
> <MessageType>REQ</MessageType>
> <CustomerReference>123456</CustomerReference>
> <PropertyPfi>1033433</PropertyPfi>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <SettlementDate></SettlementDate>
> <CommonPropertyIndicator>N</CommonPropertyIndicator>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <AlternateAddresses>
> <AlternateAddress></AlternateAddress>
> </AlternateAddresses>
> <Municipality>CITY OF YARRA</Municipality>
> <Parish>JIKA JIKA</Parish>
> <Titles>
> <Title>
> <VolumeFolio>3870/993</VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <CustodianIdentifiers>
> <CustodianIdentifier name="CITY OF YARRA"
> type="CPN">236755</CustodianIdentifier>
> </CustodianIdentifiers>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> <MapReferences>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A10</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B10</MapGrid>
> </MapReference>
> </MapReferences>
> <RelatedProperties>
> <RelatedProperty>
> <Titles>
> <Title>
> <VolumeFolio></VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> </RelatedProperty>
> </RelatedProperties>
> <Vendors>
> <Vendor>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Vendor>
> </Vendors>
> <Purchasers>
> <Purchaser>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Purchaser>
> </Purchasers>
> <BodyCorporateManager>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </BodyCorporateManager>
> <ReadingDate></ReadingDate>
> <ExtraInformation></ExtraInformation>
> <ApplicantDetails>
> <Name>Groupware -Testing WebService C/- LANDATA</Name>
> <Address1>Level 14, 570 Bourke Street</Address1>
> <Address2>Melbourne</Address2>
> <Country>Australia</Country>
> <Phone>8636 2456</Phone>
> <DX></DX>
> <Fax></Fax>
> <Email>test_certificates@landata.vic.gov.au</Email>
>
> <PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
> </ApplicantDetails>
> <ApplicationReason></ApplicationReason>
> <CertificateName code="42">Planning Certificate
> Express</CertificateName>
> <TimeStamp>2007-03-23T09:42:50</TimeStamp>
> </CustomerRequest>
> </customerRequest>
> </CertificateRequest>
>
> It worked fine for me. Can you please test your generated code with this
> test case?
>
> Amila.
>
> On 8/13/07, Angus Ng <an...@gw.com.au> wrote:
>
> > Yup, that's my mistake. I've changed it back to the correct one. But I
> > still got the same error.
> >
> > I follow the stack trace and I found that somethings wrong in the
> > reader.next () method from the generated code. At the beginning, the
> > whole CertificateRequest is passed into the Factory:
> >
> > CertificateRequest.Factory.parse (param.getXMLStreamReaderWithoutCaching
> > ())
> >
> > which param is the OMElement of CertificateRequest.
> >
> > And then in the CertificateRequest.parse(XMLStreamReader reader) method,
> > it will do some checking on whether it is a start element or end element,
> > and it looks like it is moving a pointer from CertiricateRequest to
> > CustomerRequest, which CustomerRequest is a child element of
> > CertificateRequest. By debugging the code, I can see the currentNode in
> > XMLStreamReader has been changed to CustomerRequest. However, when it uses
> > reader.getName(), the cursor is still pointing to CertificateRequest
> > content. So it ends up failing the condition statement as follow:
> >
> > if (reader.isStartElement() &&
> > new javax.xml.namespace.QName(
> > "http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices
> > ",
> > "customerRequest" ).equals(reader.getName()))
> > {
> > java.lang.String content = reader.getElementText();
> >
> > object.setCustomerRequest(
> > org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
> > content));
> >
> > reader.next();
> > } // End of if for expected property start element
> >
> >
> > And finally throw an exception - ADBException: Unexpected subelement
> > customerRequest.
> >
> > Does there appear to be any problem in my generated code?
> >
> > Regards,
> > Angus
> >
> >
> >
> > On 10 Aug 2007, at 3:36 PM, Amila Suriarachchi wrote:
> >
> > in schema you have define the targetnamespace as
> > http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices
> >
> > but in request xml element namespce is
> >
> > http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/CertificateCall
> >
> > Amila.
> >
> > On 8/10/07, Angus Ng < ang@gw.com.au> wrote:
> >
> > > Hi,
> > >
> > > I got an error when I try to test my webservice using Axis2 1.3nightly build of 9 Aug 2007. I am using ADB as my binding strategy. And I
> > > create a sample soap message and use soapUI to fire on the webservice. I got
> > > the error as follow:
> > >
> > > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> > > ">
> > > <soapenv:Body>
> > > <soapenv:Fault>
> > > <faultcode>soapenv:Server</faultcode>
> > > <faultstring>org.apache.axis2.databinding.ADBException:
> > > Unexpected subelement customerRequest</faultstring>
> > > <detail>
> > > <Exception>org.apache.axis2.AxisFault :
> > > org.apache.axis2.databinding.ADBException: Unexpected subelement
> > > customerRequest
> > > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> > > at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM (
> > > CertificateCallMessageReceiverInOut.java:193)
> > > at
> > > landata.service.adb.CertificateCallMessageReceiverInOut.invokeBusinessLogic(
> > > CertificateCallMessageReceiverInOut.java:44)
> > > at
> > > org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(
> > > AbstractInOutSyncMessageReceiver.java:42)
> > > at org.apache.axis2.receivers.AbstractMessageReceiver.receive (
> > > AbstractMessageReceiver.java:96)
> > > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java :145)
> > > at
> > > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
> > > HTTPTransportUtils.java:275)
> > > at org.apache.axis2.transport.http.AxisServlet.doPost (
> > > AxisServlet.java:120)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java :710)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
> > > ApplicationFilterChain.java :269)
> > > at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > > ApplicationFilterChain.java :188)
> > > at net.sf.springlayout.web.filter.LocalApplicationContext.doFilterInternal
> > > (LocalApplicationContext.java:57)
> > > at org.springframework.web.filter.OncePerRequestFilter.doFilter(
> > > OncePerRequestFilter.java :77)
> > > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java :215)
> > > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java :188)
> > > at
> > > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(
> > > OpenSessionInViewFilter.java:173)
> > > at org.springframework. web.filter.OncePerRequestFilter.doFilter(
> > > OncePerRequestFilter.java:77)
> > > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
> > > ApplicationFilterChain.java:215)
> > > at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > > ApplicationFilterChain.java:188)
> > > at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter (
> > > PageFilter.java:39)
> > > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
> > > ApplicationFilterChain.java:215)
> > > at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > > ApplicationFilterChain.java:188)
> > > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > > FilterChainProxy.java:264)
> > > at org.acegisecurity.intercept. web.FilterSecurityInterceptor.invoke(
> > > FilterSecurityInterceptor.java:107)
> > > at org.acegisecurity.intercept .web.FilterSecurityInterceptor.doFilter
> > > (FilterSecurityInterceptor.java:72)
> > > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> > > (FilterChainProxy.java:274)
> > > at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(
> > > ExceptionTranslationFilter.java :110)
> > > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter
> > > (FilterChainProxy.java :274)
> > > at
> > > org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(
> > > AnonymousProcessingFilter.java:125)
> > > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > > FilterChainProxy.java:274)
> > > at org.acegisecurity.ui.AbstractProcessingFilter.doFilter (
> > > AbstractProcessingFilter.java:217)
> > > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > > FilterChainProxy.java:274)
> > > at org.acegisecurity.ui.logout.LogoutFilter.doFilter(
> > > LogoutFilter.java :106)
> > > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > > FilterChainProxy.java :274)
> > > at
> > > org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(
> > > HttpSessionContextIntegrationFilter.java :229)
> > > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > > FilterChainProxy.java :274)
> > > at org.acegisecurity.util.FilterChainProxy.doFilter(
> > > FilterChainProxy.java :148)
> > > at org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > FilterToBeanProxy.java :98)
> > > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java :215)
> > > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java :188)
> > > at org.apache.catalina.core.StandardWrapperValve.invoke(
> > > StandardWrapperValve.java :210)
> > > at org.apache.catalina.core.StandardContextValve.invoke(
> > > StandardContextValve.java :174)
> > > at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> > > AuthenticatorBase.java :433)
> > > at org.apache.catalina.core.StandardHostValve.invoke(
> > > StandardHostValve.java :127)
> > > at org.apache.catalina.valves.ErrorReportValve.invoke(
> > > ErrorReportValve.java :117)
> > > at org.apache.catalina.core.StandardEngineValve.invoke(
> > > StandardEngineValve.java :108)
> > > at org.apache.catalina.connector.CoyoteAdapter.service(
> > > CoyoteAdapter.java:151)
> > > at org.apache.coyote.http11.Http11Processor.process(
> > > Http11Processor.java:870)
> > > at
> > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
> > > Http11BaseProtocol.java :665)
> > > at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (
> > > PoolTcpEndpoint.java :528)
> > > at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (
> > > LeaderFollowerWorkerThread.java :81)
> > > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (
> > > ThreadPool.java :685)
> > > at java.lang.Thread.run(Thread.java:613)
> > > Caused by: java.lang.Exception:
> > > org.apache.axis2.databinding.ADBException: Unexpected subelement
> > > customerRequest
> > > at au.gov.vic.landata.www.certificaterequestresponse.CertificateRequest
> > > $Factory.parse(CertificateRequest.java:440)
> > > at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM(
> > > CertificateCallMessageReceiverInOut.java:175)
> > > ... 52 more
> > > Caused by: org.apache.axis2.databinding.ADBException: Unexpected
> > > subelement customerRequest
> > > at au.gov.vic.landata.www.certificaterequestresponse.CertificateRequest
> > > $Factory.parse(CertificateRequest.java:436)
> > > ... 53 more</Exception>
> > > </detail>
> > > </soapenv:Fault>
> > > </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > >
> > > And here is my sample soap message:
> > >
> > > <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xmlns:xsd="
> > > http://www.w3.org/2001/XMLSchema">
> > > <soap:Body>
> > > <CertificateRequest xmlns="http://Portal1.landata.vic.gov.au/CustodianWebservices/1.20/CertificateCall
> > > ">
> > > <customerRequest><?xml version=' 1.0' encoding='UTF-8'?>
> > > <CustomerRequest>
> > > <AgentReference>816377-017-4</AgentReference>
> > > <Agent>LANDATA</Agent>
> > > <MessageType>REQ</MessageType>
> > > <CustomerReference>123456</CustomerReference>
> > > <PropertyPfi>1033433</PropertyPfi>
> > > <Parcels>
> > > <Parcel>
> > > <ParcelPfi></ParcelPfi>
> > > <SPI></SPI>
> > > <LotPlan>
> > > <Lots>1</Lots>
> > > <PlanNumber>TP422266</PlanNumber>
> > > <Section></Section>
> > > <Block></Block>
> > > <ViewPlanLink></ViewPlanLink>
> > > </LotPlan>
> > > <CrownAllotment>
> > > <Section></Section>
> > > <Block></Block>
> > > <Allotment></Allotment>
> > > <Portion></Portion>
> > > <SubDivision></SubDivision>
> > > <ParishDescription></ParishDescription>
> > > </CrownAllotment>
> > > <Area></Area>
> > > <Entitlement></Entitlement>
> > > </Parcel>
> > > </Parcels>
> > > <SettlementDate></SettlementDate>
> > > <CommonPropertyIndicator>N</CommonPropertyIndicator>
> > > <PropertyAddress>
> > > <DisplayAddress>
> > > <StreetLocation>17</StreetLocation>
> > > <StreetName>TAYLOR STREET</StreetName>
> > > <Suburb>FITZROY NORTH</Suburb>
> > > <Postcode>3068</Postcode>
> > > </DisplayAddress>
> > > <ParsedAddress>
> > > <UnitType></UnitType>
> > > <UnitNumber1></UnitNumber1>
> > > <UnitNumber2></UnitNumber2>
> > > <FloorType></FloorType>
> > > <FloorNumber></FloorNumber>
> > > <PropertyName1></PropertyName1>
> > > <PropertyName2></PropertyName2>
> > > <LocationDescriptor></LocationDescriptor>
> > > <StreetNumber1>17</StreetNumber1>
> > > <StreetNumber2></StreetNumber2>
> > > <Street>TAYLOR</Street>
> > > <StreetType>STREET</StreetType>
> > > <StreetSuffix></StreetSuffix>
> > > <Suburb>FITZROY NORTH</Suburb>
> > > <Postcode>3068</Postcode>
> > > </ParsedAddress>
> > > </PropertyAddress>
> > > <AlternateAddresses>
> > > <AlternateAddress></AlternateAddress>
> > > </AlternateAddresses>
> > > <Municipality>CITY OF YARRA</Municipality>
> > > <Parish>JIKA JIKA</Parish>
> > > <Titles>
> > > <Title>
> > > <VolumeFolio>3870/993</VolumeFolio>
> > > <ViewTitleLink></ViewTitleLink>
> > > </Title>
> > > </Titles>
> > > <CustodianIdentifiers>
> > > <CustodianIdentifier name="CITY OF YARRA"
> > > type="CPN">236755</CustodianIdentifier>
> > > </CustodianIdentifiers>
> > > <BookMemorials>
> > > <BookMemorial>
> > > <Book></Book>
> > > <Memorial></Memorial>
> > > </BookMemorial>
> > > </BookMemorials>
> > > <MapReferences>
> > > <MapReference>
> > > <MapName>Melway</MapName>
> > > <MapPage>30</MapPage>
> > > <MapGrid>A9</MapGrid>
> > > </MapReference>
> > > <MapReference>
> > > <MapName>Melway</MapName>
> > > <MapPage>30</MapPage>
> > > <MapGrid>B9</MapGrid>
> > > </MapReference>
> > > <MapReference>
> > > <MapName>Melway</MapName>
> > > <MapPage>30</MapPage>
> > > <MapGrid>A10</MapGrid>
> > > </MapReference>
> > > <MapReference>
> > > <MapName>Melway</MapName>
> > > <MapPage>30</MapPage>
> > > <MapGrid>B10</MapGrid>
> > > </MapReference>
> > > </MapReferences>
> > > <RelatedProperties>
> > > <RelatedProperty>
> > > <Titles>
> > > <Title>
> > > <VolumeFolio></VolumeFolio>
> > > <ViewTitleLink></ViewTitleLink>
> > > </Title>
> > > </Titles>
> > > <Parcels>
> > > <Parcel>
> > > <ParcelPfi></ParcelPfi>
> > > <SPI></SPI>
> > > <LotPlan>
> > > <Lots>1</Lots>
> > > <PlanNumber>TP422266</PlanNumber>
> > > <Section></Section>
> > > <Block></Block>
> > > <ViewPlanLink></ViewPlanLink>
> > > </LotPlan>
> > > <CrownAllotment>
> > > <Section></Section>
> > > <Block></Block>
> > > <Allotment></Allotment>
> > > <Portion></Portion>
> > > <SubDivision></SubDivision>
> > > <ParishDescription></ParishDescription>
> > > </CrownAllotment>
> > > <Area></Area>
> > > <Entitlement></Entitlement>
> > > </Parcel>
> > > </Parcels>
> > > <PropertyAddress>
> > > <DisplayAddress>
> > > <StreetLocation>17</StreetLocation>
> > > <StreetName>TAYLOR STREET</StreetName>
> > > <Suburb>FITZROY NORTH</Suburb>
> > > <Postcode>3068</Postcode>
> > > </DisplayAddress>
> > > <ParsedAddress>
> > > <UnitType></UnitType>
> > > <UnitNumber1></UnitNumber1>
> > > <UnitNumber2></UnitNumber2>
> > > <FloorType></FloorType>
> > > <FloorNumber></FloorNumber>
> > > <PropertyName1></PropertyName1>
> > > <PropertyName2></PropertyName2>
> > > <LocationDescriptor></LocationDescriptor>
> > > <StreetNumber1>17</StreetNumber1>
> > > <StreetNumber2></StreetNumber2>
> > > <Street>TAYLOR</Street>
> > > <StreetType>STREET</StreetType>
> > > <StreetSuffix></StreetSuffix>
> > > <Suburb>FITZROY NORTH</Suburb>
> > > <Postcode>3068</Postcode>
> > > </ParsedAddress>
> > > </PropertyAddress>
> > > <BookMemorials>
> > > <BookMemorial>
> > > <Book></Book>
> > > <Memorial></Memorial>
> > > </BookMemorial>
> > > </BookMemorials>
> > > </RelatedProperty>
> > > </RelatedProperties>
> > > <Vendors>
> > > <Vendor>
> > > <Name></Name>
> > > <Address1></Address1>
> > > <Address2></Address2>
> > > <Country></Country>
> > > <DX></DX>
> > > </Vendor>
> > > </Vendors>
> > > <Purchasers>
> > > <Purchaser>
> > > <Name></Name>
> > > <Address1></Address1>
> > > <Address2></Address2>
> > > <Country></Country>
> > > <DX></DX>
> > > </Purchaser>
> > > </Purchasers>
> > > <BodyCorporateManager>
> > > <Name></Name>
> > > <Address1></Address1>
> > > <Address2></Address2>
> > > <Country></Country>
> > > <DX></DX>
> > > </BodyCorporateManager>
> > > <ReadingDate></ReadingDate>
> > > <ExtraInformation></ExtraInformation>
> > > <ApplicantDetails>
> > > <Name>Groupware -Testing WebService C/-
> > > LANDATA</Name>
> > > <Address1>Level 14, 570 Bourke Street</Address1>
> > > <Address2>Melbourne</Address2>
> > > <Country>Australia</Country>
> > > <Phone>8636 2456</Phone>
> > > <DX></DX>
> > > <Fax></Fax>
> > > <Email> test_certificates@landata.vic.gov.au</Email>
> > >
> > > <PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
> > > </ApplicantDetails>
> > > <ApplicationReason></ApplicationReason>
> > > <CertificateName code="42">Planning Certificate
> > > Express</CertificateName>
> > > <TimeStamp>2007-03-23T09:42:50</TimeStamp>
> > > </CustomerRequest>
> > > </customerRequest>
> > > </CertificateRequest>
> > > </soap:Body>
> > > </soap:Envelope>
> > >
> > >
> > > And here is my WSDL:
> > >
> > > <?xml version= "1.0" encoding ="utf-8" ?>
> > > < wsdl:definitions xmlns:soap =" http://schemas.xmlsoap.org/wsdl/soap/"
> > > xmlns:tm =" http://microsoft.com/wsdl/mime/textMatching/"
> > > xmlns:soapenc =" http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime
> > > =" http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns ="http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
> > > xmlns:s =" http://www.w3.org/2001/XMLSchema" xmlns:soap12 ="http://schemas.xmlsoap.org/wsdl/soap12/"
> > > xmlns:http =" http://schemas.xmlsoap.org/wsdl/http/" targetNamespace =
> > > "http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
> > > xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/">
> > > < wsdl:documentation xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/"
> > > > Custodian Certificate</ wsdl:documentation>
> > > <wsdl:types >
> > > <s:schema elementFormDefault= "qualified" targetNamespace ="http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices
> > > ">
> > > < s:element name ="CertificateRequest" >
> > > <s:complexType >
> > > <s:sequence >
> > > <s:element minOccurs ="0" maxOccurs= "1" name ="customerRequest"
> > > type= "s:string" />
> > > </ s:sequence>
> > > </s:complexType >
> > > </s:element >
> > > <s:element name= "CertificateRequestResponse">
> > > < s:complexType>
> > > < s:sequence>
> > > < s:element minOccurs ="1" maxOccurs= "1" name= "CertificateRequestResult"
> > > type="s:int" />
> > > < s:element minOccurs= "0" maxOccurs ="1"
> > >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
> >
> >
> >
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
--
Amila Suriarachchi,
WSO2 Inc.
Re: ADBException: Unexpected subelement customerRequest
Posted by Angus Ng <an...@gw.com.au>.
Hi, Amila,
Yup, we finally solved it as the tag sequence of sample xml is not
correct. Thanks for that.
However, (I'm not sure wether it is correct or not), I would like to
point out that, it looks like ADB generated code will check the
namespace compulsorily (No matter it generate code via WSDL2Java or
XSD2Java). If the tag inside doesn't have the namespace, it will
still throw the "unexpected subelement" since it will compare the
QName using both namespaceURI and the tag name itself. So I end up
remove all the namespaceURI to "un-tied the restrictions". So is
there any way to generate the code which escape those namespace in
the QName?
Thanks.
Angus
On 13 Aug 2007, at 6:49 PM, Amila Suriarachchi wrote:
> hi,
>
> Did you try with the Axis2 1.3 (which is put for vote)?
>
> I tested the generated code with this class and changed xml.
>
> public class TestClass extends TestCase {
>
> public void testCertificate(){
> try {
> XMLStreamReader xmlReader =
> StAXUtils.createXMLStreamReader(new FileInputStream("test.xml"));
> Object result = CertificateRequest.Factory.parse
> (xmlReader);
> System.out.println("OK");
> } catch (XMLStreamException e) {
> e.printStackTrace(); //To change body of catch
> statement use File | Settings | File Templates.
> } catch (FileNotFoundException e) {
> e.printStackTrace(); //To change body of catch
> statement use File | Settings | File Templates.
> } catch (Exception e) {
> e.printStackTrace(); //To change body of catch
> statement use File | Settings | File Templates.
> }
>
> }
> }
>
> <CertificateRequest xmlns="http://portal1.landata.vic.gov.au/
> CustodianWebservices/1.20/WebServices ">
> <customerRequest><?xml version='1.0' encoding='UTF-8'?>
> <CustomerRequest>
> <AgentReference>816377-017-4</AgentReference>
> <Agent>LANDATA</Agent>
> <MessageType>REQ</MessageType>
> <CustomerReference>123456</CustomerReference>
> <PropertyPfi>1033433</PropertyPfi>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <SettlementDate></SettlementDate>
> <CommonPropertyIndicator>N</
> CommonPropertyIndicator>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <AlternateAddresses>
> <AlternateAddress></AlternateAddress>
> </AlternateAddresses>
> <Municipality>CITY OF YARRA</Municipality>
> <Parish>JIKA JIKA</Parish>
> <Titles>
> <Title>
> <VolumeFolio>3870/993</VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <CustodianIdentifiers>
> <CustodianIdentifier name="CITY OF YARRA" type="CPN">
> 236755</CustodianIdentifier>
> </CustodianIdentifiers>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> <MapReferences>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A10</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B10</MapGrid>
> </MapReference>
> </MapReferences>
> <RelatedProperties>
> <RelatedProperty>
> <Titles>
> <Title>
> <VolumeFolio></VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> </RelatedProperty>
> </RelatedProperties>
> <Vendors>
> <Vendor>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Vendor>
> </Vendors>
> <Purchasers>
> <Purchaser>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Purchaser>
> </Purchasers>
> <BodyCorporateManager>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </BodyCorporateManager>
> <ReadingDate></ReadingDate>
> <ExtraInformation></ExtraInformation>
> <ApplicantDetails>
> <Name>Groupware -Testing WebService C/- LANDATA</
> Name>
> <Address1>Level 14, 570 Bourke Street</Address1>
> <Address2>Melbourne</Address2>
> <Country>Australia</Country>
> <Phone>8636 2456</Phone>
> <DX></DX>
> <Fax></Fax>
> <Email>test_certificates@landata.vic.gov.au</
> Email>
> <PreferredDeliveryMethod>Email</
> PreferredDeliveryMethod>
> </ApplicantDetails>
> <ApplicationReason></ApplicationReason>
> <CertificateName code="42">Planning Certificate
> Express</CertificateName>
> <TimeStamp>2007-03-23T09:42:50</TimeStamp>
> </CustomerRequest>
> </customerRequest>
> </CertificateRequest>
>
> It worked fine for me. Can you please test your generated code with
> this test case?
>
> Amila.
>
> On 8/13/07, Angus Ng <an...@gw.com.au> wrote:
> Yup, that's my mistake. I've changed it back to the correct one.
> But I still got the same error.
>
> I follow the stack trace and I found that somethings wrong in the
> reader.next () method from the generated code. At the beginning,
> the whole CertificateRequest is passed into the Factory:
>
> CertificateRequest.Factory.parse
> (param.getXMLStreamReaderWithoutCaching())
>
> which param is the OMElement of CertificateRequest.
>
> And then in the CertificateRequest.parse(XMLStreamReader reader)
> method, it will do some checking on whether it is a start element
> or end element, and it looks like it is moving a pointer from
> CertiricateRequest to CustomerRequest, which CustomerRequest is a
> child element of CertificateRequest. By debugging the code, I can
> see the currentNode in XMLStreamReader has been changed to
> CustomerRequest. However, when it uses reader.getName(), the cursor
> is still pointing to CertificateRequest content. So it ends up
> failing the condition statement as follow:
>
> if (reader.isStartElement() &&
> new javax.xml.namespace.QName(
> " http://portal1.landata.vic.gov.au/
> CustodianWebservices/1.20/WebServices",
> "customerRequest" ).equals
> (reader.getName())) {
> java.lang.String content = reader.getElementText
> ();
>
> object.setCustomerRequest
> (org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
> content));
>
> reader.next();
> } // End of if for expected property start element
>
>
> And finally throw an exception - ADBException: Unexpected
> subelement customerRequest.
>
> Does there appear to be any problem in my generated code?
>
> Regards,
> Angus
>
>
>
> On 10 Aug 2007, at 3:36 PM, Amila Suriarachchi wrote:
>
>> in schema you have define the targetnamespace as
>> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
>> WebServices
>>
>> but in request xml element namespce is
>> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
>> CertificateCall
>>
>> Amila.
>>
>> On 8/10/07, Angus Ng < ang@gw.com.au> wrote:
>> Hi,
>>
>> I got an error when I try to test my webservice using Axis2 1.3
>> nightly build of 9 Aug 2007. I am using ADB as my binding
>> strategy. And I create a sample soap message and use soapUI to
>> fire on the webservice. I got the error as follow:
>>
>> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/
>> envelope/ ">
>> <soapenv:Body>
>> <soapenv:Fault>
>> <faultcode>soapenv:Server</faultcode>
>> <faultstring>org.apache.axis2.databinding.ADBException:
>> Unexpected subelement customerRequest</faultstring>
>> <detail>
>> <Exception>org.apache.axis2.AxisFault :
>> org.apache.axis2.databinding.ADBException: Unexpected subelement
>> customerRequest
>> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>> at
>> landata.service.adb.CertificateCallMessageReceiverInOut.fromOM
>> (CertificateCallMessageReceiverInOut.java:193)
>> at
>> landata.service.adb.CertificateCallMessageReceiverInOut.invokeBusines
>> sLogic (CertificateCallMessageReceiverInOut.java:44)
>> at
>> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBus
>> inessLogic (AbstractInOutSyncMessageReceiver.java:42)
>> at org.apache.axis2.receivers.AbstractMessageReceiver.receive
>> (AbstractMessageReceiver.java:96)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java :145)
>> at
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
>> uest (HTTPTransportUtils.java:275)
>> at org.apache.axis2.transport.http.AxisServlet.doPost
>> (AxisServlet.java:120)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java :710)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (ApplicationFilterChain.java :269)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilterChain.java :188)
>> at net.sf.springlayout.
>> web.filter.LocalApplicationContext.doFilterInternal
>> (LocalApplicationContext.java:57)
>> at org.springframework.web.filter.OncePerRequestFilter.doFilter
>> (OncePerRequestFilter.java :77)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (ApplicationFilterChain.java :215)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilterChain.java :188)
>> at
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.do
>> FilterInternal (OpenSessionInViewFilter.java:173)
>> at org.springframework. web.filter.OncePerRequestFilter.doFilter
>> (OncePerRequestFilter.java:77)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (ApplicationFilterChain.java:215)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilterChain.java:188)
>> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter
>> (PageFilter.java:39)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (ApplicationFilterChain.java:215)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilterChain.java:188)
>> at org.acegisecurity.util.FilterChainProxy
>> $VirtualFilterChain.doFilter (FilterChainProxy.java:264)
>> at org.acegisecurity.intercept.
>> web.FilterSecurityInterceptor.invoke
>> (FilterSecurityInterceptor.java:107)
>> at
>> org.acegisecurity.intercept .web.FilterSecurityInterceptor.doFilter
>> (FilterSecurityInterceptor.java:72)
>> at org.acegisecurity.util.FilterChainProxy
>> $VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>> at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter
>> (ExceptionTranslationFilter.java :110)
>> at org.acegisecurity.util.FilterChainProxy
>> $VirtualFilterChain.doFilter(FilterChainProxy.java :274)
>> at
>> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFil
>> ter ( AnonymousProcessingFilter.java:125)
>> at org.acegisecurity.util.FilterChainProxy
>> $VirtualFilterChain.doFilter (FilterChainProxy.java:274)
>> at org.acegisecurity.ui.AbstractProcessingFilter.doFilter
>> (AbstractProcessingFilter.java:217)
>> at org.acegisecurity.util.FilterChainProxy
>> $VirtualFilterChain.doFilter (FilterChainProxy.java:274)
>> at org.acegisecurity.ui.logout.LogoutFilter.doFilter
>> ( LogoutFilter.java :106)
>> at org.acegisecurity.util.FilterChainProxy
>> $VirtualFilterChain.doFilter (FilterChainProxy.java :274)
>> at
>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilte
>> r (HttpSessionContextIntegrationFilter.java :229)
>> at org.acegisecurity.util.FilterChainProxy
>> $VirtualFilterChain.doFilter (FilterChainProxy.java :274)
>> at org.acegisecurity.util.FilterChainProxy.doFilter
>> (FilterChainProxy.java :148)
>> at org.acegisecurity.util.FilterToBeanProxy.doFilter
>> (FilterToBeanProxy.java :98)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (ApplicationFilterChain.java :215)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilterChain.java :188)
>> at org.apache.catalina.core.StandardWrapperValve.invoke
>> (StandardWrapperValve.java :210)
>> at org.apache.catalina.core.StandardContextValve.invoke
>> (StandardContextValve.java :174)
>> at org.apache.catalina.authenticator.AuthenticatorBase.invoke
>> (AuthenticatorBase.java :433)
>> at org.apache.catalina.core.StandardHostValve.invoke
>> (StandardHostValve.java :127)
>> at org.apache.catalina.valves.ErrorReportValve.invoke
>> (ErrorReportValve.java :117)
>> at org.apache.catalina.core.StandardEngineValve.invoke
>> (StandardEngineValve.java :108)
>> at org.apache.catalina.connector.CoyoteAdapter.service
>> (CoyoteAdapter.java:151)
>> at org.apache.coyote.http11.Http11Processor.process
>> (Http11Processor.java:870)
>> at org.apache.coyote.http11.Http11BaseProtocol
>> $Http11ConnectionHandler.processConnection
>> (Http11BaseProtocol.java :665)
>> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
>> (PoolTcpEndpoint.java :528)
>> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
>> (LeaderFollowerWorkerThread.java :81)
>> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
>> (ThreadPool.java :685)
>> at java.lang.Thread.run(Thread.java:613)
>> Caused by: java.lang.Exception:
>> org.apache.axis2.databinding.ADBException: Unexpected subelement
>> customerRequest
>> at au.gov.vic.landata.
>> www.certificaterequestresponse.CertificateRequest$Factory.parse
>> (CertificateRequest.java:440)
>> at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM
>> (CertificateCallMessageReceiverInOut.java:175)
>> ... 52 more
>> Caused by: org.apache.axis2.databinding.ADBException: Unexpected
>> subelement customerRequest
>> at au.gov.vic.landata.
>> www.certificaterequestresponse.CertificateRequest$Factory.parse
>> (CertificateRequest.java:436)
>> ... 53 more</Exception>
>> </detail>
>> </soapenv:Fault>
>> </soapenv:Body>
>> </soapenv:Envelope>
>>
>>
>> And here is my sample soap message:
>>
>> <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="
>> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://
>> www.w3.org/2001/XMLSchema-instance " xmlns:xsd="http://www.w3.org/
>> 2001/XMLSchema">
>> <soap:Body>
>> <CertificateRequest xmlns=" http://Portal1.landata.vic.gov.au/
>> CustodianWebservices/1.20/CertificateCall">
>> <customerRequest><?xml version=' 1.0' encoding='UTF-8'?>
>> <CustomerRequest>
>> <AgentReference>816377-017-4</AgentReference>
>> <Agent>LANDATA</Agent>
>> <MessageType>REQ</MessageType>
>> <CustomerReference>123456</CustomerReference>
>> <PropertyPfi>1033433</PropertyPfi>
>> <Parcels>
>> <Parcel>
>> <ParcelPfi></ParcelPfi>
>> <SPI></SPI>
>> <LotPlan>
>> <Lots>1</Lots>
>> <PlanNumber>TP422266</PlanNumber>
>> <Section></Section>
>> <Block></Block>
>> <ViewPlanLink></ViewPlanLink>
>> </LotPlan>
>> <CrownAllotment>
>> <Section></Section>
>> <Block></Block>
>> <Allotment></Allotment>
>> <Portion></Portion>
>> <SubDivision></SubDivision>
>> <ParishDescription></ParishDescription>
>> </CrownAllotment>
>> <Area></Area>
>> <Entitlement></Entitlement>
>> </Parcel>
>> </Parcels>
>> <SettlementDate></SettlementDate>
>> <CommonPropertyIndicator>N</CommonPropertyIndicator>
>> <PropertyAddress>
>> <DisplayAddress>
>> <StreetLocation>17</StreetLocation>
>> <StreetName>TAYLOR STREET</StreetName>
>> <Suburb>FITZROY NORTH</Suburb>
>> <Postcode>3068</Postcode>
>> </DisplayAddress>
>> <ParsedAddress>
>> <UnitType></UnitType>
>> <UnitNumber1></UnitNumber1>
>> <UnitNumber2></UnitNumber2>
>> <FloorType></FloorType>
>> <FloorNumber></FloorNumber>
>> <PropertyName1></PropertyName1>
>> <PropertyName2></PropertyName2>
>> <LocationDescriptor></LocationDescriptor>
>> <StreetNumber1>17</StreetNumber1>
>> <StreetNumber2></StreetNumber2>
>> <Street>TAYLOR</Street>
>> <StreetType>STREET</StreetType>
>> <StreetSuffix></StreetSuffix>
>> <Suburb>FITZROY NORTH</Suburb>
>> <Postcode>3068</Postcode>
>> </ParsedAddress>
>> </PropertyAddress>
>> <AlternateAddresses>
>> <AlternateAddress></AlternateAddress>
>> </AlternateAddresses>
>> <Municipality>CITY OF YARRA</Municipality>
>> <Parish>JIKA JIKA</Parish>
>> <Titles>
>> <Title>
>> <VolumeFolio>3870/993</VolumeFolio>
>> <ViewTitleLink></ViewTitleLink>
>> </Title>
>> </Titles>
>> <CustodianIdentifiers>
>> <CustodianIdentifier name="CITY OF YARRA" type="CPN">
>> 236755</CustodianIdentifier>
>> </CustodianIdentifiers>
>> <BookMemorials>
>> <BookMemorial>
>> <Book></Book>
>> <Memorial></Memorial>
>> </BookMemorial>
>> </BookMemorials>
>> <MapReferences>
>> <MapReference>
>> <MapName>Melway</MapName>
>> <MapPage>30</MapPage>
>> <MapGrid>A9</MapGrid>
>> </MapReference>
>> <MapReference>
>> <MapName>Melway</MapName>
>> <MapPage>30</MapPage>
>> <MapGrid>B9</MapGrid>
>> </MapReference>
>> <MapReference>
>> <MapName>Melway</MapName>
>> <MapPage>30</MapPage>
>> <MapGrid>A10</MapGrid>
>> </MapReference>
>> <MapReference>
>> <MapName>Melway</MapName>
>> <MapPage>30</MapPage>
>> <MapGrid>B10</MapGrid>
>> </MapReference>
>> </MapReferences>
>> <RelatedProperties>
>> <RelatedProperty>
>> <Titles>
>> <Title>
>> <VolumeFolio></VolumeFolio>
>> <ViewTitleLink></ViewTitleLink>
>> </Title>
>> </Titles>
>> <Parcels>
>> <Parcel>
>> <ParcelPfi></ParcelPfi>
>> <SPI></SPI>
>> <LotPlan>
>> <Lots>1</Lots>
>> <PlanNumber>TP422266</PlanNumber>
>> <Section></Section>
>> <Block></Block>
>> <ViewPlanLink></ViewPlanLink>
>> </LotPlan>
>> <CrownAllotment>
>> <Section></Section>
>> <Block></Block>
>> <Allotment></Allotment>
>> <Portion></Portion>
>> <SubDivision></SubDivision>
>> <ParishDescription></ParishDescription>
>> </CrownAllotment>
>> <Area></Area>
>> <Entitlement></Entitlement>
>> </Parcel>
>> </Parcels>
>> <PropertyAddress>
>> <DisplayAddress>
>> <StreetLocation>17</StreetLocation>
>> <StreetName>TAYLOR STREET</StreetName>
>> <Suburb>FITZROY NORTH</Suburb>
>> <Postcode>3068</Postcode>
>> </DisplayAddress>
>> <ParsedAddress>
>> <UnitType></UnitType>
>> <UnitNumber1></UnitNumber1>
>> <UnitNumber2></UnitNumber2>
>> <FloorType></FloorType>
>> <FloorNumber></FloorNumber>
>> <PropertyName1></PropertyName1>
>> <PropertyName2></PropertyName2>
>> <LocationDescriptor></LocationDescriptor>
>> <StreetNumber1>17</StreetNumber1>
>> <StreetNumber2></StreetNumber2>
>> <Street>TAYLOR</Street>
>> <StreetType>STREET</StreetType>
>> <StreetSuffix></StreetSuffix>
>> <Suburb>FITZROY NORTH</Suburb>
>> <Postcode>3068</Postcode>
>> </ParsedAddress>
>> </PropertyAddress>
>> <BookMemorials>
>> <BookMemorial>
>> <Book></Book>
>> <Memorial></Memorial>
>> </BookMemorial>
>> </BookMemorials>
>> </RelatedProperty>
>> </RelatedProperties>
>> <Vendors>
>> <Vendor>
>> <Name></Name>
>> <Address1></Address1>
>> <Address2></Address2>
>> <Country></Country>
>> <DX></DX>
>> </Vendor>
>> </Vendors>
>> <Purchasers>
>> <Purchaser>
>> <Name></Name>
>> <Address1></Address1>
>> <Address2></Address2>
>> <Country></Country>
>> <DX></DX>
>> </Purchaser>
>> </Purchasers>
>> <BodyCorporateManager>
>> <Name></Name>
>> <Address1></Address1>
>> <Address2></Address2>
>> <Country></Country>
>> <DX></DX>
>> </BodyCorporateManager>
>> <ReadingDate></ReadingDate>
>> <ExtraInformation></ExtraInformation>
>> <ApplicantDetails>
>> <Name>Groupware -Testing WebService C/- LANDATA</
>> Name>
>> <Address1>Level 14, 570 Bourke Street</Address1>
>> <Address2>Melbourne</Address2>
>> <Country>Australia</Country>
>> <Phone>8636 2456</Phone>
>> <DX></DX>
>> <Fax></Fax>
>> <Email> test_certificates@landata.vic.gov.au</
>> Email>
>> <PreferredDeliveryMethod>Email</
>> PreferredDeliveryMethod>
>> </ApplicantDetails>
>> <ApplicationReason></ApplicationReason>
>> <CertificateName code="42">Planning Certificate
>> Express</CertificateName>
>> <TimeStamp>2007-03-23T09:42:50</TimeStamp>
>> </CustomerRequest>
>> </customerRequest>
>> </CertificateRequest>
>> </soap:Body>
>> </soap:Envelope>
>>
>>
>> And here is my WSDL:
>>
>> <?xml version= "1.0" encoding ="utf-8" ?>
>> < wsdl:definitions xmlns:soap =" http://schemas.xmlsoap.org/wsdl/
>> soap/" xmlns:tm =" http://microsoft.com/wsdl/mime/textMatching/"
>> xmlns:soapenc =" http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:mime =" http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns ="
>> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
>> WebServices" xmlns:s =" http://www.w3.org/2001/XMLSchema"
>> xmlns:soap12 =" http://schemas.xmlsoap.org/wsdl/soap12/"
>> xmlns:http =" http://schemas.xmlsoap.org/wsdl/http/"
>> targetNamespace =" http://portal1.landata.vic.gov.au/
>> CustodianWebservices/1.20/WebServices" xmlns:wsdl =" http://
>> schemas.xmlsoap.org/wsdl/">
>> < wsdl:documentation xmlns:wsdl =" http://schemas.xmlsoap.org/
>> wsdl/"> Custodian Certificate</ wsdl:documentation>
>> <wsdl:types >
>> <s:schema elementFormDefault= "qualified" targetNamespace ="
>> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
>> WebServices">
>> < s:element name ="CertificateRequest" >
>> <s:complexType >
>> <s:sequence >
>> <s:element minOccurs ="0" maxOccurs= "1" name
>> ="customerRequest" type= "s:string" />
>> </ s:sequence>
>> </s:complexType >
>> </s:element >
>> <s:element name= "CertificateRequestResponse">
>> < s:complexType>
>> < s:sequence>
>> < s:element minOccurs ="1" maxOccurs= "1" name=
>> "CertificateRequestResult" type="s:int" />
>> < s:element minOccurs= "0" maxOccurs ="1"
>>
>>
>>
>> --
>> Amila Suriarachchi,
>> WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
Re: ADBException: Unexpected subelement customerRequest
Posted by Amila Suriarachchi <am...@gmail.com>.
hi,
Did you try with the Axis2 1.3 (which is put for vote)?
I tested the generated code with this class and changed xml.
public class TestClass extends TestCase {
public void testCertificate(){
try {
XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new
FileInputStream("test.xml"));
Object result = CertificateRequest.Factory.parse(xmlReader);
System.out.println("OK");
} catch (XMLStreamException e) {
e.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
} catch (FileNotFoundException e) {
e.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use
File | Settings | File Templates.
}
}
}
<CertificateRequest xmlns="
http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices">
<customerRequest><?xml version='1.0' encoding='UTF-8'?>
<CustomerRequest>
<AgentReference>816377-017-4</AgentReference>
<Agent>LANDATA</Agent>
<MessageType>REQ</MessageType>
<CustomerReference>123456</CustomerReference>
<PropertyPfi>1033433</PropertyPfi>
<Parcels>
<Parcel>
<ParcelPfi></ParcelPfi>
<SPI></SPI>
<LotPlan>
<Lots>1</Lots>
<PlanNumber>TP422266</PlanNumber>
<Section></Section>
<Block></Block>
<ViewPlanLink></ViewPlanLink>
</LotPlan>
<CrownAllotment>
<Section></Section>
<Block></Block>
<Allotment></Allotment>
<Portion></Portion>
<SubDivision></SubDivision>
<ParishDescription></ParishDescription>
</CrownAllotment>
<Area></Area>
<Entitlement></Entitlement>
</Parcel>
</Parcels>
<SettlementDate></SettlementDate>
<CommonPropertyIndicator>N</CommonPropertyIndicator>
<PropertyAddress>
<DisplayAddress>
<StreetLocation>17</StreetLocation>
<StreetName>TAYLOR STREET</StreetName>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</DisplayAddress>
<ParsedAddress>
<UnitType></UnitType>
<UnitNumber1></UnitNumber1>
<UnitNumber2></UnitNumber2>
<FloorType></FloorType>
<FloorNumber></FloorNumber>
<PropertyName1></PropertyName1>
<PropertyName2></PropertyName2>
<LocationDescriptor></LocationDescriptor>
<StreetNumber1>17</StreetNumber1>
<StreetNumber2></StreetNumber2>
<Street>TAYLOR</Street>
<StreetType>STREET</StreetType>
<StreetSuffix></StreetSuffix>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</ParsedAddress>
</PropertyAddress>
<AlternateAddresses>
<AlternateAddress></AlternateAddress>
</AlternateAddresses>
<Municipality>CITY OF YARRA</Municipality>
<Parish>JIKA JIKA</Parish>
<Titles>
<Title>
<VolumeFolio>3870/993</VolumeFolio>
<ViewTitleLink></ViewTitleLink>
</Title>
</Titles>
<CustodianIdentifiers>
<CustodianIdentifier name="CITY OF YARRA"
type="CPN">236755</CustodianIdentifier>
</CustodianIdentifiers>
<BookMemorials>
<BookMemorial>
<Book></Book>
<Memorial></Memorial>
</BookMemorial>
</BookMemorials>
<MapReferences>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>A9</MapGrid>
</MapReference>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>B9</MapGrid>
</MapReference>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>A10</MapGrid>
</MapReference>
<MapReference>
<MapName>Melway</MapName>
<MapPage>30</MapPage>
<MapGrid>B10</MapGrid>
</MapReference>
</MapReferences>
<RelatedProperties>
<RelatedProperty>
<Titles>
<Title>
<VolumeFolio></VolumeFolio>
<ViewTitleLink></ViewTitleLink>
</Title>
</Titles>
<Parcels>
<Parcel>
<ParcelPfi></ParcelPfi>
<SPI></SPI>
<LotPlan>
<Lots>1</Lots>
<PlanNumber>TP422266</PlanNumber>
<Section></Section>
<Block></Block>
<ViewPlanLink></ViewPlanLink>
</LotPlan>
<CrownAllotment>
<Section></Section>
<Block></Block>
<Allotment></Allotment>
<Portion></Portion>
<SubDivision></SubDivision>
<ParishDescription></ParishDescription>
</CrownAllotment>
<Area></Area>
<Entitlement></Entitlement>
</Parcel>
</Parcels>
<PropertyAddress>
<DisplayAddress>
<StreetLocation>17</StreetLocation>
<StreetName>TAYLOR STREET</StreetName>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</DisplayAddress>
<ParsedAddress>
<UnitType></UnitType>
<UnitNumber1></UnitNumber1>
<UnitNumber2></UnitNumber2>
<FloorType></FloorType>
<FloorNumber></FloorNumber>
<PropertyName1></PropertyName1>
<PropertyName2></PropertyName2>
<LocationDescriptor></LocationDescriptor>
<StreetNumber1>17</StreetNumber1>
<StreetNumber2></StreetNumber2>
<Street>TAYLOR</Street>
<StreetType>STREET</StreetType>
<StreetSuffix></StreetSuffix>
<Suburb>FITZROY NORTH</Suburb>
<Postcode>3068</Postcode>
</ParsedAddress>
</PropertyAddress>
<BookMemorials>
<BookMemorial>
<Book></Book>
<Memorial></Memorial>
</BookMemorial>
</BookMemorials>
</RelatedProperty>
</RelatedProperties>
<Vendors>
<Vendor>
<Name></Name>
<Address1></Address1>
<Address2></Address2>
<Country></Country>
<DX></DX>
</Vendor>
</Vendors>
<Purchasers>
<Purchaser>
<Name></Name>
<Address1></Address1>
<Address2></Address2>
<Country></Country>
<DX></DX>
</Purchaser>
</Purchasers>
<BodyCorporateManager>
<Name></Name>
<Address1></Address1>
<Address2></Address2>
<Country></Country>
<DX></DX>
</BodyCorporateManager>
<ReadingDate></ReadingDate>
<ExtraInformation></ExtraInformation>
<ApplicantDetails>
<Name>Groupware -Testing WebService C/- LANDATA</Name>
<Address1>Level 14, 570 Bourke Street</Address1>
<Address2>Melbourne</Address2>
<Country>Australia</Country>
<Phone>8636 2456</Phone>
<DX></DX>
<Fax></Fax>
<Email>test_certificates@landata.vic.gov.au</Email>
<PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
</ApplicantDetails>
<ApplicationReason></ApplicationReason>
<CertificateName code="42">Planning Certificate
Express</CertificateName>
<TimeStamp>2007-03-23T09:42:50</TimeStamp>
</CustomerRequest>
</customerRequest>
</CertificateRequest>
It worked fine for me. Can you please test your generated code with this
test case?
Amila.
On 8/13/07, Angus Ng <an...@gw.com.au> wrote:
>
> Yup, that's my mistake. I've changed it back to the correct one. But I
> still got the same error.
>
> I follow the stack trace and I found that somethings wrong in the
> reader.next() method from the generated code. At the beginning, the whole
> CertificateRequest is passed into the Factory:
>
> CertificateRequest.Factory.parse(param.getXMLStreamReaderWithoutCaching())
>
> which param is the OMElement of CertificateRequest.
>
> And then in the CertificateRequest.parse(XMLStreamReader reader) method,
> it will do some checking on whether it is a start element or end element,
> and it looks like it is moving a pointer from CertiricateRequest to
> CustomerRequest, which CustomerRequest is a child element of
> CertificateRequest. By debugging the code, I can see the currentNode in
> XMLStreamReader has been changed to CustomerRequest. However, when it uses
> reader.getName(), the cursor is still pointing to CertificateRequest
> content. So it ends up failing the condition statement as follow:
>
> if (reader.isStartElement() &&
> new javax.xml.namespace.QName(
> "
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices",
> "customerRequest").equals(reader.getName())) {
> java.lang.String content = reader.getElementText();
>
> object.setCustomerRequest(
> org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
> content));
>
> reader.next();
> } // End of if for expected property start element
>
>
> And finally throw an exception - ADBException: Unexpected subelement
> customerRequest.
>
> Does there appear to be any problem in my generated code?
>
> Regards,
> Angus
>
>
>
> On 10 Aug 2007, at 3:36 PM, Amila Suriarachchi wrote:
>
> in schema you have define the targetnamespace as
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices
>
> but in request xml element namespce is
>
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/CertificateCall
>
> Amila.
>
> On 8/10/07, Angus Ng <an...@gw.com.au> wrote:
> >
> > Hi,
> >
> > I got an error when I try to test my webservice using Axis2 1.3 nightly
> > build of 9 Aug 2007. I am using ADB as my binding strategy. And I create a
> > sample soap message and use soapUI to fire on the webservice. I got the
> > error as follow:
> >
> > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> > ">
> > <soapenv:Body>
> > <soapenv:Fault>
> > <faultcode>soapenv:Server</faultcode>
> > <faultstring>org.apache.axis2.databinding.ADBException:
> > Unexpected subelement customerRequest</faultstring>
> > <detail>
> > <Exception>org.apache.axis2.AxisFault:
> > org.apache.axis2.databinding.ADBException: Unexpected subelement
> > customerRequest
> > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> > at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM(
> > CertificateCallMessageReceiverInOut.java:193)
> > at
> > landata.service.adb.CertificateCallMessageReceiverInOut.invokeBusinessLogic
> > (CertificateCallMessageReceiverInOut.java:44)
> > at
> > org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic
> > (AbstractInOutSyncMessageReceiver.java:42)
> > at org.apache.axis2.receivers.AbstractMessageReceiver.receive(
> > AbstractMessageReceiver.java:96)
> > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> > at
> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest
> > (HTTPTransportUtils.java:275)
> > at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
> > :120)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
> > ApplicationFilterChain.java:269)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > ApplicationFilterChain.java:188)
> > at net.sf.springlayout.web.filter.LocalApplicationContext.doFilterInternal
> > (LocalApplicationContext.java:57)
> > at org.springframework.web.filter.OncePerRequestFilter.doFilter(
> > OncePerRequestFilter.java :77)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > ApplicationFilterChain.java :215)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > ApplicationFilterChain.java :188)
> > at
> > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(
> > OpenSessionInViewFilter.java:173)
> > at org.springframework. web.filter.OncePerRequestFilter.doFilter(
> > OncePerRequestFilter.java:77)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
> > ApplicationFilterChain.java:215)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > ApplicationFilterChain.java:188)
> > at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter (
> > PageFilter.java:39)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
> > ApplicationFilterChain.java:215)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > ApplicationFilterChain.java:188)
> > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter (
> > FilterChainProxy.java:264)
> > at org.acegisecurity.intercept. web.FilterSecurityInterceptor.invoke(
> > FilterSecurityInterceptor.java:107)
> > at org.acegisecurity.intercept .web.FilterSecurityInterceptor.doFilter(
> > FilterSecurityInterceptor.java:72)
> > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > FilterChainProxy.java:274)
> > at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(
> > ExceptionTranslationFilter.java :110)
> > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > FilterChainProxy.java :274)
> > at
> > org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(
> > AnonymousProcessingFilter.java:125)
> > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter (
> > FilterChainProxy.java:274)
> > at org.acegisecurity.ui.AbstractProcessingFilter.doFilter (
> > AbstractProcessingFilter.java:217)
> > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter (
> > FilterChainProxy.java:274)
> > at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
> > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > FilterChainProxy.java :274)
> > at
> > org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(
> > HttpSessionContextIntegrationFilter.java :229)
> > at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> > FilterChainProxy.java :274)
> > at org.acegisecurity.util.FilterChainProxy.doFilter(
> > FilterChainProxy.java:148)
> > at org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > FilterToBeanProxy.java:98)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > ApplicationFilterChain.java :215)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > ApplicationFilterChain.java :188)
> > at org.apache.catalina.core.StandardWrapperValve.invoke(
> > StandardWrapperValve.java :210)
> > at org.apache.catalina.core.StandardContextValve.invoke(
> > StandardContextValve.java :174)
> > at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> > AuthenticatorBase.java :433)
> > at org.apache.catalina.core.StandardHostValve.invoke(
> > StandardHostValve.java:127)
> > at org.apache.catalina.valves.ErrorReportValve.invoke(
> > ErrorReportValve.java:117)
> > at org.apache.catalina.core.StandardEngineValve.invoke(
> > StandardEngineValve.java:108)
> > at org.apache.catalina.connector.CoyoteAdapter.service(
> > CoyoteAdapter.java:151)
> > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> > :870)
> > at
> > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> > (Http11BaseProtocol.java :665)
> > at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> > PoolTcpEndpoint.java :528)
> > at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> > LeaderFollowerWorkerThread.java :81)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> > ThreadPool.java :685)
> > at java.lang.Thread.run(Thread.java:613)
> > Caused by: java.lang.Exception:
> > org.apache.axis2.databinding.ADBException: Unexpected subelement
> > customerRequest
> > at au.gov.vic.landata. www.certificaterequestresponse.CertificateRequest
> > $Factory.parse(CertificateRequest.java:440)
> > at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM(
> > CertificateCallMessageReceiverInOut.java:175)
> > ... 52 more
> > Caused by: org.apache.axis2.databinding.ADBException: Unexpected
> > subelement customerRequest
> > at au.gov.vic.landata. www.certificaterequestresponse.CertificateRequest
> > $Factory.parse(CertificateRequest.java:436)
> > ... 53 more</Exception>
> > </detail>
> > </soapenv:Fault>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> >
> > And here is my sample soap message:
> >
> > <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema">
> > <soap:Body>
> > <CertificateRequest xmlns="http://Portal1.landata.vic.gov.au/CustodianWebservices/1.20/CertificateCall
> > ">
> > <customerRequest><?xml version=' 1.0' encoding='UTF-8'?>
> > <CustomerRequest>
> > <AgentReference>816377-017-4</AgentReference>
> > <Agent>LANDATA</Agent>
> > <MessageType>REQ</MessageType>
> > <CustomerReference>123456</CustomerReference>
> > <PropertyPfi>1033433</PropertyPfi>
> > <Parcels>
> > <Parcel>
> > <ParcelPfi></ParcelPfi>
> > <SPI></SPI>
> > <LotPlan>
> > <Lots>1</Lots>
> > <PlanNumber>TP422266</PlanNumber>
> > <Section></Section>
> > <Block></Block>
> > <ViewPlanLink></ViewPlanLink>
> > </LotPlan>
> > <CrownAllotment>
> > <Section></Section>
> > <Block></Block>
> > <Allotment></Allotment>
> > <Portion></Portion>
> > <SubDivision></SubDivision>
> > <ParishDescription></ParishDescription>
> > </CrownAllotment>
> > <Area></Area>
> > <Entitlement></Entitlement>
> > </Parcel>
> > </Parcels>
> > <SettlementDate></SettlementDate>
> > <CommonPropertyIndicator>N</CommonPropertyIndicator>
> > <PropertyAddress>
> > <DisplayAddress>
> > <StreetLocation>17</StreetLocation>
> > <StreetName>TAYLOR STREET</StreetName>
> > <Suburb>FITZROY NORTH</Suburb>
> > <Postcode>3068</Postcode>
> > </DisplayAddress>
> > <ParsedAddress>
> > <UnitType></UnitType>
> > <UnitNumber1></UnitNumber1>
> > <UnitNumber2></UnitNumber2>
> > <FloorType></FloorType>
> > <FloorNumber></FloorNumber>
> > <PropertyName1></PropertyName1>
> > <PropertyName2></PropertyName2>
> > <LocationDescriptor></LocationDescriptor>
> > <StreetNumber1>17</StreetNumber1>
> > <StreetNumber2></StreetNumber2>
> > <Street>TAYLOR</Street>
> > <StreetType>STREET</StreetType>
> > <StreetSuffix></StreetSuffix>
> > <Suburb>FITZROY NORTH</Suburb>
> > <Postcode>3068</Postcode>
> > </ParsedAddress>
> > </PropertyAddress>
> > <AlternateAddresses>
> > <AlternateAddress></AlternateAddress>
> > </AlternateAddresses>
> > <Municipality>CITY OF YARRA</Municipality>
> > <Parish>JIKA JIKA</Parish>
> > <Titles>
> > <Title>
> > <VolumeFolio>3870/993</VolumeFolio>
> > <ViewTitleLink></ViewTitleLink>
> > </Title>
> > </Titles>
> > <CustodianIdentifiers>
> > <CustodianIdentifier name="CITY OF YARRA"
> > type="CPN">236755</CustodianIdentifier>
> > </CustodianIdentifiers>
> > <BookMemorials>
> > <BookMemorial>
> > <Book></Book>
> > <Memorial></Memorial>
> > </BookMemorial>
> > </BookMemorials>
> > <MapReferences>
> > <MapReference>
> > <MapName>Melway</MapName>
> > <MapPage>30</MapPage>
> > <MapGrid>A9</MapGrid>
> > </MapReference>
> > <MapReference>
> > <MapName>Melway</MapName>
> > <MapPage>30</MapPage>
> > <MapGrid>B9</MapGrid>
> > </MapReference>
> > <MapReference>
> > <MapName>Melway</MapName>
> > <MapPage>30</MapPage>
> > <MapGrid>A10</MapGrid>
> > </MapReference>
> > <MapReference>
> > <MapName>Melway</MapName>
> > <MapPage>30</MapPage>
> > <MapGrid>B10</MapGrid>
> > </MapReference>
> > </MapReferences>
> > <RelatedProperties>
> > <RelatedProperty>
> > <Titles>
> > <Title>
> > <VolumeFolio></VolumeFolio>
> > <ViewTitleLink></ViewTitleLink>
> > </Title>
> > </Titles>
> > <Parcels>
> > <Parcel>
> > <ParcelPfi></ParcelPfi>
> > <SPI></SPI>
> > <LotPlan>
> > <Lots>1</Lots>
> > <PlanNumber>TP422266</PlanNumber>
> > <Section></Section>
> > <Block></Block>
> > <ViewPlanLink></ViewPlanLink>
> > </LotPlan>
> > <CrownAllotment>
> > <Section></Section>
> > <Block></Block>
> > <Allotment></Allotment>
> > <Portion></Portion>
> > <SubDivision></SubDivision>
> > <ParishDescription></ParishDescription>
> > </CrownAllotment>
> > <Area></Area>
> > <Entitlement></Entitlement>
> > </Parcel>
> > </Parcels>
> > <PropertyAddress>
> > <DisplayAddress>
> > <StreetLocation>17</StreetLocation>
> > <StreetName>TAYLOR STREET</StreetName>
> > <Suburb>FITZROY NORTH</Suburb>
> > <Postcode>3068</Postcode>
> > </DisplayAddress>
> > <ParsedAddress>
> > <UnitType></UnitType>
> > <UnitNumber1></UnitNumber1>
> > <UnitNumber2></UnitNumber2>
> > <FloorType></FloorType>
> > <FloorNumber></FloorNumber>
> > <PropertyName1></PropertyName1>
> > <PropertyName2></PropertyName2>
> > <LocationDescriptor></LocationDescriptor>
> > <StreetNumber1>17</StreetNumber1>
> > <StreetNumber2></StreetNumber2>
> > <Street>TAYLOR</Street>
> > <StreetType>STREET</StreetType>
> > <StreetSuffix></StreetSuffix>
> > <Suburb>FITZROY NORTH</Suburb>
> > <Postcode>3068</Postcode>
> > </ParsedAddress>
> > </PropertyAddress>
> > <BookMemorials>
> > <BookMemorial>
> > <Book></Book>
> > <Memorial></Memorial>
> > </BookMemorial>
> > </BookMemorials>
> > </RelatedProperty>
> > </RelatedProperties>
> > <Vendors>
> > <Vendor>
> > <Name></Name>
> > <Address1></Address1>
> > <Address2></Address2>
> > <Country></Country>
> > <DX></DX>
> > </Vendor>
> > </Vendors>
> > <Purchasers>
> > <Purchaser>
> > <Name></Name>
> > <Address1></Address1>
> > <Address2></Address2>
> > <Country></Country>
> > <DX></DX>
> > </Purchaser>
> > </Purchasers>
> > <BodyCorporateManager>
> > <Name></Name>
> > <Address1></Address1>
> > <Address2></Address2>
> > <Country></Country>
> > <DX></DX>
> > </BodyCorporateManager>
> > <ReadingDate></ReadingDate>
> > <ExtraInformation></ExtraInformation>
> > <ApplicantDetails>
> > <Name>Groupware -Testing WebService C/- LANDATA</Name>
> >
> > <Address1>Level 14, 570 Bourke Street</Address1>
> > <Address2>Melbourne</Address2>
> > <Country>Australia</Country>
> > <Phone>8636 2456</Phone>
> > <DX></DX>
> > <Fax></Fax>
> > <Email> test_certificates@landata.vic.gov.au</Email>
> >
> > <PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
> > </ApplicantDetails>
> > <ApplicationReason></ApplicationReason>
> > <CertificateName code="42">Planning Certificate
> > Express</CertificateName>
> > <TimeStamp>2007-03-23T09:42:50</TimeStamp>
> > </CustomerRequest>
> > </customerRequest>
> > </CertificateRequest>
> > </soap:Body>
> > </soap:Envelope>
> >
> >
> > And here is my WSDL:
> >
> > <?xml version= "1.0" encoding ="utf-8" ?>
> > < wsdl:definitions xmlns:soap =" http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns:tm =" http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc
> > =" http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime ="http://schemas.xmlsoap.org/wsdl/mime/"
> > xmlns:tns ="http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
> > xmlns:s =" http://www.w3.org/2001/XMLSchema" xmlns:soap12 ="http://schemas.xmlsoap.org/wsdl/soap12/"
> > xmlns:http =" http://schemas.xmlsoap.org/wsdl/http/" targetNamespace ="http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
> > xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/">
> > < wsdl:documentation xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/">Custodian Certificate
> > </ wsdl:documentation>
> > <wsdl:types >
> > <s:schema elementFormDefault= "qualified" targetNamespace ="http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices
> > ">
> > < s:element name ="CertificateRequest" >
> > <s:complexType >
> > <s:sequence>
> > <s:element minOccurs ="0" maxOccurs= "1" name ="customerRequest"
> > type= "s:string" />
> > </ s:sequence>
> > </s:complexType >
> > </s:element >
> > <s:element name= "CertificateRequestResponse">
> > < s:complexType>
> > < s:sequence>
> > < s:element minOccurs ="1" maxOccurs= "1" name= "CertificateRequestResult"
> > type="s:int" />
> > <s:element minOccurs= "0" maxOccurs ="1"
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
--
Amila Suriarachchi,
WSO2 Inc.
Re: ADBException: Unexpected subelement customerRequest
Posted by Angus Ng <an...@gw.com.au>.
Yup, that's my mistake. I've changed it back to the correct one. But
I still got the same error.
I follow the stack trace and I found that somethings wrong in the
reader.next() method from the generated code. At the beginning, the
whole CertificateRequest is passed into the Factory:
CertificateRequest.Factory.parse
(param.getXMLStreamReaderWithoutCaching())
which param is the OMElement of CertificateRequest.
And then in the CertificateRequest.parse(XMLStreamReader reader)
method, it will do some checking on whether it is a start element or
end element, and it looks like it is moving a pointer from
CertiricateRequest to CustomerRequest, which CustomerRequest is a
child element of CertificateRequest. By debugging the code, I can see
the currentNode in XMLStreamReader has been changed to
CustomerRequest. However, when it uses reader.getName(), the cursor
is still pointing to CertificateRequest content. So it ends up
failing the condition statement as follow:
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://portal1.landata.vic.gov.au/
CustodianWebservices/1.20/WebServices",
"customerRequest").equals(reader.getName
())) {
java.lang.String content = reader.getElementText();
object.setCustomerRequest
(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
And finally throw an exception - ADBException: Unexpected subelement
customerRequest.
Does there appear to be any problem in my generated code?
Regards,
Angus
On 10 Aug 2007, at 3:36 PM, Amila Suriarachchi wrote:
> in schema you have define the targetnamespace as
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
> WebServices
>
> but in request xml element namespce is
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
> CertificateCall
>
> Amila.
>
> On 8/10/07, Angus Ng <an...@gw.com.au> wrote:
> Hi,
>
> I got an error when I try to test my webservice using Axis2 1.3
> nightly build of 9 Aug 2007. I am using ADB as my binding strategy.
> And I create a sample soap message and use soapUI to fire on the
> webservice. I got the error as follow:
>
> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/
> envelope/">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>org.apache.axis2.databinding.ADBException:
> Unexpected subelement customerRequest</faultstring>
> <detail>
> <Exception>org.apache.axis2.AxisFault:
> org.apache.axis2.databinding.ADBException: Unexpected subelement
> customerRequest
> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM
> (CertificateCallMessageReceiverInOut.java:193)
> at
> landata.service.adb.CertificateCallMessageReceiverInOut.invokeBusiness
> Logic(CertificateCallMessageReceiverInOut.java:44)
> at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusi
> nessLogic(AbstractInOutSyncMessageReceiver.java:42)
> at org.apache.axis2.receivers.AbstractMessageReceiver.receive
> (AbstractMessageReceiver.java:96)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequ
> est(HTTPTransportUtils.java:275)
> at org.apache.axis2.transport.http.AxisServlet.doPost
> (AxisServlet.java:120)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:269)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:188)
> at net.sf.springlayout.
> web.filter.LocalApplicationContext.doFilterInternal
> (LocalApplicationContext.java:57)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter
> (OncePerRequestFilter.java :77)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java :215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java :188)
> at
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doF
> ilterInternal (OpenSessionInViewFilter.java:173)
> at org.springframework. web.filter.OncePerRequestFilter.doFilter
> (OncePerRequestFilter.java:77)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:188)
> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter
> (PageFilter.java:39)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:188)
> at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter (FilterChainProxy.java:264)
> at org.acegisecurity.intercept.
> web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:
> 107)
> at
> org.acegisecurity.intercept .web.FilterSecurityInterceptor.doFilter
> (FilterSecurityInterceptor.java:72)
> at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:274)
> at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter
> (ExceptionTranslationFilter.java :110)
> at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java :274)
> at
> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilt
> er( AnonymousProcessingFilter.java:125)
> at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter (FilterChainProxy.java:274)
> at org.acegisecurity.ui.AbstractProcessingFilter.doFilter
> (AbstractProcessingFilter.java:217)
> at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter (FilterChainProxy.java:274)
> at org.acegisecurity.ui.logout.LogoutFilter.doFilter
> (LogoutFilter.java :106)
> at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java :274)
> at
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter
> (HttpSessionContextIntegrationFilter.java :229)
> at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java :274)
> at org.acegisecurity.util.FilterChainProxy.doFilter
> (FilterChainProxy.java:148)
> at org.acegisecurity.util.FilterToBeanProxy.doFilter
> (FilterToBeanProxy.java:98)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java :215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java :188)
> at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java :210)
> at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java :174)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke
> (AuthenticatorBase.java :433)
> at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:127)
> at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:117)
> at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:108)
> at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:151)
> at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:870)
> at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java :
> 665)
> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint.java :528)
> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollowerWorkerThread.java :81)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool.java :685)
> at java.lang.Thread.run(Thread.java:613)
> Caused by: java.lang.Exception:
> org.apache.axis2.databinding.ADBException: Unexpected subelement
> customerRequest
> at au.gov.vic.landata.
> www.certificaterequestresponse.CertificateRequest$Factory.parse
> (CertificateRequest.java:440)
> at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM
> (CertificateCallMessageReceiverInOut.java:175)
> ... 52 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected
> subelement customerRequest
> at au.gov.vic.landata.
> www.certificaterequestresponse.CertificateRequest$Factory.parse
> (CertificateRequest.java:436)
> ... 53 more</Exception>
> </detail>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> And here is my sample soap message:
>
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://
> www.w3.org/2001/XMLSchema-instance " xmlns:xsd="http://www.w3.org/
> 2001/XMLSchema">
> <soap:Body>
> <CertificateRequest xmlns=" http://Portal1.landata.vic.gov.au/
> CustodianWebservices/1.20/CertificateCall">
> <customerRequest><?xml version=' 1.0' encoding='UTF-8'?>
> <CustomerRequest>
> <AgentReference>816377-017-4</AgentReference>
> <Agent>LANDATA</Agent>
> <MessageType>REQ</MessageType>
> <CustomerReference>123456</CustomerReference>
> <PropertyPfi>1033433</PropertyPfi>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <SettlementDate></SettlementDate>
> <CommonPropertyIndicator>N</CommonPropertyIndicator>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <AlternateAddresses>
> <AlternateAddress></AlternateAddress>
> </AlternateAddresses>
> <Municipality>CITY OF YARRA</Municipality>
> <Parish>JIKA JIKA</Parish>
> <Titles>
> <Title>
> <VolumeFolio>3870/993</VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <CustodianIdentifiers>
> <CustodianIdentifier name="CITY OF YARRA" type="CPN">
> 236755</CustodianIdentifier>
> </CustodianIdentifiers>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> <MapReferences>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A10</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B10</MapGrid>
> </MapReference>
> </MapReferences>
> <RelatedProperties>
> <RelatedProperty>
> <Titles>
> <Title>
> <VolumeFolio></VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> </RelatedProperty>
> </RelatedProperties>
> <Vendors>
> <Vendor>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Vendor>
> </Vendors>
> <Purchasers>
> <Purchaser>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Purchaser>
> </Purchasers>
> <BodyCorporateManager>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </BodyCorporateManager>
> <ReadingDate></ReadingDate>
> <ExtraInformation></ExtraInformation>
> <ApplicantDetails>
> <Name>Groupware -Testing WebService C/- LANDATA</
> Name>
> <Address1>Level 14, 570 Bourke Street</Address1>
> <Address2>Melbourne</Address2>
> <Country>Australia</Country>
> <Phone>8636 2456</Phone>
> <DX></DX>
> <Fax></Fax>
> <Email> test_certificates@landata.vic.gov.au</Email>
> <PreferredDeliveryMethod>Email</
> PreferredDeliveryMethod>
> </ApplicantDetails>
> <ApplicationReason></ApplicationReason>
> <CertificateName code="42">Planning Certificate
> Express</CertificateName>
> <TimeStamp>2007-03-23T09:42:50</TimeStamp>
> </CustomerRequest>
> </customerRequest>
> </CertificateRequest>
> </soap:Body>
> </soap:Envelope>
>
>
> And here is my WSDL:
>
> <?xml version= "1.0" encoding ="utf-8" ?>
> < wsdl:definitions xmlns:soap =" http://schemas.xmlsoap.org/wsdl/
> soap/" xmlns:tm =" http://microsoft.com/wsdl/mime/textMatching/"
> xmlns:soapenc =" http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:mime =" http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns ="
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
> WebServices" xmlns:s =" http://www.w3.org/2001/XMLSchema"
> xmlns:soap12 =" http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http
> =" http://schemas.xmlsoap.org/wsdl/http/" targetNamespace =" http://
> portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
> xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/">
> < wsdl:documentation xmlns:wsdl =" http://schemas.xmlsoap.org/
> wsdl/"> Custodian Certificate</ wsdl:documentation>
> <wsdl:types >
> <s:schema elementFormDefault= "qualified" targetNamespace ="
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/
> WebServices">
> < s:element name ="CertificateRequest" >
> <s:complexType >
> <s:sequence>
> <s:element minOccurs ="0" maxOccurs= "1" name
> ="customerRequest" type= "s:string" />
> </ s:sequence>
> </s:complexType >
> </s:element >
> <s:element name= "CertificateRequestResponse">
> < s:complexType>
> < s:sequence>
> < s:element minOccurs ="1" maxOccurs= "1" name=
> "CertificateRequestResult" type="s:int" />
> <s:element minOccurs= "0" maxOccurs ="1"
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
Re: ADBException: Unexpected subelement customerRequest
Posted by Amila Suriarachchi <am...@gmail.com>.
in schema you have define the targetnamespace as
http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices
but in request xml element namespce is
http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/CertificateCall
Amila.
On 8/10/07, Angus Ng <an...@gw.com.au> wrote:
>
> Hi,
>
> I got an error when I try to test my webservice using Axis2 1.3 nightly
> build of 9 Aug 2007. I am using ADB as my binding strategy. And I create a
> sample soap message and use soapUI to fire on the webservice. I got the
> error as follow:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>org.apache.axis2.databinding.ADBException:
> Unexpected subelement customerRequest</faultstring>
> <detail>
> <Exception>org.apache.axis2.AxisFault:
> org.apache.axis2.databinding.ADBException: Unexpected subelement
> customerRequest
> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM(
> CertificateCallMessageReceiverInOut.java:193)
> at
> landata.service.adb.CertificateCallMessageReceiverInOut.invokeBusinessLogic
> (CertificateCallMessageReceiverInOut.java:44)
> at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic
> (AbstractInOutSyncMessageReceiver.java:42)
> at org.apache.axis2.receivers.AbstractMessageReceiver.receive(
> AbstractMessageReceiver.java:96)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
> HTTPTransportUtils.java:275)
> at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
> :120)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:269)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:188)
> at net.sf.springlayout.web.filter.LocalApplicationContext.doFilterInternal
> (LocalApplicationContext.java:57)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(
> OncePerRequestFilter.java:77)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:188)
> at
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
> (OpenSessionInViewFilter.java:173)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(
> OncePerRequestFilter.java:77)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:188)
> at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(
> PageFilter.java:39)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:188)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> FilterChainProxy.java:264)
> at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(
> FilterSecurityInterceptor.java:107)
> at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(
> FilterSecurityInterceptor.java:72)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> FilterChainProxy.java:274)
> at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(
> ExceptionTranslationFilter.java:110)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> FilterChainProxy.java:274)
> at
> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(
> AnonymousProcessingFilter.java:125)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> FilterChainProxy.java:274)
> at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(
> AbstractProcessingFilter.java:217)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> FilterChainProxy.java:274)
> at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java
> :106)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> FilterChainProxy.java:274)
> at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(
> HttpSessionContextIntegrationFilter.java:229)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(
> FilterChainProxy.java:274)
> at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java
> :148)
> at org.acegisecurity.util.FilterToBeanProxy.doFilter(
> FilterToBeanProxy.java:98)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:188)
> at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:210)
> at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:174)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:433)
> at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:127)
> at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:117)
> at org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:108)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :151)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :870)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:665)
> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:528)
> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:81)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:685)
> at java.lang.Thread.run(Thread.java:613)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException:
> Unexpected subelement customerRequest
> at au.gov.vic.landata.www.certificaterequestresponse.CertificateRequest
> $Factory.parse(CertificateRequest.java:440)
> at landata.service.adb.CertificateCallMessageReceiverInOut.fromOM(
> CertificateCallMessageReceiverInOut.java:175)
> ... 52 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected
> subelement customerRequest
> at au.gov.vic.landata.www.certificaterequestresponse.CertificateRequest
> $Factory.parse(CertificateRequest.java:436)
> ... 53 more</Exception>
> </detail>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> And here is my sample soap message:
>
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <CertificateRequest xmlns="
> http://Portal1.landata.vic.gov.au/CustodianWebservices/1.20/CertificateCall
> ">
> <customerRequest><?xml version='1.0' encoding='UTF-8'?>
> <CustomerRequest>
> <AgentReference>816377-017-4</AgentReference>
> <Agent>LANDATA</Agent>
> <MessageType>REQ</MessageType>
> <CustomerReference>123456</CustomerReference>
> <PropertyPfi>1033433</PropertyPfi>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <SettlementDate></SettlementDate>
> <CommonPropertyIndicator>N</CommonPropertyIndicator>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <AlternateAddresses>
> <AlternateAddress></AlternateAddress>
> </AlternateAddresses>
> <Municipality>CITY OF YARRA</Municipality>
> <Parish>JIKA JIKA</Parish>
> <Titles>
> <Title>
> <VolumeFolio>3870/993</VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <CustodianIdentifiers>
> <CustodianIdentifier name="CITY OF YARRA"
> type="CPN">236755</CustodianIdentifier>
> </CustodianIdentifiers>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> <MapReferences>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B9</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>A10</MapGrid>
> </MapReference>
> <MapReference>
> <MapName>Melway</MapName>
> <MapPage>30</MapPage>
> <MapGrid>B10</MapGrid>
> </MapReference>
> </MapReferences>
> <RelatedProperties>
> <RelatedProperty>
> <Titles>
> <Title>
> <VolumeFolio></VolumeFolio>
> <ViewTitleLink></ViewTitleLink>
> </Title>
> </Titles>
> <Parcels>
> <Parcel>
> <ParcelPfi></ParcelPfi>
> <SPI></SPI>
> <LotPlan>
> <Lots>1</Lots>
> <PlanNumber>TP422266</PlanNumber>
> <Section></Section>
> <Block></Block>
> <ViewPlanLink></ViewPlanLink>
> </LotPlan>
> <CrownAllotment>
> <Section></Section>
> <Block></Block>
> <Allotment></Allotment>
> <Portion></Portion>
> <SubDivision></SubDivision>
> <ParishDescription></ParishDescription>
> </CrownAllotment>
> <Area></Area>
> <Entitlement></Entitlement>
> </Parcel>
> </Parcels>
> <PropertyAddress>
> <DisplayAddress>
> <StreetLocation>17</StreetLocation>
> <StreetName>TAYLOR STREET</StreetName>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </DisplayAddress>
> <ParsedAddress>
> <UnitType></UnitType>
> <UnitNumber1></UnitNumber1>
> <UnitNumber2></UnitNumber2>
> <FloorType></FloorType>
> <FloorNumber></FloorNumber>
> <PropertyName1></PropertyName1>
> <PropertyName2></PropertyName2>
> <LocationDescriptor></LocationDescriptor>
> <StreetNumber1>17</StreetNumber1>
> <StreetNumber2></StreetNumber2>
> <Street>TAYLOR</Street>
> <StreetType>STREET</StreetType>
> <StreetSuffix></StreetSuffix>
> <Suburb>FITZROY NORTH</Suburb>
> <Postcode>3068</Postcode>
> </ParsedAddress>
> </PropertyAddress>
> <BookMemorials>
> <BookMemorial>
> <Book></Book>
> <Memorial></Memorial>
> </BookMemorial>
> </BookMemorials>
> </RelatedProperty>
> </RelatedProperties>
> <Vendors>
> <Vendor>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Vendor>
> </Vendors>
> <Purchasers>
> <Purchaser>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </Purchaser>
> </Purchasers>
> <BodyCorporateManager>
> <Name></Name>
> <Address1></Address1>
> <Address2></Address2>
> <Country></Country>
> <DX></DX>
> </BodyCorporateManager>
> <ReadingDate></ReadingDate>
> <ExtraInformation></ExtraInformation>
> <ApplicantDetails>
> <Name>Groupware -Testing WebService C/- LANDATA</Name>
> <Address1>Level 14, 570 Bourke Street</Address1>
> <Address2>Melbourne</Address2>
> <Country>Australia</Country>
> <Phone>8636 2456</Phone>
> <DX></DX>
> <Fax></Fax>
> <Email>test_certificates@landata.vic.gov.au</Email>
> <PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
> </ApplicantDetails>
> <ApplicationReason></ApplicationReason>
> <CertificateName code="42">Planning Certificate
> Express</CertificateName>
> <TimeStamp>2007-03-23T09:42:50</TimeStamp>
> </CustomerRequest>
> </customerRequest>
> </CertificateRequest>
> </soap:Body>
> </soap:Envelope>
>
>
> And here is my WSDL:
>
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="
> http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
> xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="
> http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="
> http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Custodian
> Certificate</wsdl:documentation>
> <wsdl:types>
> <s:schema elementFormDefault="qualified" targetNamespace="
> http://portal1.landata.vic.gov.au/CustodianWebservices/1.20/WebServices">
> <s:element name="CertificateRequest">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="1" name="customerRequest"
> type="s:string" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:element name="CertificateRequestResponse">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="CertificateRequestResult"
> type="s:int" />
> <s:element minOccurs="0" maxOccurs="1"
>
--
Amila Suriarachchi,
WSO2 Inc.