WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to obtain WSDL from WebSphere Liberty

    Posted Wed July 26, 2023 03:36 PM

    Hi all,

    Traditional WebSphere has a way of extracting a WSDL from a deployed application using the Publish WDSL files link. How can I get the WSDL of an EJB WS application deployed application (.ear file) in WebSphere Liberty?

    Thank you



    ------------------------------
    ------------------------------
    octavio echevarria
    ------------------------------
    ------------------------------


  • 2.  RE: How to obtain WSDL from WebSphere Liberty

    Posted Wed July 26, 2023 04:56 PM

    Hi! 

    Unfortunately, Liberty has no equivalent to the Publish WDSL files link in Traditional WebSphere. However, Liberty automatically publishes a copy of each deployed Web Service to a URL that matches the endpoint of the Web Service implementation with an appened `?wsdl` at the end of the URL. An example would be http(s)://localhost:9080/MyEARApplication/MyWebApplication/MyWebServicePort?wsdl  which is made up of `http(s)://<hostname>:<port>/<context-root>/<EJB-module-context>/<wsdl-port-name>?wsdl` (whether or not your context root needs an additional path to the EJB module depends on how you've configured the application in the server.xml).

    Long story short: if you know the URL of your Web Service, you can obtain a copy of the WSDL via HTTP(S) GET using the URL appended with '?wsdl`. 

    As an alternate, you might also be able to use the <applicationManager autoExpand="true"/> element in your server.xml to auto expand the EAR file. The EAR contents would then be extracted to your file system, including the WSDL files. All you'd have to do is copy the file from that extracted location to another location. 



    ------------------------------
    THOMAS JOHNSON
    ------------------------------



  • 3.  RE: How to obtain WSDL from WebSphere Liberty

    Posted Thu July 27, 2023 10:22 AM

    Thank you Thomas. Your suggestion works well!



    ------------------------------
    Octavio Echevarria
    ------------------------------