Forum Stats

  • 3,759,052 Users
  • 2,251,495 Discussions
  • 7,870,477 Comments

Discussions

Can't extract a HTTP header using BPEL process in SOA Suite 12.1.3

3355118
3355118 Member Posts: 2

Hello,

I've been following a procedure to enable me to extract a HTTP header (a cookie to be specific) using a BPEL process. However, when I inspect the cookie following the extraction the value is always NULL.

The process I have followed is as follows:

1. I've added the following a property to the <service><binding.ws> section of the endpoint I wish to extract the cookie from and set it to the Header name: Set-Cookie

<service name="SetAuthUser1a" ui:wsdlLocation="WSDLs/SetAuthUser1a.wsdl">

<interface.wsdl interface="http://oracle.com/sca/soapservice/FusionWorkbench/SetAuthUserDeepDive/SetAuthUser1a#wsdl.interface(utilitySoap)"/>

<binding.ws port="http://oracle.com/sca/soapservice/FusionWorkbench/SetAuthUserDeepDive/SetAuthUser1a#wsdl.endpoint(SetAuthUser1a/utilitySoap_pt)">

<property name="oracle.webservices.http.headers">Set-Cookie</property>

<property name="weblogic.wsee.wsat.transaction.flowOption" type="xs:string" many="false">NEVER</property>

</binding.ws>

</service>

2. I have created a variable in the BPEL process to hold this extracted cookie.

<variable name="cookieVar" type="xsd:string">

<from><literal>"TestCookie"</literal></from>

</variable>

3. I have then added the following section to the <receive> section of the BPEL process.

<bpelx:fromProperties>

<bpelx:fromProperty name="Set-Cookie" variable="cookieVar"></bpelx:fromProperty>

</bpelx:fromProperties>

However, this does not work. Is there a bug in SOA Suite 12.1.3 regarding header extraction in a BPEL process?

Thanks

Dave

Answers

  • Vijayaragavan Ramasamy
    Vijayaragavan Ramasamy Member Posts: 18 Red Ribbon
    edited Jan 19, 2019 5:18AM

    Not sure on cookie part. I have used fromproperty on receive activity to read http headers in 12.2.1.0 version.

    <receive name="receiveInput" partnerLink="HeaderWs"     portType="client:HeaderService" operation="process"     variable="inputVariable" createInstance="yes">    <bpelx:fromProperties >     <bpelx:fromProperty name="ENV" variable="var_ENV"></bpelx:fromProperty> <!--to receive from SOAP endpoint -->    </bpelx:fromProperties>    </receive>

    Above is a snippet from in bpel file that reads a http header with name ENV and assigns to variable named var_ENV in bpel.

  • Hemanth Lakkaraju-Oracle
    Hemanth Lakkaraju-Oracle Member Posts: 412 Employee
    edited Jan 19, 2019 7:11AM

    Try adding javax.xml.ws.session.maintain to true along with oracle.webservices.http.headers and see if it works.

  • 3355118
    3355118 Member Posts: 2
    edited Jan 28, 2019 8:50AM

    Thanks guys for your help.In the end I couldn't solve this in the end so I've created an OSB proxy service to extract the HTTP header and pass it back to the BPEL process in the SOAP body instead.

  • vladodias
    vladodias Member Posts: 2,282
    edited Jan 29, 2019 8:06PM

    Glad you solved... The property oracle.webservices.http.headers does not seem to work on 12c...