3

Actually I used this code to access this web service FahrenheitToCelsius Method, am getting the correct response, but when I tried to access my webservice am getting

java.io.IOException: HTTP request failed, HTTP status: 500

error and it is pointing the transport.call(SOAP_ACTION, envelope);

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);                     
//Use this to add parameters                              
request.addProperty("username",usr);
request.addProperty("password",pass);
request.addProperty("backOfficePartnerId",id);

//Declare the version of the SOAP request
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);

envelope.setOutputSoapObject(request);

envelope.dotNet = true;

try {
    HttpTransportSE transport = new HttpTransportSE(URL);

    Log.i("bodyout", "" + envelope.bodyOut.toString());

    transport.call(SOAP_ACTION, envelope);      

    // Get the SoapResult from the envelope body.
    SoapObject result = (SoapObject)envelope.bodyIn;
    System.out.println("result IN F TO C::"+result);
}catch(Exception e){
    e.printStackTrace();
}

Am getting the correct response till here. I debuged and checked the values am sending the body out that is correct and in response for me the bodyin is null.

Molly
  • 1,887
  • 3
  • 17
  • 34
Jeevanandhan
  • 1,073
  • 10
  • 18
  • Have you tried to access your Webservice anywhere else? It looks like your WebService is crashing with your request. – Aitor Calderon Apr 04 '13 at 11:13
  • @AitorCalderon::I tried the same url in Iphone and got the output,, – Jeevanandhan Apr 04 '13 at 11:17
  • What external libraries are you using? I had a similar issue and I think it might be libraries. I was using ksoap2, httpmime4.0.1, and apache-mime4j-0.6 and once I deleted those last 2 the errors went away – Roman Apr 18 '13 at 21:59
  • @Roman:: Thanks dude,,,, probz with the soap action and method name solved .i.e., input am sending is wrong. solved it,,, – Jeevanandhan Apr 25 '13 at 06:46
  • I didn't get what you did to resolve this? I am able to get to any other public soap services. The one which I am suppose to use keep throwing me error on same call you mentioned. I have checked 10 times that my request parameters, namespace, url, method are correct. Any thoughts? – AKG Sep 11 '13 at 18:20
  • Did you find a solution?, I'm getting same error – seleucia Apr 19 '15 at 09:55
  • @seleucia:: I have send a wrong method name.. Kindly check whether you are sending the correct input.... – Jeevanandhan Apr 28 '15 at 09:58
  • @JeevaNandhan I found out problem, i did similar mistake. Thank youu – seleucia Apr 29 '15 at 13:15

3 Answers3

0

The HTTP Status: 500 is an internal server error and it probably has something to do with your .NET server side coding.

0

change VER10 to VER11. SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11) working for me

etimux
  • 1
0

I searched a lot but couldn't find any specific solution. I solved my problem by downloading new server package(of same version) and replaced the previous server package by new one .(about Apache tomcat 7)

shiv
  • 625
  • 1
  • 6
  • 12