SOAP request
いくつかの値を追加して送信していますURL
が、例外を与える応答はありません。次のコードを使用しています。さらに試してみましたが、成功しませんでした。それを見て、間違っている場所を教えてください。
SharedPreferences myPrefs = this.getSharedPreferences("myPrefs",
MODE_WORLD_READABLE);
String prefName = myPrefs.getString(MY_ID, "0");
// http://dotnet4.peaceofmind.in/ms/ChestMeetAndMeet /ChestMeetAndMeatServices.asmx
final String SOAP_ACTION = "http://dotnet4.peaceofmind.in/ms/ChestMeetAndMeet/ChestMeetAndMeatServices.asmx/UpdateUserProfile";
final String OPERATION_NAME ="UpdateUserProfile";
final String WSDL_TARGET_NAMESPACE ="http://dotnet4.peaceofmind.in/ms/ChestMeetAndMeet/";
final String SOAP_ADDRESS ="http://dotnet4.peaceofmind.in/ms/ChestMeetAndMeet/ChestMeetAndMeatServices.asmx";
SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);
//PropertyInfo pi = new PropertyInfo();
request.addProperty("sUserId", prefName);
request.addProperty("sUserName", prefName);
request.addProperty("sUserId", getfirstname);
request.addProperty("sPassword", "");
request.addProperty("sFirstName",getfirstname);
request.addProperty("sLastName", "");
request.addProperty("sAlternateEmailId",getemail);
request.addProperty("sBirthDate",getbirthdate);
request.addProperty("sAddress1", getaddress1);
request.addProperty("sOpenTo", getopento);
request.addProperty("sCity", getcity);
request.addProperty("sState", getstate);
request.addProperty("sCountry", getcountry);
request.addProperty("sZipCode", getzip);
request.addProperty("sMobile", getmobile);
request.addProperty("sPhone", "");
request.addProperty("sInterest", getinterest);
request.addProperty("sLatitude","");
request.addProperty("sLongitude", "");
request.addProperty("sProfession", getprofession);
request.addProperty("sHeight", getheight);
request.addProperty("sWeight", getweight);
request.addProperty("sColor", getethinicity);
request.addProperty("sProfileImage", bitmapString);
request.addProperty("sGender", "");
request.addProperty("sMaritalStatus",getmaritalstatus);
request.addProperty("sShortDescription", getlookingfor);
request.addProperty("sCheckInLocation", "");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
try
{
SoapObject response=null;
httpTransport.call(SOAP_ACTION,envelope);
try{
//give exception bellow line
response = (SoapObject)envelope.getResponse();
}catch(Exception e)
{
System.out.println(e.getMessage());
e.printStackTrace();
}
int UserID= Integer.parseInt(response.toString());
objprofile.ResultValue= response.getProperty(1).toString();
int vv = objprofile.UserID;
String rre= objprofile.ResultValue;
}
catch(Exception e)
{
e.printStackTrace();
}
}
誰か助けてください次の例外が表示されています--
05-04 13:06:41.859: W/System.err(11790): SoapFault - faultcode: 'soap:Client' faultstring: 'System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://dotnet4.peaceofmind.in/ms/ChestMeetAndMeet /ChestMeetAndMeatServices.asmx/UpdateUserProfile.
05-04 13:06:41.859: W/System.err(11790): at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
05-04 13:06:41.869: W/System.err(11790): at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
05-04 13:06:41.869: W/System.err(11790): at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
05-04 13:06:41.869: W/System.err(11790): at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)' faultactor: 'null' detail: org.kxml2.kdom.Node@406236e0
05-04 13:06:41.889: W/System.err(11790): at org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:116)
05-04 13:06:41.889: W/System.err(11790): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:137)
05-04 13:06:41.909: W/System.err(11790): at org.ksoap2.transport.Transport.parseResponse(Transport.java:63)
05-04 13:06:41.919: W/System.err(11790): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:100)
05-04 13:06:41.929: W/System.err(11790): at com.synapse.meetnmeat.MyProfile.userIdREsponse(MyProfile.java:735)
05-04 13:06:41.929: W/System.err(11790): at com.synapse.meetnmeat.MyProfile.UpdateUserProfile(MyProfile.java:358)
05-04 13:06:41.929: W/System.err(11790): at com.synapse.meetnmeat.MyProfile$7$1.run(MyProfile.java:271)