In this blogpost I will show how you can use this HTTP Binding as a Service or as a Reference Adapter. I start with a Service so I can use this Service later in the Reference Adapter.
Drag the HTTP Binding from the Component Palette to the Service part of the Composite. Use Service as Type and when you want to have this Service, to return a message then you should select Request-Response as Operation Type.
For this HTTP Binding Service Soa Suite adds two Port types to the WSDL. This means you can also invoke this Service with a SOAP message.
<wsdl:service name="execute"> <wsdl:port name="Request_Response_pt" binding="tns:Request_Response_ptHttpGET"> <http:address xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" location="http://laptopedwin.wh.lan:8001/soa-infra/services/default/HttpBinding/execute"/> </wsdl:port> <wsdl:port name="Request_Response_pt_soappt" binding="tns:Request_Response_pttBinding"> <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://laptopedwin.wh.lan:8001/soa-infra/services/default/HttpBinding/execute"/> </wsdl:port> </wsdl:service>
The Best way to test this HTTP Service is to open the endpoint url in a browser
This one is better then the tester of the Enterprise manager.
Or you can use the HTTP analyzer of JDeveloper, this is a great way to see the raw request and response
The HTTP binding can also be used as a Reference adapter. For example you can use the just created Service as Endpoint. Provide the Request and Response Schema's.
You can download my example at github
and in here I also have a txt file with all the request I did with the Wfetch tool.
Update by Rakesh
Testing of HTTP Binding adapter works from the browser just fine. It's just that how you pass the parameters.
Here's what I did:
I created a simple composite application with one input parameter and exposed it as REST service using HTTP binding adapter (GET). The service does nothing but add a string to the input parameter and returns back.
The endpoint looks like this:
When you go to test console it forms the test URL string like this
All along until now I was trying to use this URL from test console or from the browser.
...but this never works. It's not the right way to use it. If you try this it will return page not found.
What you actually need to use this is below:
Notice the changes in above URL. The Request-Response is not just after HTTPBindingService (as before), instead its passed as a parameter of operationName.
The above URL works just fine from browser and test console. The auto generated Test URL in test console is misleading.