1 2 3 Previous Next 77 Replies Latest reply: Nov 9, 2010 5:05 AM by 410021 RSS

    Dealing with changing service wsdl locations  in the ESB

    446910
      Hi,

      I wonder how you can easily change the WSDL locations for the webservices in the SOAP services of your ESB project. I need this to be able to easily deploy an ESB project on the different OTAP environments.

      I have looked for a solution myself, but till now I must conclude that you need to make a new SOAP service each time the WSDL location changes. Also, you need to make a new xslt mapping file in the routing service that is proxying the SOAP service, because the mapping file also contains/needs WSDL location information. I omit the option to manually edit the source files in my favourite text editior, because this is not want you want by default.

      BPEL contains a wsdlRuntimeLocation parameter for its PartnerLink definitions, which you can use to change wsdl locations during environment change. I hope the ESB also has a comparable option to make environment changes easy...

      Regards,

      -Tom
        • 2. Re: Dealing with changing service wsdl locations  in the ESB
          519522
          Hi Dave. Your posts are really appreciated, however I have to confess that I don't see the answer to the question in that thread and I'm having the same problem - or at least I think I am!

          I have an ESB project that calls a web service. On dev, I want my ESB service to call the dev web service. When I deploy to QA, I need the WSDL of the web service to be changed to that of the QA system. And then again when we deploy to production.

          I was really hoping we woudn't have to use ANT to modify the WSDL URL in the .esbsvc files.

          Richard Davis
          • 3. Re: Dealing with changing service wsdl locations  in the ESB
            446910
            Hi Richard,

            Maybe the Oracle Registry is a better option. The Oracle registry allows you to hide concrete urls behind a business key, so that you are able to deploy on different platforms without needing to change the wsdl references..

            My experience so far with the Oracle Registry is of the beginners level, but a colleague of my advised me to use the Oracle Registry.

            regards,

            -Tom
            • 4. Re: Dealing with changing service wsdl locations  in the ESB
              Dave Berry
              Richard,

              That link points to the ESB Ant deployment zip bundle that enables the ability to deploy using Ant and changing endpoint locations using a deployment plan.

              http://www.oracle.com/technology/products/integration/esb/files/esbdeploymentautomation.zip
              • 5. Re: Dealing with changing service wsdl locations  in the ESB
                446910
                Hi Dave,

                Your Ant extension is really useful for our purpose. Thanks on that!

                I still have one question for you regarding the extraction of the deployment plan for an esb project. Is it possible to automatically extract the correct deployment plan for a specific deployment environment? Or do you extract the deployment plan once and after that you can edit the plan manually to make specific deployment plans for the different environments?

                Regards,

                Tom
                • 6. Re: Dealing with changing service wsdl locations  in the ESB
                  Dave Berry
                  The latter. Extract the plan once then copy and update different plans for each target environment.
                  • 7. Re: Dealing with changing service wsdl locations  in the ESB
                    525992
                    Provided ExtractDeploymentPlan Ant task is definitely very useful. To avoid people (admin/configuration management) making changes to extracted DP in XML format, we developed another custom task to modify the DP XML automatically by reading the property values from simple target environment properties file. This way all you need to do is maintain properties file for each target environment and use the respective one during deployment.

                    The basic thinking for this extension is Admin people find making changes to properties file easier than actually understanding the DP schema.

                    Mentioned properties file has the following simple format:

                    <serviceDeploymentPlanQName>.<property name>=<property value>

                    For example:
                    DefaultSystem.someGroup.esbServiceX.wsdlURL=${wsm.gwy.url}/gateway/services/SID300011?WSDL

                    You only need to specify the values you want to override in this file.

                    So our high level deployment involves following Ant task automation:

                    1. CVS checkout of ESB project
                    2. Extract Deployment Plan
                    3. Inject deployment properties
                    4. Register the project

                    When I find sometime I will try to post this on my Blog and provide more details.

                    HTH

                    Rajesh
                    • 8. Re: Dealing with changing service wsdl locations  in the ESB
                      446910
                      Hi Rajesh,

                      Your proposed extension sounds interesting. Is it still under development or is it already open for use? If the latter holds, is it possible for me to get your extension?

                      Regards,

                      -Tom
                      • 9. Re: Dealing with changing service wsdl locations  in the ESB
                        519522
                        Thanks, this is very helpful. The point I was missing was to use the ExtractESBDeploymentPlan. I was simply using the tool to register the services via Ant. Now that I understand that, I'm trying and getting the following error. (the project registers successfully from JDev and from the custom task)

                        C:\antBuild>ant -f esbBuild.xml test.ExtractESBDeploymentPlan
                        Buildfile: esbBuild.xml

                        test.ExtractESBDeploymentPlan:
                        [echo]
                        [echo] Extracting Deployment Profile
                        [echo] From: C:\Oracle\JDeveloper\jdev\mywork\CaseCentral\CaseCentralProviderInterface
                        [echo] To: C:\Oracle\JDeveloper\jdev\mywork\CaseCentral\CaseCentralProviderInterface\DevDeploymentPlan.xml
                        [echo]
                        [extractESBDeploymentPlan] java.lang.NullPointerException
                        [extractESBDeploymentPlan] at oracle.tip.esb.jdev.artifacts.model.ESBServiceArtifactContent.getServiceWsdlURL(ESBServiceArtifactContent.java:73)
                        [extractESBDeploymentPlan] at oracle.tip.esb.jdev.artifacts.model.ESBAdapterServiceArtifactContent.computeAdapterServiceWsdlFilename(ESBAdapterServiceArtif
                        actContent.java:107)
                        [extractESBDeploymentPlan] at oracle.tip.esb.jdev.artifacts.model.ESBAdapterServiceArtifactContent.doesFileRepresentAdapterServiceWSDLDocument(ESBAdapterSe
                        rviceArtifactContent.java:120)
                        [extractESBDeploymentPlan] at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.hydrateServiceDeploymentPlans(ExtractESBDeploymentPlanTask.java:3
                        25)
                        [extractESBDeploymentPlan] at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.constructDeploymentPlan(ExtractESBDeploymentPlanTask.java:477)
                        [extractESBDeploymentPlan] at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.execute(ExtractESBDeploymentPlanTask.java:543)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Task.perform(Task.java:364)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Target.execute(Target.java:341)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Target.performTasks(Target.java:369)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Main.runBuild(Main.java:668)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.Main.startAnt(Main.java:187)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
                        [extractESBDeploymentPlan] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

                        BUILD FAILED
                        • 10. Re: Dealing with changing service wsdl locations  in the ESB
                          446910
                          Hi,

                          I am getting a null-pointer exception when I run the task extractESBDeploymentPlan:

                          BUILD FAILED
                          E:\workdir\soa-blueprint\trunk\soa-tickets\ticket-esb\build.xml:67: java.lang.NullPointerException
                               at org.apache.tools.ant.Task.perform(Task.java:373)
                               at org.apache.tools.ant.Target.execute(Target.java:341)
                               at org.apache.tools.ant.Target.performTasks(Target.java:369)
                               at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
                               at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                               at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                               at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                               at oracle.jdevimpl.ant.runner.AntLauncher.launch(AntLauncher.java:321)
                               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:585)
                               at oracle.jdevimpl.ant.runner.InProcessAntStarter.runAnt(InProcessAntStarter.java:295)
                               at oracle.jdevimpl.ant.runner.InProcessAntStarter.mav$runAnt(InProcessAntStarter.java:43)
                               at oracle.jdevimpl.ant.runner.InProcessAntStarter$1.run(InProcessAntStarter.java:71)
                          Caused by: java.lang.NullPointerException
                               at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.hasValidDeploymentPlanFilename(ExtractESBDeploymentPlanTask.java:101)
                               at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.performSemanticValidation(ExtractESBDeploymentPlanTask.java:137)
                               at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.execute(ExtractESBDeploymentPlanTask.java:524)
                               at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
                               at org.apache.tools.ant.Task.perform(Task.java:364)
                               ... 14 more
                          --- Nested Exception ---
                          java.lang.NullPointerException
                               at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.hasValidDeploymentPlanFilename(ExtractESBDeploymentPlanTask.java:101)
                               at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.performSemanticValidation(ExtractESBDeploymentPlanTask.java:137)
                               at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.execute(ExtractESBDeploymentPlanTask.java:524)
                               at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
                               at org.apache.tools.ant.Task.perform(Task.java:364)
                               at org.apache.tools.ant.Target.execute(Target.java:341)
                               at org.apache.tools.ant.Target.performTasks(Target.java:369)
                               at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
                               at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                               at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                               at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                               at oracle.jdevimpl.ant.runner.AntLauncher.launch(AntLauncher.java:321)
                               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:585)
                               at oracle.jdevimpl.ant.runner.InProcessAntStarter.runAnt(InProcessAntStarter.java:295)
                               at oracle.jdevimpl.ant.runner.InProcessAntStarter.mav$runAnt(InProcessAntStarter.java:43)
                               at oracle.jdevimpl.ant.runner.InProcessAntStarter$1.run(InProcessAntStarter.java:71)

                          Total time: 0 seconds

                          I have made sure that all the needed libraries are found. I assume that the deployment file doen't need to exist yet.

                          Looking at the error-trace, i can see that the ant raises an error during the the validation of the deploymentplanfilename

                          I think i'm missing some essential initialization step..Do you know which?

                          Regards,

                          -Tom
                          • 11. Re: Dealing with changing service wsdl locations  in the ESB
                            446910
                            bump/

                            Does anyone has a suggestions how to solve my issue?
                            • 12. Re: Dealing with changing service wsdl locations  in the ESB
                              130180
                              Hi Tom

                              I had until now not run the extractESBDeploymentPlan option. Having done so, I initially got the NullPointerException due to an invalid file path in my build.xml. That fixed I now get the following error:

                              M:\utils\ESBAntDeploy>ant local.ExtractESBDeploymentPlan
                              Buildfile: build.xml

                              local.ExtractESBDeploymentPlan:
                              [extractESBDeploymentPlan] javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package oracle.tip.esb.cli
                              ent.metadata.deploymentplan.model
                              [extractESBDeploymentPlan] at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:205)
                              [extractESBDeploymentPlan] at javax.xml.bind.ContextFinder.find(ContextFinder.java:149)
                              [extractESBDeploymentPlan] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
                              [extractESBDeploymentPlan] at oracle.tip.esb.client.metadata.deploymentplan.utils.DeploymentPlanUtils.getJAXBContex
                              t(DeploymentPlanUtils.java:37)
                              [extractESBDeploymentPlan] at oracle.tip.esb.client.metadata.deploymentplan.utils.DeploymentPlanUtils.getMarshaller
                              (DeploymentPlanUtils.java:65)
                              [extractESBDeploymentPlan] at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.saveDeploymentPlan(Extrac
                              tESBDeploymentPlanTask.java:509)
                              [extractESBDeploymentPlan] at oracle.tip.esb.client.anttasks.ExtractESBDeploymentPlanTask.execute(ExtractESBDeploym
                              entPlanTask.java:544)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Task.perform(Task.java:364)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Target.execute(Target.java:341)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Target.performTasks(Target.java:369)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Main.runBuild(Main.java:668)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.Main.startAnt(Main.java:187)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
                              [extractESBDeploymentPlan] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

                              BUILD FAILED
                              M:\utils\ESBAntDeploy\build.xml:76: javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package oracle.ti
                              p.esb.client.metadata.deploymentplan.model

                              Total time: 0 seconds


                              I have no idea what that error is about!!

                              Sorry, Chris
                              • 13. Re: Dealing with changing service wsdl locations  in the ESB
                                446910
                                Hi Chris,

                                I think you'd missing some jaxb.properties file (duh ;)). I can imagine that this should be included in the extension somewhere. Maybe it is not loaded on your classpath for some reason.

                                Thanks for your suggesting about incorrect paths. However, I have checked the paths also and guaranteed that all libs are found...Can you tell me which path was invalid in your case?

                                Can you also put the fragment of your build.xml here that covers the extractESBDeploymentPlan, so I can look at your working example.

                                Thanks for your help so far!

                                -Tom
                                • 14. Re: Dealing with changing service wsdl locations  in the ESB
                                  130180
                                  Thanks Tom, hadn't thought of that ;-)

                                  I cannot find a jaxb.properties file in any jaxb or extension archives, so not sure where it's supposed to be! I'll keep looking!

                                  Here's the part of the build.xml:

                                  <property name="esbProject1" value="M:/code/jdev/ESBLLPGInbound"/>
                                  <property name="localDeploymentPlanFilename" value="./localDeploymentPlan.xml"/>

                                  <target name="local.ExtractESBDeploymentPlan">
                                  <extractESBDeploymentPlan sourceDir="${esbProject1}" deploymentPlanFile="${localDeploymentPlanFilename}"/>
                                  </target>

                                  I had the NullPointer when it couldn't find the directory to put the output xml file in.

                                  Cheers

                                  Chris
                                  1 2 3 Previous Next