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 Problem with MTOM
Date Mon, 20 Aug 2007 11:42:41 GMT
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