axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Updated: (AXIS-1326) ?WSDL emits elements in incorrect namespaces
Date Tue, 20 Apr 2004 19:44:55 GMT
The following issue has been updated:

    Updater: Jonathan Anderson (mailto:anderson_jonathan@bah.com)
       Date: Tue, 20 Apr 2004 12:43 PM
    Changes:
             Attachment changed to axis12b_emitted.wsdl
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1326?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1326

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1326
    Summary: ?WSDL emits elements in incorrect namespaces
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing

   Assignee: 
   Reporter: Jonathan Anderson

    Created: Tue, 20 Apr 2004 12:39 PM
    Updated: Tue, 20 Apr 2004 12:43 PM
Environment: Axis 1.2 Beta, Windows XP Professional, Sun JDK/JRE 1.4.2_04

Description:
In the attached WSDL, I do the following:

BankService-DocLiteral.wsdl, target namespace:
http://webservices.bah.com/examples/docliteral/bank

...which imports...

BankService.xsd, target namespace:
http://webservices.bah.com/examples/docliteral/bank

...which imports...

BankTypes.xsd, target namespace:
http://webservices.bah.com/examples/docliteral/bank/types

Note that the Deposit element and DepositType type are defined in BankTypes.xsd, under the
target namespace http://webservices.bah.com/examples/docliteral/bank/types.  The DepositRequest
element and DepositRequestType type are defined in BankService.xsd under the target namespace
http://webservices.bah.com/examples/docliteral/bank, and DepositRequestType then *references*
the Deposit element for inclusion inside of a sequence.

At the end of the day I should have a "wrapper" element in namespace A with a child element
in namespace B, a la:

<soap:Envelope
   xmlns:bank="http://webservices.bah.com/examples/docliteral/bank"
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:banktypes="http://webservices.bah.com/examples/docliteral/bank/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <bank:DepositRequest>
         <banktypes:Deposit>
            <banktypes:AccountNumber>100</banktypes:AccountNumber>
            <banktypes:Amount>100</banktypes:Amount>
         </banktypes:Deposit>
      </bank:DepositRequest>
   </soap:Body>
</soap:Envelope>

The problem is then in the Axis 1.2 beta emitted WSDL (http://.../DocLiteralBankService?wsdl)
for the service - it places the DepositType type in the correct namespace (http://webservices.bah.com/examples/docliteral/bank/types),
but the Deposit element itself is in the wrong namespace (http://webservices.bah.com/examples/docliteral/bank).
 This results in the following:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
   xmlns:bank="http://webservices.bah.com/examples/docliteral/bank"
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:banktypes="http://webservices.bah.com/examples/docliteral/bank/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <bank:DepositRequest>
         <bank:Deposit>
            <banktypes:AccountNumber>100</banktypes:AccountNumber>
            <banktypes:Amount>100</banktypes:Amount>
         </bank:Deposit>
      </bank:DepositRequest>
   </soap:Body>
</soap:Envelope>

Which of course the generated WSDL2Java service impl does not expect, so it throws:

org.xml.sax.SAXException: Invalid element in com.bah.webservices.examples.docliteral.bank.DepositRequestType
- Deposit



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message