Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. public final String SOAP_ACTION = "http://test.app.org/";;
  2. public final String OPERATION_NAME = "Login";
  3. public final String WSDL_TARGET_NAMESPACE = "http://test.app.org/";
  4. public final String SOAP_ADDRESS = "https://abc.test.com/ws/webservice/Service1.asmx";
  5. SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);
  6. PropertyInfo pi=new PropertyInfo();
  7. pi.setName("name");
  8. pi.setValue(name);
  9. pi.setType(String.class);
  10. request.addProperty(pi);
  11. pi=new PropertyInfo();
  12. pi.setName("password");
  13. pi.setValue(password);
  14. pi.setType(String.class);
  15. request.addProperty(pi);
  16.  
  17. SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
  18. SoapEnvelope.VER11);
  19. envelope.dotNet = true;
  20. envelope.setOutputSoapObject(request);
  21. HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
  22. Object response=null;
  23. try
  24. {
  25. httpTransport.call(SOAP_ACTION+OPERATION_NAME, envelope);
  26. response = envelope.getResponse();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement