aspose file tools
The moose likes Web Services and the fly likes Problem calling Axis SWA web service Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Problem calling Axis SWA web service" Watch "Problem calling Axis SWA web service" New topic
Author

Problem calling Axis SWA web service

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 56
Hello

I have a simple web service that uses axis 1.4.1. This web service returns a SOAPMessage when invoqued by a little java client I developped. Everything works fine when the soapMessage returned by the webservice don't have any attachment.

When I add an attachment to the soapmessage returned by the webservice, the following error occurs:



Note that In my services.xml file I have the following line:
<parameter name="enableSwA" locked="false">true</parameter>

Here is the code I use to build the SOAPMessage that is returned by my webservice:


Resuming: If I have the 3 last lines of presented code, the error occurs. If not, everything works fine.

I am using java 1.6.

Thanks for your help!

Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2194
Hi!
Try setting the content id of the attachment before you add it to the message.
Example:

Best wishes!
Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 56
Hello

Thanks for your answer and help.

I tried your suggestion but the result (error) is the same.

Here goes my code. Any help?



Thanks

Ivan Krizsan wrote:Hi!
Try setting the content id of the attachment before you add it to the message.
Example:

Best wishes!
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2194
Hi!
Sorry, your code looks very much like code I have written myself. I did not use Axis, though.
Are you able to capture the packets going to and from your web service and examine the message that causes the error?
Best wishes!
Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 56
What did you use instead Axis (if you used something else) ?

thanks

best regards

Ivan Krizsan wrote:Hi!
Sorry, your code looks very much like code I have written myself. I did not use Axis, though.
Are you able to capture the packets going to and from your web service and examine the message that causes the error?
Best wishes!
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2194
Hi!
Paulo Carvalho wrote:What did you use instead Axis (if you used something else) ?

I used Metro in GlassFish.
My example program can be found in the document here: http://faq.javaranch.com/content/Exam-Objectives-5.pdf
Best wishes!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem calling Axis SWA web service
 
Similar Threads
SOAP 1.1 or 1.2
how to compile and run a SAAJ client without ANT
Axis2 exception
Axis2 SAAJ API conflict with Java6 SAAJ - UnknownHostException on call()
webservice package javax.xml.soap does not exist