axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Timmer (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AXIS2-5254) WSDL2Java results in XML response that not conforms to schema
Date Mon, 27 Feb 2012 15:36:48 GMT
WSDL2Java results in XML response that not conforms to schema
-------------------------------------------------------------

                 Key: AXIS2-5254
                 URL: https://issues.apache.org/jira/browse/AXIS2-5254
             Project: Axis2
          Issue Type: Bug
          Components: wsdl
    Affects Versions: 1.6.1
         Environment: Mac 10.6.8, Java 1.6.0_29
axis2-wsdl2code-maven-plugin 1.6.1 and also 1.6.2-SNAPSHOT
            Reporter: Andre Timmer


== Generated (INCORRECT) ==
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
            ...
            <soapenv:Body>
                <ns2:BDPersoonInfoResponse xmlns:ns2="http://bkwi.nl/SuwiML/Diensten/BDDossierPersoon/v0100">
                    <ClientSuwi>
                        <Burgerservicenr>000000000</Burgerservicenr>
                        <Vermogenscomponent>
                            <Bankrekening xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance"
ns0:type="ns2:Bankrekening_type0">
                                <Bankrekeningnr>1014444</Bankrekeningnr>
                                <Banknaam>BANK SAX</Banknaam>
                                <Tenaamstelling>MR SMIT</Tenaamstelling>
                                <OntvangenRenteBankrekening>
                                    <JaarOntvangenRente>2008</JaarOntvangenRente>
                                    <BedrOntvangenRente>
                                        <WaardeBedr>0</WaardeBedr>
                                    </BedrOntvangenRente>
                                </OntvangenRenteBankrekening>
                                <SaldoBankrekening>
                                    <DatRekeningafschrift>20080000</DatRekeningafschrift>
                                    <BedrSaldoBankrekening>
                                        <WaardeBedr>107100</WaardeBedr>
                                    </BedrSaldoBankrekening>
                                </SaldoBankrekening>
                            </Bankrekening>
                        </Vermogenscomponent>
                    </ClientSuwi>
                </ns2:BDPersoonInfoResponse>
            </soapenv:Body>
        </soapenv:Envelope>

== Expected (CORRECT) ==
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
            ...
            <soapenv:Body>
                <ns2:BDPersoonInfoResponse xmlns:ns2="http://bkwi.nl/SuwiML/Diensten/BDDossierPersoon/v0100">
                    <ClientSuwi>
                        <Burgerservicenr>000000000</Burgerservicenr>
                        <Vermogenscomponent>
                            <Bankrekening>                                         
          --> namespace and type have been removed, this is the only change
                                <Bankrekeningnr>1014444</Bankrekeningnr>
                                <Banknaam>BANK SAX</Banknaam>
                                <Tenaamstelling>MR SMIT</Tenaamstelling>
                                <OntvangenRenteBankrekening>
                                    <JaarOntvangenRente>2008</JaarOntvangenRente>
                                    <BedrOntvangenRente>
                                        <WaardeBedr>0</WaardeBedr>
                                    </BedrOntvangenRente>
                                </OntvangenRenteBankrekening>
                                <SaldoBankrekening>
                                    <DatRekeningafschrift>20080000</DatRekeningafschrift>
                                    <BedrSaldoBankrekening>
                                        <WaardeBedr>107100</WaardeBedr>
                                    </BedrSaldoBankrekening>
                                </SaldoBankrekening>
                            </Bankrekening>
                        </Vermogenscomponent>
                    </ClientSuwi>
                </ns2:BDPersoonInfoResponse>
            </soapenv:Body>
        </soapenv:Envelope>

== Part of schema (it's big so only the relevant part here is included) ==
..
<element name="Vermogenscomponent" minOccurs="0">
	<complexType>
	        <sequence>
			<element name="Bankrekening" minOccurs="0" maxOccurs="unbounded">
				<complexType>
					<complexContent>
						<extension base="smls:Bankrekening">
							<sequence>
								<element name="Tenaamstelling" type="sml:OmschrijvingAN80" minOccurs="0"/>
								<element name="OntvangenRenteBankrekening" type="smls:OntvangenRenteBankrekening"
minOccurs="0"/>
								<element name="SaldoBankrekening" type="smls:SaldoBankrekening" minOccurs="0"/>
							</sequence>
						</extension>
					</complexContent>
				</complexType>
			</element>
		</sequence>
	</complexType>
</element>
..
<complexType name="Bankrekening">
        <sequence>
		<element name="Bankrekeningnr" type="sml:BankGironr" minOccurs="0"/>
		<element name="Bic" type="sml:Bic" minOccurs="0"/>
		<element name="Iban" type="sml:Iban" minOccurs="0"/>
		<element name="LandencdIso" type="sml:LandenCdIsoA2" minOccurs="0"/>
		<element name="Banknaam" type="sml:OmschrijvingAN40" minOccurs="0"/>
	</sequence>
</complexType>
..

The issue is that schema element Bankrekening is an extension of a type with the SAME name.
The java code generated mirrors this extension:
- we get a Bankrekening.java
- and a Bankrekening_type0.java extending Bankrekening

  Some where in the code of this class it generates:
      <Bankrekening xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" ns0:type="ns2:Bankrekening_type0">
  instead of
      <Bankrekening>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message