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.
Provide the Request and Response XSD and choose the right element. For the Request Message Schema you can also use the wizard.
Next step is to wire this Service to a component. Choose a BPEL component and use the Define Service Later template.
Make a wire between the Service and the BPEL component.
Open the BPEL component and a Receive and Reply Activity and finish your BPEL. When everything is valid then you can deploy this to the Soa Suite Server.
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
http://laptopedwin.wh.lan:8001/soa-infra/services/default/HttpBinding/execute
This one is better then the tester of the Enterprise manager.
Here you can choose for the normal Invoke ( Soap message ) or use REST POST or GET
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.
Deploy this composite application, invoke the Mediator Service and take a look at the instances in the Enterprise Manager.
You can download my example at github
https://github.com/biemond/soa11g_examples/tree/master/SoaHTTPBinding
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:
soatestserver:8001/soa-infra/services/default/TestPatchProject/HTTPBindingService
When you go to test console it forms the test URL string like this
soatestserver:8001/soa-infra/services/default/TestPatchProject/HTTPBindingService/Request-Response?input=Rakesh
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:
soatestserver:8001/soa-infra/services/default/HelloHTTPProject/HTTPBindingService?input=test&operationName=Request-Response
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.
Hi Ed,
ReplyDeleteI have a question on HTTP Binding. Did you successfully invoke your REST service with a web browser with following URL(without test console)?
http://laptopedwin.wh.lan:8001/soa-infra/services/default/HttpBinding/execute?name=Ediwin&message=Hello
I created a similar REST service. But it didn't work (it only resulted into "invalid request"), so I'm looking for correct URL to invoke.
Regards,
-Tak
P.S.
This blog post is very useful to learn this feature. nice post!
Hi,
ReplyDeletethe best way is to test it with a microsoft tool wfetch like I did in this post. Then you know for sure
http://biemond.blogspot.com/2010/08/http-basic-authentication-with-soa.html
it can be you need to set a http header like the Content-Type
like in this picture
http://2.bp.blogspot.com/_earSixbe3dw/TGw3jRGB4eI/AAAAAAAADeI/fBpRYKQVkSc/s1600/http_basic_8.png
thanks
Thanks Ed,
ReplyDeleteSorry, my explanation wasn't enough. Actually I successfully made a REST service using HTTPBinding. I tested it with test console and HTTP analyzer of JDev, and it worked as your this post. But I couldn't understand what URL can we use to invoke this REST service. If we make a REST service using HTTPBinding with GET operator, I assume we can invoke it with a url on a web browser, for example, http://laptopedwin.wh.lan:8001/soa-infra/services/default/HttpBinding/execute?name=Ediwin&message=Hello. But unfortunately a test result with my REST service was failure. It resulted into only "Invalid Request".. So if you made a service with GET operator, I'm interested in your result (invoke with url(+ query string) on a web browser)
Regards
Hi,
ReplyDeletewhat you did is right, try to set http header Content-Type. I think it needs this , I got the same ( nvalid Request)
thanks
Hi Edwin,
ReplyDeleteI tested this in 11g PS3. Its not working and throwing Nullpointer exception. Did you get a chance to test this in 11.1.1.4 and if so were you successful. Is there any patch if its a bug.
thanks,
Satish
Hi,
ReplyDeleteCan you give me more information because this is all standard so no special programming. This should work.
Thanks
I have the same issue.
ReplyDeleteEdwin, how can you post to blog w/o testing by yourself?
Hi,
ReplyDeleteI tested and build it with in PS2 and if this does not work in PS3 then it is a bug, because there is no special user made code. So report a bug and I will also test it in PS3
thanks
Hi,
ReplyDeleteit seems like a PS3 weblogic / soa problem, in PS2 you can put the http endpoint in a browser and you will get an test form, in PS3 indeed you get a nullpointer problem
it still works but you need to use a other test tool like wfetch, http://biemond.blogspot.com/2010/08/http-basic-authentication-with-soa.html
thanks
Hi, Edwin.
ReplyDeleteReally appreciate your help.
According to your link (http://biemond.blogspot.com/2010/08/http-basic-authentication-with-soa.html) using Wfetch and POST/xml mode it works!
Hi Edwin,
ReplyDeleteI am wondering how the client with 'oracle/wss_username_token_client_policy' takes username and password credentials in jdeveloper 11g?
Regards,
Amar
Hi,
ReplyDeletethere are some way to set the username , password.
set basic.credentials in the EM security keystore
or set these properties
oracle.webservices.auth.username and oracle.webservices.auth.password on external reference in the composite.xml
dont think credentials are stored in jdeveloper, its done in the weblogic server
thanks
Hi Edwin,
ReplyDeleteI went through your post and it was really helpful. In one of my projects, I have a requirement to use both POST and GET methods in a single Bpel prosses. I need to expose a https URL(soa Composite's) to client which accepts order.xml as input. In the order.xml there will be HTTPS URLs for .pdf downloads and I need to download pdf files by calling those URLs. Can you suggest how to work with pdf downloads?
Hi,
ReplyDeletethe post and get is no problem for bpel or soa suite. For the download I would use the SOA Spring component then you can use plain java and the apache http client and still be working in the bus.
maybe this can help you
http://biemond.blogspot.com/2010/06/enriching-and-forwarding-your-data-with.html
thanks
Hi, Edvin.
ReplyDeleteAs I said before, according to your blog POST method works,
but now I need exactly GET method and I can't understand how query string should be constructed,
because I am constantly receiving "invalid query string" error :(
Hi,
ReplyDeleteI know, I got the same problem and tried different tools but I don't get it either
please ask Oracle and please let me know what they say
thanks
Hi Ed,
ReplyDeleteI am curious where you actually give the http link where you want to post the files. I mean , I have a process where I have to send the XML files using HTTP post, but I the client External Service just has an URL to which I have to post the XML. Where do I have to enter this if I follow your HTTP binding Method ?
Please let me know
Hi,
ReplyDeletein this http://3.bp.blogspot.com/_earSixbe3dw/TAEpg_seU0I/AAAAAAAADYk/oYYfPPNzZr8/s1600/http_7.png
thanks
Hi Ed,
ReplyDeleteLeft Swim lane has HTTP binding Service with following
Interface : Define from operation and Schema
type : Service
Operation type : One-Way
Operation Name : Send
Verb : POST
Payload type XML
On an Empty BPEL , I added a Receive activity and assigned a input variable.Selected the Create instance (as it throws error saying there is no starting point) and uploaded it to Weblogic
I get the following Error when I click on TEST web -Service after entering the Arguments.
The selected operation Send could not be invoked.
An exception occured while invoking the webservice operation. Please see logs for more details.
oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: null
Collapse Hide Additional Trace Information Hide Additional Trace Information
java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: null at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:575) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:381) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:298) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source) at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:765) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:305) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at
Am I missing something in the BPEL ?
Even the End Point URL says Error Parsing the WSDL for this end point
Hi Ed,
ReplyDeleteI am trying to get this working for last 3 days but it looks like I am missing something. Can really make it work.
Is is possible to uplodad the zip file of your application somewhere? I need to have a look how you have done it.
Thanks.
RK
Hi,
ReplyDeleteI don't have this project in this state but what is the error you are getting.
I know it got some issues with the em test client.
I use wfetch for testing described in this blogpost
http://biemond.blogspot.com/2010/08/http-basic-authentication-with-soa.html
thanks
Hi,
ReplyDeleteIt's giving me the null pointer exception when I am trying to test it.
The application was deployed successfully.
I have used the GET methods for HTTP Binding.
Here's a link to my project, if you want to have a quick look. It's really very simple and can be deployed anywhere.
http://dl.dropbox.com/u/8289460/HelloHTTPBinding.zip
I will try to use wfetch to see if that helps.
Regards,
Rakesh
Hi,
ReplyDeleteit is a known ps3 bug, use a different test tool like wfetch or ps2
thanks
Hi,
ReplyDeleteI have deployed in on SOA Suite version 11.1.1.4
I also have a SR open with oracle. Do you think that the bug is there in this version as well.
Do you have any reference to this bug?
I will add this to my SR request.
Thanks
Hi Ed,
ReplyDeleteI tried few thinks today and this is my observation.
HTTP Binding - GET
Did not work at all whatever combinations I tried.
HTTP Binding - POST
1. Simple Type Request and Response - Worked
2. Complex Type Request and Simple Type Response - Worked
3. Complex Type Request and Response - Did not work
So it's fair to say that for POST method the the response must be simple type defined in XSD.
I was able to test it both from OEM test console and wfetch Tool.
Now the first issue I have is that the GET method is not working at all.
The second is that to test the POST method I need to pass like this in wfetch tool:
AA
BB
In response I get back:
AA BB
Now my question is, how can I write a simple html page to make a request and response using the POST method?
Any help much appreciated.
Thanks
"The Best way to test this HTTP Service is to open the endpoint url in a browser
ReplyDeletehttp://laptopedwin.wh.lan:8001/soa-infra/services/default/HttpBinding/execute "
From your post.
Somehow this method did not work even for POST. When I try to open the endpoint URL, always getting a null pointer exception page.
RK
A quick update, I was wrong about the POST methods working. In fact nothing is working GET or POST for REST.
ReplyDeleteAs described in this thread that at run time, the binding is created for both REST and SOAP.
The only thing that has worked for far for me is the SOAP binding for POST method.
What I am looking is the REST binding.
Any more help with this?
Thanks
Rakesh
It's kind of funny.
ReplyDeleteJust got another update from oracle about the SR that I have opened for this issue.
In the update, instead of giving any definite answer they have actually given me link of this post for reference. Just shows that the world is round :)
Do even oracle know how this works?
Rakesh
Hi
ReplyDeleteheheh, good old support.
you can better swith to OSB ( you got the license for it when you have soa suite ) and there many guide how to do this.
with OSB you have total control.
for outgoing you can use the spring component in combination of apache http.
thanks.
for PS3, if you browse for end point it gives null pointer exception because in PS3 WSDL in services section it has only one port (for http) under service section. In PS2 we have 2 ports one for soap and other for http.
ReplyDeleteRegards
PavanKumar.M
I am not sure what you mean here Pavan. If I look at the runtime WSDL I can still see both http and SOAP bindings. Both are still there.
ReplyDeleteHave you managed to get it working?
Rakesh
Rakesh,
ReplyDeleteI could see service section as below
I did not try this in PS2. But according to Edwin's post, it says the service section should contain another port with .
That's why I think it is working in Wfetch and http analyser.
Correct me if I am wrong.
Regards
PavanKumar.M
Hi Ed,
ReplyDeleteCan you throw some light on calling an XML-RPC based service from SOA? Is it possible ever?
Hi,
ReplyDeleteyou can take a look at these documents
http://download.oracle.com/docs/cd/E21764_01/doc.1111/e17836/chapter4.htm
or
http://download.oracle.com/docs/cd/E21764_01/web.1111/e13759/overview.htm#WSOVR115
but maybe you can do it in java and add this to the spring component of the soa suite.
thanks.
Hi Ed,
ReplyDeleteThanks for the excellent blog.
I am struck with the same issue Rajesh Kumar is facing. (i.e Null Pointer exception when I invoke the service)
I need your advice on the following issues. My requirements are -
1. Send a document via HTTP post (for which i am trying to use HTTP binding adapter - which i am stuck with the above mentioned error)
2. Add custom tags in soap headers like customer name, customer location (these are hardcoded values)
3. Is there any workaround sending soap messages (with the customer header) without using a HTTP binding adapter?
And Rajesh, If you could share me the bug number, it will be helpful
Hi Dwarak,
ReplyDeleteI am Rakesh not Rajesh :) Just a one letter difference.
The Bug Reference number is 12874442. Oracle support still working on the SR. Nothing concrete yet.
The HTTP POST method may work with XML payload.
Remember to hit the Parse WSDL button in Test console.
As suggested by the blog author, try using wfetch (microsoft tool). You can use SoapUI or JDeveloper HTTP Analyzer as well.
You may try OSB as well. Although I got a totally different result on OSB. On OSB, HTTP GET is working fine for me but not HTTP POST :( Not sure what I am doing wrong.
Cheers
Rakesh
@Pavan - I am not sure why or what you cant see but I can see port binding for both REST and SOAP in the example I am working on.
ReplyDeleteHi,
ReplyDeleteWe are running Oracle SOA 11g (11.1.1.2.0) is there any option to disable "test form" while typing endpoint URL in browser. This is required for security resons. So the production URLs cannot be invoked through browsers.
thanks
Arunachalam.C
Dubai-U.A.E
Hi Ed,
ReplyDeleteCan you give some direction / best practice in how to implement a service (webservice or http) which replies an image (binary content) to the client.
My requirement is , client calls the BPEL by sending a URL of image, BPEL has to read that image and send back to client.
Can I use HTTP Binding to achieve this ?
Thanks
Sreeny
Hi,
ReplyDeletein the response use a xsd with a base64Binary element and use this blogpost to fill it from bpel.
http://biemond.blogspot.com/2011/09/base64-encoding-in-oracle-bpel-11g.html
Maybe if the image comes out of a database you can do a mapping between a db adapter and bpel.
thanks
Hi Ed,
ReplyDeleteA quick update.
In response to my SR 3-4198774021: HTTP Binding (Service Adapter) not working, that I opened 3 months back, oracle has finally provided a patch 12874442. The patch is available through official channel.
If you need the patch, let me know I will send it to you. It's only 28kb in size, quite small. This is for SOA Suite 11.1.1.4
It is supposed to fix the issue that I have experienced. I haven't tested the patch due to DBA unavailability (working in official environment and all).
I hope to have this tested by next week and post my findings.
Hope this information helps someone who is experiencing the same problem.
Thanks
Rakesh
Thanks
ReplyDeleteis this the patch, where you in PS3 just can add the url of the service in a browser to test it.
instead of using wfetch
thanks
Yes its the same patch and it should sort out the issue of java error when trying from the test console as well.
ReplyDeleteFor me only SOAP binding worked never the REST.
So hopefully it will sort out these issues.
I will give an update as soon as I get to try it.
DBAs still unavailable in my company due to to oracle ERP upgrade to R12.
Hopefully they will apply the patch early next week.
I asked you another question about Kerberos in your other post. Do let me know if you find some time.
Thanks
Rakesh
Here's the update.....
ReplyDeleteIt's a bit stupid from oracle's part. It was all along working, I don't know why they provided a patch for this and I am not sure what the patch actually does.
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:
soatestserver:8001/soa-infra/services/default/TestPatchProject/HTTPBindingService
When you go to test console it forms the test URL string like this
soatestserver:8001/soa-infra/services/default/TestPatchProject/HTTPBindingService/Request-Response?input=Rakesh
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:
soatestserver:8001/soa-infra/services/default/HelloHTTPProject/HTTPBindingService?input=test&operationName=Request-Response
Notice the changes in above URL. The Request-Response is not just after HTTPBindingService (as before), instead its passed as a parameter of operationName.
Here's the reponse:
Hello test! From SOA World.
The above URL works just fine from browser and test console. The auto generated Test URL in test console is misleading.
I haven't seen any oracle documentation that says you have to pass the operation name parameter but it looks like the right way of doing it.
I am yet to try out the post method but if GET works the POST should work as well.
After 4 months it looks like I am finally getting there :)
Rakesh
Here's the update.....
ReplyDeleteIt's a bit stupid from oracle's part. It was all along working, I don't know why they provided a patch for this and I am not sure what the patch actually does.
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:
soatestserver:8001/soa-infra/services/default/TestPatchProject/HTTPBindingService
When you go to test console it forms the test URL string like this
soatestserver:8001/soa-infra/services/default/TestPatchProject/HTTPBindingService/Request-Response?input=Rakesh
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:
soatestserver:8001/soa-infra/services/default/HelloHTTPProject/HTTPBindingService?input=test&operationName=Request-Response
Notice the changes in above URL. The Request-Response is not just after HTTPBindingService (as before), instead its passed as a parameter of operationName.
Here's the reponse:
Hello test! From SOA World.
The above URL works just fine from browser and test console. The auto generated Test URL in test console is misleading.
I haven't seen any oracle documentation that says you have to pass the operation name parameter but it looks like the right way of doing it.
I am yet to try out the post method but if GET works the POST should work as well.
After 4 months it looks like I am finally getting there :)
Rakesh
Great and thanks for the update. I added your research and solution to this blogpost.
ReplyDeletekeep up the good work.
thanks Edwin
Hi
ReplyDeleteI did my own testing and with the HTTP Get adapter
I can send with POST
/soa-infra/services/default/HttpBinding/execute?operationName=Request-Response
With this as body
<request xmlns="http://www.example.org">
<name>edwin</name>
<message>hi</message>
</request>
or now with GET
/soa-infra/services/default/HttpBinding/execute?operationName=Request-Response&name=edwin&message=hi
By the way you need to name the operation to Request-Response else I get strange strange errors and indeed the operationName=Request-Response is always required.
With the POST HTTP binding and url encoded
I can make it only work like this
/soa-infra/services/default/HttpBinding/execute2
With this as body
<request xmlns="http://www.example.org">
<name>edwin</name>
<message>hi</message>
</request>
The operationName does not matter here ( strange , it uses the default )
I put my example in github with the request I did with wfetch tool of microsoft
https://github.com/biemond/soa11g_examples/tree/master/SoaHTTPBinding
thanks
Hi Ed,
ReplyDeleteI was away for few days for Xmas holidays :)
I downloaded your example and I was playing around with it.
You are right about operationName in POST method using the default (it does not matter if you provide it or not)but may I add that it's the case only when you are testing it form wfetch tool with your payload:
\r\n
edwin\r\n
hi\r\n
Next what I did is to create a smiple html page for using the POST method. I am using your example application.
I cant post the html page here (html tags not allowed in this forum).
I have uploaded the page here:
dl.dropbox.com/u/8289460/t1.html
Now when I try this html form from the browser, it is its working fine and getting the response back.
It has three input parameters operationName, name and message. If I delete the line operationName input parameter line (line that starts with operationName) from the html page and try again it does not work.
So again if you are using it from browser it looks like operationName is required.
Download and give the html page a try in your environment.
The strange thing you mentioned about the operation name that it always have to be Request-Response. I will give it a try by giving it some other name.
Just to note that I have not yet closed my SR, had a conference call with oracle last week. They are still trying to figure out whats happening.
We have proressed so far on this issue, might as well get to the end of it. :)
Rakesh
thnks 4 the example..it worked and was helpful
ReplyDeleteI have one query regarding the HTTP Binding adapter. I am calling third party rest service using this adapter and using GET method (url encoded). It seems that the binding adapter adds the operation name and so the rest service fails since it doesn't have this parameter. Can you tell us how can we avoid this parameter in url?
ReplyDeleteDon't use 'url encoded' if you want to avoid passing the parameter in url.
DeleteJust want to update this post with the info that this example works well in 11.1.1.6. I did not have to install any patch (so I guess the fix is present in 11.1.1.6).
ReplyDeleteAnd using Rakesh's example, I could call Ed's service from browser as follows
http://myhost:7001/soa-infra/services/default/HttpBinding/execute?message=test&operationName=Request-Response
Ed,
ReplyDeleteIn this article, you explained how to expose the BPEL process as a RESTful service. I am looking for an article on how to invoke/call a RESTful service from a BPEL process. Please help.
--Santosh
Hi,
Deleteyou can use the soa suite http reference adapter but only get and post are supported. Maybe you can also use the soa suite spring component and use it with a rest library or use OSB.
thanks
Hi Edwin,
ReplyDeletePlease advise below are the details and error message i am getting:
I am trying to HTTP POST through BPEl process with HTTP Binding adapter as reference.I need to pass Content-Type and Authorization headers which i am doing though the properties in the composite.xml i.e Authorization,Content-Type.
I am assigning values to these 2 headers through 2 variables in bpel assign activity.In the Invoke activity that invokes Http binding adapter i have below:I.e i am assiging the variables to the headers i defined in composite.xml
When i test through EM console i get the error
:Non Recoverable System Fault :
Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL
Non Recoverable System Fault :
Unable to access the following endpoint(s):https://apps-apis.google.com/a/feeds/ieeetest.mygbiz.com/user/2.0
I have spent lot of time time debugging,but not able to find solution.Please advise on this.I am
passing xml payload which has complex types.
Also does SOA be default sends the Content-Length header for HTTP POST or do we need to add it as
header?..We ar eusing Oracle SOA SUITE 11.1.1.6 and jdeveloper 11.1.1.6.
The same end point uri when i test through SOAP UI is working fine.
Please Please Help,this is a show stopper for the project i am working.
Hi,
Deletevery strange, is it a hrrp proxy problem, can you use a http analyzer and maybe you make a servlet which pass on the request
for setting header properties you can use this
http://biemond.blogspot.nl/2012/04/retrieve-or-set-http-header-from-oracle.html
thanks
Hi I have a problem with security.
DeleteHttp binding adapter has endpoint https://192.168.10.10:8080/uuid/453434563
I have added my client certificate and server certificate to keystore. I have made a configuration in soa server/console keystores and ssl.
Non Recoverable System Fault :
ORAMED-03303:[Unexpected exception in case execution]Unexpected exception in request response operation "Request-Response" on reference "ecm". Possible Fix:Check whether the reference service is properly configured and running or look at exception for analyzing the reason or contact Oracle Support Services. Cause:Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL
Should I add a policy to http adapter in composite?
Hi,
DeleteI think it is more a HTTP adapter problem , never found it working great with external services.
Can you make a support call
Thanks
Hi Punya
DeleteWere you able to figure it out, I have exactly the same requirement and except for two, I need to pass four Headers(Content-type, Accept, Connection and Authorization).
In my scenario, i can't use the oracle/wss_http_token_client_policy as i have to pass following against
Authorization header:
for e.g.
'Basic Yw79u1jshbihchjasj=='
where, Yw79u1jshbihchjasj== represents Base64Encoded username:password
I have following configuration based on the blog regarding Adding BPEL Headers
1) I have added following in composite.xml under reference
property name="oracle.webservices.http.headers">Authorization/property>
2) I have added following in MyBPEL.bpel under invoke
bpelx:toProperties>
bpelx:toProperty name="Authorization" variable="tempString1"/>
/bpelx:toProperties>
I am assigning the value to Autorization(string variable) using Assign activity.
But, it is not working for me. I am using SOA 11.1.1.5
In addition, do I need to add bpelx:inputHeaderVariable="Autorization" along with the Custom Header properties?
Please help as I am not able to figure out other ways to send this Header while making a HTTP POST call using HTTP Bindings adapter
Hi Edwin,
ReplyDeleteThanks a lot for your tutorial.
I had the same challenges as outlined in the comments above.
If it is compulsory that we specify Request-Respond Operation,
does that mean only one operation is possible per port in the wsdl file for the HTTP Binding (POST)
Regards,
Tumi
Hi,
DeleteThis was PS2, we are now at PS6 but don't know if this behaviour is current. Can you check this for me?
Thanks
I'm attempting to call a REST service using the HTTP Binding with the XML payload, however this service isn't expecting any XML tags, it's just looking for some data in the payload. Is there any way to pass this information (I don't have any control over this service) sans the XML tags? Currently I'm sending:
ReplyDeleteblahblahblah
where the service is just expecting:
blahblahblah
Is there any way to do this using 11g? Am I missing something super basic?
Thanks!
Something stripped out the XML tags from my 'Currently I'm sending: ...' block
DeleteHI Ed,
ReplyDeleteI am trying to call a third party GET call through BPEL and so i am using Reference in HTTP Binding . But the issue is that i need to pass only 1 parameter , say Accountid, but unfortunately the adapter is also adding Operation Name(&operationname) along with it in url , and so the call fails Why is this behaviour ? Can we suppress this. Any inputs are appreciated. Thanks.
Hi,
Deletethis adapter is not so flexible and don't think you can suppress this
I think you can do this by writing a Custom Policy and attach this to your HTTP adapter.
DeleteHi
ReplyDeleteI am also trying to set Header while making a HTTP POST call using HTTP Bindings adapter. I am not able to get any do so.Please help me.I have to set
Content-type: application/octet-stream
Please suggest.
Hi,
Deleteok what is the default Content-type , probably application/xml
maybe you can override this with setting this header property in BPEL.
http://biemond.blogspot.com.au/2012/04/retrieve-or-set-http-header-from-oracle.html
thanks
Hi,
ReplyDeleteGetting this exception while invoking the Google API Webservice using HTTP Adapter
oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL
Hi Edwin- we have a requirement where we need to read an XML file over http without passing any Input parameter?
ReplyDeletee.g. http://abc.com/services/codelist/testfile.xml
is it possible to read it using HTTP adapter?
Hi Edwin,
ReplyDeleteIt very good blog for Http adapter, I am facing one issue using http adapter. Please find below details
SOA server : 11.1.1.7
Jdev: 11.1.1.7.1
My requirement simple, I have invoke REST service from BPEL, I am using http binding adapter to invoke below url
http://xx.xx.xx.xx:8080/uaqpncp/register.html?username=uaq&password=uaq123&method=updateSubscription&deviceuid=a3b2227ebb3afe4f&subscription=1
I have successfuly tested above url using Browser, Wfetch, and SOAPUI, getting below response.
Wfetch Logs: *********************************
started....WWWConnect::Connect("xx.xx.xxx.xxx","8080")\nIP = "xx.xx.xxx.xxx:8080"\nsource port: 63380\r\n
REQUEST: **************\nGET /uaqpncp/register.html?username=uaq&password=uaq123&method=updateSubscription&deviceuid=a3b2227ebb3afe4f&subscription=1 HTTP/1.1\r\n
Host: xxx.xx.xxx.xxx\r\n
Accept: */*\r\n
\r\n
RESPONSE: **************\nHTTP/1.1 200 OK\r\n
Server: Apache-Coyote/1.1\r\n
Content-Length: 9\r\n
Date: Wed, 19 Aug 2015 07:26:06 GMT\r\n
\r\n
success\r\n
finished.
******************************
But When I am trying to use this url in http binding adapter and invoking bpel service, I am getting below error.
Error:
Unable to invoke endpoint URI "http://xx.xx.xxx.xxx:8080/uaqpncp/register.html" successfully due to: javax.xml.soap.SOAPException: Unable to read response: org.xml.sax.SAXParseException: Content is not allowed in prolog.
as per my understanding BPEL is unable read response from REST service. XML parser is not able reading this response.
I am using xml encoding UTF-8,
How to fix this issue. ? Please help out I am working this since 2 days.
-Regards
AR
plz tell me how to add my index jsp page into bpel
ReplyDeletePDF file download through rest API in soa
ReplyDeleteHi ,
I am trying to consume rest api using rest adapter/http adapter in soa 12c.This API is returning a PDF file in response.I want to write this response as a pdf file using file adapter in my local file system.
When I test my POC on local weblogic server.
I tried to download the file using soa but when I am using
Rest Adapter:
getting below error
oracle.sysman.emInternalSDK.webservices.util.SoapTestException: Client received SOAP Fault from server : oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: Unknown media type : application/pdf
When I used HTTP Adapter , It is giving below error:
oracle.sysman.emInternalSDK.webservices.util.SoapTestException: Client received SOAP Fault from server :
oracle.fabric.common.FabricInvocationException: Unable to invoke endpoint URI
"http://phcv-dwitci01.corp.incresearch.com:81/SiteVisitReport.svc/visitId/94281182" successfully due to:
javax.xml.soap.SOAPException: Unable to read response: XML-22004: (Fatal Error) Error while parsing input XML document (Invalid UTF-8 encoding.).
I am still searching for the solution in soa.
Can you help me out of this in downloading pdf file using oracle soa using Rest Adapter/HTTP Adapter.
Regards,
Kavindra
I love all the posts, I really enjoyed, I would like more information about this, because it is very nice. Thanks for sharing. I love all the posts.
ReplyDeletewire binding