Tom -

Thanks for the response.  The issue that I have is with the fact that
Axis moved the StreetAddress type definition into a separate schema with
a separate namespace.  The original WSDL specified that all of the types
were in the same namespace.  The result is that the client code (which
is being developed by a third-party and not under my control) is
experiencing issues with using the generated WSDL.  The client code is
.NET code, but here is the SOAP conversation between the .NET client and
my Axis server:

====================
Client SOAP request:
====================
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

        <SOAP-ENV:Body> 
                <m:SubmitAlert
xmlns:m="http://coqawl01-nat.aaaresponse.com:7001/rcapp/AirIQ";> 
                        <AAAVehicleID>AAA-1</AAAVehicleID> 
 
<AlertID>{1D21927D-51D1-4547-A0BA-411D231F7E2B}</AlertID> 
                        <Note>String</Note> 
                        <LocationInfo> 
                                <Longitude>3.14159</Longitude> 
                                <Latitude>3.14159</Latitude> 
                                <Altitude>3.14159</Altitude> 
                                <Speed>3.14159</Speed> 
                                <Heading>3.14159</Heading> 
                                <Attitude>3.14159</Attitude> 
                                <Address> 
                                        <Address1>String</Address1> 
                                        <Address2>String</Address2> 
                                        <City>String</City> 
                                        <ProvState>String</ProvState> 
                                        <Country>String</Country> 
                                        <PostalZip>String</PostalZip> 
                                </Address> 
                                <FixDateTime>2002-11-14
12:12:11</FixDateTime> 
                        </LocationInfo> 
                        <AlertInfo>String</AlertInfo> 
                        <EventDateTime>2002-11-14
12:12:12</EventDateTime> 
                </m:SubmitAlert> 
        </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

===============
Axis response:
===============

<?xml version="1.0" encoding="UTF-8"?> 
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

        <soapenv:Body> 
                <soapenv:Fault> 
                        <faultcode
xmlns:ns1="http://xml.apache.org/axis/";>ns1:Server.userException</faultc
ode> 
                        <faultstring>org.xml.sax.SAXException: Invalid
element in
com.aaaresponse.rcapp.commserver.device.handler.airiq.soap.inbound.Vehic
leLocationInfo - Longitude</faultstring>

                        <detail> 
                                <ns2:stackTrace
xmlns:ns2="http://xml.apache.org/axis/";>org.xml.sax.SAXException:
Invalid element in
com.aaaresponse.rcapp.commserver.device.handler.airiq.soap.inbound.Vehic
leLocationInfo - Longitude

        at
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeseriali
zer.java:252) 
        at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextImpl.java:893) 
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
200) 
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:684) 
        at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:207) 
        at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:265) 
        at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.ja
va:190) 
        at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276
) 
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:71) 
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156) 
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126) 
        at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437) 
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)

        at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 
        at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
ava:335) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:265) 
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:200) 
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:2456) 
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:1985) 
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)

        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) 
</ns2:stackTrace> 
                        </detail> 
                </soapenv:Fault> 
        </soapenv:Body> 
</soapenv:Envelope> 

--Mike

-----Original Message-----
From: Tom Jordahl [mailto:tomj@;macromedia.com] 
Sent: Thursday, November 14, 2002 2:16 PM
To: '[EMAIL PROTECTED]'
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: [EMAIL PROTECTED]
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>

Reply via email to