4 Replies Latest reply on Apr 26, 2020 10:27 PM by 1052233

    Update BPEL composite reference WSDL endpoints programatically

    1052233

      I have a bunch of composites and their corresponding references that need to have end-points updated in bulk.

      I am looking for options apart from config plan that is 1 file per composite.

      1. Through program by getting composites ?

      2. Calling JMX Mbeans and updating ?

      3. Bulk find and replace ?

        • 1. Re: Update BPEL composite reference WSDL endpoints programatically
          Martien van den Akker

          Hi,

           

          Oh, first of all: why do you want to do that? Is this because you need to deploy your services from to other lifecycle environments? (From dev to test, preprod, and prod)?

          If so, you should do so using config plans. You can generate the config plan for a composite by rightclicking on the composite from JDeveloper and choose generate config plan.

          Now, that generated plan needs to be updated for every target environment. So, per target environment you need a config plan per composite. At my current customer, they combined all the config plans in to one. So, per target environment we have a config plan for all the composite. Actually, we have a template that is used by ANT to generate the actual config plan for the target environment.

           

          A few years ago I developed an ANT based Release Deploy framework that does the same, but based on default generated config plans per composite. So it expects an unchanged config plan per composite.

          You can find it here: https://github.com/makker-nl/ReleaseDeploy Unfortunately it is undocumented, because the documentation I created back then was customer specific with examples from their code. So I can't share it. And I haven't got the chance to do a setup with demo/training code.

           

          It also supports OSB and Maven based ADF deployments.

           

          If this is not what you meant, but you would need to do bulk updates because of changing WSDL references and so on, then what I would do is to create an ANT script that does this for you.

          As example you could take a look at https://blog.darwin-it.nl/2018/11/using-ant-to-investigate-jca-adapters.html  What this does is to search for all the .jpr files in the projects home folder. A .jpr file denotes the actual Jdeveloper project. So that would provide you a SOA Projects folder. From there you can search for your composite.xml (not so hard) and possibly other files like .xsl, .wsdl, .bpel etc. Or in the example the .jca files.

           

          The last months I created several of this kind of ANT projects to investigate our SOA Suite code base. I found the use of JavaScript in ANT very usefull, so I wrote about it: https://blog.darwin-it.nl/2020/01/javascript-in-ant.html

          Under d:\Projects\GitHub\makker-nl\WeblogicScripts\AnalyseUtils\ I posted a few example projects that I created like this. You can use an example of this project to search for your composite.xml files, and I would create some JavaScript scriptlets to do the actual changes of the references.

           

          Kind regards,
          Martien

          • 2. Re: Update BPEL composite reference WSDL endpoints programatically
            1052233

            Thanks for the inputs Martien.

             

            The use case I am trying to address is: The environment already has the composites deployed. Now we are planning to update the end-points from http to https. This would mean changing the protocol, hostname, port number but rest all parts of the url are unchanged. I am trying to do for all composites  references endpoints/WSDLs.

            • 3. Re: Update BPEL composite reference WSDL endpoints programatically
              Martien van den Akker

              I really think the easiest way is to redeploy your composites with a new config plan.

               

              You could do it using Java, See for example: https://www.albinsblog.com/2012/07/changing-reference-endpoint-of.html

              More or less the same way you could do it using WLST. I think with some googling you could assemble a working script.

              But it seems to me quite a hassle in this case.

               

              Kind regards,
              Martien

              1 person found this helpful
              • 4. Re: Update BPEL composite reference WSDL endpoints programatically
                1052233

                Let me try this out and see if this works the way I wanted but definitely looks promising.