you can  use the  the syntax
import org.apache.axiom.om.OMElement;

public interface ServiceInreface {

      String echoText(OMElement element); 

}

I have done the same using eclipse plug in so it should be possible with
<java2wsdl>  also

 


Binoy K Philip 



  _____  

From: Ashish Arya [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 21, 2007 2:01 PM
To: axis-user@ws.apache.org
Subject: RE: Problem with MTOM



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:[EMAIL PROTECTED] 
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

 

 

 

 

Reply via email to