Monday, August 23, 2010

Dependent SCA composites fail with "503: Service Unavailable for url" after server restart

We often design composite applications that invoke other composite applications. A typical use case would be AIA artifacts where RequestorABCS calls EBS which in turn calls ProviderABCS.

If these are not configured correctly then after restarting SOA server the one having dependency does not work any more. Basically issue is with the order in which SOA server re-deploys these composites. You may see the below error message in EM console

The composite SalesOrderRequestorABCS (1.0) is not available. This could happen because either the composite has been undeployed or soa-infra has not yet loaded this composite.
[JCABinding] [SalesOrderRequestorABCS/1.0]Unable to complete load due to: Error in getting XML input stream: http://hostname:port/soa-infra/services/default/SalesOrderEBS/SalesOrderEBS_ep?WSDL: Response: '503: Service Unavailable' for url


The recommendations to avoid dependencies between composites are :

1. In the composite.xml of the calling composite have the import refer to an abstract wsdl and
not a concrete one to avoid loading issues.
2. Make sure you refer to the MDS location for common XSDs, WSDLs and deployed composites.

For example in case of RequestorABCS if you are having references to end point URL of EBS(obtained from EM console after deployment of EBS) then make sure you change that to oramds location for abstract WSDL.

FROM
<import namespace="http://xmlns.oracle.com/EnterpriseServices/Core/SalesOrder/V2" location="http://hostname:port/soa-infra/services/default/SalesOrderEBS/SalesOrderEBS_ep?WSDL" importType="wsdl"/>
<reference name="SalesOrderEBS" ui:wsdlLocation="http://hostname:port/soa-infra/services/default/SalesOrderEBS/SalesOrderEBS_ep?WSDL">
<interface.wsdl interface="http://xmlns.oracle.com/EnterpriseServices/Core/SalesOrder/V2#wsdl.interface(SalesOrderEBS)"/>
<binding.ws port="http://xmlns.oracle.com/EnterpriseServices/Core/SalesOrder/V2#wsdl.endpoint(SalesOrderEBS_ep/SalesOrderEBS_pt)" location="http://hostname:port/soa-infra/services/default/SalesOrderEBS/SalesOrderEBS_ep?WSDL"/>
</reference>

TO

<import namespace="http://xmlns.oracle.com/EnterpriseServices/Core/SalesOrder/V2" location="oramds:/apps/AIAMetaData/AIAComponents/EnterpriseBusinessServiceLibrary/Core/EBO/SalesOrder/V2/SalesOrderEBSV2.wsdl" importType="wsdl"/>
<reference name="SalesOrderEBS" ui:wsdlLocation="oramds:/apps/AIAMetaData/AIAComponents/EnterpriseBusinessServiceLibrary/Core/EBO/SalesOrder/V2/SalesOrderEBSV2.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/EnterpriseServices/Core/SalesOrder/V2#wsdl.interface(SalesOrderEBS)"/>
<binding.ws port="http://xmlns.oracle.com/EnterpriseServices/Core/SalesOrder/V2#wsdl.endpoint(SalesOrderEBS_ep/SalesOrderEBS_pt)" location="http://hostname:port/soa-infra/services/default/SalesOrderEBS/SalesOrderEBS_ep?WSDL"/>
</reference>

Similarily if you are referring to ProviderABCS from EBS composite.xml of EBS will look something as below

<reference name="SalesOrderProviderABCS" ui:wsdlLocation="oramds:/deployed-composites/SalesOrderProviderABCS_rev1.0/SalesOrderProvABCSImpl.wsdl">
..
..

No comments:

Post a Comment