web-services

C# windows to C# phone windows

允我心安 提交于 2020-01-03 06:38:27
问题 This is more a task to ask than help but... after 1 day of tries I can't get it work. This is my code private string _InetReadEx(string sUrl) { HttpWebRequest webReq = (HttpWebRequest)HttpWebRequest.Create(sUrl); try { webReq.CookieContainer = new CookieContainer(); webReq.Method = "GET"; using (WebResponse response = webReq.GetResponse()) { using (Stream stream = response.GetResponseStream()) { StreamReader reader = new StreamReader(stream); aRet = reader.ReadToEnd(); return aRet; } } }

Axis 2 webservice SSL communication

匆匆过客 提交于 2020-01-03 06:33:54
问题 I am getting Soap Response from this code SOAPConnectionFactory sfc = SOAPConnectionFactory.newInstance(); SOAPConnection connection = sfc.createConnection(); SOAPMessage soapMessageResponse = connection.call(soapRequest, new URL(serviceLocation)); How can I make it SSL based? I know how to create SSLSocketFactory from SSLContext giving my specified keystore . How can I tell SOAPConnection class about SSLSocketFactory or SSLContext ? So that my communication can be secured. I do not want to

Android SOAP request is returning HTTP Response 405

99封情书 提交于 2020-01-03 05:43:08
问题 I see a couple of similar questions on here but mine has one big difference. I was able to use my login web client web method for about 9 months and then yesterday afternoon I started getting the 405 response. Below is my code: class Login extends AsyncTask<String, String, Integer> { StringManipulator stringManipulator = new StringManipulator(); String result = ""; ParseSessionId parseSessionId = new ParseSessionId(); @Override protected Integer doInBackground(String... args) { int statusCode

Android sending post data to webservice [duplicate]

喜欢而已 提交于 2020-01-03 05:41:11
问题 This question already has answers here : How to fix 'android.os.NetworkOnMainThreadException'? (56 answers) Closed 6 years ago . Hi I'm trying to send data to a webservice String url = "https://www.myurl.com"; URL urlobj = new URL(url); HttpsURLConnection con = (HttpsURLConnection) urlobj.openConnection(); con.setRequestMethod("POST"); con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); String urlParameters = GenerateUrlParameters(data); con.setDoOutput(true); con

How to use OCR web service in android application. How can we send request and get response?

試著忘記壹切 提交于 2020-01-03 05:41:08
问题 How can we use OCR web service in android application I have use this webservice. How can i pass data using soap base web service and get response back. How can i pass request for nested XML tags ? http://www.ocrwebservice.com/services/OCRWebService.asmx?op=OCRWebServiceRecognize Please help.. 回答1: Please check this library for Android: kSoap2. Also, check this similar question, that offers a few other solutions: "How to call web service with Android" Hope it helps! 回答2: Actually i got the

Web service method returns Response object instead of custom object

狂风中的少年 提交于 2020-01-03 05:38:25
问题 I have the following code: [WebMethod] [SoapHeader("_webServiceAuth")] public User GetUser(string username) { try { this._validationMethods.Validate(_webServiceAuth); User user = new User(username); return user; } catch (Exception ex) { throw ex; } } As you can see, one would expect to receive a User as a responce when I do: myUser = this.Service.GetUser(username); But what I get is a request for a "GetUserRequest" instance, and get returned a "GetUserResponse" instance. Any help in why my

ServiceStack/ASP.NET: Global object to be access by all requests/worker processes?

人走茶凉 提交于 2020-01-03 05:12:14
问题 I am developing a web services project using the ServiceStack framework. I would like to create a global object(in my case, a SessionManager object for a GDS system I am working against, it has no relation to ASP.NET sessions) to be accessed by all incoming requests. However, I am facing a problem whereby ASP.NET will create a new instance of my application and thereby create a new instance of my SessionManager a few times in it's life cycle. I verified this by putting a debugging line on

How to call web service to achieve login system in Android?

夙愿已清 提交于 2020-01-03 05:09:08
问题 i have a xml project. this is the Login sample code http://10.99.99.99:8087/item/services/ItemService <soapenv:Header/> <soapenv:Body> <ser:userLogin> <!--Optional:--> <arg0>admin</arg0> <!--Optional:--> <arg1>admin</arg1> </ser:userLogin> </soapenv:Body> </soapenv:Envelope> If Succeed <soap:Body> <ns2:userLoginResponse xmlns:ns2="http://services.ws.item/"> <return> <result>1</result> <msg>Login Succeed</msg> </return> </ns2:userLoginResponse> </soap:Body> </soap:Envelope> If Not Succeed

Passing parameters from android to .net web service

孤人 提交于 2020-01-03 05:08:15
问题 Im using ksoap2 to call web .net services. The call works just fine except when I pass paramaters. The passed paramaters are always recieved as null values by the web service. I dont know what the problem is, I hope someone can help. Thanks, 回答1: Comment code envelope.dotNet = true; . This should do the trick 来源: https://stackoverflow.com/questions/1910668/passing-parameters-from-android-to-net-web-service

Hibernate session handling in spring web services

半世苍凉 提交于 2020-01-03 04:55:27
问题 I am using spring-ws with Jaxb2Marshaller, PayloadRootAnnotationMethodEndpointMapping and GenericMarshallingMethodEndpointAdapter to configure my web services via the @Endpoint and @PayloadRoot annotations. When I try to use the DAO's of my project I am able to load objects from the database but as soon as I try to access properties inside my service that should be lazily loaded I get a org.hibernate.LazyInitializationException - could not initialize proxy - no Session. In my spring-mvc web