This discussion is archived
1 Reply Latest reply: Jan 31, 2011 10:42 PM by Eric Elzinga RSS

DB adapter - "/ns2:OutputParameters/ns2:X_OUTPUT" is empty at line 84

746843 Newbie
Currently Being Moderated
Hi!

I created a simple db procedure as below:

create or replace
procedure APPEND_HI
(P_INPUT IN VARCHAR2
,X_OUTPUT OUT VARCHAR2) is
begin
X_OUTPUT := 'Hi' || P_INPUT;
end;
/

I created a very simple DB Adapter for the above procedure. And in my BPEL process, there are just 3 simple activities. An assign activity for taking the input variable of the main process to pass it on to the DBWS input. An invoke to invoke the WS with the input and output (these variables are of the type of the input and output messages of the DBWS). A third assign activity to assign the DBWS output to the main BPEL process output. When I deploy it, I get an error that the value in the output variable from the WS is empty. I tried to check the name space and variables/statement - everything looks fine. Am I missing something here?

Error is:

"/ns2:OutputParameters/ns2:X_OUTPUT" is empty at line 84, when attempting reading/copying it.

The invoke statement clearly produces the output:

<messages>
- <DBWS_Input>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/SYSTEM/APPEND_HI/">

<P_INPUT>

World

</P_INPUT>

</InputParameters>

</part>
</DBWS_Input>
- <DBWS_Output>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
- <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/SYSTEM/APPEND_HI/">

<X_OUTPUT>

HiWorld

</X_OUTPUT>

</db:OutputParameters>

</part>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">

[]

</part>
</DBWS_Output>
</messages>


Thanks a bunch.

DBWS WSDL File:

*
<definitions
name="DBWS"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/DBWS/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/DBWS/"
xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/SYSTEM/APPEND_HI/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/db/"
>
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/" location="DBAdapterOutboundHeader.wsdl"/>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/SYSTEM/APPEND_HI/"
schemaLocation="SYSTEM_APPEND_HI.xsd" />
</schema>
</types>
<message name="args_in_msg">
<part name="InputParameters" element="db:InputParameters"/>
</message>
<message name="args_out_msg">
<part name="OutputParameters" element="db:OutputParameters"/>
</message>
<portType name="DBWS_ptt">
<operation name="DBWS">
<input message="tns:args_in_msg"/>
<output message="tns:args_out_msg"/>
</operation>
</portType>
<binding name="DBWS_binding" type="tns:DBWS_ptt">
<jca:binding />
<operation name="DBWS">
<jca:operation
SchemaName="SYSTEM"
ProcedureName="APPEND_HI"
InteractionSpec="oracle.tip.adapter.db.DBStoredProcedureInteractionSpec" >
</jca:operation>
<input>
<jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
</input>
<output/>
</operation>
</binding>
<service name="DBWS">
<port name="DBWS_pt" binding="tns:DBWS_binding">
<!--Your runtime connection is declared in
J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
These mcf properties here are from your design time connection and
save you from having to edit that file and restart the application server
if eis/DB/OracleXEDatabase_Connection is missing.
These mcf properties are safe to remove.-->
<jca:address location="eis/DB/OracleXEDatabase_Connection" UIConnectionName="OracleXEDatabase_Connection"
ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
mcf.DriverClassName="oracle.jdbc.OracleDriver"
mcf.PlatformClassName="oracle.toplink.internal.databaseaccess.Oracle9Platform"
mcf.ConnectionString="jdbc:oracle:thin:@APOLLO-A2CF44B3:1521:XE"
mcf.UserName="system"
mcf.Password="6672B62098892995C8B651EFDF798A59" />
</port>
</service>
<plt:partnerLinkType name="DBWS_plt" >
<plt:role name="DBWS_role" >
<plt:portType name="tns:DBWS_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions>
*

BPEL Process Source Code

*
<?xml version = "1.0" encoding = "UTF-8" ?>
<process name="append_hi_process"
targetNamespace="http://xmlns.oracle.com/append_hi_process"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/DBWS/"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/SYSTEM/APPEND_HI/"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:client="http://xmlns.oracle.com/append_hi_process"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<partnerLinks>
<partnerLink name="client" partnerLinkType="client:append_hi_process"
myRole="append_hi_processProvider"/>
<partnerLink name="DBWS" partnerRole="DBWS_role"
partnerLinkType="ns1:DBWS_plt"/>
</partnerLinks>
<variables>
<variable name="inputVariable"
messageType="client:append_hi_processRequestMessage"/>
<variable name="outputVariable"
messageType="client:append_hi_processResponseMessage"/>
<variable name="DBWS_Input" messageType="ns1:args_in_msg"/>
<variable name="DBWS_Output" messageType="ns1:args_out_msg"/>
</variables>
<sequence name="main">
<receive name="receiveInput" partnerLink="client"
portType="client:append_hi_process" operation="process"
variable="inputVariable" createInstance="yes"/>
<assign name="Assign_main_input_WS_input">
<copy>
<from variable="inputVariable" part="payload"
query="/client:append_hi_processProcessRequest/client:input"/>
<to variable="DBWS_Input" part="InputParameters"
query="/ns2:InputParameters/ns2:P_INPUT"/>
</copy>
</assign>
<invoke name="Invoke_DBWS" partnerLink="DBWS" portType="ns1:DBWS_ptt"
operation="DBWS" inputVariable="DBWS_Input"
outputVariable="DBWS_Output"/>
<assign name="Assign_WS_Output_main_Output">
<copy>
<from variable="DBWS_Output" part="OutputParameters"
query="/ns2:OutputParameters/ns2:X_OUTPUT"/>
<to variable="outputVariable" part="payload"
query="/client:append_hi_processProcessResponse/client:result"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client"
portType="client:append_hi_process" operation="process"
variable="outputVariable"/>
</sequence>
</process>
*

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points