[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[bpel-dev] Why the generate literal xmls is defferent when call a variable Initializer?
|
Hi all,
I met a problem about the bpel assign element.
When I add a copy to a assign element, the editor will prompt you to see if you want to create an Initializer. If you click yes, you will get a Fixed value to the To element.
But I found a problem:
if the To variable is like:
<xs:element name='hello' type='tns:hello'/>
<xs:complexType name='hello'>
<xs:sequence>
<xs:element name='name' type='xs:string'/>
</xs:sequence>
</xs:complexType>
the generated literal is like:
<bpel:literal xml:space="preserve">
<tns:hello xmlns:tns="
http://eclipse.org/examples/ws/Hello" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
</tns:hello>
</bpel:literal>
But if the To variable is like:
<xs:element name='hello' type='tns:hello'/>
<xs:complexType name='hello'>
<xs:sequence>
<xs:element minOccurs='0' name='name' type='xs:string'/>
</xs:sequence>
</xs:complexType>
the generated literal is like:
<bpel:literal xml:space="preserve">
<tns:hello xmlns:tns="
http://jboss.com/examples/ws/Hello" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<name></name>
</tns:hello>
</bpel:literal>
The first literal is not right for the ode runtime engine. The runtime engine need the second literal.
I don't know why there is no <name></name> in the first literal. The difference of the first and the second is just: minOccurs='0' in <xs:element minOccurs='0' name='name' type='xs:string'/>.
Thanks!
Grid