1 Reply Latest reply on Mar 23, 2012 11:54 AM by user9285225

    "Start of root element expected" message - AQ Adapter Invoke frm SOA 11g

    user5149250
      Hi All,

      Good Morning.....We need some help with this issue...we are getting an error while invoking the B2B Aq Adapter from Soa 11g side to access the B2B protocols/agreements deployed on b2b.

      The process has been migrated to Soa 11g environment successfully.

      latest current error message during invoke AQ Adapter operation:

      ************************************
      JCA Binding execute of Reference operation 'Enqueue' failed due to: Start of root element expected.".The invoked JCA adapter raised a resource exception.
      *************************************


      Earlier we were getting the below error message :
      *******************************************************************
      "JCA Binding execute of Reference operation 'Enqueue' failed due to: Start of root element expected.".The invoked JCA adapter raised a resource exception
      JCA Binding execute of Reference operation 'Enqueue' failed due to: AQ_INVALID_PAYLOAD_HEADERS_OUTBOUND.
      Failed to access payload headers. jca.aq.HeaderDocument property is missing for the outbound interaction. "
      *********************************************************************

      After seeing this just above mentioned error message, at the Invoke Operation for the B2B queue we set the property named :jca.aq.HeaderDocument in the Properties tab with the variable : v_msg_header/Header/PayloadHeader/ at the Invoke node..compiled the process and deployed again

      Also in the Headers tab this variable is mentioned :v_msg_header

      This v_msg_header variable is defined as - {http://xmlns.oracle.com/pcbpel/adapter/aq/B2BAQ/}Header_Msg

      Header_Msg -->
      Header -->
      QueueHeader
      PayloadHeader

      PayloadHeader format is as mentioned below :
      <MSG_ID>msgid1</MSG_ID><INREPLYTO_MSG_ID>inreply1</INREPLYTO_MSG_ID><FROM_PARTY>tp1</FROM_PARTY><TO_PARTY>tpprty1</TO_PARTY><ACTION_NAME>action1</ACTION_NAME><DOCTYPE_NAME>docname</DOCTYPE_NAME><DOCTYPE_REVISION>4010</DOCTYPE_REVISION></MSG_TYPE></PAYLOAD>

      now at the moment we are getting the first error message mentioned in the post at the start

      Could someone please help us with this issue ...it would be really very helpful, as we are stuck with this

      even after setting the property jca.aq.HeaderDocument with the variable (v_msg_header/Header/PayloadHeader/) , it is still erroring out.

      Thanks
        • 1. Re: "Start of root element expected" message - AQ Adapter Invoke frm SOA 11g
          user9285225
          Hello,


          Create a String variable in your BPEL say "JCA_AQ_Header_Variable".

          Then use the below script and assign to this variable

          <copy>
          <from expression='concat("&lt;Header>&lt;PayloadHeader>&lt;MSG_ID>",ora:generateGUID(),"&lt;/MSG_ID>&lt;INREPLYTO_MSG_ID/>&lt;FROM_PARTY>GlobalChips&lt;/FROM_PARTY>&lt;TO_PARTY>Acme&lt;/TO_PARTY>&lt;ACTION_NAME/>&lt;DOCTYPE_NAME>850&lt;/DOCTYPE_NAME>&lt;DOCTYPE_REVISION>4020&lt;/DOCTYPE_REVISION>&lt;MSG_TYPE>1&lt;/MSG_TYPE>&lt;PAYLOAD/>&lt;ATTACHMENT/>&lt;/PayloadHeader>&lt;/Header>")'/>
          <to variable="JCA_AQ_Header_Variable"/>
          </copy>

          Finally

          in Invoke properties attach this variable to "jca.aq.HeaderDocument"

          This should work