web-services

JSON String returned from SOAP web service containing no records for table

人走茶凉 提交于 2019-12-30 17:29:09
问题 I have a SOAP web service(.asmx) implemented using the .NET framework that returns me a JSON String in this form: {"checkrecord":[{"rollno":"abc2","percentage":40,"attended":12,"missed":34}],"Table1":[]} Now in my Android app I am using ksoap to call the web service in the following way: public String getjsondata(String b) { String be=""; SoapObject request = new SoapObject(namespace, method_NAME); request.addProperty("rollno",b); SoapSerializationEnvelope envelope = new

A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by“@Consumes” and “@Produces” annotations

被刻印的时光 ゝ 提交于 2019-12-30 17:26:13
问题 How can the following produce this error when they have different URLs ? @Path("/job/{empId}/empProfile") public EmpProfileResource delegateToEventProfileResource() { EmpProfileResource resource = new EmpProfileResource(); locator.inject(resource); return resource; } @Path("/job/{empId}/empTask") public EmpTaskResource getClientLevelAttendees(@PathParam("clientId") long clientId){ EmpTaskResource resource = new EmpTaskResource (empId); locator.inject(resource); return resource; } @Path("/")

PHP microtime() drift, External NTP service

我怕爱的太早我们不能终老 提交于 2019-12-30 12:53:37
问题 I am looking for a solution for an issue on my cloud-hosted server where the result returned from microtime(true); is very accurate between calls within a few minutes of each other, but drifts by nearly a second over the course of a day or two. I'm using this result to synchronize between asynchronously connected clients and I need the precision to be accurate to NIST by within <~10ms or so if at all possible. I know this could be considered off-topic, but the current best option I can think

How to invoke methods on external server / webservice?

↘锁芯ラ 提交于 2019-12-30 12:13:45
问题 I'm trying to invoke methods from http://www.ibanbic.be/IBANBIC.asmx I have read a lot of forums and tutorials, but all the information is about setting up a webservice in ASP.net or using ajax / javascript. I just need to call the function: calculateIBAN1. A tutorial step by step would be awesome. Thanks in advance 回答1: A tutorial step by step would be awesome. Right click on the References menu in your project in the solution explorer and choose Add Service Reference... . In the address

Using HttpGet returning complete HTML code

会有一股神秘感。 提交于 2019-12-30 11:33:28
问题 I am trying to invoke a private web-service in which there's one link I've to access using GET method. While using the direct URL on browser (needs to login first), I get the data in JSON format. The URL I am invoking is like this http://www.example.com/trip/details/860720?format=json The url is working fine, but when I invoke this using HttpGet , I am getting the HTML coding of the webpage, instead of the JSON String. The code I am using is as follows: private String runURL(String src,int id

How to disable scanning @WebService annotations in JBoss AS 7?

和自甴很熟 提交于 2019-12-30 11:16:13
问题 I have web services developed using Spring+ApacheCXF and I need tod eploy them on JBoss AS7. They are being deployed by CXFServlet properly. But JBoss AS7 also deploying them by scanning @WebService annotations(as expected without Spring Injection). How to disable scanning @WebService annotations in JBoss AS 7? PS: I am deploying as a .war file. PS PS: My current cxf webservices are being deployed properly. But JBoss AS7 also trying to scan @WebService classes and deploying them also(without

XML Serialization using DataContractSerializer and XmlSerializer

杀马特。学长 韩版系。学妹 提交于 2019-12-30 11:12:12
问题 I have 2 service reference (WCF). the first visual studio generate code using DataContractSerializer the second one, visual studio generates code using XmlSerializer I can't change anything on the web server side. So I'm creating an object aggregating objects from both references. How can I serialize this object so it respect the serialization specification for a DataContractSerializer and for a XmlSerializer. If I use a DataContractSerializer I'll have every field from my reference 2

BASIC authentication in jersey JAX-RS service and Tomcat 6.0 getting failed

Deadly 提交于 2019-12-30 11:06:53
问题 I am trying to do a BASIC Authentication in my service using Tomcat 6.0 and JAX-RS jersey implementation. Below are the implementation steps I followed: 1) Added the Realm in server.xml like this: <Realm className="org.apache.catalina.realm.JDBCRealm" connectionName="XXX" connectionPassword="YYY" connectionURL="jdbc:oracle:thin:@localhost:1521/orcl" driverName="oracle.jdbc.OracleDriver" roleNameCol="role_name" userCredCol="user_pass" userNameCol="user_name" userRoleTable="user_roles"

BASIC authentication in jersey JAX-RS service and Tomcat 6.0 getting failed

為{幸葍}努か 提交于 2019-12-30 11:06:13
问题 I am trying to do a BASIC Authentication in my service using Tomcat 6.0 and JAX-RS jersey implementation. Below are the implementation steps I followed: 1) Added the Realm in server.xml like this: <Realm className="org.apache.catalina.realm.JDBCRealm" connectionName="XXX" connectionPassword="YYY" connectionURL="jdbc:oracle:thin:@localhost:1521/orcl" driverName="oracle.jdbc.OracleDriver" roleNameCol="role_name" userCredCol="user_pass" userNameCol="user_name" userRoleTable="user_roles"

Creating JSON return “strings” from a webservice for use with jquery ajax

天大地大妈咪最大 提交于 2019-12-30 11:05:54
问题 I tried implementing a simple web service into an asp.net application using the tutorial found here: http://dotnetslackers.com/articles/ajax/JSON-EnabledWCFServicesInASPNET35.aspx#1301 and http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx The problem is, my data is being returned as seen in this screen shot (according to firebug): $("#btnGet").click(function () { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "TimeService.svc/GetCar", data: "{