• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

SOAP with Attachments (SwA) with Axis2, problem.

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

My client is having axis1.x SOAP client, who sends a file, for which I am suppose to write a Webservice. I have decided to use axis 2.0 for this service.

To get my axis 1.x SOAP client running with axis 2 SOAP Service, I was using following tutorial.
http://ws.apache.org/axis2/1_0/mtom-guide.html

It says.

"Axis2 Handles SwA messages at the inflow only. When Axis2 receives a SwA message it extracts the binary attachment parts and puts a reference to those parts in the Message Context."

I understood this as following, if I send the SOAP message with attachment using axis1.x client to the axis2 webservice. Axis2 will extract the binary attachment and put an element into the xml like

<source href="cid:3936AE19FBED55AE4620B81C73BDD76E" xmlns="/>

and I can retrive this attachment from MessageContext.

But it does not work. The OMElement which I receive as a parameter to my serviceMethod do not have this source element into it. If I use following code given in tutorial.

public OMElement echoAttachment(OMElement omEle) {
OMElement child = (OMElement) omEle.getFirstOMChild(); or OMElement child = element.getFirstChildWithName(new QName("source"));
OMAttribute attr =
child.getAttribute(new QName("href"));
String contentID = attr.getAttributeValue();
..

Child element is always null(in case of both statements from the code snippet)

Can somebody help me here. Tutorial says above code has been tested with axis1.x can somebody send me the test client in axis 1.x.

Thanks in advance.
-Prasad
 
Beware the other head of science - it bites! Nibble on this message:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic