Thursday, January 19, 2012

A callout cannot invoke a one-way operation

I have created a DBAdapter JCA Client invoking an INSERT operation
JDeveloper generates this WLSD:

<?binding.jca AcmeDBInsert_db_db.jca?>
<wsdl:definitions name="AcmeDBInsert_db" targetNamespace="" xmlns:tns="" xmlns:wsdl="" xmlns:plt="" xmlns:top="">
    <plt:partnerLinkType name="AcmeDBInsert_db_plt">
        <plt:role name="AcmeDBInsert_db_role">
            <plt:portType name="tns:AcmeDBInsert_db_ptt"/>
        <schema xmlns="">
            <import namespace="" schemaLocation="xsd/AcmeDBInsert_db_table.xsd"/>
    <wsdl:message name="GmAcmeTrackerCollection_msg">
        <wsdl:part name="GmAcmeTrackerCollection" element="top:GmAcmeTrackerCollection"/>
    <wsdl:portType name="AcmeDBInsert_db_ptt">
        <wsdl:operation name="insert">
            <wsdl:input message="tns:GmAcmeTrackerCollection_msg"/>

the "insert" operation is a one-way operation (no wlsd:output clause)

The problem is that the Service Callout expects a request-reply pattern.

So in this case you must necessarily use a Publish, with Quality of Service "Exactly Once" to execute in the same transaction and with a blocking operation.

1 comment:

Eric Elzinga said...

Or edit the generated wsdl to make the insert a sync operation. In that case it will just return a dummy response