File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes SOAP request error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP request error" Watch "SOAP request error" New topic

SOAP request error

Lavanya Halliwell
Ranch Hand

Joined: Apr 09, 2010
Posts: 57
So I recently built a java application that builds a soap request.

my webservice requires: order to work

but my java method puts:

SOAP-ENV:envelope.....but this doesn't work, I get a soap fault.

this is how I build the sopa request....
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
For some examples (tested code) on how to create SOAP messages with SAAJ, please see section 5.7 etc. in the following document:
Best wishes!
Lavanya Halliwell
Ranch Hand

Joined: Apr 09, 2010
Posts: 57
so I solved this by doing a replaceAll (soapenv for SOAP-ENV replacement)

I think the better way would be to somehow overwrite the default soap namespace/URI and put the one need there.

thanks Ivan for the reply!
I agree. Here's the link:
subject: SOAP request error
It's not a secret anymore!