Search code examples
web-serviceswsdlwsdl2javawsimport

wsimport - Confusing WARNINGS


Hi i'm newbie working with wsdl, xsd and web services... I must generate some class from a wsdl generated in EA.

I found some problems trying to import 2 local schemas on same namespace, so my workaround was include schemas.

But now i find an Error that i can't resolve:

[ERROR] XML type "{http://www.iTEC.aero/AMANSequence}filter" could not be resolved, XML    to JAVA binding failed! Please check the wsdl:part "filter" in the wsdl:message "   {http://www.iTEC.aero
  /AMANSequence}amanMessageFilter". line 75 of ***.wsdl

WSDL

<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions name="iSwimService"
targetNamespace="http://www.iTEC.aero/AMANSequence" 
xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:tns="http://www.iTEC.aero/AMANSequence"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">


<!--TYPES--> 


<wsdl:types>
    <xs:schema elementFormDefault="qualified" version="1.0"          
        xmlns:xs="http://www.w3.org/2001/XMLSchema"         
        xmlns:seq="http://www.iTEC.aero/AMANSequence" 
        targetNamespace="http://www.iTEC.aero/AMANSequence">
        <xs:include schemaLocation="AMANFilter.xsd" /> 
        <xs:include schemaLocation="AMANSequence.xsd" />
        <xs:element name="filter" type="seq:AMANSequenceFilterType" />
        <xs:element name="sequence" type="seq:AMANSequence" />
    </xs:schema>
</wsdl:types>


<!-- MESSAGES -->


<wsdl:message name="amanMessageSequence">
    <wsdl:part type="tns:sequence" name="sequence" />
</wsdl:message>

<wsdl:message name="amanMessageFilter">
    <wsdl:part  type="tns:filter" name="filter" />
</wsdl:message>

<wsdl:message name="amanMessageSubscription">
    <wsdl:part type="xs:string" name="stakeholderId" />
    <wsdl:part type="tns:filter" name="filter" />
</wsdl:message>

<wsdl:message name="amanMessageUnSubscription">
    <wsdl:part type="xs:string" name="stakeholderId" />
</wsdl:message>


<wsdl:message name="amanMessageReturn">
    <wsdl:part type="xs:string" name="returnValue" />
</wsdl:message>

<wsdl:message name="amanFaultMessage">
    <wsdl:part name="operationName" type="xs:string"/>
    <wsdl:part name="errorCode" type="xs:string"/>
    <wsdl:part name="errorMessage" type="xs:string"/>   
</wsdl:message>




<!-- PORT TYPES -->
<wsdl:portType name="AMANSequenceInfo">
    <wsdl:operation name="getAMANSequence">
        <wsdl:input message="tns:amanMessageFilter" />
        <wsdl:output message="tns:amanMessageSequence"/>
        <wsdl:fault message="tns:amanFaultMessage" name="faultMessage"/>
    </wsdl:operation>

    <wsdl:operation name="publishAMANSequence">
        <wsdl:input message="tns:amanMessageSequence" />
        <wsdl:output message="tns:amanMessageReturn" />
        <wsdl:fault message="tns:amanFaultMessage" name="faultMessage"/>
    </wsdl:operation>
</wsdl:portType>


<wsdl:portType name="AMANSequenceSubscription">
    <wsdl:operation name="subscribeToAMANSequence">
        <wsdl:input message="tns:amanMessageSubscription" />
        <wsdl:output message="tns:amanMessageReturn" />
        <wsdl:fault message="tns:amanFaultMessage" name="faultMessage"/>
    </wsdl:operation>

    <wsdl:operation name="unsubscribeToAMANSequence">
        <wsdl:input message="tns:amanMessageUnSubscription" />
        <wsdl:output message="tns:amanMessageReturn" />
        <wsdl:fault message="tns:amanFaultMessage" name="faultMessage"/>
    </wsdl:operation>

</wsdl:portType>



<!-- BINDING -->
<wsdl:binding name="AMANSequenceInfoSOAP" type="tns:AMANSequenceInfo">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />


    <!--  
    return the sequence data according to the filters provided.
    if no filter is provided, all the sequence data for this aman is provided
     -->
    <wsdl:operation name="getAMANSequence">
        <soap:operation soapAction="http://www.iTEC.aero/getAMANSequence" />
        <wsdl:input>
            <soap:body use="literal" namespace="http://www.iTEC.aero/AMANSequence"  />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" namespace="http://www.iTEC.aero/AMANSequence"/>
        </wsdl:output>
    </wsdl:operation>


    <!-- 
    A request/reply operation deployed in the iMAS ESB. 
    The invocation of this operation will trigger a request in the iMAS ESB for distributing 
    this information to several stakeholders in a async way         
     -->
    <wsdl:operation name="publishAMANSequence">
        <soap:operation soapAction="http://www.iTEC.aero/publishAMANSequence" />
        <wsdl:input>
            <soap:body use="literal"  />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" />
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>


<wsdl:binding name="AMANSequenceSubscriptionSOAP" type="tns:AMANSequenceSubscription">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />

    <!-- 
    subscribe to the corresponding aman indicating the filter with the information the customer is interested in receiving.
    The stakeholderId is also provided in this operation to manage the publication of the information       
     -->
    <wsdl:operation name="subscribeToAMANSequence">
        <soap:operation soapAction="" />
        <wsdl:input>
            <soap:body use="literal"   />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" />
        </wsdl:output>
    </wsdl:operation>

    <!-- 
    unsubscribe to the corresponding aman indicating the filter with the information the customer is interested in receiving.
    The stakeholderId is also provided in this operation to manage the publication of the information       
     -->
    <wsdl:operation name="unsubscribeToAMANSequence">
        <soap:operation soapAction="" />
        <wsdl:input>
            <soap:body use="literal"  />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" />
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>


<!-- SERVICES -->

<wsdl:service name="AMANSequenceInfo">
    <wsdl:port binding="tns:AMANSequenceInfoSOAP" name="AMANSequenceInfoService">
        <soap:address location="null" />
    </wsdl:port>

    <wsdl:port binding="tns:AMANSequenceSubscriptionSOAP" name="AMANSequenceSubscriptionService">
        <soap:address location="null" />
    </wsdl:port>
</wsdl:service>


</wsdl:definitions>

FILTER XSD

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema version="0.1"
elementFormDefault="qualified"
targetNamespace="http://www.iTEC.aero/AMANSequence"

xmlns:filter="http://www.iTEC.aero/AMANSequence"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:complexType name="AMANSequenceFilterType">
    <xs:sequence>
        <xs:element name="filterRows" type="filter:FilterRowType" minOccurs="1" maxOccurs="1" />
        <xs:element name="filterColumns" type="filter:FilterColumnsType" minOccurs="1" maxOccurs="1" />
        <xs:element name="filterUpdate" type="filter:FilterUpdatedType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
</xs:complexType>



<xs:complexType name="FilterRowType">
    <xs:annotation>
                <xs:documentation>These filters are based on the ""DomainOfinterest" class in the logical model</xs:documentation>
    </xs:annotation>    
    <xs:sequence>
        <xs:element name="fixName" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="typeOfFix" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="departureAerodrome" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="destinationAerodrome" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="runwayDirection" type="xs:string" minOccurs="1" maxOccurs="1" />          
    </xs:sequence>
</xs:complexType>


<xs:complexType name="FilterColumnsType">
    <xs:annotation>
                <xs:documentation>These filters are based on filter example discussed in the SICG</xs:documentation>
    </xs:annotation>    
    <xs:sequence>
        <xs:element name="sequenceNumber" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="RunwayId" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="LandingTime" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="CallSign" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="MF" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="OTA" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="TTL" type="xs:string" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
</xs:complexType>


<xs:complexType name="FilterUpdatedType">
    <xs:annotation>
                <xs:documentation>These filters are based on filter example discussed in the SICG</xs:documentation>
    </xs:annotation>        
    <xs:choice>
        <xs:element name="periodic" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="sequenceEntryOnChange" type="xs:string" minOccurs="1" maxOccurs="1" />
    </xs:choice>
</xs:complexType>


</xs:schema>

If somebody can help ;!!


Solution

  • SOLVED

    I changed binding style to document.

    Create complexType in the schema for messages with multiple parts and compile without errors or warnings.