axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Godwin Chapman (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-986) WSDL2Java works for invalid WSDL
Date Tue, 08 Aug 2006 07:46:16 GMT
WSDL2Java works for invalid WSDL
--------------------------------

                 Key: AXIS2-986
                 URL: http://issues.apache.org/jira/browse/AXIS2-986
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: wsdl
    Affects Versions: 0.94
            Reporter: Keith Godwin Chapman


WSDL2Java works for invalid WSDL's instead of validating it and reporting an error.

I tried using the WSDL2Java tool of axis 2 using the following WSDL's.

Using the following valid WSDL it generates the java classes

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:ns1=" http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns=" http://org.apache.axis2/" targetNamespace=" http://org.apache.axis2/">
  <wsdl:types>
    <xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema" xmlns:ns1=" http://org.apache.axis2/xsd"
targetNamespace=" http://org.apache.axis2/xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
      <xs:element name="helloRequest">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="param0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="helloResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="return"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="helloRequestMessage">
    <wsdl:part name="part1" element="ns1:helloRequest"/>
  </wsdl:message>
  <wsdl:message name="helloResponseMessage">
    <wsdl:part name="part1" element="ns1:helloResponse"/>
  </wsdl:message>
  <wsdl:portType name="EchoServicePort">
    <wsdl:operation name="hello">
      <wsdl:input message="tns:helloRequestMessage"/>
      <wsdl:output message="tns:helloResponseMessage"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="EchoServiceBinding" type="tns:EchoServicePort">
    <soap:binding transport=" http://schemas.xmlsoap.org/soap/http " style="document"/>
    <wsdl:operation name="hello">
      <soap:operation name="operation" soapAction="hello" style="document"/>
      <wsdl:input>
        <soap:body use="literal" namespace="http://www.org.apache.axis2"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" namespace=" http://www.org.apache.axis2"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="EchoService">
    <wsdl:port name="EchoServicePortType" binding="tns:EchoServiceBinding">
      <soap:address location=" http://127.0.0.1:8080/axis2/services/EchoService "/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>




Then I deleted the message element corresponding to helloRequestMessage. Still it generates
the classes for the following WSDL (with the helloRequestMessage element deleted)




<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:ns1=" http://org.apache.axis2/xsd" xmlns:xs=" http://www.w3.org/2001/XMLSchema"
xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://org.apache.axis2/" targetNamespace=" http://org.apache.axis2/">
  <wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1=" http://org.apache.axis2/xsd
" targetNamespace="http://org.apache.axis2/xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
      <xs:element name="helloRequest">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="param0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="helloResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="return"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>
 
  <wsdl:message name="helloResponseMessage">
    <wsdl:part name="part1" element="ns1:helloResponse"/>
  </wsdl:message>
  <wsdl:portType name="EchoServicePort">
    <wsdl:operation name="hello">
      <wsdl:input message="tns:helloRequestMessage"/>
      <wsdl:output message="tns:helloResponseMessage"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="EchoServiceBinding" type="tns:EchoServicePort">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <wsdl:operation name="hello">
      <soap:operation name="operation" soapAction="hello" style="document"/>
      <wsdl:input>
        <soap:body use="literal" namespace=" http://www.org.apache.axis2"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" namespace=" http://www.org.apache.axis2 "/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="EchoService">
    <wsdl:port name="EchoServicePortType" binding="tns:EchoServiceBinding">
      <soap:address location="http://127.0.0.1:8080/axis2/services/EchoService "/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


Shouldn't this report an error instead of generating the java classes?

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message