Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This code worked for me</p> <pre><code>String SOAP_ACTION = "http://rytryryry.com/AddCar"; String Email = "kishore@gmail.com"; String passWRD ="hai"; String token = "4535677756"; String server = "http://ytrytrytryty.org/Services.asmx"; String date=(String) android.text.format.DateFormat.format("MM/dd/yy h:mm:ss aa", new java.util.Date()); //date format "MM/dd/yy h:mmaa" -&gt; "04/06/70 3:23am" try { //System.out.println("in try blok"); URL u = new URL(server); URLConnection uc = u.openConnection(); HttpURLConnection connection = (HttpURLConnection) uc; connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestProperty("SOAPAction", SOAP_ACTION); connection.setRequestMethod("POST"); connection.setRequestProperty("Content-type", "text/xml; charset=utf-8"); String xmldata = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;" + "&lt;soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt; "+ "&lt;soap:Body&gt;"+ "&lt;AddCar xmlns=\"http://abcd.com/\"&gt;"+ "&lt;clsAddCarRequest&gt;"+ "&lt;clsCredentials&gt;"+ "&lt;EmailAddress&gt;"+Email+"&lt;/EmailAddress&gt;"+ "&lt;Password&gt;"+passWRD+"&lt;/Password&gt;"+ "&lt;TokenID&gt;"+token+"&lt;/TokenID&gt;"+ "&lt;/clsCredentials&gt;"+ "&lt;clsCar&gt;"+ "&lt;CarID&gt;"+01+"&lt;/CarID&gt;"+ "&lt;UserID&gt;"+34+"&lt;/UserID&gt;"+ "&lt;RegisteredOwner&gt;"+"kishore"+"&lt;/RegisteredOwner&gt;"+ "&lt;State&gt;"+"string"+"&lt;/State&gt;"+ "&lt;VINNumber&gt;"+"string"+"&lt;/VINNumber&gt;"+ "&lt;YearOfRegistration&gt;"+"2007"+"&lt;/YearOfRegistration&gt;"+ "&lt;ExpiryDate&gt;"+"2/5/2016"+"&lt;/ExpiryDate&gt;"+ "&lt;IsAutoFightOn&gt;"+true+"&lt;/IsAutoFightOn&gt;"+ "&lt;IsDeleted&gt;"+false+"&lt;/IsDeleted&gt;"+ "&lt;DateAddedTimeStamp&gt;"+date+"&lt;/DateAddedTimeStamp&gt;"+ "&lt;LastUpdatedTimeStamp&gt;"+date+"&lt;/LastUpdatedTimeStamp&gt;"+ "&lt;/clsCar&gt;"+ "&lt;/clsAddCarRequest&gt;"+ "&lt;/AddCar&gt;"+ "&lt;/soap:Body&gt;"+ "&lt;/soap:Envelope&gt;"; System.out.println(xmldata); OutputStream out = connection.getOutputStream(); Writer wout = new OutputStreamWriter(out); wout.write(xmldata); wout.flush(); wout.close(); BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); //InputStream in = connection.getInputStream(); String result; //int c; while ((result=rd.readLine()) != null) { System.out.println(result); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload