Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2069

provide services list that's easily parseable

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1
    • 2.0.11, 2.1.5
    • Transports
    • None
    • all

    • Novice

    Description

      The motivation for this feature is to help support tools to generate all client stubs for a given instance, i.e. a given instance may have 10 or more service end points and therefore 10 different wsdl's. When generating client stubs right now there's no easy way to generate all client stubs or to even know what all available stubs are. You can see the "Available services" list provided at the CXFServlet mapping point but that's currently provided in HTML which is not as nice to parse and I would presume is meant to be human readable and therefore I'm assuming the display may change when ever some one desires a different display format.

      The idea here is to provide a terse programmatic listing, i.e. a raw unformatted list.

      Attached is a patch file which outlines a simple change to the ServletController.java which has a query string options of "?formatted=false" which then displays the same list of services on new lines.

      With the change, I was then able to use a simple command like wget to retrieve the listing, then generate all client stubs for the given system (without having to hard code the service end points into the script). i.e.

      #!/bin/sh
      SERVICES_LIST_FILE=target/services_list.txt
      wget -O ${SERVICES_LIST_FILE} http://127.0.0.1:8095/hnr/ws?formatted=false

      for foo in `cat ${SERVICES_LIST_FILE}`
      do
      java -classpath ${CLASSPATH} org.apache.cxf.tools.wsdlto.WSDLToJava -verbose -client -p org.oscarehr.hnr.ws.client -d target/client_stubs ${foo}?wsdl
      done

      Attachments

        1. patch.txt
          5 kB
          Ted Leung

        Activity

          People

            dkulp Daniel Kulp
            tedman@sfu.ca Ted Leung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: