How to make a SOAP call with dot42? -


i have following code. know webrequests , such should in async calls wanted proof of concept.

using system; using android.app; using android.os; using android.widget; using dot42; using dot42.manifest; using system.xml; using system.net; using system.io; using system.text;  [assembly: application("dot42application6")]  namespace dot42application6 {     [activity]     public class mainactivity : activity     {     protected override void oncreate(bundle savedinstance)     {         base.oncreate(savedinstance);         setcontentview(r.layouts.mainlayout);         string soap = @"<?xml version=""1.0"" encoding=""utf-8""?>         <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/"">         <soap:body><getcolorchangecharge xmlns=""http://reps.catalystinnovations.net/"">         <password>ujnvusk</password></getcolorchangecharge></soap:body>    </soap:envelope>";          httpwebrequest req = (httpwebrequest)webrequest.create("http://www.someurl/service.asmx");         req.headers.add("soapaction", "http://www.someurl/getcolorchangecharge");         req.contenttype = "text/xml; charset=utf-8";         req.accept = "text/xml";         req.method = "post";          using (stream stm = req.getrequeststream())         {             using (streamwriter stmw = new streamwriter(stm))             {                 stmw.write(soap);             }         }          webresponse resp = req.getresponse();         stream responsstream = resp.getresponsestream();      }   } 

}

i java.lang.runtime exception @ webresponse resp = req.getresponse(); have no idea problem or how fix it.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -