Hi,
we already have discussed this issue some months ago. FYI here the result:
-------------------------------------------------------------------------------
Hello,
to solve the problem I had to declare an element of the complexType TestVO
in the .wsdl
<element name="TestVOElement" type="tns:TestVO"/>
The declaration of the variable in the .bpel file must be of the element
type:
<bpel:variable name="mytestvo" element="tns:TestVOElement"></bpel:variable>
Initialize:
<bpel:copy>
<bpel:from>
<bpel:literal xml:space="preserve">
<tns:TestVOElement xmlns:tns="http://BPELVoTest"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:TestVO>
<tns:key></tns:key>
<tns:value></tns:value>
</tns:TestVO>
</tns:TestVOElement>
</bpel:literal>
</bpel:from>
<bpel:to variable="mytestvo">
</bpel:to>
</bpel:copy>
Fill:
<bpel:copy>
<bpel:from part="payload" variable="input"></bpel:from>
<bpel:to variable="mytestvo">
<bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:TestVO/tns:key]]>
</bpel:query>
</bpel:to>
</bpel:copy>
Add to response:
<bpel:copy>
<bpel:from>
<![CDATA[ode:insert-as-last-into($output.payload, $mytestvo)]]>
</bpel:from>
<bpel:to part="payload" variable="output">
</bpel:to>
</bpel:copy>
The SOAP Response
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<BPELVoTestResponse xmlns="http://BPELVoTest">
<TestVOElement>
<tns:TestVO xmlns:tns="http://BPELVoTest">
<key><input>tut</input></key>
<tns:value />
</tns:TestVO>
</TestVOElement>
</BPELVoTestResponse>
</soapenv:Body>
</soapenv:Envelope>
After that the ODE engine seems to use the root-element I initialized
instead of wrapping it with a "xsd-complex-type-wrapper" element. I dont
know if this is the right behavior in this case but using the element
instead of the complex-type will be at least a workaround.
Have a nice weekend,
Kathrin
-------- Original-Nachricht --------
Datum: Fri, 26 Jun 2009 08:47:01 +0200
Von: "Christian Fonden" <[email protected]>
An: [email protected]
Betreff: Re: Complex type wrapper element is still visible in messages
sent by the engine
Hello,
I get the same using the ode trunk source code. I think this is somehow
related with imported xsd type definitions that use other xsd types for
themselves.
Kathrin, I think we should reopen ODE-110. Do you agree?
Greets from Germany too,
Chris
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Monday, June 22, 2009 7:31 PM
Subject: Complex type wrapper element is still visible in messages sent by
the engine
> Hallo @ all,
>
> I receive a <xsd-complex-type-wrapper> element from my BPEL Process. As
> documented here
> https://issues.apache.org/jira/browse/ODE-110
> the problem should be fixed but I get the same result with ODE Version
> 1.3.2.
>
> Used ODE Version: 1.3.2
>
> The message definition in the .wsdl:
> <element name="BPELVoTestResponse">
> <complexType>
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" nillable="true"
> name="result" type="tns:TestVO"/>
> </sequence>
> </complexType>
> </element>
>
> The Definition of the complexType:
> <complexType name="TestVO">
> <sequence>
> <element minOccurs="0" name="key" nillable="true" type="string"/>
> <element minOccurs="0" name="value" nillable="true" type="string"/>
> </sequence>
> </complexType>
>
> The varible declaration in my .bpel:
> <bpel:variable name="mytestvo" type="tns:TestVO"></bpel:variable>
>
> Initialize
> <bpel:copy>
> <bpel:from>
> <bpel:literal xml:space="preserve">
> <tns:TestVO xmlns:tns="http://BPELVoTest"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <tns:key></tns:key>
> <tns:value></tns:value>
> </tns:TestVO>
> </bpel:literal>
> </bpel:from>
> <bpel:to variable="mytestvo">
> </bpel:to>
> </bpel:copy>
>
> <bpel:copy>
> <bpel:from>
> <bpel:literal xml:space="preserve">
> <tns:BPELVoTestResponse xmlns:tns="http://BPELVoTest"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> </tns:BPELVoTestResponse>
> </bpel:literal>
> </bpel:from>
> <bpel:to variable="output" part="payload"></bpel:to>
> </bpel:copy>
>
> Fill
> <bpel:copy>
> <bpel:from part="payload" variable="input"></bpel:from>
> <bpel:to variable="mytestvo">
> <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
> <![CDATA[tns:key]]>
> </bpel:query>
> </bpel:to>
> </bpel:copy>
>
> Add to response
> <bpel:copy>
> <bpel:from>
> <![CDATA[ode:insert-as-last-into($output.payload, $mytestvo)]]>
> </bpel:from>
> <bpel:to part="payload" variable="output">
> </bpel:to>
> </bpel:copy>
>
> The response off my process:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <BPELVoTestResponse xmlns="http://BPELVoTest">
> <xsd-complex-type-wrapper xmlns="">
> <key xmlns="http://BPELVoTest">
> <input>tut</input>
> </key>
> <tns:value xmlns:tns="http://BPELVoTest" />
> </xsd-complex-type-wrapper>
> </BPELVoTestResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Perhaps I'm doing something wrong... I hope somebody can help me.
>
> Nice greetings from Germany,
>
> Kathrin
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Thursday, August 06, 2009 9:26 PM
Subject: Re: xsd-complex-type-wrapper
More Information....
I also tried in in the beta 2 release, and I am getting the same results.
Thanks,
Paul
From: [email protected]
To: [email protected]
Date: 08/06/2009 01:38 PM
Subject: xsd-complex-type-wrapper
Hello all,
I am using ODE 1.3.2 on Tomcat 6.0.20
I am getting this back from my bpel call:
<xsd-complex-type-wrapper>
<typ xmlns="http://www.metavante.com/mvnt_InvolvedParty">House
Number</typ>
<val xmlns="http://www.metavante.com/mvnt_InvolvedParty">845 W.
Hampton Ave</val>
</xsd-complex-type-wrapper>
The variable is defined as the following:
<bpel:variable name:="addrCmpt" type="ns3:PstlAddrCmpt"></bpel:variable>
I am initializing the variable with the following code
<bpel:literal xml:space="preserve">
<mvnt_InvolvedParty:PstlAddrCmpt
xmlns:mvnt="http://www.metavante.com/mvnt"
xmlns:mvnt_Common="http://www.metavante.com/mvnt_Common"
xmlns:mvnt_InvolvedParty="http://www.metavante.com/mvnt_InvolvedParty"
xmlns:p="mvntCommon" xmlns:p1="mvntCommonRqstHdr"
xmlns:p2="mvntCommonRspHdr"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<mvnt_InvolvedParty:typ></mvnt_InvolvedParty:typ>
<mvnt_InvolvedParty:val></mvnt_InvolvedParty:val>
</mvnt_InvolvedParty:PstlAddrCmpt>
</bpel:literal>
I an inserting the object into a list using the following:
<bpel:copy keepSrcElementName="yes">
<bpel:from>
<![CDATA[ode:insert-as-first-into($addrOsi, $addrCmpt)]]>
</bpel:from><bpel:to>
<![CDATA[$addrOsi]]>
</bpel:to>
</bpel:copy>
I have not had this problem before, so I am completely baffled. Any help
would be great.
Paul R. Johnson
---------------------------------------------------------------------
This message contains confidential and proprietary information of the
sender, and is intended only for the person(s) to whom it is addressed.
Any use, distribution, copying or disclosure by any other person is
strictly prohibited. If you have received this message in error, please
notify the e-mail sender immediately, and delete the original message
without making a copy.
---------------------------------------------------------------------
This message contains confidential and proprietary information of the
sender, and is intended only for the person(s) to whom it is addressed.
Any use, distribution, copying or disclosure by any other person is
strictly prohibited. If you have received this message in error, please
notify the e-mail sender immediately, and delete the original message
without making a copy.