Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-843

Invalid namespaces in WSDL of types generated by XMLBean from schema

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Web Services (181)
    • None

    Description

      If I use the following schema to generate my types:

      <?xml version="1.0" encoding="UTF-8"?>
      <xsd:schema elementFormDefault="qualified" targetNamespace="http://byXmlBeanNS" xmlns:impl="http://byXmlBeanNS" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <xsd:complexType name="Address">
      <xsd:sequence>
      <xsd:element name="city" nillable="true" type="xsd:string"/>
      <xsd:element name="state" nillable="true" type="impl:StateType"/>
      <xsd:element name="zip" type="xsd:int"/>
      </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="StateType">
      <xsd:sequence>
      <xsd:element name="code" nillable="true" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>

      </xsd:schema>

      Then write a JWS that uses the Address like:

      package web;

      import java.rmi.RemoteException;

      import javax.jws.Oneway;
      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.jws.WebResult;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;

      import byXmlBeanNS.Address;

      @WebService
      public class SimpleService {

      @WebMethod
      public void doABC(Address add)

      { return; }

      }

      Then run and generate WSDL for the service I get:

      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions targetNamespace="http://web" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://web" xmlns:intf="http://web" xmlns:tns1="http://byXmlBeanNS" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <!--WSDL created by Apache Axis version: 1.2
      Built on May 03, 2005 (02:20:24 EDT)-->
      <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://web" xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://byXmlBeanNS"/>
      <element name="doABC">
      <complexType>
      <sequence>
      <element name="add" type="tns1:Address"/>

      </sequence>
      </complexType>
      </element>
      <element name="doABCResponse">
      <complexType/>
      </element>
      </schema>
      <schema elementFormDefault="qualified" targetNamespace="http://byXmlBeanNS" xmlns="http://www.w3.org/2001/XMLSchema">
      <xsd:complexType name="Address">

      <xsd:sequence>

      <xsd:element name="city" nillable="true" type="xsd:string"/>

      <xsd:element name="state" nillable="true" type="impl:StateType"/> <<<<---------- ERROR name space

      <xsd:element name="zip" type="xsd:int"/>

      </xsd:sequence>

      </xsd:complexType>

      <xsd:complexType name="StateType">

      <xsd:sequence>

      <xsd:element name="code" nillable="true" type="xsd:string"/>

      </xsd:sequence>

      </xsd:complexType>
      </schema>
      </wsdl:types>

      ...... rest of the wsdl

      The schema of the wsdl puts the StateType in the "impl" namespace, which is correct in the orginial schema but it is not correct in the schema in the wsdl. The impl name space in the WSDL is not the same as the schema!

      Attachments

        Activity

          People

            Unassigned Unassigned
            dmehrtash daryoush mehrtash
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: