Monday, March 5, 2012

Unified endpoints for BPEL Processes

WSO2 Carbon platform supports unified-endpoints(UEPs) to configure partner endpoints which are used in the BPEL processes. In more general terms, UEPs facilitate for a generalized way of configuring endpoints taking quality of service in to the picture. So a particular UEP configuration can be used across the carbon platform to configure security in a partner endpoint in BPEL process and to configure WS-Addressing in a WSO2 ESB endpoint.

This post provides a guide on how to properly configure a partner endpoint in a BPEL process.
Tested Environment :
  • WSO2 Carbon 4.0.0 based releases 

Please take a look at Async-Server sample which is a sample BPEL process which uses an UEP to configure the target endpoint of a partner service.


If you are interested in other supported constructs by UEPs, please refer this xml schema which provides the current supported functionality like setting “ReplyTo” header.

So where is this UEP configuration actually engaged to a partner endpoint?. This is configured at the deploy.xml which declares the particular partner service as follows. Please refer the same sample mentioned above.


If you look at the mentioned sample above, UEP configuration is located inside with the BPEL artifact.
But on the other hand, an UEP can be maintained outside from the BPEL artifact. So it can be located in the file system or registry. Maintaining an UEP outside from the BPEL artifact becomes very useful when governing endpoints which are used by multiple BPEL processes in multiple WSO2 BPS instances.

eg - If the UEP to be maintained in the file sytem - Use the absolute path for the UEP in deploy.xml


eg - If the UEP to be maintained in the registry - Use the registry specific path for the UEP in deploy.xml


Please refer this UEP on configuring security for a partner service via a UEP. More information on this can be found from this post as well.

20 comments:

Unknown said...

i am very new to wso2 server

I want to configure the endpointresources for displaying the content of custom ui...

right now i m working on the wso2 2.3.2 server

if any ways to set this thing plz..
let me know....

Regards
Anil Kesariya

Unknown said...

Hi Anil,
Can you elaborate your requirement a little bit more?
And what's the name of the server (Mashup Server, Data Service Server etc.) ,you referring to?

Unknown said...

i m working on wso2 mashup server 2.3.2


i had scraped some content from website.. so i want to display that content in ui form which i had scrap so for that what should i do...???

Regards
Anil Kesariya

Unknown said...

Hi Anil,
In that case you have to do as follows (And this unified endpoint concept is not relevant to what you are trying to do).

1. I hope you have already wrote a mashup script to get the scraper content.
2. In this mashup script you can write a function which returns the output of the scraper.
3. So once you deployed the mashup in the mashup server, a web service operation is exposed. So using this web service operation you can invoke your scraper logic.
4. Now in the client side, you just have to invoke this web-service operation (eg - using an AJAX call), so the returned output of the AJAX call will be the scraper content.

Please let me know if you need more clarifications.

Regards,
Denis Weerasiri

Unknown said...

i m using the

wso2 mashup server
version 3.2.0

Unknown said...

Hi Anil,
What I mentioned, is applicable for any version of WSO2 mashup server.

Unknown said...

ok buddy..thanks....


but what i actuly want you couldn't get it..

i had generate a one script in custom ui which calling the mashup script it woriking fine manully
for that we have to go thouh full path of wso2 server
../admin/sandeshData.resource/www/index.html

but i want to run this file from the server how can i do.. ????

Unknown said...

Hi Anil,
I guess this link ideally suits what you are trying to do. (Also this is what explained).

Please refer http://wso2.org/project/mashup/2.3.2/docs/quickstart.html section "Scraping a Web Page"

Unknown said...

ok.. buddy...
Thanks......

SatyamMishra said...

Can I some how read the path to the ebr file from an env variable something like :-







Since we are developing on windows and it will be deployed on linux I cannot hard code the path. Also, reading froma registry is not an option for us.

Thanks for you support.


Satyam

Unknown said...

Hi SatyamMishra,
I can't see your example. But I assume you need to refer to a system variable from an Unified Endpoint file.
Could you please ask this question via dev@wso2.org. This is the community mailing list (http://wso2.org/mail) and community will help you this. I haven't use the recent WSO2 Unified Endpoint source code, so I can't give an exact solution. Sorry for the inconvenience.

SatyamMishra said...

Hi Denis,
Thanks for the quick update. I am want to do something like

endpointReference="${MY_CUSTOM_PATH}/uep.epr"

in deploy.xml
If you do not have a solution that's fine, I'll follow up on the dev mailing list.

Thanks for the assistance,

-Satyam

Unknown said...

Hi Satyam,
AFAIK this is supported. But please do follow up the mailing list.

Cheers,
Denis

Unknown said...

Hi,
I tried this method without success. I didn't found any authorization tags in header. :(

Unknown said...

Hi,
I want to know how to use UEP/EPR in case of 2 different operation at 1 endpoint. There could be cases when you have to set different soap action to avoid exception. Maybe solution is create 2 partner links for 1 endpoint and then you can set different partner link for each invoke and then set different EPR in deploy XML.

Unknown said...

Hi, now I found why my EPR (with soapAction) works. It is strange but it works only whenSOAP Message Tracer is enabled in ESB. When I disable SOAP Message Tracer then all requests from BPS ends with Fault response:
axis2ns10:ClientThe endpoint reference (EPR) for the Operation not found is /services/RepositoryService and the WSA Action = . If this EPR was previousl
y reachable, please contact the server administrator.
Why?

Unknown said...

Hi,
Can you please use the TcpMon (can be found inside the bin directory of ESB) and see raw messages, and look for any differences between the two messages. Let me know if you need any help.

Unknown said...

Hi,
sorry I cannot use TCPMon. (I ran it, I changed endpoint in BPEL to TCPMon but TCPMon didn't catch any message)

Unknown said...

hm.. seems wierd right? If the input is same then output also should be same right.
This means Wireshark monitr messages before it reaches the SOAP tracer , where the message is altered. So you don't any difference between the messages. I am afraid, it's very hard to give you a proper answer, without knowing exactly what's happening.

Unknown said...

Strange thing is that BPS don't add soapAction to message. If BPS communicate with service behind ESB directly then soapAction is included. WSDL of service and proxy service is the same in this direction.