DataPower

 View Only
  • 1.  Use "add WSDL wizard" with script?

    Posted Mon April 25, 2022 09:52 AM
    Hello

    I have a working web service proxy and need to add a WSDL file. With the "add WSDL Wizard" it works perfectly, it parses the WSDL file and automatically creates the necessary configurations for "WS-Proxy Endpoint Rewrite", like "Local and Remote Rewrite Rules", etc.

    My question: can I run the "add WSDL Wizard" in an automated way, e.g. via WSG REST API or similar? Or are there other ways to automatically add WSDL files to an existing WSP, analogous to the "add WSDL Wizard"?

    Many thanks and greetings
    Andreas

    ------------------------------
    Andreas Brand
    ------------------------------


  • 2.  RE: Use "add WSDL wizard" with script?

    Posted Mon April 25, 2022 10:01 AM
    Hi, you can use (and automate via script) the datapower cli commands as follows:
    config;
    
    wsgw <your gateway name>;
    
    wsdl <wsdlLocation> <localName> [policyAttachment];​


    ------------------------------
    Tom Hoang
    ------------------------------



  • 3.  RE: Use "add WSDL wizard" with script?

    Posted Tue April 26, 2022 05:47 AM
    Hello Tom

    Thanks for the help :)

    I didn't know that this is also possible via cli: I tested it and it works - unfortunately it "only" adds the WSDL file to the web service proxy.

    The additional, very helpful wizards functions, such as adding the necessary "WS-Proxy Endpoint Rewrite" configurations are missing, I still have to do these myself.

    My goal was to start the "add wsdl" wizard by script. This would save me a lot of work, as the wizard does a lot automatically: i.e.: add wsdl file and create the necessary ws-proxy endpoint rewrite configurations.

    Too bad, it would have been very nice to start the wizard via script.

    Many greetings
    Andreas

    ------------------------------
    Andreas Brand
    ------------------------------



  • 4.  RE: Use "add WSDL wizard" with script?

    IBM Champion
    Posted Wed April 27, 2022 07:45 AM
    Hi,

    you can try to define WSDL cache policy that forces refresh for the files and re-configures the WSP. It should automatically recreate endpoint rewrite rules etc.

    https://www.ibm.com/docs/en/datapower-gateway/10.0.1?topic=commands-wsdl-cache-policy


    ------------------------------
    Hermanni Pernaa
    ------------------------------



  • 5.  RE: Use "add WSDL wizard" with script?

    Posted Fri April 29, 2022 10:17 AM
    Thanks for the good idea: I have looked at this more closely. According to the help:

    ... Refresh retrieves the WSDL from the source location and refreshes the web service proxy state. Depending upon the changes in the WSDL file itself, the Proxy may reconfigure itself in any number of ways, including adding new endpoints or removing existing endpoints.

    However, the configuration for "WS-Proxy Endpoint Rewrite" with the parameters such as "Service Port Match Expression", "Local Endpoint URI" and "Local Endpoint Handler", etc. must already exist.

    But no problem, I'll do it now using a script.

    ------------------------------
    Andreas Brand
    ------------------------------



  • 6.  RE: Use "add WSDL wizard" with script?

    Posted Wed May 25, 2022 05:18 AM

    I use simple trick to see which sequence of CLI commands WebGUI does when doing something:

    Do some action in WebGUI, eg. creating a WSDL with Wizard.

    Then open "logtemp:///cli-log" and see which CLI commands were executed.



    ------------------------------
    Hermann Stamm-Wilbrandt
    Compiler Level 3 support & Fixpack team lead
    IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
    https://stamm-wilbrandt.de/en/blog/
    ------------------------------



  • 7.  RE: Use "add WSDL wizard" with script?

    Posted Wed May 25, 2022 07:48 AM
    Hello Hermann

    Thank you very much for the very valuable tip! I will be very happy to try this out. This will also help me with new integrations in Jenkins.

    Many greetings
    Andreas


    By the way, you helped me incredibly much in 2019 and 2020 when I started working with Datapower. Your information, answers to many questions and your tips and tricks saved me days and hours in troubleshooting.

    Too bad your "developerWorks blog postings" are no longer visible, they helped a lot.

    ------------------------------
    Andreas Brand
    ------------------------------