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?