This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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!