wood burning stoves 2.0
The moose likes Web Services and the fly likes creating soap requests in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "creating soap requests in java" Watch "creating soap requests in java" New topic

creating soap requests in java

Lavanya Halliwell
Ranch Hand

Joined: Apr 09, 2010
Posts: 57
The code snippet below is my attempt at creating a soap request. I can see the parts of my envelope, and even add content to the body with out compilation error. However, when I try to print the request at the end of the snippet all I get is null. What is the appropriate way to view a soap request like this? why do you suppose that it is coming as null?

(for the purpose of this topic, I created a simple java application and imported the required resources, I am not actually making a request of any web service as of yet)

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
Here is a method that creates a string representation of an instance of SOAPMessage, along with any MIME attachments to the SOAP message:

Best wishes!
Lavanya Halliwell
Ranch Hand

Joined: Apr 09, 2010
Posts: 57
I managed to get my soap functions working the original way.

but what is the soap Mime header/body.

is it just where you include the header/body as an attachment? in which case you could have prepared it earlier?
I agree. Here's the link: http://aspose.com/file-tools
subject: creating soap requests in java
It's not a secret anymore!