Calling Wso2 Dss Services by using ajax is not working like Rest Resource or SOAP UI it causes
Cors Issue , Even i did not get any relevant information about that after a long research What i have to edit in my Configuration File or is some other option is there to fix this issue.
This Case For my apache tomcat Server , i can Simply add Access Control Orgin header as * , but in wso2 its not working out .I dont know even where to add it ..plz give me a good solution for this
You may set up WSO2 ESB on before of your DSS server and you may call your service using ESB proxy or REST end point.If you do that you can set CORS parameters inside outSequence tag.
Same question asked here Call WSO2 DSS service using ajax?
Related
I am trying to make a Java (Spring) application which invokes a REST api in a .NET Core application. Everything seems to work in the general case, but now that I am making a POST with an XML string which takes up 80 megabytes on my system, the RestTemplate produces a 404 error code saying "Not found". I have tried to remove the POST size limit in both the .NET Core application (by using the DisableRequestSizeLimit attribute in the API controller) and in the Spring configuration (by setting the variable spring.servlet.multipart.max-request-size to 200MB in application.properties). Neither of it seems to work. Is there some way to fix this? I am willing to use an alternative to the RestTemplate, if that would make sense. I am using the exchange method of the RestTemplate object.
Not found is a general error, if the problem would be sending the request, other problem will happens. I highly recommend you to test the rest api with another tool, like Postman or Insomnia. After that works with the tool try with your client application.
Clarification:
spring.servlet.multipart.max-request-size is for api in your Spring application, no for requesting another services.
Due to Milton BO's answer, I made a request in POSTMAN, which gave me a more detailed error response from the ASP.NET Core app. And it told me to change the maximum allowed post size in the web.config (or appplicationhost.config) file for IIS Express. Furthermore, I am now using the Kestrel server instead of IIS Express, so the DisableRequestSizeLimit attribute now works as expected.
Im developing an sdk to connect to a soap server. (Under https)
Im using LuaSoap to do it and its working as espected with the xml request but now i need to be able to configure the timeout (im in online payments industry and its really important) but I dont know how to do it in LuaSoap.
To be able to enable the https requests i followed the instructions of LuaSoap documentation using this code
local soap = require"soap.client"
soap.https = require"ssl.https"
from this point i dont know what to do or where to set the timeout.
Tnx for ur help.
PD.
LuaSoap uses LuaSec to send the request.
I am learning and working on building some wso2 sample prototypes.
I have created a proxy service and tried using it with the tryit tool inside.
But i don't know how to use it externally. i mean how to send data to the proxy service because in API there is a endpoint created where the request is sent.
Is there anything like link to request or how to use it externally in some application.
You can use SOAP UI. Please check the article.
The easiest way to call Your proxy service is to use some Rest Client on Your Browser. I use Add-On in Firefox (RestClient i think). U can create there whole request (json, xml), add headers, Authentications or Content Type. It should helps U to call any services in wso2.
I am currently working on an OData Web API 2 service using EF6 with a code first approach. My controllers all derive from the base ODataController. I have made use of Ninject for DI and Owin.
I am trying to expose OData but for some strange reason on using the EDMBuilder, content negotiation fails even on a browser, giving the HTTP 406 error.
Content negotiation works when I use the ODataConventionModelBuilder, but I cannot use this as I will not be able to use breeze's client side features.
Wondering if anyone has come across such an issue before while using the EDMBuilder.
Looks like this is documented :(. It is there in the Breeze documentation at the following link with a suggested workaround: http://www.breezejs.com/documentation/odata-server
I am developing java web services (JAX-WS) to insert data into mysql DB and retrieve it. This web service has two methods i.e. fetchFromDB and insertIntoDB. Services seems to be running fine when I test them using netbeans IDE.
Address: /CalculatorWSService
WSDL: /CalculatorWSService?wsdl
but when I try to access it using AJAX's xmlHttpRequest object by providing url http://localhost:8080/CalculatorApp/CalculatorWSService. It is not able to access it. I have developed C# web services and It has been so easy to access them with a url but java web services don't seem to follow that.
My question is
What url to use to access the web service operations in AJAX? (Do I need to use '?wsdl' in the url?
Is there a javascript ajax library to easily access JAX-WS web services?
Apache Axis web services are a better choice over JAX-WS?
Please help me, Thanks, Jay
I was having the same problem of yours, couldn't invoke a Jax-ws web service from Javascript, but i've found a way to do this.
The Url to use can be your same (EndPointAddress) "http://localhost:8080/CalculatorApp/CalculatorWSService"
but when you create the XMLHttpRequest object from javascript you have to:
* Use the POST method to open the URL , i tried with GET but it didn't work for me.
* Set the SOAPAction Request Header to the one in your wsdl, even if its empty "".
* Be very careful with the request body to send, the soap Envelope must be correct.
hope this can help you!.
Bye.
Paul Manjarres.
From the client's perspective, I wasn't expecting significant differences between Axis and JAX-WS. Everything the client needs should be in the WSDL.
One thing that sometimes happens is that the URL used when developing a WebService references the develpoment host and port (and maybe even the ContextRoot) When deployed to a particular server any of those could be changed. Ideally a new WSDL could be created with new "binding" information.
My first step would be to point a browser directly at the Web Service you want to invoke. In my environments that returns a nice "Hi this is a Web Service" kind of message. If you get 401 not found errors then you just need to study exactly how the web service was deployed. Was a different port or context root specified?