Forum Stats

  • 3,815,988 Users
  • 2,259,125 Discussions
  • 7,893,356 Comments

Discussions

How redirect External SOAP endpoint URL on invoke activity.

Maroof Ahmad
Maroof Ahmad Member Posts: 118

Hi, This post on web services but still i want put my SOA query. I am invoking one External SOAP service BPEL on Invoke activity in SOA 12.2.1. Internally its redirect Ex. http://mysoapservices.com:80/fetchmydata/

I discussed with my SOAP service provider he suggested to redirect Ex. https://mysoapservices.com/fetchmydata/

We can achive in Java code as below

((BindingProvider)proxy).getRequestContext().put(

        BindingProvider.ENDPOINT_ADDRESS_PROPERTY,

        " https://mysoapservices.com/fetchmydata/ ");

I would like to know It can be redirected in SOA 12c on invoke activity without using Java code and even if want want to use java code when Java code will be get called before invoke activity or after invoke activity.

I am looking some best approach please help to get finest solution.

Error i am getting.

<?xml version = '1.0' encoding = 'UTF-8'?>

<RestFaultElement>

    <code>301</code>

    <summary>oracle.fabric.common.FabricInvocationException: Unable to invoke endpoint URI "http://mysoapservices.com:80/fetchmydata/ " successfully due to: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 301 Moved Permanently from url https://mysoapservices.com/fetchmydata/

===== reqeust ========

SOAPAction:""

Authorization:Basic bWNjb25zdWx0MTpHUE00QXBsbCRXU1BXRA==

Content-Type:text/xml; charset=UTF-8

Content-Length:2210

Regards,

Maroof

Tagged:
Maroof Ahmad

Best Answer

  • Martien van den Akker
    Martien van den Akker Member Posts: 2,776 Bronze Crown
    edited Dec 9, 2016 6:58AM Answer ✓

    Hy Maroof,

    Apparently you already have an endpointURI property in your composite. But in it it had a http://... reference, while the runtime wsdl is fetched from https://.

    So, it might already work if you change the value in the endpointURI property to https://..., as follows:

    <?xml version="1.0" encoding="UTF-8" ?>

    <!-- Generated by Oracle SOA Modeler version 12.2.1.2.0.161003 at [12/8/16 8:34 PM]. -->

    <composite name="SOAProject"

               revision="1.0"

               label="2016-12-08_20-34-26_732"

               mode="active"

               state="on"

               xmlns="http://xmlns.oracle.com/sca/1.0"

               xmlns:xs="http://www.w3.org/2001/XMLSchema"

               xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"

               xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"

               xmlns:ui="http://xmlns.oracle.com/soa/designer/"

               xmlns:sca-ext="http://xmlns.oracle.com/sca/1.0-ext">

      <import namespace="http://gop.mytrip.com/schema/rrc/v1" location="WSDLs/rrc.wsdl" importType="wsdl"/>

      <import namespace="http://gop.mytrip.com/schema/rrc/v1" location="WSDLs/rrcWrapper.wsdl" importType="wsdl"/>

      <service name="RestService">

        <interface.wadl interface="WADLs/RestService.wadl"/>

        <binding.rest config="WADLs/RestService.wadl"/>

      </service>

      <property name="productVersion" type="xs:string" many="false">12.2.1.2.0.161003</property>

      <property name="compositeID" type="xs:string" many="false">4dac0ca3-9f93-42c2-bcba-6d6593c3ded5</property>

      <component name="BPELProcess1" version="2.0">

        <implementation.bpel src="BPEL/BPELProcess1.bpel"/>

        <componentType>

          <service name="RestService">

            <interface.wadl interface="WADLs/RestService.wadl"/>

          </service>

          <reference name="SOAPReference" ui:wsdlLocation="WSDLs/rrcWrapper.wsdl">

            <interface.wsdl interface="http://gop.mytrip.com/schema/rrc/v1#wsdl.interface(rrc)"/>

          <!--Adding by Maroof Start-->

            <property name="oracle.webservices.auth.username" type="xs:string" many="false" override="may">myuser</property>

            <property name="oracle.webservices.auth.password" type="xs:string" many="false" override="may">MYPWD</property>

            <!--Adding by Maroof End-->

          </reference>

        </componentType>

      </component>

      <reference name="SOAPReference" ui:wsdlLocation="WSDLs/rrc.wsdl">

        <interface.wsdl interface="http://gop.mytrip.com/schema/rrc/v1#wsdl.interface(rrc)"/>

        <binding.ws port="http://gop.mytrip.com/schema/rrc/v1#wsdl.endpoint(rrcService/rrcSoap11)"

                    location="https://ppl-stage01.mytrip.com/rrc/soap/v1/rrc.wsdl" soapVersion="1.2">          

            <property name="endpointURI">https://ppl-stage01.mytrip.com:80/rrc/soap/v1/</property>       

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

        </binding.ws>

      </reference>

      <wire>

        <source.uri>RestService</source.uri>

        <target.uri>BPELProcess1/RestService</target.uri>

      </wire>

      <wire>

        <source.uri>BPELProcess1/SOAPReference</source.uri>

        <target.uri>SOAPReference</target.uri>

      </wire>

    </composite>

    But if 'https://ppl-stage01.mytrip.com/rrc/soap/v1/rrc.wsdl' already fetches proper wsdl with the proper endpoint url, then it might (should) even work if you removed the endpointURI.

    Regards,

    Martien

    Maroof Ahmad

Answers

This discussion has been closed.