IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Importing REST services using API

    Posted 02/25/16 03:08 PM

    Hi!
    I want to import a service/REST service to CS using API. With service and attached wsdl it works flawlessly, but fails when importing REST service. Checked on CS 9.6, 9.7 and 9.9.

    Fails on code:

    WebServiceRegistrator wsr = new WebServiceRegistrator(wsdl.getAbsolutePath(), hlp.getJAXR(), importParameters, null, null);

    where “wsdl” is the part to actual wsdl file.

    Error when importing REST service:
    WSDLException (at /wsdl:description): faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/}definitions’.
    javax.wsdl.WSDLException: WSDLException (at /wsdl:description): faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/}definitions’.
    at com.ibm.wsdl.xml.WSDLReaderImpl.checkElementName(WSDLReaderImpl.java:2167)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:248)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2352)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2316)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2369)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422)
    at com.centrasite.jaxr.webservice.WebServiceAbstractAnalyzer.getWSDLDefinition(WebServiceAbstractAnalyzer.java:553)
    at com.centrasite.jaxr.webservice.WebServiceAnalyzer.(WebServiceAnalyzer.java:59)
    at com.centrasite.jaxr.webservice.WebServiceRegistrator.(WebServiceRegistrator.java:524)

    I guess WebServiceRegistrator class is not supporting REST? Should I use different class? I tried to find suitable one but no luck.
    Any ideas?


    #CentraSite
    #webMethods
    #API-Management


  • 2.  RE: Importing REST services using API

    Posted 07/23/18 10:46 AM

    Hi Radek,

    Usually, REST services are not specified via WSDL, but SWAGGER or RAML.

    Also, AFAIK, REST support until 9.8 is not so great.

    Best regards,
    Vlad Turian


    #API-Management
    #CentraSite
    #webMethods


  • 3.  RE: Importing REST services using API

    Posted 07/23/18 12:38 PM

    Could anyone please post sample code snippet of importing REST services in CS in bulk. CS version 9.8+
    If this sample exist in any documentation pointer is appreciated as well


    #CentraSite
    #API-Management
    #webMethods