0 Replies Latest reply on Sep 11, 2008 12:43 PM by amashtakov

    websphere swaRef/MIME interop. issue

    amashtakov

      Hi Everybody,

      I spent several hours while fighting with the following issue, but with
      no luck:

      I have to access a web service, running on websphere v6.
      The web service itself uses swaRef and MIME for attachments.
      Both, JBossWS and WebSphere v6 claim support for
      WS-I Attachment Profile 1.0, but running wsconsume tool against
      wsdl file raises the folowing error:

      [ERROR] invalid extension element: "mime:part" (in namespace http://schemas.xmlsoap.org/wsdl/mime/") unknown location
      


      I tested this with jboss 4.2.2.GA, 4.2.3.GA and jbossws-3.0.3-native, but
      the error remains. Seems, that problem is with wsdl file, but I cannot
      figure out why due my limited experience with web services. Can
      anybody help me this ? Any pointers will be highly appreciated.

      Thank you in advance,
      /Alexander

      PS:

      WeatherAttachment.wsdl (an example from websphere web services handbook v6)

      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions xmlns:impl="http://bean.itso" xmlns:intf="http://bean.itso"
      xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
      xmlns:tns2="http://objects.itso"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://bean.itso">
       <wsdl:types>
       <schema xmlns="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://bean.itso" xmlns:impl="http://bean.itso"
      xmlns:intf="http://bean.itso" xmlns:tns2="http://objects.itso"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      
       <import namespace="http://objects.itso"/>
       <import namespace="http://ws-i.org/profiles/basic/1.1/xsd" schemaLocation="swaref.xsd"/>
       <element name="getDayForecast">
       <complexType>
       <sequence>
       <element name="theDate" nillable="true" type="xsd:dateTime"/>
       </sequence>
       </complexType>
       </element>
       <element name="getDayForecastResponse">
       <complexType>
       <sequence>
       <element name="getDayForecastReturn" nillable="true" type="tns2:Weather"/>
       </sequence>
       </complexType>
       </element>
       </schema>
       <schema xmlns="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://objects.itso" xmlns:impl="http://bean.itso"
      xmlns:intf="http://bean.itso"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <complexType name="Weather">
       <sequence>
       <element name="condition" nillable="true" type="xsd:string"/>
       <element name="date" nillable="true" type="xsd:dateTime"/>
       <element name="windDirection" nillable="true" type="xsd:string"/>
       <element name="windSpeed" type="xsd:int"/>
       <element name="temperatureCelsius" type="xsd:int"/>
       <element name="dbflag" type="xsd:boolean"/>
       </sequence>
       </complexType>
       </schema>
       </wsdl:types>
      
       <wsdl:message name="getDayForecastRequest">
      
       <wsdl:part element="impl:getDayForecast" name="parameters"/>
      
       </wsdl:message>
      
       <wsdl:message name="getDayForecastResponse">
      
       <wsdl:part element="impl:getDayForecastResponse" name="parameters"/>
      
       </wsdl:message>
      
       <wsdl:message name="getDayForecastImageRequest">
      
       <wsdl:part name="theDate" type="xsd:dateTime"/>
      
       <wsdl:part name="bgImage" type="xsd:hexBinary"/>
      
       </wsdl:message>
      
       <wsdl:message name="getDayForecastImageResponse">
      
       <wsdl:part name="weatherImage" type="wsi:swaRef"/>
      
       </wsdl:message>
      
       <wsdl:portType name="WeatherAttachment">
      
       <wsdl:operation name="getDayForecast">
      
       <wsdl:input message="impl:getDayForecastRequest" name="getDayForecastRequest"/>
      
       <wsdl:output message="impl:getDayForecastResponse" name="getDayForecastResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getDayForecastImage">
      
       <wsdl:input message="impl:getDayForecastImageRequest" name="getDayForecastImageRequest"/>
      
       <wsdl:output message="impl:getDayForecastImageResponse" name="getDayForecastImageResponse"/>
      
       </wsdl:operation>
      
       </wsdl:portType>
      
       <wsdl:binding name="WeatherAttachmentSoapBinding" type="impl:WeatherAttachment">
      
       <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      
       <wsdl:operation name="getDayForecast">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getDayForecastRequest">
      
       <wsdlsoap:body use="literal"/>
      
       </wsdl:input>
      
       <wsdl:output name="getDayForecastResponse">
      
       <wsdlsoap:body use="literal"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getDayForecastImage">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getDayForecastImageRequest">
       <mime:part>
       <wsdlsoap:body parts="theDate" use="literal"/>
       </mime:part>
       <mime:multipartRelated>
       <mime:part>
       <mime:content part="bgImage" type="image/jpeg"/>
       </mime:part>
       </mime:multipartRelated>
       </wsdl:input>
      
       <wsdl:output name="getDayForecastImageResponse">
       <mime:multipartRelated>
       <mime:part>
       <wsdlsoap:body parts="weatherImage" use="literal"/>
       </mime:part>
       </mime:multipartRelated>
       </wsdl:output>
      
       </wsdl:operation>
      
       </wsdl:binding>
      
       <wsdl:service name="WeatherAttachmentService">
      
       <wsdl:port binding="impl:WeatherAttachmentSoapBinding" name="WeatherAttachment">
      
       <wsdlsoap:address location="http://localhost:9080/WeatherAttachmentWeb/services/WeatherAttachment"/>
      
       </wsdl:port>
      
       </wsdl:service>
      
      </wsdl:definitions>
      



      swaref.xsd
      <?xml version="1.0" encoding="UTF-8"?>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd">
       <xsd:simpleType name="swaRef">
       <xsd:restriction base="xsd:anyURI"/>
       </xsd:simpleType>
      </xsd:schema>