web-services

Validating path to nested resource

点点圈 提交于 2021-01-27 14:20:46
问题 I'm using Jersey to implement a RESTful Service with some nested resources. This is a basic example of what I currently have: @Path("/sites") public class SiteResource { @GET @Path("/{siteId}") public Site get(@PathParam("siteId") long siteId) { Site site = // find Site with siteId if (site == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return site; } } @Path("/sites/{siteId}/articles") public class ArticleResource { @GET @Path("/articleId") public Article get(

Prestashop Webservice api url redirection

邮差的信 提交于 2021-01-27 14:12:03
问题 I'm trying to run a simple webservice to get a XML list of customers but, when getting http://www.myshopurl.com/api/customers, PS redirects to frontpage. Mod_rewrite is on in apache (checked with phpinfo function). Think that .htaccess is well formed: # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www

Consuming soap service with NTLM Authentication

佐手、 提交于 2021-01-27 09:06:37
问题 I am trying to consume a SOAP service with NTLM authentication by creating a NTLM engine (following instructions on http://hc.apache.org/httpcomponents-client-4.3.x/ntlm.html ) implemented AuthSchemeFactory and finally registered the AuthSchemeFactory to my HTTP Client. When I hit the service using my HTTP Client I get a reponse that "Status code - 415 , Message - The server cannot service the request because the media type is unsupported." Can anybody tell how can I fix this issue of

Consuming soap service with NTLM Authentication

喜欢而已 提交于 2021-01-27 09:06:18
问题 I am trying to consume a SOAP service with NTLM authentication by creating a NTLM engine (following instructions on http://hc.apache.org/httpcomponents-client-4.3.x/ntlm.html ) implemented AuthSchemeFactory and finally registered the AuthSchemeFactory to my HTTP Client. When I hit the service using my HTTP Client I get a reponse that "Status code - 415 , Message - The server cannot service the request because the media type is unsupported." Can anybody tell how can I fix this issue of

Consuming soap service with NTLM Authentication

ε祈祈猫儿з 提交于 2021-01-27 09:05:01
问题 I am trying to consume a SOAP service with NTLM authentication by creating a NTLM engine (following instructions on http://hc.apache.org/httpcomponents-client-4.3.x/ntlm.html ) implemented AuthSchemeFactory and finally registered the AuthSchemeFactory to my HTTP Client. When I hit the service using my HTTP Client I get a reponse that "Status code - 415 , Message - The server cannot service the request because the media type is unsupported." Can anybody tell how can I fix this issue of

Jersey web service proxy

不羁岁月 提交于 2021-01-27 06:58:48
问题 I am trying to implement a web service that proxies another service that I want to hide from external users of the API. Basically I want to play the middle man to have ability to add functionality to the hidden api which is solr. I have to following code: @POST @Path("/update/{collection}") public Response update(@PathParam("collection") String collection, @Context Request request) { //extract URL params //update URL to target internal web service //put body from incoming request to outgoing

SOAPMessage writeTo without attachment

可紊 提交于 2021-01-27 06:14:05
问题 I use SOAPMessage.writeTo(OutputStream) to log web service messages. A problem is that it also writes attachments. It is space consuming and the binary attachments are not readable . Is there any way how to log the message without attachments, e.g. a wrapper? There must be a better solution than this one. ByteArrayOutputStream out = new ByteArrayOutputStream(); message.writeTo(out); StringBuilder builder = new StringBuilder(out.toString()); int indexOfAttachment = builder.indexOf("------=");

Spring Boot web service client authentication

这一生的挚爱 提交于 2021-01-27 05:22:46
问题 My goal is to call web service, which is require authentification (when I opne it's wsdl in my browser, browser asks me login+password). As a base, I use the sample from this tutorial. And now I have to add authentification configurations. Accoding to the documentation something like configuring WebServiceTemplate bean may help. But with Spring Boot there are no applicationContext.xml or any other configuration xml's in a project. So, how to configure WebServiceTemplate using Spring Boot, or

An asynchronous operation cannot be started at this time Exception occurs on calling WebService?

我的未来我决定 提交于 2021-01-26 20:01:08
问题 In my ASP.NET MVC 3 project I'm calling a web service for login authentication. But it throws an exception: Exception Details: An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@ Page Async="true" %>. How to fix this issue? 回答1: Make sure that your Controller method

Eclipse JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer

橙三吉。 提交于 2021-01-20 15:13:51
问题 i'm new to web service and i'm trying to do a project using jax-rs rest and spring in eclipse. I use java 1.8 but eclipse shows me an error that jax-rs 2.0 requires java 1.6 or newer error and my project won't work This is the project explorer and error's screenshot. I tried to google it but can't get any english solutions Edit : It seems like the screenshot's quality is low if i try to display it so here is the imgur link for the screenshot for better quality http://i.imgur.com/YYyoeUX.png