1 Reply Latest reply on Dec 5, 2006 4:59 PM by Thomas Diesler

    WSTOOLS BUG error resolving component

    Stefano Stefano Newbie

      When I run WSTOOLS against a document/literal WSDL describing an arbitrary object, it fails with this error:

      ERROR [JBossXSErrorHandler] JBossWS_weather.samples_xsd41009.xsd[domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve.4.2]::Message=src-resolve.4.2: Error resolving component 'ax21:Weather'. It was detected that 'ax21:Weather' is in namespace 'http://data.pojo.sample/xsd', but co
      mponents from this namespace are not referenceable from schema document 'file:/c:/temp/JBossWS_weather.samples_xsd41009.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ax21:Weather' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/c:/temp/JBossWS_weather.samples_xsd41009.xsd'.


      Using WSCOMPILE everything is ok.

      I have already updated my wstools-config.xml file with:

      <wsdl-java location="SomeWSDL.wsdl" parameter-style="bare">



      WSDL is taken from Axis2 WeatherService sample:

      - <wsdl:definitions xmlns:axis2="http://weather.samples/" xmlns:ns0="http://data.pojo.sample/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns="http://weather.samples/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://weather.samples/">
      <wsdl:documentation>WeatherService</wsdl:documentation>
      - <wsdl:types>
      - <xs:schema xmlns:ax21="http://data.pojo.sample/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://weather.samples/xsd">
      - <xs:element name="getWeatherResponse">
      - <xs:complexType>
      - <xs:sequence>
      <xs:element name="return" nillable="true" type="ax21:Weather" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      - <xs:element name="setWeather">
      - <xs:complexType>
      - <xs:sequence>
      <xs:element name="param0" nillable="true" type="ax21:Weather" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>
      - <xs:schema xmlns:ax21="http://data.pojo.sample/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://data.pojo.sample/xsd">
      <xs:element name="Weather" type="ax21:Weather" />
      - <xs:complexType name="Weather">
      - <xs:sequence>
      <xs:element name="forecast" nillable="true" type="xs:string" />
      <xs:element name="howMuchRain" type="xs:float" />
      <xs:element name="rain" type="xs:boolean" />
      <xs:element name="temperature" type="xs:float" />
      </xs:sequence>
      </xs:complexType>
      </xs:schema>
      </wsdl:types>
      <wsdl:message name="getWeatherMessage" />
      - <wsdl:message name="getWeatherResponseMessage">
      <wsdl:part name="part1" element="ns:getWeatherResponse" />
      </wsdl:message>
      - <wsdl:message name="setWeatherMessage">
      <wsdl:part name="part1" element="ns:setWeather" />
      </wsdl:message>
      - <wsdl:portType name="WeatherServicePortType">
      - <wsdl:operation name="getWeather">
      <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getWeatherMessage" wsaw:Action="urn:getWeather" />
      <wsdl:output xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getWeatherResponseMessage" wsaw:Action="http://weather.samples/WeatherServicePortType/getWeatherResponse" />
      </wsdl:operation>
      - <wsdl:operation name="setWeather">
      <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:setWeatherMessage" wsaw:Action="urn:setWeather" />
      </wsdl:operation>
      </wsdl:portType>
      - <wsdl:binding name="WeatherServiceSOAP11Binding" type="axis2:WeatherServicePortType">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
      - <wsdl:operation name="getWeather">
      <soap:operation soapAction="urn:getWeather" style="document" />
      - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      - <wsdl:operation name="setWeather">
      <soap:operation soapAction="urn:setWeather" style="document" />
      - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      </wsdl:operation>
      </wsdl:binding>
      - <wsdl:binding name="WeatherServiceSOAP12Binding" type="axis2:WeatherServicePortType">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
      - <wsdl:operation name="getWeather">
      <soap12:operation soapAction="urn:getWeather" style="document" />
      - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
      - <wsdl:output>
      <soap12:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      - <wsdl:operation name="setWeather">
      <soap12:operation soapAction="urn:setWeather" style="document" />
      - <wsdl:input>
      <soap12:body use="literal" />
      </wsdl:input>
      </wsdl:operation>
      </wsdl:binding>
      - <wsdl:service name="WeatherService">
      - <wsdl:port name="WeatherServiceSOAP11port_http" binding="axis2:WeatherServiceSOAP11Binding">
      <soap:address location="http://26.2.243.190:8080/axis2/services/WeatherService" />
      </wsdl:port>
      - <wsdl:port name="WeatherServiceSOAP12port_http" binding="axis2:WeatherServiceSOAP12Binding">
      <soap12:address location="http://26.2.243.190:8080/axis2/services/WeatherService" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>