I apologize I didn't finish my idea,go to your service and change the namespace to something other than tempuri.org chang it to CeltoF or somethign like that no .com or .org or http Should fix it
Sincerely Jose C Gomez http://www.josecgomez.com Sent from Jacksonville, Florida, United States On Thu, Dec 17, 2009 at 9:33 AM, Jose Gomez <[email protected]> wrote: > Change the Tempuri to something else it will fix it :) had the same problem > Sincerely > Jose C Gomez > > http://www.josecgomez.com > > > > On Thu, Dec 17, 2009 at 9:24 AM, android09 <[email protected]>wrote: > >> Hello Everyone, >> >> I am trying to develop an application which consume the asp.net web >> service from android. I tried a lot but every time i got an exception >> while calling the SOAP_ACTION. I have tried with the localhost, local >> IP Address and also i have taken URL from the internet but it throws >> an exception. Here it is: >> >> Exception: >> ------------------ >> SoapFault - faultcode: 'soap:Client' faultstring: 'Server did not >> recognize the value of HTTP HeaderSOAPAction : >> >> http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit >> .' >> faultactor: 'null' detail : org.kxml2.kdom.n...@43c582e8 >> >> I also got an exception like this:- "org.ksoap2.SoapFault : null" >> >> Here is my source code: >> ------------------------------------ >> package com.android.webdemo3; >> >> import org.ksoap2.SoapEnvelope; >> import org.ksoap2.serialization.SoapObject; >> import org.ksoap2.serialization.SoapSerializationEnvelope; >> import org.ksoap2.transport.HttpTransportSE; >> >> import android.app.*; >> import android.os.*; >> import android.widget.TextView; >> >> public class WebDemo3 extends Activity { >> /** Called when the activity is first created. */ >> >> private static final String SOAP_ACTION = " >> http://www.w3schools.com/ >> webservices/tempconvert.asmx?op=CelsiusToFahrenheit<http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit> >> "; >> private static final String METHOD_NAME = "CelsiusToFahrenheit"; >> private static final String NAMESPACE = "http://tempuri.org/ >> CelsiusToFahrenheit"; >> private static final String URL = "http://www.w3schools.com/ >> webservices/tempconvert.asmx<http://www.w3schools.com/webservices/tempconvert.asmx> >> "; >> >> TextView tv; >> >> @Override >> public void onCreate(Bundle savedInstanceState) { >> super.onCreate(savedInstanceState); >> setContentView(R.layout.main); >> tv=(TextView)findViewById(R.id.textView); >> >> try >> { >> SoapObject request = new SoapObject(NAMESPACE, >> METHOD_NAME); >> >> // request.addProperty("Celsius", 32); >> >> SoapSerializationEnvelope envelope = new >> SoapSerializationEnvelope(SoapEnvelope.VER11); >> envelope.dotNet=true; >> envelope.setOutputSoapObject(request); >> >> HttpTransportSE androidHttpTransport = new HttpTransportSE >> (URL); >> >> androidHttpTransport.call(SOAP_ACTION, envelope);//Here an >> exception is throw. >> >> // Object result = (Object)envelope.getResponse(); >> // String[] results = (String[]) result; >> // System.out.println("Result is: "); >> >> java.lang.String receivedString = (String) >> envelope.getResponse(); >> tv.setText("Result is: "+receivedString); >> } >> catch (Exception e) >> { >> e.printStackTrace(); >> tv.setText(e.getMessage()); >> } >> } >> } >> >> You can access this URL, because i got from the internet(web). I can't >> understand, why this exception is throw. Please anybody give me >> solution of my problem and i would really appreciate your help. Please >> reply me as soon as possible earlier. >> >> Thanks. >> Pranav >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

