axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Arya" <Ashish.A...@sos.sungard.com>
Subject RE: Problem with MTOM
Date Tue, 21 Aug 2007 08:30:37 GMT
Hi All,

 

Let me re-phrase my question to make it simpler. 

 

Can we use <java2wsdl> ant task to generate the WSDL file especially
when MTOM attachments are expected in Request or Response?

 

I noticed that inside the axis2/samples/mtom folder, the build file
doesn't contain task to generate WSDL file from a java file.

 

How should we automate the process of generation of WSDL for MTOM
attachments?

 

Thanks and 1Regards,

 

Ashish Arya,

Sungard Offshore Services (India) <http://www.sungard.com/sos> 

 

________________________________

From: Ashish Arya [mailto:Ashish.Arya@sos.sungard.com] 
Sent: Monday, August 20, 2007 5:13 PM
To: axis-user@ws.apache.org
Subject: Problem with MTOM

 

Hi All,

 

I am new to AXIS 2 and trying to implement a small web service
application which uses MTOM attachment.  In my simple web service
application, I have an operation called 'echoText()' which expects a
text file as MTOM attachment as request parameter to this operation. In
return this method simply echo the text contained in the attached file.

 

public interface ServiceInreface {

      String echoText(String name); 

}

 

My question is: how can I inform the <Java2wsld> ant task that the
string request parameter to my web service operation expects a MTOM
attachment inside it. Thus the WSDL generated should have an entry like
this

<wsdl:types>

    <xs:schema attributeFormDefault="qualified"
xmlns:xs=http://www.w3.org/2001/XMLSchema ..................>

    <xs:import namespace="http://www.w3.org/2005/05/xmlmime"
schemaLocation="xsd0.xsd"/> <!-This I have taken from MTOM sample
folder-->

      <xs:element name="echoText">

            <xs:complexType>

                  <xs:sequence>

                        <xs:element name="param0" nillable="true"
type="xs:string"/>

                        <xs:element minOccurs="0" name="binaryData"
type="xmime:base64Binary"/>

                  </xs:sequence>

                  ....................................

 

Instead of 

 

<wsdl:types>

    <xs:schema attributeFormDefault="qualified"
xmlns:xs=http://www.w3.org/2001/XMLSchema .... ..... .... ... ... ...
... ... ... ..>

    <xs:import namespace="http://www.w3.org/2005/05/xmlmime"
schemaLocation="xsd0.xsd"/>

      <xs:element name="echoText">

            <xs:complexType>

                  <xs:sequence>

                        <xs:element name="param0" nillable="true"
type="xs:string"/>                        

                  </xs:sequence>

                  ....................................

 

Please help me to understand this.

 

Thanks and Regards,

 

Ashish

 

 

 

 


Mime
View raw message