I am making my way through the book "Implementing Oracle Integration Cloud Service" and a few chapters use Mockable.io to mock calls. Unfortunately, I haven't been able to get a single SOAP Mock to work. No matter what I try I get "Mock not found." This happens in the browser, if I try to call the mock as an endpoint in SOAPUI and Oracle ICS also returns a "404 not found" when I call the integration that I have the mock wired to and all of the online SOAP clients I've tried return the same result. I have seen other posts that claim Mockable.io works fine for REST mocks, but at least one person could not get any SOAP Mocks to work. Either I'm missing something very basic (likely) or Mockable.io doesn't work consistently with SOAP mocks. Has anyone had success using Mockable.io for SOAP mocks? I am calling the mock with the URL: http://demoXXXXXXX.mockable.io/FlightStatusUpdate (the Xs obscure the demo ID, I am not testing it with Xs, just to be clear). I have not found any resources for Mockable.io online apart from REST resources, I sent them a message and posted on their issues site. I hope the product is still being developed. Any information or guidance would be appreciated! Thank you!
Related
I created a REST API with Spring and want to test it. I saw WireMock but I dont really know how this library can help me. Can I use it to test my Rest API or ist it to mock another API my API uses, so that I can ensure that a mistake is coming from my Service?
What exactly do you mean by "want to test it"? How would you be "testing" your API? What would a pass/failure look like?
WireMock is a mock server service. It acts as an API that can feed in responses that you have defined (or even proxy an existing API and feed in responses it gets from there.) I usually use it in place of an unreliable API, to act as the back end for the app that I am using.
If you are looking for a library that you can use to ping your API, I've had success using REST-Assured. If you are looking for a program you can use to ping your API, Postman is my app of choice.
I create a new Split-Join (in the OSB workshop application). Then
I use an action "Invoke Service" to call a not secured business service. So far no problem. When I assign a security policy to my business service, the OSB does not accept. Here is the error message in the OSB workshop:
[Parallel, Scope, Invoke Service]
The WSDL Binding for BusinessService "OSB/1_0/BusinessServices/TestBS" is not supported: The service feature "WS-Security" is not supported.
How can I call a secured business service in a splitJoin?
Thanks
I'll put a little more expanded version of the correct answer of user2364825.
Split-Join is actually a "window" into an older product (that's why it looks and behave differently from OSB). That product has some limitation, including inability to work with WS_POLICY.
There are two commonly used workarounds for that.
Approach #1. Make a version of the same WSDL stripped of WS_POLICY and use it in the Split-Join. From the Split-Join, call the intermediate proxy with that stripped WSDL which in turn calls a business service with the original WSDL.
BizService(Stripped WSDL)->Split-Join->Proxy2(Stripped WSDL)->BizService(Real WSDL)
That approach only works if the WS_POLICY headers are created by OSB code.
If the message going via Split-Join already has some SOAP Headers (including Policies), those are going to be lost, and the approach #1 is not working.
Approach #2. Make a custom WSDL which wraps the original message with all its SOAP Headers and whatnot. Use that WSDL for Split-Join, pass the wrapped message to an unwrapping proxy, and then call the real proxy/biz.
BizService(Wrapper WSDL)->Split-Join->Proxy2(Wrapper WSDL)->BizService(Real WSDL)
The second approach is more complex, but also more powerful. For instance, it easily can be extended to support user headers (Split-Join doesn't support them too), passing debug information and pretty much anything else.
This approach is implemented in my GenericParallel service which does all above and some more.
I also have a blog post outlining passing the SOAP Headers via Split-Join in a bit more details. (The WS_Policy is just a SOAP Header after all).
YOu can never a call a WSDL based proxy/Business Service that has WS_POLICY defined in the WSDL. You need to have a intermediate business/proxy to pass the message to the WS-policy containg WSDL service.
I'm very new to webservices. I'm trying to figure out how I can formulate a request message (and determine what the response message) would be based on the wsdl description that I have.
This is from a third party web service. The WSDL description that I have access to gives me a bunch of information like <types> <message> <operation> etc.
But in the examples that I've seen online, it's showing the request mesage within the "soap:envelope" tag.
What am I missing?
Eventually I'd like to be able to call this webservice using JQuery. But I can't even figure out how to formulate the request message let alone make an ajax call to it.
any help would be appreciated.
For these types of situations I would download soapUI, point it to your WSDL and use it to generate a few sample requests to get familiar with the endpoints, messages and the data model (XSD) for the service.
Armed with soapUI's sample requests it should be fairly easy to move this to jQuery's SOAP client (assuming of cause that the service is not humongous and requires you to transfer a big object graph as XML - in these cases you might want to check if your service vendor has a REST API as these are generally very easy to work with from jQuery).
I'm trying to integrate a rails application with a WCF service. I've tried soap4r and Savon with no love at all. As far as I can tell, none of the Ruby libraries support the newest version of SOAP.
The error that I was getting was:
Cannot process the message because the
content type 'text/xml;charset=UTF-8'
was not the expected type
'application/soap+xml; charset=utf-8'.'application/soap+xml; charset=utf-8'.
I managed to beat this error by changing the WCF service binding from wsHttpBinding to basicHttpBinding, but then received the new error:
The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). (SOAP::FaultError)
Now, this error leaves me baffled because I don't see any way to configure endpoints in any of the Ruby libraries. Does anyone know?
Has anyone successfully called WCF services from Ruby?'application/soap+xml; charset=utf-8'.
Please note that I got this working...after I changed the web.config for the service to basicHttpBinding, Savon is able to send and receive messages. It is only soap4r that is unable to still and throws the Action '' error.
this may not be what you want t hear but I've recently been interacting with SOAP in Ruby.... It's not fun at all, none of the gems available are complete, stable or well documented and all seem to fall down when you add a tiny bit of complexity (passing an object containing some values instead of just passing a integer or string).
I ended up sniffing the request made by a .net client, then building objects that have a .to_xml method, taking a XML Builder object and adding it's own stuff..
That takes care of the request and then each service request method is custom made to extract the information needed for the result.
Very manual way to do it, and have to add more for every method i need to use but at least it works!
Some other guys I work with had success using JRuby and Axis. I stayed away from this as I wanted a pure Ruby solution.
Sorry I couldn't be of more help.. if you'd like I'll post my code to build the soap request...
I was running into the same issue with Savon with my WCF web service. The content error is because your service is expecting SOAP 1.2, but by default Savon sends the request as SOAP 1.1.
The Content-Type value for 1.1 is 'text/xml;charset=UTF-8', but if the server is configured for 1.2 (which is what wsHttpBinding is), the Content-Type must be 'application/soap+xml; charset=utf-8'.
I found this method on the Savon website:
response = client.request :get_user do
soap.version = 2
end
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?