ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject Re: Namespaces during initialization and invocation
Date Thu, 08 Nov 2007 16:38:33 GMT
On Nov 7, 2007 4:53 PM, Rich Taylor <bhamtaylor@gmail.com> wrote:

> I'm trying to understand namespaces when initializing variables (using
> literal etc.) and invoking services.  I'm using 1.1 and the Axis2
> distro.
>
> Question 1:  When using an assign/copy operation to initialize a
> variable using a literal, I'm trying to understand when I need to
> include a namespace declaration in the literal XML I'm assigning.  Is
> it based on whether or not the schema type for each element is locally
> or globally defined in its schema and whether or not
> elementFormDefault is set to qualified or not?  Or am I barking up the
> wrong (seemingly complicated) tree?
>
> For example when to initialize a variable with something like this:
> <ns1:execute xmlns:ns1="urn:services:simple">
>    <ns1:input1>
>        <ns1:url/>
>    </ns1:input1>
> </ns1:execute>
>
> versus something like the following:
>
> <execute>
>    <input1>
>        <url/>
>    </input1>
> </execute>
>
>
Namespaces in your BPEL document are handled exactly in the same way as in
any XML document. So in your second example with non qualified elements, the
namespace used for your literals will be the default namespace, which is
often the bpel namespace. If there's no default namespace then your literal
elements will have no namespace.

That's why fully qualified is usually better, both for the bpel elements and
for your literal elements, you'll have less surprises.


> Question 2:   I've noticed that in all SOAP requests coming and going
> from ODE (using Axis2) the root of the body has a dynamically
> generated namespace prefix, axis2nsN, where N increase each time.
> This happens even if I specify the proper namespace during the
> initialization of the outgoing message variable
>
> Example message going out across the wire:
> <axis2ns1:execute xmlns:axis2ns1="urn:services:simple"
> xmlns:ns1="urn:services:simple">
>    <ns1:input1>
>        <ns1:url/>
>    </ns1:input1>
> </ns1:execute>
>
> Is the "axis2ns" prefixing something that is configurable?  The number
> increases during each execution, will it not get insanely large over
> time?  How does this namespace relate to namespaces in Question 1?  It
> seems there is overlap.
>
>
Mmmh that seems to be an axis2 thing where it insists on having a prefix for
your execute element. Not sure how configurable that is... We could add a
prefix ourselves when there's none but it's a bit awkward.

Cheers,
Matthieu


>
> Thank you!
> Rich Taylor
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message