-
1. Re: Is it possible to set a new URI for a partnerLink during
aguizar Oct 29, 2007 8:27 PM (in response to zazzaz)Per the BPEL specification, only the partner role of a partner link can be assigned a new address dynamically. Try the following:
<assign> <copy> <from variable="msg" part="reference"> <to partnerLink="pl"> </copy> </assign>
The information item returned by from must have a supported service reference type. Currently, the product supports wsa:EndpointReferenceType and wsdl:tService. If you have a BPEL 2 process, the type can also be bpel:ServiceRefType. The namespace URIs for these prefixes are:
wsa http://schemas.xmlsoap.org/ws/2004/08/addressing
wsdl http://schemas.xmlsoap.org/wsdl/
bpel http://schemas.xmlsoap.org/ws/2004/03/business-process/ -
2. Re: Is it possible to set a new URI for a partnerLink during
zazzaz Oct 30, 2007 3:26 AM (in response to zazzaz)Ok
but how the endpoint reference has to be initialized?
I mean I declare a variable
and before executing an assign activity like
<from ep>
I need to set something for the endpoint reference, isnt' it?
By the by, wsa:EndpointReferenceType and wsa:EndpointReference differs?
Thanks a lot for your time and availability. Bye
ZazzaZ -
3. Re: Is it possible to set a new URI for a partnerLink during
zazzaz Oct 30, 2007 3:30 AM (in response to zazzaz)<variable name="ep" element="wsa:EndpointReference"> <assign> <copy> <from variable="ep"> <to partnerLink="pl"> </copy> </assign>
-
4. Re: Is it possible to set a new URI for a partnerLink during
zazzaz Nov 5, 2007 8:25 AM (in response to zazzaz)Hi,
I tried using BPEL 2 and it didn't work out.
The only one accepted was<copy> <from> <literal> <wsa:EndpointReference> <wsa:Address>THE_URI_FROM_THE_SERVICE_IN_THE_WSDL</wsa:Address> <wsa:ServiceName PortName="myPort">THE_SERVICENAME_FROM_THE_WSDL</wsa:ServiceName> </wsa:EndpointReference> </literal> </from> <to partnerLink="myPL"> </copy>
Ideally, the partnerLink should be OK. I saw the implementation of EndpointReference in endpointref package and no additional info is required.
The assignment goes fine but the invoke fails and the reason is that no port implements the required port type. Moreover it look like the process tries to build a new partnerlink loking the wsdl files in the URI catalog.
Hope anyone has a solution. Bye
ZazzaZ -
5. Re: Is it possible to set a new URI for a partnerLink during
zazzaz Nov 5, 2007 8:28 AM (in response to zazzaz)The correct namespace are specified in wsa:endpointReference tag as attributes (to make it recognizable by some factory)
They are
xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/03/business-process/'
Nothing works. Bye -
6. Re: Is it possible to set a new URI for a partnerLink during
aguizar Nov 7, 2007 1:03 PM (in response to zazzaz)The information contained in the endpoint reference is used to identify the partner endpoint to invoke. However, it does not provide enough information to format a message (wsdl:binding) and send it to a given address (wsdl:port). The full WSDL description is still needed even if you set the reference dynamically.
The solution is to register the WSDL documents of all your candidate partner services. jBPM BPEL will select the best match to your endpoint reference among all the services in the catalog. -
7. Re: Is it possible to set a new URI for a partnerLink during
zazzaz Nov 8, 2007 5:46 AM (in response to zazzaz)Ok,
here is the code for full working.//in variables <variable name="er" element="wsa:EndpointReference" /> <assign> <copy> <from> <wsa:EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" > <wsa:Address >URI_YOU_READ_IN_SERVICE_soap:address</wsa:Address> <wsa:Service >THE_NAME_OF_THE_SERVICE</wsa:Service> </wsa:EndpointReference> </from> <to variable="er" /> </copy> <copy> <from variable="er" /> <to partnerLink="ca"/> </copy> </assign>
You were right. I changed the URI in the WSDL with a wrong path and the tool read infos from the code I wrote in the assign.
Thanks a lot. If you need the full example, I can zip it and give you. Bye
ZazzaZ