web-services

Securing webservices of PHP

五迷三道 提交于 2019-12-30 05:18:26
问题 I'm developing a small project in android which is using php webservices' call. I want my webservices to be protected, however by using GET/POST request methods I don't think its much protected. After googling I got RSA implementation in "phpseclib", Its having good documentation as well. But I'm confused so much, so thought post this here. Basically what I need is: from Android I'l call a url with "encrypted parameters merged in one string". (I'l first encode parameters in json and then I'l

Making of JSON Webservice using C# .NET

强颜欢笑 提交于 2019-12-30 05:14:27
问题 I am trying to make JSON webservice in C# .NET. A json string is returning by web method but it contains xml structure like: <string xmlns="http://tempuri.org/"> {"checkrecord":[{"rollno":"abc2","percentage":40,"attended":12,"missed":34}],"Table1":[]} </string> I saw this article before it wasn't much helpful for me. So my problem is, that json string is not returned in its pure format. I do not want that xml version and xmlns string. I plan to consume the web service on Android later. Can

Access Denied while trying to stop a C# Windows Service

廉价感情. 提交于 2019-12-30 05:00:06
问题 I have created a C# web service using visual studio to stop the windows service 'Simple Mail Transfer Protocol (SMTP)' called SMTPSVC. The following is the web method to do it: [WebMethod] public string StopService() { String status = ""; try { ServiceController scAlerter = new ServiceController("SMTPSVC"); Console.WriteLine(scAlerter.DisplayName); Console.WriteLine(scAlerter.CanStop); scAlerter.Stop(); Console.WriteLine("Service stopped"); status = "STOPPED"; } catch (Exception e) { Console

android.os.NetworkOnMainThreadException for webservice (ksoap)

邮差的信 提交于 2019-12-30 04:32:09
问题 I am new to android programming and trying to use webservice in this sample program: I use Android 4.1 and my IDE is Eclipse Juno. I think the programming part is ok, but may be there is a problem about connecting. package com.example.webserviceexample; import java.io.IOException; import org.ksoap2.SoapEnvelope; import org.ksoap2.SoapFault; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapPrimitive; import org.ksoap2.serialization.SoapSerializationEnvelope;

WCF Tracing. How I can get the exact reason for closing connection?

久未见 提交于 2019-12-30 04:10:10
问题 In my WCF service, when trying transfer large data I constantly get an error: The underlying connection was closed: The connection was closed unexpectedly I want to know what particular reason invokes this error, so I set up WCF Tracing and can read traces.svclog file. The problem is, that I can see in this file a lot of information about flow of processes, I can see exact time when exception is appeared, but I can't see the exact reason for that. Is it due to MaxReceivedMessageSize or

Retrofit2 error java.io.EOFException: End of input at line 1 column 1

社会主义新天地 提交于 2019-12-30 03:38:07
问题 I called PATCH web service using Retrofit2 but onResponse is not called and the onFailure is called Despite of the operation of the service is succeeded on the server side perfectly And whenever,I tried to use fiddler to check the service its working , i found the problem is that serializing the coming response of the service and when using fiddler i found that no content of the JSON response so the Retrofit service assumed that its failed because there is no content and it cannot serialize

JAX WS client cannot authenticate

只愿长相守 提交于 2019-12-30 03:09:11
问题 I'm trying to consume a secure (HTTPS schema) web-service with help of standard JAVA 7 JAX WS tools. This web-service requires authentication. I have already successfully added certificate to my local java keystore. All needed classes I've generated from WSDL file with help of wsimport tool. Now I am trying to use the following call to run a simple test: public class ReportingWebServiceTest { static ReportingServiceService service; static ReportingService port; @BeforeClass public static void

How to get rid of “Uncaught SoapFault exception: [Client] looks like we got no XML document in…” error

99封情书 提交于 2019-12-30 03:09:08
问题 I'm trying to develop business logic for a dynamic site using nusoap on server side (because I need wsdls, and PHP SOAP extension can't generate wsdls), and PHP SOAP extenstion on client side. However, I can't get even login and getRole functions right. When i try to invoke client, I get following message Uncaught SoapFault exception: [Client] looks like we got no XML document in [some paths]... Wsdl does exist on server side, and client does read it (when I put wrong url for wsdl, I get an

How good and/or necessary are Stateful Web Services?

浪子不回头ぞ 提交于 2019-12-30 02:43:09
问题 What kind of server do you people see in real projects? 1) Web Services MUST be stateless: Basically you must send username/password with every request, every request must use HTTPS and I will authenticate and load the User object everytime if needed. 2) A Session for Web Services: like in a web container so I can at least save the authenticated User object and have something similar to a session ID so I don't need to authenticate, load and check the User on every request. 3) Sticky Service

how to send SOAP request with SSL certificate in PHP?

旧街凉风 提交于 2019-12-30 02:32:15
问题 I'm trying to send a SOAP - PHP request with a DER certificate (that means the certificate don't have a privateKey) but no success. $local_cert = FULL_PATH_TO_MY_CERT; $client = new SoapClient($wsdl, array( 'local_cert' => $local_cert, 'trace' => 1, 'exceptions' => 1, 'soap_version' => SOAP_1_1, 'encoding' => 'ISO-8859-1', 'compression' => (SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP), 'location' => 'https://webserviceurl:port/ws/servlet/ws' )); Only I recieve this errors: Warning (2):