Hello,
 
I am trying to implement a webservice using WSDL first approach. My requirement 
is to add method signature which returns a file as an attachment to caller. I 
am using SWA, wsi:swaRef as type of the return parameter. i have imported the 
schema for it in my wsdl file. When i generated the server side skeleton using 
Axis2 WSDL2Java tool, the method signature is generated like this:
 
                 public org.ws_i.profiles.basic._1_1.xsd.SwaRef 
ContentExportAsAttachment                  (  boolean 
attachType,java.lang.String lock,java.lang.String traslation                  )
 
I dont understand why it is generating the type of the return parameter like 
this: org.ws_i.profiles.basic._1_1.xsd.SwaRef. This is not even getting 
compiled now. I thought this should be mapped to "javax.activation.DataHandler" 
class.  
I have used  adb binding here.
 
I am pasting the wsdl file here, it is a simple wsdl with only one method. 
style i used is document literal. 
 
Any help in this regard is greatly appreciated.
 
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tns="http://www.example.org/TestCommand/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="TestCommand" 
targetNamespace="http://www.example.org/TestCommand/";>
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.org/TestCommand/"; 
xmlns="http://www.w3.org/2001/XMLSchema";
xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"; >

<import namespace="http://ws-i.org/profiles/basic/1.1/xsd";
schemaLocation="http://ws-i.org/profiles/basic/1.1/swaref.xsd"/>

<xsd:element name="ContentExportAsAttachment">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="attachType" type="xsd:boolean" />
<xsd:element name="Lock" type="xsd:string"></xsd:element>
<xsd:element name="Traslation" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ContentExportAsAttachmentResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="return" type="wsi:swaRef"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="ContentExportAsAttachmentRequest">
<wsdl:part element="tns:ContentExportAsAttachment" name="parameters"/>
</wsdl:message>
<wsdl:message name="ContentExportAsAttachmentResponse">
<wsdl:part element="tns:ContentExportAsAttachmentResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="TestCommand">
<wsdl:operation name="ContentExportAsAttachment">
<wsdl:input message="tns:ContentExportAsAttachmentRequest"/>
<wsdl:output message="tns:ContentExportAsAttachmentResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestCommandSOAP" type="tns:TestCommand">
<soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ContentExportAsAttachment">
<soap:operation soapAction="http://www.example.org/TestCommand/NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestCommand">
<wsdl:port binding="tns:TestCommandSOAP" name="TestCommandSOAP">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
 
Thanks,
Kiran
 
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join

Reply via email to