On Wed, Apr 23, 2008 at 10:40 PM, Mark Panahi <[EMAIL PROTECTED]> wrote:
> Ok, so I have something like this: > > I have the namespace "xmlns:ode="http://www.apache.org/ode/type/extension" > declared at the top, and the copy statement: > > <copy> > <from>$ode:pid</from> > <to variable="Variable1" header="someHeader"/> > </copy> > > But I get the error: > > > file:/home/mpanahi/Desktop/apache-ode-war-1.1.1/examples/HelloWorld2/HelloWorld2.bpel:81: > 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:81: > error: [CopyToMessageFromNonMessage] Copy to message variable Variable1 > requires a message for the r-value > > Do I have the correct syntax? > In SOAP, headers are always elements so you can't set a simple string to be sent in a header, you will have to wrap it. See all the way down here: http://ode.apache.org/headers-handling.html What you can do is use a literal to first prepare your header element. Something like: <copy> <from><literal><myns:headerElemt></myns:headerElmt></literal></from> <to variable="tempEltmVar"/> </copy> <copy> <from>$ode:pid</from> <to>$tempEltmVar/myns:headerElemt</to> </copy> <copy> <from>$tempEltmVar</from> <to variable="Variable1" header="someHeader"/> </copy> Cheers, Matthieu > Thanks, > > Mark > > On Wed, Apr 23, 2008 at 8:05 PM, Matthieu Riou <[EMAIL PROTECTED]> > wrote: > > > On Wed, Apr 23, 2008 at 3:53 PM, Mark Panahi <[EMAIL PROTECTED]> wrote: > > > > > Hi Paul, > > > > > > Actually I need for a research project I'm working on. i am developing > > an > > > extension to an ESB that among other things collects QoS data about > > hosted > > > services for a given process. This data can be be queried at runtime by > > > automated external agents that can diagnose problems, such as QoS > > > violations. > > > > > > Is there any workaround to get the process id in the SOAP header? > > > > > > > There's a read only XPath variable called pid in the ODE extension > > namespace > > ("http://www.apache.org/ode/type/extension") that you can use to > retrieve > > the current process instance id and eventually assign it to a header > part. > > You could also assign the process name as a literal I guess. > > > > Cheers, > > Matthieu > > > > > > > > > > Thanks, > > > > > > Mark > > > > > > On Wed, Apr 23, 2008 at 3:28 PM, Paul Brown <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > Hi, Mark -- > > > > > > > > On Apr 23, 2008, at 3:14 PM, Mark Panahi wrote: > > > > > > > > > Hi, I'd like to be able to somehow send a process id and instance > id > > > in > > > > > the > > > > > SOAP header when invoking partner links. Is there any way to do > > this? > > > > > > > > > > > > > Can I ask about why you want to do it? In philosophical terms at > > least, > > > > instance and process identifiers are invisible to external observers. > > > The > > > > correlation facility in the engine is responsible for delegating > > > execution > > > > to an appropriate new or existing instance, and the versioning > > facility > > > and > > > > policies are responsible for determining which process definition is > > > used. > > > > > > > > Are you looking to unify management information? > > > > > > > > -- Paul > > > > > > > > > >
