Oracle SOA Suite - Abstract WSDL - Resolving the composite dependency issue during deployment and server restart:
Dependency order is not recorded in SOA Suite for composites. So, during server start-up, there might be multiple retries before all composites are loaded to the server if a wrong dependency order is followed by the server.
This does not necessarily mean the composites are not loaded at all, but server may end up trying to load a composite multiple times before it is finally succeeds after restart. This results in multiple errors in logs and also overall time taken for restart. E.g., as seen in the diagram below, if the server tries to load A before B and C are deployed then the composite loading fails. This can also happen during deployment time if there is a circular dependency between composites.
Solution to this problem is isolating design time and runtime dependencies. This can be done by moving WSDL dependencies to abstract WSDL’s. We can store the abstract copies of all such WSDL’s in MDS.
Consider the XML snippets below which can be found in composite.xml.
<binding.ws port="******" location="http://eaidev2:8004/soa-infra/services/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM.SubmitOrderToCOMPASSRS_ep?WSDL" soapVersion="1.1">
ui:wsdlLocation signifies design time and binding.ws stands for runtime.
So, we need to change the value in ui: wsdlLocation, so that it refers to MDS rather than the deployed component through http. The changed value should look something similar as below to point it to MDS.
oramds:/apps/EAIMetaData/Abstract/WSDL/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM_SubmitOrderToCOMPASSRS.wsdl
By following the approach, during compile time the compiler finds all the references it needs and the runtime engine does not bother about the abstract WSDL’s once it is loaded. So for both initial deployment and subsequent server restarts this approach helps in avoiding design time dependencies.
The steps to implement the solution:
2. Change the import location of dependent WSDL in Composite.xml to the abstract WSDL in MDS.
Change From:
<import namespace="http://www.reuters.com/ns/2007/09/01/GCAP/EAI/CS/OM"location="http://10.15.35.244/soa-infra/services/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM_SubmitOrderToCOMPASSRS.wsdl" importType="wsdl"/>
Change To:
<import namespace="http://www.reuters.com/ns/2007/09/01/GCAP/EAI/CS/OM" location="oramds:/apps/EAIMetaData/Abstract/WSDL/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM_SubmitOrderToCOMPASSRS.wsdl" importType="wsdl"/>3. Change the ui: wsdlLocation in composite.xml and the Component files to refer to MDS for the dependent WSDL’s rather than deployed composites through http.
Change From:
<reference name="SubmitOrderToCOMPASSRS" ui: wsdlLocation=" http://10.15.35.244/soa-infra/services/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM_SubmitOrderToCOMPASSRS.wsdl ">
Change To:
<reference name="SubmitOrderToCOMPASSRS" ui: wsdlLocation=" oramds:/apps/EAIMetaData/Abstract/WSDL/MEDIATOR/CSOM_SubmitOrderToCOMPASS/CSOM_SubmitOrderToCOMPASSRS.wsdl ">
In the same way change the reference ui: wsdlLocation for the same dependent WSDL in component file (file with the extension .componentType) also.
This will help us to resolve the dependency issue with the composites during deployment and server restart.
Hi Albin,
ReplyDeleteIf we will reference to same wsdl which contains abstract and concrete and this wsdl is stored in MDS, do you think that we may have problems?
I mean MDS should solve reference problems when loading SCA...
Thanks,A
Hi Augustin
ReplyDeleteThere will not be any issue until we are referring the WSDL(abstract/concrete) from the MDS.
Regards
Albin I
Albin
ReplyDeleteThanks for sharing this. It has been very helpful.
- Chandu
Thanks for Sharing. Nicely documented.
ReplyDeleteThanks,
Shailesh
This is really good - explains in simple terms and sometimes the best way.
ReplyDeleteThanks for explaining the concept of this Design time and Runtime WSDL ..Really helpful
ReplyDeletethanks for sharing this info... really helpful.
ReplyDeleteThanks for this information..Really helpful
ReplyDeleteVery well explained, Thank you
ReplyDelete-Ziaur
Hi, one question here , while creating the reference if i use the option to copy the referenced wsdl into my local directory it will solve any design time issues right?
ReplyDeletewhat will be the difference between this (copying while creating the reference )and referring it from oramds?
There is no difference both the approaches will work fine, but only the different is reusing the same wsdl with the other components.
ReplyDeleteAlso when ever there is a change in the parent wsdl the same change needs to be done in multiple places(if the same wsdl is refereed from multiple components)
The MDS is the best place to keep the common artifacts.
Regards
Albin I
Hi Albin,
ReplyDeleteThanks for the info.I have one doubt
if i have the following scenario A calls B--> i will keep the artifacts of B (wsdl ,xsd ) in MDS. Lets say i have to make a change in B wsdl or XSD. How do i load B wsdl or xsd updated version in to MDS?? what i mean is how do i replace with the new version in MDS in case any change? what are the steps involved here.
You have to redploy(deploy) the MDS jar as you deployed first time.
ReplyDeleteIf still u are having doubt,please let me know i can help u.
Regards
Albin I
Hi Albin,
ReplyDeleteNice blog.
You said composite will do the retry in case of dependencies but in my case i have just two composite one is called the other(a->b) and after restart composite 'a' status is still pending even after composite 'b' is deployed for long time. Do i have to do any setting to increase the retries??
I Appreciate your assistance.
Thanks
Also ...how can i create the abstract wsdl from concrete wsdl? in order to upload in MDS.
ReplyDeleteThanks
The difference between the concrete and abstract wsdl is abstract wsdl will not have the binding and service details.
DeleteYou can get the abstract wsdl from the jdeveloper project in design time else you can get the runtime concrete wsdl and upload to MDS, if you want you can remove the binding and service details from the concrete wsdl before uploading to MDS.
Regards
Albin I
Hi,
ReplyDeleteDo abstarct wsdl in MDS should have port binding and service.
Refer the following url for difference between abstract and concrete wsdl - http://sathyam-soa.blogspot.in/2012/10/abstract-wsdl-vs-concrete-wsdl.html
ReplyDeleteAbstract wsdl in MDS normally wont have binding and service section but there is no harm in having that.
Regards
Albin I
Hi:
ReplyDeleteI'm following your suggestions and I don't know how to import the WSDL's to a particular MDS location (apps).
Refer the below url for details on deploying the shared artifacts to MDS.
Deletehttps://blogs.oracle.com/reynolds/entry/share_enjoy_using_a_jdeveloper
The deployment also can be done through ANT script.
Regards
Albin I
Hi Albin,
ReplyDeleteWhat should the location attribute in the binding.ws element of the reference point to- oramds/local OR actual endpointURI ? And how does the service endpointURI get applied for runtime?
Thank you.
--
Hi Albin,
ReplyDeleteWill this resolve the error "java.lang.NoClassDefFoundError: oracle/mds/net/OraMDSURLInfoProvider" ???
I am facing this while deploying any SOA Composite project in JDeveloper.
Thanks.
Hello.! Actually i have exactly the same problem, but i have two environments, the first it's my local weblogic in my own pc and the other it's a production server, both servers had a weblogic version 10.3.6, but in my local machine that solution working but in the server not work ... any suggestion?
ReplyDelete