Monday, September 26, 2011

Consuming External Web Services in UCM11g

In our project, we were trying to consume external web services from a component in UCM 11g but were unsuccessful for a long time.

The component in 10g to consume web services was working very well but when upgraded to 11g, this component was not working.

In 10g, we bundled the stub classes as a jar and deployed it as part of custom component ($Component/lib). When this component was deployed in 11g, we were getting the below error.

Illegal Argument Exception..............
Interface not visible from class loader.


It was clear from the error that the stub classes are not loaded to the correct class loader.

Finally we achieved it by placing the stub jar in the $DOMAIN_DIR/lib folder where $DOMAIN_DIR is the UCM Domain. Then removed the jar from the component and its class path and restarted and then it started working.

If there is a better solution to the problem, please leave your suggestions as comments.