aspose file tools
The moose likes Web Services and the fly likes Getting Bad Response from Web service Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Getting Bad Response from Web service" Watch "Getting Bad Response from Web service" New topic
Author

Getting Bad Response from Web service

Mamu Jan
Ranch Hand

Joined: Sep 21, 2005
Posts: 45
Hi,

I'm trying to post to the web service http://www.webservicex.net/CurrencyConvertor.asmx?WSDL using SOAP.

My java program generates the following XML :



But I get the following response:



Can sum1 tell me wats wrong?? A detailed description of the service can be found here

Any sorta help wud be gr8ly appreciated.

Thanx
[ December 26, 2005: Message edited by: Mamu Jan ]

There is no patch for ignorance...
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2036
What value is in your html request for the header SOAPAction?

The link you provided showed an example with the text below

SOAPAction: "http://www.webserviceX.NET/ConversionRate"

Maybe you should do same.
Mamu Jan
Ranch Hand

Joined: Sep 21, 2005
Posts: 45
Originally posted by Jesus Angeles:
What value is in your html request for the header SOAPAction?

The link you provided showed an example with the text below

SOAPAction: "http://www.webserviceX.NET/ConversionRate"

Maybe you should do same.


When I used the above link I get an HTTP Error 404. Try opening the link in IE you'll get the same error.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35258
    
    7
You're not supposed to access that URL, you should use it as value of the SOAPAction HTTP header as was suggested.


Android appsImageJ pluginsJava web charts
Mamu Jan
Ranch Hand

Joined: Sep 21, 2005
Posts: 45
Originally posted by Ulf Dittmer:
You're not supposed to access that URL, you should use it as value of the SOAPAction HTTP header as was suggested.


Plz can u show me how I can set a value for the SOAPAction HTTP header. I've never heard of SOAPAction b4

Thanx
Mamu Jan
Ranch Hand

Joined: Sep 21, 2005
Posts: 45
This is the XML Message I need to generate :



and this is my code



I cudnt find any error in the code ?!! Can sum1 help me !
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35258
    
    7
You can set HTTP headers like so:

MimeHeaders hd = message.getMimeHeaders();
hd.addHeader("SOAPAction", "http://www.webserviceX.NET/ConversionRate");
[ December 29, 2005: Message edited by: Ulf Dittmer ]
Mamu Jan
Ranch Hand

Joined: Sep 21, 2005
Posts: 45
Thanx every1 ! My program is working now !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Bad Response from Web service
 
Similar Threads
Axis rejects int parameter
Writing a MS Client to access a Java SOAP Service
SOAP Exception : did not recognize the value of HTTP Header SOAPAction:
SOAP Fault for SOAP Action property
Problem in soap response it gives me some faultcode..