You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Santhosh T R <Sa...@ibsplc.com> on 2009/07/29 16:24:22 UTC
BPEL process is not returning the expected result to the client JSP
Hi All,
I'm trying to build a POC with Tuscany with its BPEL capabilities, now I'm
stuck at problem where I'm not getting expected result in my JSP client,
but I can see the response in my tomcat console.
Response Printed on the console
============================
>>>Invocation status:RESPONSE
>>>Response:
<?xml version="1.0" encoding="UTF-8"?>
<message><processResponse><processResponse xmlns="
http://com.company.app.types"><return xmlns:ns2="
http://cmpx.component.dta.app.company.com/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:type="travelRequestVO"><name
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>>>Response:
<?xml version="1.0" encoding="UTF-8"?>
<message><processResponse><processResponse xmlns="
http://com.company.app.types"><return xmlns:ns2="
http://cmpx.component.dta.app.company.com/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:type="travelRequestVO"><name
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
In this I can see the attribute <name> in the response message has no name
space [<name xmlns="">invoke-bpel-engine</name>], is this the reason
behind this issue ?
Type Definitions - XML Schema used
============================================
Please find the attachment [app_types.xsd]
Client JSP
==========
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
<%@page import="com.company.app.dta.message.TravelRequestVO"%>
<sca:reference name="DtaManagerComponent" type=
"com.company.app.dta.process.DTAProcessManagerService" />
<%= "Trying to invoke the BPEL process !!"%>
<%
TravelRequestVO tVO = new TravelRequestVO();
tVO.setName("invoke-bpel-engine");
out.write(DtaManagerComponent.process(tVO)+"");
out.write(" "+DtaManagerComponent.process(tVO).getName());
out.write("<hr>");
%>
In JSP, out.write(DtaManagerComponent.process(tVO)+""); is printing an
Object of TravelVO [com.company.app.dta.message.TravelRequestVO@e19158 ]
But when we try to print out.write(" "
+DtaManagerComponent.process(tVO).getName());, it is printing null.
We are trying our level best to debug this issue, mean time looking
forward your guidance find a way out.During the debugging, we feel that
the problem occurs during the Node2JAXB transform process. Please find the
debug stack attached.
Best Regards,
DISCLAIMER:
"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."
Re: BPEL process is not returning the expected result to the client JSP
Posted by Santhosh T R <Sa...@ibsplc.com>.
Dear Mike,
We got it working with one change in the BPEL. Please check if
this is the way to go.
Earlier, the <from> part of the BPEL assign statement to set the output
variable was $cmpxServiceResponse.parameters.
Now, with $cmpxServiceResponse.parameters/return, it worked.
We compared two Node-to-JAXB conversions.
(1) BPEL to SCA component invocation
(2) BPEL to JSP response
and found there is an extra return element in the second case.
The name return is from the SCA component (cmpx.wsdl) called by the BPEL.
So, when we tried going one level inside the BPEL assign statement, it
worked. The complete source(eclipse workspace excluding the Tuscany 1.5
libs) is attached with this mail.
The application now works fine with both elementFormDefault="unqualified"
/"qualified" directives.
Description to the attached POC.
This POC is being built as part of an enterprise application which will
use spring for component implementation and is planning to use Hibernate
for data access along with the BPEL capabilities(Business process
implementation with BPEL). And the JSP clients will be replaced with Flex
at the end. Now we are stuck at the implementing some of the key NFRs like
security and transaction. We would also like to have some inputs/guidance
from you people to proceed with this requirement
Thanks and regards,
Santhosh
From:
Mike Edwards <mi...@gmail.com>
To:
user@tuscany.apache.org
Date:
08/04/2009 03:33 AM
Subject:
Re: BPEL process is not returning the expected result to the client JSP
Santhosh,
This is certainly a little complex!!
Some initial thoughts inline...
Santhosh T R wrote:
> Hi All,
>
> I'm trying to build a POC with Tuscany with its BPEL capabilities, now
> I'm stuck at problem where I'm not getting expected result in my JSP
> client, but I can see the response in my tomcat console.
>
>
> *Response Printed on the console*
> ============================
> >>>Invocation status:RESPONSE
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
>
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
I note that the second (nested) processResponse element is stated to be in
the namespace
"http://com.company.app.types"
- however, no alias is used for this namespace
The <return/> element is not explicitly stated as being in any namespace,
despite the presence of
xmlns:ns2="http://cmpx.component.dta.app.company.com/"
- ns2 is not used anywhere
- this namespace is curious - where does it come from?
As you noticed, <name/> is explicitly stated to be in the namespace ""
I note that your itin_types.xsd states elementFormDefault="qualified" -
and from this I would have
expected all the elements within <processResponse/> to have a qualifier
for their namespace
- I can suggest changing the setting to elementFormDefault="unqualified"
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
>
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
>
> In this I can see the attribute <name> in the response message has no
> name space *[<name xmlns="">invoke-bpel-engine</name>]*, is this the
> reason behind this issue ?
>
>
> *Type Definitions - XML Schema used*
> ============================================
> *Please find the attachment [app_types.xsd] *
>
>
>
> *Client JSP *
> ==========
> <%@ page contentType=/"text/html;charset=UTF-8"/ language=/"java"/ %>
> <%@ taglib uri=/"//http://www.osoa.org/sca/sca_jsp.tld//"/
> prefix=/"sca"/ %>
> <%@page import=/"com.company.app.dta.message.TravelRequestVO"/%>
>
> <sca:reference name=/"DtaManagerComponent"/
> type=/"com.company.app.dta.process.DTAProcessManagerService"/ />
> <%= "Trying to invoke the BPEL process !!"%>
> <%
> TravelRequestVO tVO = *new* TravelRequestVO();
> tVO.setName("invoke-bpel-engine");
> out.write(DtaManagerComponent.process(tVO)+"");
> out.write(" "+DtaManagerComponent.process(tVO).getName());
> out.write("<hr>");
> %>
>
> In JSP, out.write(DtaManagerComponent.process(tVO)+""); is printing an
> Object of TravelVO [*com.company.app.dta.message.TravelRequestVO@e19158*
]
> But when we try to print *out.write(**"
> "**+DtaManagerComponent.process(tVO).getName());,* it is printing
null*.*
>
Can you debug the contents of the TravelRequestVO object? I suspect that
you will find it contains
nothing at all, probably because the namespaces of the returned XML
elements don't match.
>
> We are trying our level best to debug this issue, mean time looking
> forward your guidance find a way out.During the debugging, we feel that
> the problem occurs during the Node2JAXB transform process. Please find
> the debug stack attached.
What makes you think that an error is occurring during Node2JAXB
transformation?
>
> Best Regards,
>
Yours, Mike.
DISCLAIMER:
"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."
Re: BPEL process is not returning the expected result to the client
JSP
Posted by Mike Edwards <mi...@gmail.com>.
Santhosh,
This is certainly a little complex!!
Some initial thoughts inline...
Santhosh T R wrote:
> Hi All,
>
> I'm trying to build a POC with Tuscany with its BPEL capabilities, now
> I'm stuck at problem where I'm not getting expected result in my JSP
> client, but I can see the response in my tomcat console.
>
>
> *Response Printed on the console*
> ============================
> >>>Invocation status:RESPONSE
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
> xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
I note that the second (nested) processResponse element is stated to be in the namespace
"http://com.company.app.types"
- however, no alias is used for this namespace
The <return/> element is not explicitly stated as being in any namespace, despite the presence of
xmlns:ns2="http://cmpx.component.dta.app.company.com/"
- ns2 is not used anywhere
- this namespace is curious - where does it come from?
As you noticed, <name/> is explicitly stated to be in the namespace ""
I note that your itin_types.xsd states elementFormDefault="qualified" - and from this I would have
expected all the elements within <processResponse/> to have a qualifier for their namespace
- I can suggest changing the setting to elementFormDefault="unqualified"
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
> xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
>
> In this I can see the attribute <name> in the response message has no
> name space *[<name xmlns="">invoke-bpel-engine</name>]*, is this the
> reason behind this issue ?
>
>
> *Type Definitions - XML Schema used*
> ============================================
> *Please find the attachment [app_types.xsd] *
>
>
>
> *Client JSP *
> ==========
> <%@ page contentType=/"text/html;charset=UTF-8"/ language=/"java"/ %>
> <%@ taglib uri=/"//http://www.osoa.org/sca/sca_jsp.tld//"/
> prefix=/"sca"/ %>
> <%@page import=/"com.company.app.dta.message.TravelRequestVO"/%>
>
> <sca:reference name=/"DtaManagerComponent"/
> type=/"com.company.app.dta.process.DTAProcessManagerService"/ />
> <%= "Trying to invoke the BPEL process !!"%>
> <%
> TravelRequestVO tVO = *new* TravelRequestVO();
> tVO.setName("invoke-bpel-engine");
> out.write(DtaManagerComponent.process(tVO)+"");
> out.write(" "+DtaManagerComponent.process(tVO).getName());
> out.write("<hr>");
> %>
>
> In JSP, out.write(DtaManagerComponent.process(tVO)+""); is printing an
> Object of TravelVO [*com.company.app.dta.message.TravelRequestVO@e19158* ]
> But when we try to print *out.write(**"
> "**+DtaManagerComponent.process(tVO).getName());,* it is printing null*.*
>
Can you debug the contents of the TravelRequestVO object? I suspect that you will find it contains
nothing at all, probably because the namespaces of the returned XML elements don't match.
>
> We are trying our level best to debug this issue, mean time looking
> forward your guidance find a way out.During the debugging, we feel that
> the problem occurs during the Node2JAXB transform process. Please find
> the debug stack attached.
What makes you think that an error is occurring during Node2JAXB transformation?
>
> Best Regards,
>
Yours, Mike.
Re: BPEL process is not returning the expected result to the client JSP
Posted by Santhosh T R <Sa...@ibsplc.com>.
Dear Mike/All,
I'm using the Tuscany1.5 runtime to build the POC
Please find the necessary fils attached with this mail
The problem which i described is still existing, looking forward for your
help.
Best Regards,
Santhosh
From:
Mike Edwards <mi...@gmail.com>
To:
user@tuscany.apache.org
Date:
07/29/2009 08:28 PM
Subject:
Re: BPEL process is not returning the expected result to the client JSP
Santhosh,
Which version of Tuscany are you running?
We shall also need to see the WSDL which applies to the BPEL service
interface that you are invoking
here...
Yours, Mike.
Santhosh T R wrote:
> Hi All,
>
> I'm trying to build a POC with Tuscany with its BPEL capabilities, now
> I'm stuck at problem where I'm not getting expected result in my JSP
> client, but I can see the response in my tomcat console.
>
>
> *Response Printed on the console*
> ============================
> >>>Invocation status:RESPONSE
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
>
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
>
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
>
> In this I can see the attribute <name> in the response message has no
> name space *[<name xmlns="">invoke-bpel-engine</name>]*, is this the
> reason behind this issue ?
>
>
> *Type Definitions - XML Schema used*
> ============================================
> *Please find the attachment [app_types.xsd] *
>
>
>
> *Client JSP *
> ==========
> <%@ page contentType=/"text/html;charset=UTF-8"/ language=/"java"/ %>
> <%@ taglib uri=/"//http://www.osoa.org/sca/sca_jsp.tld//"/
> prefix=/"sca"/ %>
> <%@page import=/"com.company.app.dta.message.TravelRequestVO"/%>
>
> <sca:reference name=/"DtaManagerComponent"/
> type=/"com.company.app.dta.process.DTAProcessManagerService"/ />
> <%= "Trying to invoke the BPEL process !!"%>
> <%
> TravelRequestVO tVO = *new* TravelRequestVO();
> tVO.setName("invoke-bpel-engine");
> out.write(DtaManagerComponent.process(tVO)+"");
> out.write(" "+DtaManagerComponent.process(tVO).getName());
> out.write("<hr>");
> %>
>
> In JSP, out.write(DtaManagerComponent.process(tVO)+""); is printing an
> Object of TravelVO [*com.company.app.dta.message.TravelRequestVO@e19158*
]
> But when we try to print *out.write(**"
> "**+DtaManagerComponent.process(tVO).getName());,* it is printing
null*.*
>
>
> We are trying our level best to debug this issue, mean time looking
> forward your guidance find a way out.During the debugging, we feel that
> the problem occurs during the Node2JAXB transform process. Please find
> the debug stack attached.
>
>
>
>
> Best Regards,
DISCLAIMER:
"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."
Re: BPEL process is not returning the expected result to the client JSP
Posted by Santhosh T R <Sa...@ibsplc.com>.
Dear Mike/All,
I'm using the Tuscany1.5 runtime to build the POC
Please find the necessary fils attached with this mail
The problem which i described is still existing, looking forward for your
help.
Best Regards,
Santhosh
From:
Mike Edwards <mi...@gmail.com>
To:
user@tuscany.apache.org
Date:
07/29/2009 08:28 PM
Subject:
Re: BPEL process is not returning the expected result to the client JSP
Santhosh,
Which version of Tuscany are you running?
We shall also need to see the WSDL which applies to the BPEL service
interface that you are invoking
here...
Yours, Mike.
Santhosh T R wrote:
> Hi All,
>
> I'm trying to build a POC with Tuscany with its BPEL capabilities, now
> I'm stuck at problem where I'm not getting expected result in my JSP
> client, but I can see the response in my tomcat console.
>
>
> *Response Printed on the console*
> ============================
> >>>Invocation status:RESPONSE
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
>
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
>
xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
>
> In this I can see the attribute <name> in the response message has no
> name space *[<name xmlns="">invoke-bpel-engine</name>]*, is this the
> reason behind this issue ?
>
>
> *Type Definitions - XML Schema used*
> ============================================
> *Please find the attachment [app_types.xsd] *
>
>
>
> *Client JSP *
> ==========
> <%@ page contentType=/"text/html;charset=UTF-8"/ language=/"java"/ %>
> <%@ taglib uri=/"//http://www.osoa.org/sca/sca_jsp.tld//"/
> prefix=/"sca"/ %>
> <%@page import=/"com.company.app.dta.message.TravelRequestVO"/%>
>
> <sca:reference name=/"DtaManagerComponent"/
> type=/"com.company.app.dta.process.DTAProcessManagerService"/ />
> <%= "Trying to invoke the BPEL process !!"%>
> <%
> TravelRequestVO tVO = *new* TravelRequestVO();
> tVO.setName("invoke-bpel-engine");
> out.write(DtaManagerComponent.process(tVO)+"");
> out.write(" "+DtaManagerComponent.process(tVO).getName());
> out.write("<hr>");
> %>
>
> In JSP, out.write(DtaManagerComponent.process(tVO)+""); is printing an
> Object of TravelVO [*com.company.app.dta.message.TravelRequestVO@e19158*
]
> But when we try to print *out.write(**"
> "**+DtaManagerComponent.process(tVO).getName());,* it is printing
null*.*
>
>
> We are trying our level best to debug this issue, mean time looking
> forward your guidance find a way out.During the debugging, we feel that
> the problem occurs during the Node2JAXB transform process. Please find
> the debug stack attached.
>
>
>
>
> Best Regards,
DISCLAIMER:
"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."
Re: BPEL process is not returning the expected result to the client
JSP
Posted by Mike Edwards <mi...@gmail.com>.
Santhosh,
Which version of Tuscany are you running?
We shall also need to see the WSDL which applies to the BPEL service interface that you are invoking
here...
Yours, Mike.
Santhosh T R wrote:
> Hi All,
>
> I'm trying to build a POC with Tuscany with its BPEL capabilities, now
> I'm stuck at problem where I'm not getting expected result in my JSP
> client, but I can see the response in my tomcat console.
>
>
> *Response Printed on the console*
> ============================
> >>>Invocation status:RESPONSE
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
> xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
> >>>Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <message><processResponse><processResponse
> xmlns="http://com.company.app.types
> <http://com.company.app.types/>"><return
> xmlns:ns2="http://cmpx.component.dta.app.company.com/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="travelRequestVO"><name
> xmlns="">invoke-bpel-engine</name></return></processResponse></processResponse></message>
>
>
> In this I can see the attribute <name> in the response message has no
> name space *[<name xmlns="">invoke-bpel-engine</name>]*, is this the
> reason behind this issue ?
>
>
> *Type Definitions - XML Schema used*
> ============================================
> *Please find the attachment [app_types.xsd] *
>
>
>
> *Client JSP *
> ==========
> <%@ page contentType=/"text/html;charset=UTF-8"/ language=/"java"/ %>
> <%@ taglib uri=/"//http://www.osoa.org/sca/sca_jsp.tld//"/
> prefix=/"sca"/ %>
> <%@page import=/"com.company.app.dta.message.TravelRequestVO"/%>
>
> <sca:reference name=/"DtaManagerComponent"/
> type=/"com.company.app.dta.process.DTAProcessManagerService"/ />
> <%= "Trying to invoke the BPEL process !!"%>
> <%
> TravelRequestVO tVO = *new* TravelRequestVO();
> tVO.setName("invoke-bpel-engine");
> out.write(DtaManagerComponent.process(tVO)+"");
> out.write(" "+DtaManagerComponent.process(tVO).getName());
> out.write("<hr>");
> %>
>
> In JSP, out.write(DtaManagerComponent.process(tVO)+""); is printing an
> Object of TravelVO [*com.company.app.dta.message.TravelRequestVO@e19158* ]
> But when we try to print *out.write(**"
> "**+DtaManagerComponent.process(tVO).getName());,* it is printing null*.*
>
>
> We are trying our level best to debug this issue, mean time looking
> forward your guidance find a way out.During the debugging, we feel that
> the problem occurs during the Node2JAXB transform process. Please find
> the debug stack attached.
>
>
>
>
> Best Regards,