1 Reply Latest reply on Aug 27, 2012 7:08 AM by bmaier

    Change ReplyTo in WS-Addressing Header

    799763
      Hi,

      i have created an async webservice with JAX-WS and i want to consume this by using BPEL. All works fine with correlationSet. But in the SOAP-Header the ReplyTo-Address is wrong.

      <addr:ReplyTo xmlns:addr="http://www.w3.org/2005/08/addressing">
      <addr:Address>http://www.w3.org/2005/08/addressing/none</addr:Address>
      </addr:ReplyTo>

      Now i want to change this address to my callback endpoint. I have tried the following thing:

      <bpel:copy>
      <bpel:from>
      <bpel:literal>
      <wsa:EndpointReference>
      <wsa:Address>http://localhost:9999/AppWS-Project1-webapp/SayHelloService</wsa:Address>
      <wsa:ReferenceProperties>
      <wsa:To>http://localhost:9999/AppWS-Project1-webapp/SayHelloService</wsa:To>
      <wsa:Action>http://service.blablubb.de/SayHello/sayHello</wsa:Action>
      <wsa:ReplyTo>
      <wsa:Address>http://localhost:8082/ode/processes/SayHelloCallbackService</wsa:Address>
      </wsa:ReplyTo>
      </wsa:ReferenceProperties>
      </wsa:EndpointReference>
      </bpel:literal>
      </bpel:from>
      <bpel:to variable="partnerReference"></bpel:to>
      </bpel:copy>
      ...
      ...
      ...
      <bpel:copy>
      <bpel:from variable="partnerReference"></bpel:from>
      <bpel:to partnerLink="SayHelloPL"></bpel:to>
      </bpel:copy>

      But the header of the SOAP message looks like this:

      <soapenv:Header>
      <addr:To xmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:9999/AppWS-Project1-webapp/SayHelloService</addr:To>
      <addr:Action xmlns:addr="http://www.w3.org/2005/08/addressing">http://service.blablubb.de/SayHello/sayHello</addr:Action>
      <addr:ReplyTo xmlns:addr="http://www.w3.org/2005/08/addressing">
      <addr:Address>http://www.w3.org/2005/08/addressing/none</addr:Address>
      </addr:ReplyTo>
      <addr:MessageID xmlns:addr="http://www.w3.org/2005/08/addressing">urn:uuid:90B0298DB6676D41EE1285233228820</addr:MessageID>
      </soapenv:Header>


      Can anyone tell me whats wrong?

      greets spaxx86
        • 1. Re: Change ReplyTo in WS-Addressing Header
          bmaier
          I solved it! There is a bug (included 11.1.1.6) in the Jdev-property dialog and documentation. You have to remove the prefix bpel.replyToAddress/wsa.replyToAddress in the bpel source code to bpelx:replyToAddress (see below). Additionally I set explicitly on the partnerlink reference the ws-addressing policy and disable the local optimization like this:

          <reference name="AsyncReplyMep"
          ui:wsdlLocation="http://si.com:7001/soa-infra/services/default/AsyncReplyMep/AsyncReplyBPELProcess.wsdl">
          <interface.wsdl interface="http://xmlns.oracle.com/AsyncReplyMep/AsyncReplyBPELProcess#wsdl.interface(AsyncReplyBPELProcess)"
          callbackInterface="http://xmlns.oracle.com/AsyncReplyMep/AsyncReplyBPELProcess#wsdl.interface(AsyncReplyBPELProcessCallback)"/>
          <binding.ws port="http://xmlns.oracle.com/AsyncReplyMep/AsyncReplyBPELProcess#wsdl.endpoint(asyncreplybpelprocess_client_ep/AsyncReplyBPELProcess_pt)"
          location="http://si.com:7001/soa-infra/services/default/AsyncReplyMep/asyncreplybpelprocess_client_ep?WSDL"
          soapVersion="1.1">
          <wsp:PolicyReference URI="*oracle/wsaddr_policy*"
          orawsp:category="addressing"
          orawsp:status="enabled"/>
          <property name="*oracle.webservices.local.optimization">false</property>*
          </binding.ws>


          Hint to resolve the bug is described under: http://docs.oracle.com/cd/E23549_01/doc.1111/e14771/bpel.htm

          20.1.5 Do Not Specify the wsa and bpel Property Prefixes with the bpelx:property
          Tables H-1 and H-2 of Appendix H, "Normalized Message Properties" of the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite describe the Oracle BPEL Process Manager and Oracle Web Services Addressing properties.To use these properties correctly with the bpelx:property in activities such as a receive activity, ensure that you do not include the wsa. or bpel. prefixes. For example:

          <receive name="receiveInput" partnerLink="bpelprocessb_client"
          portType="client:BPELProcessB" operation="process" variable="inputVariable"
          createInstance="yes">
          <bpelx:property name="action" variable="v1"/>
          <bpelx:property name="messageId" variable="v2"/>
          <bpelx:property name="relatesTo" variable="v3"/>
          *<bpelx:property name="replyToAddress"* variable="v4"/>
          <bpelx:property name="replyToPortType" variable="v5"/>
          <bpelx:property name="replyToService" variable="v6"/>
          </receive>

          Edited by: bmaier on Aug 27, 2012 12:08 AM