Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.erplogic.Webservice;
- import android.util.Base64;
- import android.util.Log;
- import org.ksoap2.SoapEnvelope;
- import org.ksoap2.serialization.PropertyInfo;
- import org.ksoap2.serialization.SoapObject;
- import org.ksoap2.serialization.SoapSerializationEnvelope;
- import org.ksoap2.transport.HttpTransportSE;
- import org.xmlpull.v1.XmlPullParserException;
- import java.io.IOException;
- public class CreateCustomer {
- String WSDL_URL = "http://infinitycosmic.com/ram/customer.wsdl";
- String SOAP_ACTION = "http://sap.com/xi/A1S/Global/ManageCustomerIn/MaintainBundle_V1Request";
- String NAME_SPACE = "http://sap.com/xi/A1S/Global";
- String METHOD_NAME = "maintainBundleV1";
- public void createCustomerAccount(){
- SoapObject soapObject = new SoapObject(NAME_SPACE,METHOD_NAME);
- soapObject.addProperty("InternalID","98765");
- soapObject.addProperty("CategoryCode","1");
- soapObject.addProperty("CustomerIndicator","true");
- soapObject.addProperty("LifeCycleStatusCode","2");
- PropertyInfo username = new PropertyInfo();
- username.setName("username");
- username.setValue("_ANDROIDPOC");
- soapObject.addProperty(username);
- PropertyInfo password = new PropertyInfo();
- password.setName("password ");
- password.setValue("Welcome1" );
- soapObject.addProperty(password );
- SoapSerializationEnvelope soapSerializationEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
- soapSerializationEnvelope.setOutputSoapObject(soapObject);
- HttpTransportSE httpTransportSE = new HttpTransportSE(WSDL_URL,100*10000);
- try {
- httpTransportSE.call(SOAP_ACTION,soapSerializationEnvelope);
- SoapObject response = (SoapObject) soapSerializationEnvelope.bodyIn;
- String responses = response.getProperty(0).toString();
- Log.i("Response","************************ "+responses);
- } catch (IOException e) {
- e.printStackTrace();
- } catch (XmlPullParserException e) {
- e.printStackTrace();
- }
- }
- }
Add Comment
Please, Sign In to add comment