This discussion is archived
0 Replies Latest reply: Jun 14, 2013 8:31 AM by suryak RSS

How to extract data from OMElement object file attachment SOAP Service

suryak Newbie
Currently Being Moderated

We are having Axis2 Tomcat6 Webservice on SOAP WSDL

 

The Webservice method is like this

 

public String uploadGpxFile(OMElement omEle) throws AxisFault {

    // Extract file attachment from omEle

   // store in database

   return "ok";

}


So, I just went through the documentation and executed


omEle.getText();


This printed the attached data like this


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:uploadGpxFileResponse xmlns:ns="..........">

         <ns:return><![CDATA[ MY REQUIRED XML DATA IS HERE ]]></ns:return>

      </ns:uploadGpxFileResponse>

   </soapenv:Body>

</soapenv:Envelope>


So, I essentially want to extract this data and store in database. My simple question is how to do it!


It sounds crazy but, I am quite new to Java. I was actually debugging client and found there is a problem in server and started fixing it!! It would be very helpful if someone helps

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points