You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Raidwan <Ra...@hotmail.com> on 2010/03/17 09:50:08 UTC
ASSIGN / copy / literal without namespace, not possible ?
Hi,
I am currently working on a BPEL project in a specific context (Servicemix
3.2.3 (on console mode with tomcat 6/jdk 1.5) / ODE jbi 1.3.3), but my
question is not due of my context.
I want to manipulate xml message without namespace (xmlns) in BPEL, by
executing XPATH query.
When i assign a literal xml value to a variable, if i don't specify a
namespace, ODE engine put the namespace of the process.
Example:
<copy>
<from>
<literal>
<callMethodRequest>
<methodName>MyFunction</methodName>
<parameters>
<parameter name="IN" type="struct">
</parameter>
</parameters>
</callMethodRequest>
</literal>
</from>
<to>$CallMethodIn.query</to>
</copy>
became (extract from log):
ASSIGN | org.apache.ode.bpel.runtime.ASSIGN 188 | Evaluating FROM
expression "{Literal...
<message><query><callMethodRequest
xmlns="http://www.raid.com/ServiceBus/Type">
<methodName
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">MyFunction</methodName>
<parameters
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
<parameter name="IN" type="struct">
</parameter>
</parameters>
</callMethodRequest></query></message>
The callMethodRequest is in rigth namespace (as specify in my wsdl) but my
question is why the methodName and parameters tags took the default
namespace ?
Is there any way to prevent this ?
My solution was to specify an xmlns="" on these tags... but that's not
really nice...
Thanks for help.
--
View this message in context: http://old.nabble.com/ASSIGN---copy---literal-without-namespace%2C-not-possible---tp27928228p27928228.html
Sent from the Apache Ode User mailing list archive at Nabble.com.
Re: ASSIGN / copy / literal without namespace, not possible ?
Posted by Raidwan <Ra...@hotmail.com>.
Hi,
Thanks for your answer...
So ... i will try to put a bpel prefix in the process tag and check with and
without xmlns="" on the process tag.
Raid
Rafal Rusin wrote:
>
> xmlns="" is the solution. If you don't want to do this, just declare a
> bpel or bpws prefix for process and nothing to empty prefix.
> So you will have something like this:
>
> <bpws:assign name="assign1" validate="yes">
> <bpws:copy>
> <bpws:from variable="inVar" part="parameters">
> ...
> </bpws:from>
> <bpws:to variable="tmpVar"/>
> </bpws:copy>
>
> Regards
>
> On 17 March 2010 09:50, Raidwan <Ra...@hotmail.com> wrote:
>>
>> Hi,
>>
>> I am currently working on a BPEL project in a specific context
>> (Servicemix
>> 3.2.3 (on console mode with tomcat 6/jdk 1.5) / ODE jbi 1.3.3), but my
>> question is not due of my context.
>>
>> I want to manipulate xml message without namespace (xmlns) in BPEL, by
>> executing XPATH query.
>> When i assign a literal xml value to a variable, if i don't specify a
>> namespace, ODE engine put the namespace of the process.
>> Example:
>> <copy>
>> <from>
>> <literal>
>> <callMethodRequest>
>> <methodName>MyFunction</methodName>
>> <parameters>
>> <parameter name="IN" type="struct">
>>
>>
>>
>> </parameter>
>> </parameters>
>> </callMethodRequest>
>> </literal>
>> </from>
>> <to>$CallMethodIn.query</to>
>> </copy>
>>
>> became (extract from log):
>> ASSIGN | org.apache.ode.bpel.runtime.ASSIGN 188 | Evaluating FROM
>> expression "{Literal...
>> <message><query><callMethodRequest
>> xmlns="http://www.raid.com/ServiceBus/Type">
>> <methodName
>> xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">MyFunction</methodName>
>> <parameters
>> xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
>> <parameter name="IN" type="struct">
>>
>>
>>
>> </parameter>
>> </parameters>
>> </callMethodRequest></query></message>
>>
>>
>> The callMethodRequest is in rigth namespace (as specify in my wsdl) but
>> my
>> question is why the methodName and parameters tags took the default
>> namespace ?
>> Is there any way to prevent this ?
>> My solution was to specify an xmlns="" on these tags... but that's not
>> really nice...
>>
>> Thanks for help.
>> --
>> View this message in context:
>> http://old.nabble.com/ASSIGN---copy---literal-without-namespace%2C-not-possible---tp27928228p27928228.html
>> Sent from the Apache Ode User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://old.nabble.com/ASSIGN---copy---literal-without-namespace%2C-not-possible---tp27928228p27933582.html
Sent from the Apache Ode User mailing list archive at Nabble.com.
Re: ASSIGN / copy / literal without namespace, not possible ?
Posted by Rafal Rusin <ra...@gmail.com>.
xmlns="" is the solution. If you don't want to do this, just declare a
bpel or bpws prefix for process and nothing to empty prefix.
So you will have something like this:
<bpws:assign name="assign1" validate="yes">
<bpws:copy>
<bpws:from variable="inVar" part="parameters">
...
</bpws:from>
<bpws:to variable="tmpVar"/>
</bpws:copy>
Regards
On 17 March 2010 09:50, Raidwan <Ra...@hotmail.com> wrote:
>
> Hi,
>
> I am currently working on a BPEL project in a specific context (Servicemix
> 3.2.3 (on console mode with tomcat 6/jdk 1.5) / ODE jbi 1.3.3), but my
> question is not due of my context.
>
> I want to manipulate xml message without namespace (xmlns) in BPEL, by
> executing XPATH query.
> When i assign a literal xml value to a variable, if i don't specify a
> namespace, ODE engine put the namespace of the process.
> Example:
> <copy>
> <from>
> <literal>
> <callMethodRequest>
> <methodName>MyFunction</methodName>
> <parameters>
> <parameter name="IN" type="struct">
>
>
>
> </parameter>
> </parameters>
> </callMethodRequest>
> </literal>
> </from>
> <to>$CallMethodIn.query</to>
> </copy>
>
> became (extract from log):
> ASSIGN | org.apache.ode.bpel.runtime.ASSIGN 188 | Evaluating FROM
> expression "{Literal...
> <message><query><callMethodRequest
> xmlns="http://www.raid.com/ServiceBus/Type">
> <methodName
> xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">MyFunction</methodName>
> <parameters
> xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
> <parameter name="IN" type="struct">
>
>
>
> </parameter>
> </parameters>
> </callMethodRequest></query></message>
>
>
> The callMethodRequest is in rigth namespace (as specify in my wsdl) but my
> question is why the methodName and parameters tags took the default
> namespace ?
> Is there any way to prevent this ?
> My solution was to specify an xmlns="" on these tags... but that's not
> really nice...
>
> Thanks for help.
> --
> View this message in context: http://old.nabble.com/ASSIGN---copy---literal-without-namespace%2C-not-possible---tp27928228p27928228.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>
Re: ASSIGN / copy / literal without namespace, not possible ?
Posted by Raidwan <Ra...@hotmail.com>.
Hi Tammo,
You are right, that XML not ODE...
i have tried without namespace on process tag and add bpel prefix, and also
remove the xmlns="" on my literals.
The result is ... that in debug i now have a default xmlns="" on my literals
string ;)
Ok with that... I will review and apply a namespace every where.
Thanks all.
Tammo van Lessen wrote:
>
> Raidwan wrote:
>> Hi,
>>
>> I am currently working on a BPEL project in a specific context
>> (Servicemix
>> 3.2.3 (on console mode with tomcat 6/jdk 1.5) / ODE jbi 1.3.3), but my
>> question is not due of my context.
>>
>> I want to manipulate xml message without namespace (xmlns) in BPEL, by
>> executing XPATH query.
>> When i assign a literal xml value to a variable, if i don't specify a
>> namespace, ODE engine put the namespace of the process.
> ...
>> The callMethodRequest is in rigth namespace (as specify in my wsdl) but
>> my
>> question is why the methodName and parameters tags took the default
>> namespace ?
>> Is there any way to prevent this ?
>> My solution was to specify an xmlns="" on these tags... but that's not
>> really nice...
>
> That's XML, not ODE. Elements that have no prefix are automatically
> bound the default namespace (xmlns="..."). So either use xmlns="" in
> elements that shall be in the null namespace or just don't use a default
> namespace and prefix your BPEL elements.
>
> HTH,
> Tammo
>
>
> --
> Tammo van Lessen - http://www.taval.de
>
>
--
View this message in context: http://old.nabble.com/ASSIGN---copy---literal-without-namespace%2C-not-possible---tp27928228p27946565.html
Sent from the Apache Ode User mailing list archive at Nabble.com.
Re: ASSIGN / copy / literal without namespace, not possible ?
Posted by Tammo van Lessen <tv...@gmail.com>.
Raidwan wrote:
> Hi,
>
> I am currently working on a BPEL project in a specific context (Servicemix
> 3.2.3 (on console mode with tomcat 6/jdk 1.5) / ODE jbi 1.3.3), but my
> question is not due of my context.
>
> I want to manipulate xml message without namespace (xmlns) in BPEL, by
> executing XPATH query.
> When i assign a literal xml value to a variable, if i don't specify a
> namespace, ODE engine put the namespace of the process.
...
> The callMethodRequest is in rigth namespace (as specify in my wsdl) but my
> question is why the methodName and parameters tags took the default
> namespace ?
> Is there any way to prevent this ?
> My solution was to specify an xmlns="" on these tags... but that's not
> really nice...
That's XML, not ODE. Elements that have no prefix are automatically
bound the default namespace (xmlns="..."). So either use xmlns="" in
elements that shall be in the null namespace or just don't use a default
namespace and prefix your BPEL elements.
HTH,
Tammo
--
Tammo van Lessen - http://www.taval.de