0 Replies Latest reply on Oct 13, 2019 8:57 PM by mohamed abd ellatife

    changing REST resources path dynamically

    mohamed abd ellatife

      Hello All,

      I have SOA composite - 12.2.1.3.0 - with a REST reference, I have create a configuration plan for that composit to be used within deployment. the question is how can I change the resource path of the WADL file related to the REST reference, I already use the global token for the hostname and port and it worked fine, I tried to update the generated configuration plan to change the requestURI at run time but I got the following error

       

      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

         <env:Header>

            <tracking:faultId xmlns:tracking="http://oracle.soa.tracking.core.TrackingProperty">1330008</tracking:faultId>

         </env:Header>

         <env:Body>

            <env:Fault>

               <faultcode>env:Server</faultcode>

               <faultstring>oracle.fabric.common.FabricInvocationException: javax.ws.rs.ProcessingException: URI is not absolute</faultstring>

               <faultactor/>

               <detail>

                  <exception>URI is not absolute</exception>

               </detail>

            </env:Fault>

         </env:Body>

      </env:Envelope>

       

      the following is the generated configuration plan:

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

      <SOAConfigPlan xmlns:jca="http://platform.integration.oracle/blocks/adapter/fw/metadata" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy" xmlns:edl="http://schemas.oracle.com/events/edl" xmlns="http://schemas.oracle.com/soa/configplan">

         <composite name="BPMNotificationsService">

            <!--Add search and replace rules for the import section of a composite

      Example:

      <searchReplace>

      <search>http://my-dev-server</search>

      <replace>http://my-test-server</replace>

      <searchReplace>

      <searchReplace>

      <search>8888</search>

      <replace>8889</replace>

      <searchReplace>-->

            <import>

               <searchReplace>

                  <search/>

                  <replace/>

               </searchReplace>

            </import>

            <service name="mlinotificationService_client_ep">

               <binding type="ws">

                  <attribute name="port">

                     <replace>http://xmlns.oracle.com/MLICommon/BPMNotificationsService/MLINotification_service#wsdl.endpoint(mlinotificationService_client_ep/MLINotification_service_pt)</replace>

                  </attribute>

               </binding>

            </service>

            <property name="productVersion">

               <replace>12.2.1.3.0.170820</replace>

            </property>

            <property name="compositeID">

               <replace>73010c03-41e3-4dae-9f5a-5197c5b3af21</replace>

            </property>

            <!--Add search and replace rules for the component properties

      For components and service/reference bindings, you can add policy references.

      Example:

      <component name="*">

      <wsp:PolicyReference orawsp:category="management" orawsp:status="enabled" URI="oracle/log_policy"/>

      </component>-->

            <component name="MLINotification_service">

               <property name="bpel.config.transaction">

                  <replace>required</replace>

               </property>

            </component>

            <!--Add search and replace rules for the reference properties

      Example:

      <searchReplace>

      <search>http://my-dev-server</search>

      <replace>http://my-test-server</replace>

      <searchReplace>

      <searchReplace>

      <search>8888

      <replace>8889</replace>

      <searchReplace>

      or provide a new replace value like:

      <replace>http://my-new-server:8889/myservice</replace>-->

            <reference name="readNotificationTemplate">

               <property name="jca.retry.count">

                  <replace>4</replace>

               </property>

               <property name="jca.retry.interval">

                  <replace>1</replace>

               </property>

               <property name="jca.retry.backoff">

                  <replace>2</replace>

               </property>

               <property name="jca.retry.maxInterval">

                  <replace>120</replace>

               </property>

               <binding type="jca"/>

            </reference>

            <reference name="IL_SMSNotificationService">

               <binding type="rest"/>

            </reference>

            <reference name="IL_EmailNotificationService">

              <property name="rest.binding.requestURI">

                <replace>/misr/lifeft1/isb/api/notification/sendEmail</replace>

              </property>

               <binding type="rest"/>

            </reference>

         </composite>

         <!--To configure monitor.config:

      <property name="enabled"><replace>true</replace></property>

      <property name="dataObjectsFolder"><searchReplace><search>mydev</search><replace>myproduction</replace></searchReplace></property>

       

      sample properties to configure for adapter:

      <jca:property name="QueueName"><replace>medmq1</replace></jca:property>

       

      To add search and replace rules for wsdls, xsd and jca files

      Example:

      <searchReplace>

      <search>http://my-dev-server</search>

      <replace>http://my-test-server</replace>

      <searchReplace>

      <searchReplace>

      <search>8888</search>

      <replace>8889</replace>

      <searchReplace>

      -->

         <wsdlAndSchema name="Adapters/readNotificationTemplate_db.jca|Schemas/commons.xsd|Schemas/notificationService.xsd|Schemas/readNotificationTemplate_table.xsd|Schemas/sendMailRequest.xsd|Schemas/sendMailResponse.xsd|Schemas/sendSMSRequest.xsd|Schemas/sendSMSResponse.xsd|WSDLs/IL_EmailNotificationService.wsdl|WSDLs/IL_SMSNotificationService.wsdl|WSDLs/MLINotification_service.wsdl|WSDLs/readNotificationTemplate.wsdl">

            <searchReplace>

               <search/>

               <replace/>

            </searchReplace>

         </wsdlAndSchema>

      </SOAConfigPlan>

       

      could you adivse in this.

       

      Thanks