web-services

HTTP Status 415 - request entity is in a format not supported

冷暖自知 提交于 2020-03-17 10:00:13
问题 I am working on java restful web service. I got it working for GET request, but POST request does not work. My Controller class is RestController . I have done these so far: @RequestMapping(value = "/api/signup", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public long signUp(@ModelAttribute ApiMemberModel apiMember) { memberService = new MemberDetailsService(); Member m = memberService.createMember(apiMember

Referencing system.web.cors

喜夏-厌秋 提交于 2020-03-17 07:55:26
问题 I'm trying to implement cors support in my Web API. I have read a couple of blog posts on this topic, but I can't seem to find System.Web.Cors.dll or System.Web.Http.Cors.dll Is there something I need to install? 回答1: Create a .NET 4.5 MVC project, install nuget package "Microsoft ASP.NET Web API [version] Cross-Origin Support" (search for "cors" and it will be on 1st or 2nd place in list). That's it. P.S. If you encounter errors try to install "Microsoft ASP.NET Web API [version]" package

NetSuite SuiteTalk REST Web Services - Invalid Login Attempt

亡梦爱人 提交于 2020-03-16 07:37:10
问题 I am trying to use the NetSuite SuiteTalk REST Web Services to access NetSuite CRM data. I have the access up and working in production. Able to retrieve record data and metadata. I am now trying to set up access in the sandbox for more in-depth testing. In the sandbox I have: - Enabled rest web services - Enabled token based authentication - Given user concurrent web services permission - Given user Log in using access tokens permission - Created an integration - Created an access token All

Populating ANY elements on a web service in C#

谁说胖子不能爱 提交于 2020-03-12 03:17:42
问题 Can someone point me to a C# example where they populate a request and receive the response for a web service where the schema is mostly implemented as ANY elements? I have added a web service reference to my project. The WSDL/schema for the web service has most of the body of the service request and response as an 'ANY' element. I know the underlying schema based on implementing a client to this web service request in Java. Thanks in advance for help. ServiceGenericRequest_Type requestBody =

Populating ANY elements on a web service in C#

三世轮回 提交于 2020-03-12 03:17:32
问题 Can someone point me to a C# example where they populate a request and receive the response for a web service where the schema is mostly implemented as ANY elements? I have added a web service reference to my project. The WSDL/schema for the web service has most of the body of the service request and response as an 'ANY' element. I know the underlying schema based on implementing a client to this web service request in Java. Thanks in advance for help. ServiceGenericRequest_Type requestBody =

Can creating a new WCF client for each request in ASP.NET Core lead to socket exhaustion?

夙愿已清 提交于 2020-03-04 19:37:31
问题 This article shows a well-known problem with HttpClient that can lead to socket exhaustion. I have an ASP.NET Core 3.1 web application. In a .NET Standard 2.0 class library I've added a WCF web service reference in Visual Studio 2019 following this instructions. In a service I'm using the WCF client the way it's described in the documentation. Creating an instance of the WCF client and then closing the client for every request. public class TestService { public async Task<int> Add(int a, int

Use SOAP 1.2 with WebServiceGatewaySupport in Spring

隐身守侯 提交于 2020-03-03 08:06:34
问题 I am very new to Spring framework and i had some problem to create a simple SOAP client with Spring. Like a good newbie, i have used the Spring tutorial to make my SOAP client. You can find it here -> https://spring.io/guides/gs/consuming-web-service/ The test with the web service given in example is OK. I have changed the code to make it work with my web service, so this is the files : SetCodePinConfigurartion.java package hello; import org.springframework.context.annotation.Bean; import org

Use SOAP 1.2 with WebServiceGatewaySupport in Spring

百般思念 提交于 2020-03-03 08:06:10
问题 I am very new to Spring framework and i had some problem to create a simple SOAP client with Spring. Like a good newbie, i have used the Spring tutorial to make my SOAP client. You can find it here -> https://spring.io/guides/gs/consuming-web-service/ The test with the web service given in example is OK. I have changed the code to make it work with my web service, so this is the files : SetCodePinConfigurartion.java package hello; import org.springframework.context.annotation.Bean; import org

PHP SOAP request all lowercase

旧街凉风 提交于 2020-03-03 05:41:39
问题 I have created a web service and have used soapUI to verify that it works correctly. However, the PHP client is getting a fatal error when attempting to access it. I have a try/catch set up so that I can view the output SOAP Request and do a var_dump . When I view the request and var_dump , it shows it as all lowercase (even the custom header I typed the XML for manually). I know XML is case-sensitive, and when I put the request back into soapUI and change the case correctly, I get the

Coldfusion 11 REST Service works with HTTP but not HTTPS (404)

廉价感情. 提交于 2020-02-27 09:20:28
问题 I'm trying to take advantage of Coldfusion 11's REST Services, but I can only get it working with HTTP, not HTTPS. When I change the protocol to HTTPS, it returns a 404. The steps I have taken: 1) I made a folder in web root called "api-test" 2) Inside that folder, I created a file called "animals.cfc" containing: <cfcomponent rest="true" restpath="/animals"> <cffunction name="getAnimals" access="remote" httpmethod="GET" produces="application/json" returntype="struct"> <cfset value = { "cats"