Hi,

I guess the problem is caused by the following messages in your WSDL,

   <wsdl:message name="GetAssetSoapOut">
       <wsdl:part name="parameters" element="tns:GetAssetResponse"/>
       <wsdl:part name="asset" type="s:base64Binary"/>
   </wsdl:message>
   <wsdl:message name="StoreAssetSoapIn">
       <wsdl:part name="parameters" element="tns:StoreAsset"/>
       <wsdl:part name="asset" type="s:base64Binary"/>
   </wsdl:message>

Modifying it to something like

   <wsdl:message name="GetAssetSoapOut">
       <wsdl:part name="parameters" element="tns:GetAssetResponse"/>
   </wsdl:message>
   <wsdl:message name="StoreAssetSoapIn">
       <wsdl:part name="parameters" element="tns:StoreAsset"/>
   </wsdl:message>

and making asset a element of GetAssetResponse and StoreAsset should fix the
issue (At least from the point of Axis2. I'm not sure weather this would
break Axis1, but I doubt it will).

Thanks,
Keith.




On Tue, Sep 2, 2008 at 4:43 PM, Ian Ashley <[EMAIL PROTECTED]> wrote:

> I am trying to create a WSDL for sending attachments that works with
> WSDL2Java from Axis1 and Axis2. The following WSDL works fine with
> WSDL2Java
> from Axis1 but fails with Axis2 reporting
>
> [ERROR] More than one part for message GetAssetSoapOut
>
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingExcept
> ion: More than one part for message GetAssetSoapOut
>
> Does anyone know either what I would need to change to make the WSDL work
> with Axis1 and 2 or if there is an example anywhere (I have tried to find
> one but failed)?
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
>                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
>                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
>                  xmlns:s="http://www.w3.org/2001/XMLSchema";
>                  xmlns:tns="~/WebServices/"
>                  targetNamespace="~/WebServices/">
>    <wsdl:types>
>        <s:schema elementFormDefault="qualified"
> targetNamespace="~/WebServices/">
>            <s:complexType name="NameTypeValue">
>                <s:sequence>
>                    <s:element minOccurs="1" maxOccurs="1" name="name"
> type="s:string"/>
>                    <s:element minOccurs="1" maxOccurs="1" name="type"
> type="tns:FieldType"/>
>                    <s:element minOccurs="1" maxOccurs="1" name="value"
> type="s:string"/>
>                </s:sequence>
>            </s:complexType>
>            <s:simpleType name="FieldType">
>                <s:restriction base="s:string">
>                    <s:enumeration value="Text"/>
>                    <s:enumeration value="Number"/>
>                    <s:enumeration value="Boolean"/>
>                    <s:enumeration value="Date"/>
>                    <s:enumeration value="Time"/>
>                </s:restriction>
>            </s:simpleType>
>
>            <s:element name="GetAsset">
>                <s:complexType>
>                    <s:sequence>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="sessionID" type="s:string"/>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="assetRef" type="s:string"/>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="checkOut" type="s:boolean"/>
>                    </s:sequence>
>                </s:complexType>
>            </s:element>
>            <s:element name="GetAssetResponse">
>                <s:complexType>
>                    <s:sequence>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="checkedOut" type="s:boolean"/>
>                        <s:element minOccurs="0" maxOccurs="1"
> name="failureReason" type="s:string"/>
>                    </s:sequence>
>                </s:complexType>
>            </s:element>
>            <s:element name="StoreAsset">
>                <s:complexType>
>                    <s:sequence>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="sessionID" type="s:string"/>
>                        <s:element minOccurs="0" maxOccurs="1"
> name="assetRef" type="s:string"/>
>                        <s:element minOccurs="0" maxOccurs="1"
> name="leafName" type="s:string"/>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="checkIn" type="s:boolean"/>
>                        <s:element minOccurs="0" maxOccurs="unbounded"
> name="values" type="tns:NameTypeValue"/>
>                    </s:sequence>
>                </s:complexType>
>            </s:element>
>            <s:element name="StoreAssetResponse">
>                <s:complexType>
>                    <s:sequence>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="assetRef" type="s:string"/>
>                        <s:element minOccurs="1" maxOccurs="1"
> name="checkedIn" type="s:boolean"/>
>                        <s:element minOccurs="0" maxOccurs="1"
> name="failureReason" type="s:string"/>
>                    </s:sequence>
>                </s:complexType>
>            </s:element>
>        </s:schema>
>    </wsdl:types>
>    <wsdl:message name="GetAssetSoapIn">
>        <wsdl:part name="parameters" element="tns:GetAsset"/>
>    </wsdl:message>
>    <wsdl:message name="GetAssetSoapOut">
>        <wsdl:part name="parameters" element="tns:GetAssetResponse"/>
>        <wsdl:part name="asset" type="s:base64Binary"/>
>    </wsdl:message>
>    <wsdl:message name="StoreAssetSoapIn">
>        <wsdl:part name="parameters" element="tns:StoreAsset"/>
>        <wsdl:part name="asset" type="s:base64Binary"/>
>    </wsdl:message>
>    <wsdl:message name="StoreAssetSoapOut">
>        <wsdl:part name="parameters" element="tns:StoreAssetResponse"/>
>    </wsdl:message>
>    <wsdl:portType name="VersionCueService">
>        <wsdl:operation name="GetAsset">
>            <wsdl:input message="tns:GetAssetSoapIn"/>
>            <wsdl:output message="tns:GetAssetSoapOut"/>
>        </wsdl:operation>
>        <wsdl:operation name="StoreAsset">
>            <wsdl:input message="tns:StoreAssetSoapIn"/>
>            <wsdl:output message="tns:StoreAssetSoapOut"/>
>        </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="VersionCueService" type="tns:VersionCueService">
>        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
>        <wsdl:operation name="GetAsset">
>            <soap:operation soapAction="~/WebServices/GetAsset"
> style="document"/>
>            <wsdl:input>
>                <soap:body use="literal"/>
>            </wsdl:input>
>            <wsdl:output>
>                <mime:multipartRelated>
>                    <mime:part>
>                        <soap:body use="literal"/>
>                    </mime:part>
>                    <mime:part>
>                        <mime:content part="asset"
> type="application/octet-stream"/>
>                    </mime:part>
>                </mime:multipartRelated>
>            </wsdl:output>
>        </wsdl:operation>
>        <wsdl:operation name="StoreAsset">
>            <soap:operation soapAction="~/WebServices/StoreAsset"
> style="document"/>
>            <wsdl:input>
>                <mime:multipartRelated>
>                    <mime:part>
>                        <soap:body use="literal"/>
>                    </mime:part>
>                    <mime:part>
>                        <mime:content part="asset"
> type="application/octet-stream"/>
>                    </mime:part>
>                </mime:multipartRelated>
>            </wsdl:input>
>            <wsdl:output>
>                <soap:body use="literal"/>
>            </wsdl:output>
>        </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="VersionCueService">
>        <wsdl:port name="VersionCueService" binding="tns:VersionCueService">
>            <soap:address
> location="http://localhost:8080/axis/services/VersionCueService"/>
>        </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>
>
> Thanks in advance,
> Ian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Reply via email to