Thursday, 6 March 2014

Use proxy configuration when invoking webservices

Introduction


Sometimes, its necessary to access webservices only accessible through web proxy. This configuration can be maintained both server level or composite level. Of course maintaining this on server level you are maintaining the proxy configuration for every service invocation.

Maintained on composite level, better, on reference level guarantees different configuration during invocation time.

Server Level


The proxy configuration at server level can be accessed  on EM SOA Aministration / Common Properties / More SOA Advanced Configuration / Properties

Here you will find the properties:

  • HttpProxyHost
  • HttpProxyPort
  • HttpProxyUsername 
  • HttpProxyPassword

Restart the server after changing them.

Composite Level


At the composite level the proxy configuration is maintained at the reference webservice: select the reference, change the binding properties 

This changes can be delivered directely on the composite.xml aswell

  <reference name="thisWS" ui:wsdlLocation="thisWS.wsdl">
    <interface.wsdl interface="https:/host/#wsdl.interface(thisWsaSoap)"/>
    <binding.ws port="https://host/#wsdl.endpoint(thisWsa/thisWsaSoap12)"
                location="thisWs.wsdl" soapVersion="1.2">
      <property name="oracle.webservices.proxyHost" type="xs:anyURI"
                many="false" override="may">10.xxx.xxx.xx</property>
      <property name="oracle.webservices.proxyPort" type="xs:integer"
                many="false" override="may">8080</property>
    </binding.ws>
    <binding.ws port="https:/host/#wsdl.endpoint(thisWs/thisWsSoap)"
                location="thisWs.wsdl" soapVersion="1.1">
      <property name="weblogic.wsee.wsat.transaction.flowOption"
                type="xs:string" many="false">WSDLDriven</property>
      </binding.ws>
  </reference>

After deployment the properties are accessible from the Enterprise Manager console on the composite administration area. Just need to access the reference available on adapter list and configure the properties directly in the console.

Other considerations

  • Of course have in mind that you should maintain this reference properties on SOA configuration plans to manage the composite migration between environments.

No comments:

Post a Comment