UCMDB and UD Practitioners Forum (Previously CMS)
cancel

how to use ucmdb webservice API

Highlighted
xiaobinyuan
Collector

how to use ucmdb webservice API

Hi

I'm doing the integration between uCMDB9.05 and Moab (from Adpative Computing), and I need to provide the web service for them to access.

I tried to the following to generate the Java class from the WSDL of ucmdb webservice API using the axis tool, but I got the following error:

 

T:\Media\axis>java org.apache.axis.wsdl.WSDL2Java -o T:\Media\axis\HP -U sysadmin -P sysadmin http://130.47.139.134:8080/axis2/services/UcmdbService?wsdl
java.io.IOException: ERROR: Missing <soap:fault> element inFault "ucmdbFault" in operation "ucmdbFault", in binding getClassAncestors
        at org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolTable.java:2858)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2549)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:744)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Thread.java:619)

 

And then I copied the content of http://130.47.139.134:8080/axis2/services/UcmdbService?wsdl to a local file, and then try WSDL2Java agin, a error shows:

 

T:\Media\axis>java org.apache.axis.wsdl.WSDL2Java -o T:\Media\axis\HP T:\Media\UcmdbService.wsdl

WSDLException (at /wsdl:definitions/wsdl:types/xs:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'UcmdbService?xsd=xsd0', relative to 'file:/T:/Media/UcmdbService.wsdl'.: This file was not found: file:/T:/Media/UcmdbService?xsd=xsd0: java.io.FileNotFoundException: This file was not found: file:/T:/Media/UcmdbServicexsd=xsd0
        at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)

        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Thread.java:619)

        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Thread.java:619) 

 

I'm totally new to webservice.....

If I want to use Java to access the webservcie API of ucmdb, I need to generate the classes from WSDL file and then import these classes to my Java programm, right?

     Any solution?

BTW, I open http://130.47.139.134:8080/axis2/services/UcmdbService, and I got "Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml”, does this a normal situation??

Attached is the WSDL file I got from http://130.47.139.134:8080/axis2/services/UcmdbService?wsdl

 

 

 

P.S. This thread has been moved from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. - HP Forum Moderator

1 REPLY
RajChakraborty
Occasional Advisor

Re: how to use ucmdb webservice API

Hi all,

I am trying to integrate UCMDB with Netcool/Impact.
I also got the same problem.

 

Are there any option in UCMDB to download the WSDL file(s) folder??????

I am sure that downloaded file folder(if proper) will also serve the purpose.

 

@

//Add this to "OnDomLoad" event