You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Mark Panahi <mp...@gmail.com> on 2008/04/22 08:36:55 UTC
dynamic headers
I've been looking at the page
http://ode.apache.org/headers-handling.htmlabout adding dynamic
headers to bpel, but I can't quite get it to work.
My BPEL is below. I want to assign a header to Variable1 before I invoke. I
call it "someHeader". What else do I need in my BPEL code to get this to
work?
Thanks,
Mark
<process name="HelloWorld2"
targetNamespace="http://ode/bpel/unit-test"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:tns="http://ode/bpel/unit-test"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:test="http://ode/bpel/unit-test.wsdl"
xmlns:ns3="http://components.llama.uci.edu"
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
<import location="HelloWorld2.wsdl"
namespace="http://ode/bpel/unit-test.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/" />
<import location="Component1.wsdl"
namespace="http://components.llama.uci.edu"
importType="http://schemas.xmlsoap.org/wsdl/"/>
<partnerLinks>
<partnerLink name="helloPartnerLink"
partnerLinkType="test:HelloPartnerLinkType"
myRole="me" />
<partnerLink name="PartnerLink1"
partnerLinkType="ns3:muleLinkType"
partnerRole="muleRole"/>
</partnerLinks>
<variables>
<variable name="myVar" messageType="test:HelloMessage"/>
<variable name="tmpVar" type="xsd:string"/>
<variable name="Variable2" messageType="ns3:execResponse"/>
<variable name="Variable1" messageType="ns3:execRequest"/>
</variables>
<sequence>
<receive
name="start"
partnerLink="helloPartnerLink"
portType="test:HelloPortType"
operation="hello"
variable="myVar"
createInstance="yes"/>
<assign name="assign1">
<copy>
<from variable="myVar" part="TestPart"/>
<to variable="tmpVar"/>
</copy>
<copy>
<from>concat($tmpVar,' World')</from>
<to part="in0" variable="Variable1"/>
</copy>
<copy>
<from>concat($tmpVar,' World Header')</from>
<to variable="Variable1" header="someHeader"/>
</copy>
</assign>
<invoke name="Invoke1" partnerLink="PartnerLink1"
operation="exec"
portType="ns3:mulePortType"
inputVariable="Variable1"
outputVariable="Variable2"/>
<reply name="end"
partnerLink="helloPartnerLink"
portType="test:HelloPortType"
operation="hello"
variable="myVar"/>
</sequence>
</process>
Re: dynamic headers
Posted by Mark Panahi <mp...@gmail.com>.
Hi Mattieu,
Sorry, I'm fairly new to BPEL. Do you think you could post an example of how
to assign a literal value to a dynamic header? For example, how would I
assign a process name in the SOAP header of an outgoing message.
Also, this is the error I got when trying to compile what I first posted:
file:/home/mpanahi/Desktop/apache-ode-war-1.1.1/examples/HelloWorld2/HelloWorld2.bpel:71:
error: [CopyToMessageFromNonMessage] Copy to message variable Variable1
requires a message for the r-value.
java org.apache.ode.tools.bpelc.cline.BpelC: error: [CompilationErrors]
Compilation completed with 1 error(s):
file:/home/mpanahi/Desktop/apache-ode-war-1.1.1/examples/HelloWorld2/HelloWorld2.bpel:71:
error: [CopyToMessageFromNonMessage] Copy to message variable Variable1
requires a message for the r-value.
Thanks,
Mark
On Tue, Apr 22, 2008 at 7:23 AM, Matthieu Riou <ma...@offthelip.org>
wrote:
> Hi Mark,
>
> The header you're assigning to Variable1 is just a string, however SOAP
> headers are always elements. I've updated the documentation to point that
> out. If you're still having difficulties, a trace would help, but given
> your
> BPEL I'm guessing that's the issue here.
>
> Cheers,
> Matthieu
>
> On Mon, Apr 21, 2008 at 11:36 PM, Mark Panahi <mp...@gmail.com> wrote:
>
> > I've been looking at the page
> > http://ode.apache.org/headers-handling.htmlabout adding dynamic
> > headers to bpel, but I can't quite get it to work.
> >
> > My BPEL is below. I want to assign a header to Variable1 before I
> invoke.
> > I
> > call it "someHeader". What else do I need in my BPEL code to get this to
> > work?
> >
> > Thanks,
> >
> > Mark
> >
> > <process name="HelloWorld2"
> > targetNamespace="http://ode/bpel/unit-test"
> > xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
> > xmlns:tns="http://ode/bpel/unit-test"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:test="http://ode/bpel/unit-test.wsdl"
> > xmlns:ns3="http://components.llama.uci.edu"
> > queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
> >
> > expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
> >
> > <import location="HelloWorld2.wsdl"
> > namespace="http://ode/bpel/unit-test.wsdl"
> > importType="http://schemas.xmlsoap.org/wsdl/" />
> > <import location="Component1.wsdl"
> > namespace="http://components.llama.uci.edu"
> > importType="http://schemas.xmlsoap.org/wsdl/"/>
> >
> > <partnerLinks>
> > <partnerLink name="helloPartnerLink"
> > partnerLinkType="test:HelloPartnerLinkType"
> > myRole="me" />
> > <partnerLink name="PartnerLink1"
> > partnerLinkType="ns3:muleLinkType"
> > partnerRole="muleRole"/>
> > </partnerLinks>
> >
> > <variables>
> > <variable name="myVar" messageType="test:HelloMessage"/>
> > <variable name="tmpVar" type="xsd:string"/>
> > <variable name="Variable2" messageType="ns3:execResponse"/>
> > <variable name="Variable1" messageType="ns3:execRequest"/>
> > </variables>
> >
> > <sequence>
> > <receive
> > name="start"
> > partnerLink="helloPartnerLink"
> > portType="test:HelloPortType"
> > operation="hello"
> > variable="myVar"
> > createInstance="yes"/>
> >
> > <assign name="assign1">
> > <copy>
> > <from variable="myVar" part="TestPart"/>
> > <to variable="tmpVar"/>
> > </copy>
> > <copy>
> > <from>concat($tmpVar,' World')</from>
> > <to part="in0" variable="Variable1"/>
> > </copy>
> > <copy>
> > <from>concat($tmpVar,' World Header')</from>
> > <to variable="Variable1" header="someHeader"/>
> > </copy>
> > </assign>
> >
> > <invoke name="Invoke1" partnerLink="PartnerLink1"
> > operation="exec"
> > portType="ns3:mulePortType"
> > inputVariable="Variable1"
> > outputVariable="Variable2"/>
> > <reply name="end"
> > partnerLink="helloPartnerLink"
> > portType="test:HelloPortType"
> > operation="hello"
> > variable="myVar"/>
> > </sequence>
> > </process>
> >
>
Re: dynamic headers
Posted by Matthieu Riou <ma...@offthelip.org>.
Hi Mark,
The header you're assigning to Variable1 is just a string, however SOAP
headers are always elements. I've updated the documentation to point that
out. If you're still having difficulties, a trace would help, but given your
BPEL I'm guessing that's the issue here.
Cheers,
Matthieu
On Mon, Apr 21, 2008 at 11:36 PM, Mark Panahi <mp...@gmail.com> wrote:
> I've been looking at the page
> http://ode.apache.org/headers-handling.htmlabout adding dynamic
> headers to bpel, but I can't quite get it to work.
>
> My BPEL is below. I want to assign a header to Variable1 before I invoke.
> I
> call it "someHeader". What else do I need in my BPEL code to get this to
> work?
>
> Thanks,
>
> Mark
>
> <process name="HelloWorld2"
> targetNamespace="http://ode/bpel/unit-test"
> xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
> xmlns:tns="http://ode/bpel/unit-test"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:test="http://ode/bpel/unit-test.wsdl"
> xmlns:ns3="http://components.llama.uci.edu"
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
>
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
>
> <import location="HelloWorld2.wsdl"
> namespace="http://ode/bpel/unit-test.wsdl"
> importType="http://schemas.xmlsoap.org/wsdl/" />
> <import location="Component1.wsdl"
> namespace="http://components.llama.uci.edu"
> importType="http://schemas.xmlsoap.org/wsdl/"/>
>
> <partnerLinks>
> <partnerLink name="helloPartnerLink"
> partnerLinkType="test:HelloPartnerLinkType"
> myRole="me" />
> <partnerLink name="PartnerLink1"
> partnerLinkType="ns3:muleLinkType"
> partnerRole="muleRole"/>
> </partnerLinks>
>
> <variables>
> <variable name="myVar" messageType="test:HelloMessage"/>
> <variable name="tmpVar" type="xsd:string"/>
> <variable name="Variable2" messageType="ns3:execResponse"/>
> <variable name="Variable1" messageType="ns3:execRequest"/>
> </variables>
>
> <sequence>
> <receive
> name="start"
> partnerLink="helloPartnerLink"
> portType="test:HelloPortType"
> operation="hello"
> variable="myVar"
> createInstance="yes"/>
>
> <assign name="assign1">
> <copy>
> <from variable="myVar" part="TestPart"/>
> <to variable="tmpVar"/>
> </copy>
> <copy>
> <from>concat($tmpVar,' World')</from>
> <to part="in0" variable="Variable1"/>
> </copy>
> <copy>
> <from>concat($tmpVar,' World Header')</from>
> <to variable="Variable1" header="someHeader"/>
> </copy>
> </assign>
>
> <invoke name="Invoke1" partnerLink="PartnerLink1"
> operation="exec"
> portType="ns3:mulePortType"
> inputVariable="Variable1"
> outputVariable="Variable2"/>
> <reply name="end"
> partnerLink="helloPartnerLink"
> portType="test:HelloPortType"
> operation="hello"
> variable="myVar"/>
> </sequence>
> </process>
>