Nigel,

Please log a bug report and upload your wsdl.

thanks,
dims

On 4/9/07, Nigel Furber <[EMAIL PROTECTED]> wrote:

Hi,
I'd be grateful for any suggestions anyone might have for fixing my Axis2
WSDL2Java problem - I'm trying to write an Axis2 client for an existing Web
Service which expects an attachment as well some data in the body of the
incoming messages, and returns a similar response.

The stub generated has a method with no incoming parameters  - I was
expecting perhaps two incoming plus the returned one it does have. I applied
the fix of D's emails on 2007-03-08 by amending the wsdl to cause it to
generate the response parameter.
Here's the generated Java signature..

public bplserver.bplwebservice.types.ResponseInfo submitAttachment()
                    throws java.rmi.RemoteException



Here's the bit of ant script..
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="false">
                        <classpath refid="axis.classpath" />
                        <arg value="-d" />
                        <arg value="adb" />
                        <arg value="-uri" />
                        <arg file="BPLWebService.wsdl" />
                        <arg value="-ss" />
                        <arg value="-g" />
                        <arg value="-sd" />
                        <arg value="-o" />
                        <arg file="output" />
                        <arg value="-p" />
                        <arg value="-s" />
                        <arg value="-uw" />
                        <arg value="-u" />
                        <arg value="uk.co.boxfordpark" />

                </java>
and here's the wsdl

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="BPLWebService"
        targetNamespace="http://bplserver/BPLWebService";
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:types="http://bplserver/BPLWebService/types";
        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
        xmlns:tns="http://bplserver/BPLWebService";>
        <wsdl:types>
                <xsd:schema
                        targetNamespace="http://bplserver/BPLWebService/types";
                        xmlns:types="http://bplserver/BPLWebService/types";>

                        <!--  Request Type  -->
                        <xsd:simpleType name="request_type">
                                <xsd:restriction base="xsd:string">
                                        <xsd:minLength value="3" />
                                        <xsd:maxLength value="4" />
                                        <xsd:enumeration value="ABC" />
                                        <xsd:enumeration value="DEF" />
                                        <xsd:enumeration value="XYZ" />
                                </xsd:restriction>
                        </xsd:simpleType>

                        <!--  Request Identifier  -->
                        <xsd:simpleType name="request_identifier">

                                <xsd:restriction base="xsd:string">
                                        <xsd:minLength value="3" />
                                        <xsd:maxLength value="4" />
                                        <xsd:enumeration value="ace" />
                                        <xsd:enumeration value="two" />
                                        <xsd:enumeration value="four" />
                                        <xsd:enumeration value="jim" />
                                </xsd:restriction>
                        </xsd:simpleType>
                        <xsd:element name="RequestAttInfo">
                                <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="ReqType"
                                                        type="types:request_type" 
minOccurs="1" maxOccurs="1" />
                                                <xsd:element 
name="ReqIdentifier"
                                                        type="types:request_identifier" 
minOccurs="1" maxOccurs="1" />
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                        <!-- output  data -->
                        <xsd:element name="ResponseInfo">
                                <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="ResStatus" 
type="xsd:string"
                                                        minOccurs="1" 
maxOccurs="1" />
                                                <xsd:element name="ResBinary" 
type="xsd:boolean"
                                                        minOccurs="1" 
maxOccurs="1" />
                                                <xsd:element name="ResFileName"
                                                        type="xsd:string" minOccurs="1" 
maxOccurs="1" />

                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                </xsd:schema>
        </wsdl:types>

        <wsdl:message name="submitAttachmentRequest">
                <wsdl:part name="RequestInput" element="types:RequestAttInfo" />
                <wsdl:part name="ReqAttData" type="xsd:string" />
        </wsdl:message>
        <wsdl:message name="retrieveAttachmentResponse">
                <wsdl:part name="ResponseOutput" element="types:ResponseInfo" />
                <wsdl:part name="ResAttData" type="xsd:string" />
        </wsdl:message>

        <wsdl:portType name="BPLWebService">
                <wsdl:operation name="submitAttachment">
                        <wsdl:input message="tns:submitAttachmentRequest" />
                        <wsdl:output message="tns:retrieveAttachmentResponse" />
                </wsdl:operation>
        </wsdl:portType>

        <wsdl:binding name="BPLDataBinding" type="tns:BPLWebService">
                <soap:binding style="document"
                        transport="http://schemas.xmlsoap.org/soap/http"; />

                <!-- For soap file attachment based requests -->
                <wsdl:operation name="submitAttachment">
                        <wsdl:input>
                        <soap:body use="literal"/> <!-- Added as per D's email 
-->
                        <mime:multipartRelated>
                                        <mime:part>
                                                <soap:body parts="RequestInput" 
use="literal" />
                                        </mime:part>
                                        <mime:part>
                                                <mime:content part="ReqAttData" 
type="text/xml" />
                                        </mime:part>
                                </mime:multipartRelated>
                        </wsdl:input>
                        <wsdl:output>
                        <soap:body use="literal"/> <!-- Added as per D's email 
-->
                                        <mime:multipartRelated>
                                        <mime:part>
                                                <soap:body parts="ResponseOutput" 
use="literal" />
                                        </mime:part>
                                        <mime:part>
                                                <mime:content part="ResAttData" 
type="text/xml" />
                                        </mime:part>
                                </mime:multipartRelated>
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>

        <wsdl:service name="BPLWebService">
                <wsdl:port name="BPLWebService"
                        binding="tns:BPLDataBinding">
                        <soap:address
                                location="http://bplserver:7001/BPLWebService/ws"; 
/>
                </wsdl:port>
        </wsdl:service>

</wsdl:definitions>

Any help or ideas would be much appreciated.

Regards

Nigel Furber


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.0.0/752 - Release Date: 08/04/2007
20:34


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to