This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,810 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

Problem passing BPEL DIME attacment doc to a DB using pl/sql adapter

user10758101
user10758101 Member Posts: 11
edited Jan 5, 2009 1:41PM in BPEL
I have a BPEL process that receives a DIME attachment and tries to save the attacment to a db using pl/sql procedure adapter. It looks that the attachment is received by the bpel process as I am able to write it into a file in the local file system using the xpath function - writeBinaryToFile() and I also see it on the audit trail attachment download using the key shown on the href, but when I copy the attachment message to the pl/sql procedure parameter - nothing gets assigned and a null value is passed to the procedure. Have anyone experienced this problem? I feel I am missing something. Following is an extract of what I have:

Schema def: for the attachment

<xs:element name="PutCompanyInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="report" type="msg:Report"/>
</xs:sequence>
</xs:complexType>
</xs:element>

Schema def: for the pl/sql procedure

<element name="InputParameters">
<complexType>
<sequence>
<element name="DOCUMENT" type="base64Binary" db:index="5" db:type="BLOB" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>

WSDL attachment message def:
<wsdl:message name="PutCompanyInfo">
<wsdl:part name="body" element="msg:PutCompanyInfo"/>
</wsdl:message>

WSDL pl/sql message def:
<message name="args_in_msg">
<part name="InputParameters" element="db:InputParameters"/>
</message>
<message name="args_out_msg">
<part name="OutputParameters" element="db:OutputParameters"/>
</message>

BPEL Assignment to pl/sql blop paramenter
<copy>
<from expression="bpws:getVariableData('input','body','/msg:PutCompanyInfo/msg:report')"/>
<to variable="Invoke_store_dime_doc_store_dime_doc_InputVariable"
part="InputParameters" query="/ns2:InputParameters/ns2:DOCUMENT"/>
</copy>

BPEL write to local file
<copy>
<from expression="ora:writeBinaryToFile('input','body', '/msg:PutCompanyInfo/msg:report', 'c:/temp/report2.html')"/>
<to variable="input" part="body"
query="/msg:PutCompanyInfo/msg:report"/>
</copy>


Aduit Trail output
Invoke_store_dime_doc
[2009/01/03 21:26:27] Invoked 2-way operation "store_dime_doc" on partner "store_dime_doc".less
- <messages>
- <Invoke_store_dime_doc_store_dime_doc_InputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/HR/TEST_UTIL_PKG/STORE_DOCUMENT/">
<DOCUMENT href="uuid:07c20690d6fea08e:-38f80a3b:11e9ec52c8d:-7f3e"/>
</InputParameters>
</part>
</Invoke_store_dime_doc_store_dime_doc_InputVariable>
- <Invoke_store_dime_doc_store_dime_doc_OutputVariable>
- <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/HR/TEST_UTIL_PKG/STORE_DOCUMENT/">
<X_STATUS>store procedure doc length is zero</X_STATUS>
</db:OutputParameters>
</part>
</messages>

The attachment data is shown correctly when the uuid key is entered in the Audit trail attachment download at the bottom. Please help I am stuck.
Tagged:

Answers

  • 428263
    428263 Member Posts: 364
    What version of JDeveloper and SOA are you using? It looks like your JDev is 10.1.3.1 (based on db:InputParameters). In 10.1.3.1 elementFormDefault is unqualified while in 10.1.3.{3,4} it's qualified. If your SOA is 10.1.3.{3,4} and you're using JDev 10.1.3.1 then you'll run into namespace issues and null assignments as you've reported here. We changed elementFormDefault to qualified in 10.1.3.3. The best way to resolve your problem is to upgrade and sync both your JDev and SOA to 10.1.3.3. Mixing 10.1.3.3 and 10.1.3.4 should also work.
  • user10758101
    user10758101 Member Posts: 11
    Thanks for your help! I think that may be my problem - I am using JDev 10.1.3.3.0 and SOA 10.1.3.1.0. I will try your suggestion.

    Regards,
    AT
This discussion has been closed.