axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wei Chen" <wc...@vitria.com>
Subject RE: Generated WSDL <> original WSDL
Date Thu, 14 Nov 2002 19:34:06 GMT
Hi, Tom,

I am not sure I understand the functional equivalence.

If the client is generated based on the generated WSDL, it can not always invoke the server
based on the original WSDL.

One case I run into is the namespace changed. For example, if the original namespace is urn://a/b/c,
the Java package will be c.b.a, and the generated WSDL will be http://a/b/c.

Another case I run into is the case issue. An XML type named "street" will generate a Java
class "Street". The generated WSDL will use "Street" as the XML type.

It seems to me you can not get an equivalent WSDL back from the round-trip (WSDL -> Java
-> WSDL).

- Wei Chen

-----Original Message-----
From: Tom Jordahl [mailto:tomj@macromedia.com]
Sent: Thursday, November 14, 2002 11:16 AM
To: 'axis-user@xml.apache.org'
Subject: RE: Generated WSDL <> original WSDL



Axis will generate the WSDL from the Java classes.  This is not guaranteed to exactly match
the WSDL those classes were generated from, although they should be functionally equivalent.

You can specify the <wsdlFile>/path/to/file</wsdlFile> attribute for the service
in the server-config.wsdd if you want the WSDL to be static.

I took a look at the StreetAddress definitions, and the only difference I saw was the nillable="true"
attribute.  This is because the Java String objects can have a null value, so Java2WSDL specifies
that in the WSDL.

--
Tom Jordahl
Macromedia Server Development



-----Original Message-----
From: Daleiden, Mike [mailto:mike.daleiden@aaaresponse.com]
Sent: Thursday, November 14, 2002 1:52 PM
To: axis-user@xml.apache.org
Subject: Generated WSDL <> original WSDL


I hand-built a WSDL file to describe my web services, then used
WSDL2Java as follows to generate the stubs and server-side code:

java WSDL2Java -v -a -s --NStoPkg
http://coqawl01-nat.aaaresponse.com:7001/rcapp/services/AirIQ=com.aaares
ponse.rcapp.commserver.device.handler.airiq.soap.inbound webservice.wsdl

I then compiled the generated code and deployed it on my app server (BEA
WebLogic 6.1 SP1) and hit the URL to view the generated WSDL for my
service.  The generated WSDL was very much different from the original
WSDL (particularly with respect to the schema definitions for
VehicleLocationInfo and StreetAddress).  Is there something in my
original WSDL that is not quite correct that is causing the code to
generate the oddities in the generated WSDL?

This has been frustrating me for hours now, and I really don't
understand what's going on!

Here are the two WSDLs:

Original WSDL:
===============
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
             xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ" 
             xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" 
             xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ" 
             xmlns="http://schemas.xmlsoap.org/wsdl/">

  <types>

    <s:schema elementFormDefault="qualified"
targetNamespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ">

      <s:complexType name="VehicleLocationInfo">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="Longitude"
type="s:float" />
          <s:element minOccurs="1" maxOccurs="1" name="Latitude"
type="s:float" />
          <s:element minOccurs="1" maxOccurs="1" name="Altitude"
type="s:float" />
          <s:element minOccurs="1" maxOccurs="1" name="Speed"
type="s:float" />
          <s:element minOccurs="1" maxOccurs="1" name="Heading"
type="s:float" />
          <s:element minOccurs="1" maxOccurs="1" name="Attitude"
type="s:float" />
          <s:element minOccurs="1" maxOccurs="1" name="Address"
type="s0:StreetAddress" />
          <s:element minOccurs="0" maxOccurs="1" name="FixDateTime"
type="s:string" />
        </s:sequence>
      </s:complexType>

      <s:complexType name="StreetAddress">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="Address1"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Address2"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="City"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="ProvState"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Country"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="PostalZip"
type="s:string" />
        </s:sequence>
      </s:complexType>

      <s:element name="SubmitActionResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="AAAVehicleID"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="ActionID"
type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="ActionResultID"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Note"
type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="LocationInfo"
type="s0:VehicleLocationInfo" />
            <s:element minOccurs="0" maxOccurs="1" name="ActionInfo"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="EventDateTime"
type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>

      <s:element name="SubmitActionResponseResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1"
name="SubmitActionResponseResult" type="s0:ActionResponseResult" />
          </s:sequence>
        </s:complexType>
      </s:element>

      <s:complexType name="ActionResponseResult">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="SubmitResultID"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Note"
type="s:string" />
        </s:sequence>
      </s:complexType>

      <s:element name="SubmitAlert">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="AAAVehicleID"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="AlertID"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Note"
type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="LocationInfo"
type="s0:VehicleLocationInfo" />
            <s:element minOccurs="0" maxOccurs="1" name="AlertInfo"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="EventDateTime"
type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>

      <s:element name="SubmitAlertResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1"
name="SubmitAlertResult" type="s0:AlertResult" />
          </s:sequence>
        </s:complexType>
      </s:element>

      <s:complexType name="AlertResult">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="SubmitResultID"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Note"
type="s:string" />
        </s:sequence>
      </s:complexType>

    </s:schema>

  </types>

  <message name="SubmitActionResponseSoapIn">
    <part name="parameters" element="s0:SubmitActionResponse" />
  </message>

  <message name="SubmitActionResponseSoapOut">
    <part name="parameters" element="s0:SubmitActionResponseResponse" />
  </message>

  <message name="SubmitAlertSoapIn">
    <part name="parameters" element="s0:SubmitAlert" />
  </message>

  <message name="SubmitAlertSoapOut">
    <part name="parameters" element="s0:SubmitAlertResponse" />
  </message>

  <portType name="RESPONSEAirIQSoap">

    <operation name="SubmitActionResponse">
      <input message="s0:SubmitActionResponseSoapIn" />
      <output message="s0:SubmitActionResponseSoapOut" />
    </operation>

    <operation name="SubmitAlert">
      <input message="s0:SubmitAlertSoapIn" />
      <output message="s0:SubmitAlertSoapOut" />
    </operation>

  </portType>

  <binding name="RESPONSEAirIQSoap" type="s0:RESPONSEAirIQSoap">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />

    <operation name="SubmitActionResponse">
      <soap:operation
soapAction="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ/SubmitA
ctionResponse" style="document" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>

    <operation name="SubmitAlert">
      <soap:operation
soapAction="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ/SubmitA
lert" style="document" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>

  </binding>

  <service name="RESPONSEAirIQ">

    <port name="RESPONSEAirIQSoap" binding="s0:RESPONSEAirIQSoap">
      <soap:address
location="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ" />
    </port>

  </service>

</definitions>


===============
Generated WSDL:
===============
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ" 
                  xmlns="http://schemas.xmlsoap.org/wsdl/" 
                  xmlns:apachesoap="http://xml.apache.org/xml-soap" 
 
xmlns:impl="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ" 
 
xmlns:intf="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ" 
 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
 
xmlns:tns1="http://inbound.soap.airiq.handler.device.commserver.rcapp.aa
aresponse.com" 
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
    <schema
targetNamespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ"
xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <element name="submitActionResponse">
        <complexType>
          <sequence>
            <element name="AAAVehicleID" type="xsd:string"/>
            <element name="ActionID" type="xsd:string"/>
            <element name="ActionResultID" type="xsd:string"/>
            <element name="Note" type="xsd:string"/>
            <element name="LocationInfo"
type="impl:VehicleLocationInfo"/>
            <element name="ActionInfo" type="xsd:string"/>
            <element name="EventDateTime" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <complexType name="VehicleLocationInfo">
        <sequence>
          <element name="Longitude" type="xsd:float"/>
          <element name="Latitude" type="xsd:float"/>
          <element name="Altitude" type="xsd:float"/>
          <element name="Speed" type="xsd:float"/>
          <element name="Heading" type="xsd:float"/>
          <element name="Attitude" type="xsd:float"/>
          <element name="Address" nillable="true"
type="tns1:StreetAddress"/>
          <element maxOccurs="1" minOccurs="0" name="FixDateTime"
nillable="true" type="xsd:string"/>
        </sequence>
      </complexType>
      <complexType name="ActionResponseResult">
        <sequence>
          <element maxOccurs="1" minOccurs="0" name="SubmitResultID"
nillable="true" type="xsd:string"/>
          <element maxOccurs="1" minOccurs="0" name="Note"
nillable="true" type="xsd:string"/>
        </sequence>
      </complexType>
      <element name="submitActionResponseResponse">
        <complexType>
          <sequence>
            <element name="SubmitActionResponseResult"
type="impl:ActionResponseResult"/>
          </sequence>
        </complexType>
      </element>
      <element name="submitAlert">
        <complexType>
          <sequence>
            <element name="AAAVehicleID" type="xsd:string"/>
            <element name="AlertID" type="xsd:string"/>
            <element name="Note" type="xsd:string"/>
            <element name="LocationInfo"
type="impl:VehicleLocationInfo"/>
            <element name="AlertInfo" type="xsd:string"/>
            <element name="EventDateTime" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <complexType name="AlertResult">
        <sequence>
          <element maxOccurs="1" minOccurs="0" name="SubmitResultID"
nillable="true" type="xsd:string"/>
          <element maxOccurs="1" minOccurs="0" name="Note"
nillable="true" type="xsd:string"/>
        </sequence>
      </complexType>
      <element name="submitAlertResponse">
        <complexType>
          <sequence>
            <element name="SubmitAlertResult" type="impl:AlertResult"/>
          </sequence>
        </complexType>
      </element>
    </schema>
    <schema
targetNamespace="http://inbound.soap.airiq.handler.device.commserver.rca
pp.aaaresponse.com" 
            xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="StreetAddress">
        <sequence>
          <element maxOccurs="1" minOccurs="0" name="Address1"
nillable="true" type="xsd:string"/>
          <element maxOccurs="1" minOccurs="0" name="Address2"
nillable="true" type="xsd:string"/>
          <element maxOccurs="1" minOccurs="0" name="City"
nillable="true" type="xsd:string"/>
          <element maxOccurs="1" minOccurs="0" name="ProvState"
nillable="true" type="xsd:string"/>
          <element maxOccurs="1" minOccurs="0" name="Country"
nillable="true" type="xsd:string"/>
          <element maxOccurs="1" minOccurs="0" name="PostalZip"
nillable="true" type="xsd:string"/>
        </sequence>
      </complexType>
    </schema>
  </wsdl:types>

  <wsdl:message name="submitAlertRequest">
    <wsdl:part element="impl:submitAlert" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="submitActionResponseRequest">
    <wsdl:part element="impl:submitActionResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="submitAlertResponse">
    <wsdl:part element="impl:submitAlertResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="submitActionResponseResponse">
    <wsdl:part element="impl:submitActionResponseResponse"
name="parameters"/>
  </wsdl:message>
  <wsdl:portType name="RESPONSEAirIQSoap">
    <wsdl:operation name="submitActionResponse" parameterOrder="">
      <wsdl:input message="impl:submitActionResponseRequest"
name="submitActionResponseRequest"/>
      <wsdl:output message="impl:submitActionResponseResponse"
name="submitActionResponseResponse"/>
    </wsdl:operation>
    <wsdl:operation name="submitAlert" parameterOrder="">
      <wsdl:input message="impl:submitAlertRequest"
name="submitAlertRequest"/>
      <wsdl:output message="impl:submitAlertResponse"
name="submitAlertResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="RESPONSEAirIQSoapSoapBinding"
type="impl:RESPONSEAirIQSoap">
    <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="submitActionResponse">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="submitActionResponseRequest">
        <wsdlsoap:body
namespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ"
use="literal"/>
      </wsdl:input>
      <wsdl:output name="submitActionResponseResponse">
        <wsdlsoap:body
namespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ"
use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="submitAlert">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="submitAlertRequest">
        <wsdlsoap:body
namespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ"
use="literal"/>
      </wsdl:input>
      <wsdl:output name="submitAlertResponse">
        <wsdlsoap:body
namespace="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ"
use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="RESPONSEAirIQ">
    <wsdl:port binding="impl:RESPONSEAirIQSoapSoapBinding"
name="RESPONSEAirIQSoap">
      <wsdlsoap:address
location="http://coqawl01-nat.aaaresponse.com:7001/rcapp/services/RESPON
SEAirIQSoap"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Mime
View raw message