Tuesday, April 2, 2013

Token Configurations in Oracle SOA Suite PS6 (

Oracle Soa Suite PatchSet 6 or  now has support for Token configurations which really can help administrators in configuring or overriding external Web Service Reference parameters like the protocol ( http, oramds or https ),  the remote host etc. And more important if you do it right you can kick out the all those Soa Suite deployment plans :-)

Important to know this only works on the location attribute of the element of the composite.xml file. But when you use Metadata Service (MDS) and call a Web Service like a Java WS, .Net WS,  OSB or SOA Suite Reference Services then you can use this new feature.

In this blogpost I will show you all the steps.

First step is to make all these services in depended of each other ( Don't want invalid composites or want to use deployment plans ), I followed this great AIA blog about Best Practices for Decoupling Services and Avoiding Invalid Composites at Server Startup

In this demo I created a workspace with a MDS project which contains some WSDL's with a XML Schema. This WSDL is used in the Helloworld Reference Soa project. Deployed it together with the MDS soa sar and I put the Impl of the Reference WSDL back to the MDS so it can be used in my other main project ( I downloaded it from the EM and changed the xml schema import ).

The main project will call this helloworld reference service and in this project we will use a server name token in the WSDL url ( location attribute of the element ).

In my main project I added this externel reference web service to my composite by selecting the Reference Impl from the MDS  ( First add a File MDS in the Resource Palette and map this to your local MDS location and finally lookup the WSDL, for compiling you also need to add an extra MDS location to the adf-config.xml )

After adding the reference service, we need to fix some hard references in the composite.xml to this remote service.
  • Change the location attribute of the composite import to oramds://
  • Do the same for ui:wsdlLocation attribute of the Reference element.
  • In the location attribute of the Binding.WS element we need to use the real reference WSDL url ( see the EM for the reference WSDL url  ). 

Do the same for the Reference Wrapper WSDL

Now our main Soa Suite project only needs this reference service at runtime and we won't have any deployment issues or invalid composites after a reboot of the Soa Suite Service.

Next step is to create a Token file which contains some server host entries, we can use this file in the JDeveloper Token wizard or later when we want to import these Tokens in the Oracle Enterprise Manager.  See this url for an Token xml example

I added two host key values entries 

Click the token button of the composite.xml editor.

Select our reference service and click on edit.

Lookup the just created Token file and on the Host field we can lookup our LocalSoaServer entry.

This will change the location attribute to http://${LocalSoaServer}:8001.....

We are ready to compile the project.

The Soa Suite server does not know this LocalSoaServer token so we need to create this token in the Enterprise Manager.

Go to SOA Infrastructure -> SOA Administration -> Token Configurations.

Click on Modify Configuration File and add a new token.

Add the LocalSoaServer Token with its value.

Commit this token.

 This will update the mdm-url-resolver.xml file located in the config/fmwconfig folder of the weblogic soa domain.

 We can also upload the Token file of JDeveloper, this will add the missing tokens.

You need to reboot the Soa Server, after this you can deploy the main project and test the main project.

here is the demo workspace with all the above code.


  1. Finally !!! Sigh !!
    This is going to take away all the pain of replacing host and port. This was really needed. Thank you SOA team. :)

  2. This is really helpful.

  3. Hi Edwin,

    can you tell me, which configuration file is changed?

    1. Hi,

      you mean this mdm-url-resolver.xml file located in the config/fmwconfig folder of the weblogic soa domain.

      or do you mean the external references in the composite.xml


    2. Okay, read first, then ask. I read over it. It's the mdm-url-resolver.xml file!

      Thanks anyway

  4. Hi Edwin, Its really helpful.

    Need some clarifications . So using this we can avoid Configuration File ?. Also can we export the configuration which we have commited ?