Topic
  • 2 replies
  • Latest Post - ‏2011-04-13T06:01:39Z by SystemAdmin
SystemAdmin
SystemAdmin
141 Posts

Pinned topic Loading WSDLs to WSRR via CLI?

‏2011-04-05T01:09:23Z |
In my attempts to deploy WSDLs via wsrrcli.sh, I've been getting errors along the lines of "could not locate dependencies" (WSDLs and XSDs). Assume I have deployed its dependencies prior. I was under the impression that dependencies that already exist on WSRR would get resolved.
I then went on to create a GenericObject to group the WSDLs/XSDs together and deploy that, but again, it does not check for existing dependencies. It creates duplicates of ones already on WSRR.
My code is as follows.

from java.io 

import FileInputStream from com.ibm.serviceregistry.cli 

import WSRRConnectionFactory from com.ibm.serviceregistry.sdo 

import WSDLDocument from com.ibm.serviceregistry.sdo 

import XSDDocument from com.ibm.serviceregistry.sdo 

import GenericObject from com.ibm.serviceregistry.sdo 

import UserDefinedRelationship from com.ibm.serviceregistry.sdo.helper 

import TypeConstants from com.ibm.serviceregistry 

import SRXMLHelper   connectionFactory = WSRRConnectionFactory(configFile, alias) mbeanConn = connectionFactory.getSessionConnection(user,password) mttStubDoc = SRXMLHelper.INSTANCE.load(FileInputStream(
"WebServiceWSDL.wsdl"),TypeConstants.TYPE_WSDLDOCUMENT); mttStubDoc.setLocation(
"WebServiceWSDL.wsdl") mttStubDoc.setName(
"WebServiceWSDL.wsdl") mttStubDoc.setVersion(
"1") mttDoc = SRXMLHelper.INSTANCE.load(FileInputStream(
"dependantWSDL.wsdl"),TypeConstants.TYPE_WSDLDOCUMENT); mttDoc.setLocation(dependantWSDL.wsdl
") mttDoc.setName(
"dependantWSDL.wsdl") mttDoc.setVersion(
"1") mttXSD = SRXMLHelper.INSTANCE.load(FileInputStream(
"dependantXSD.xsd"),TypeConstants.TYPE_XSDDOCUMENT); mttXSD.setLocation(
"dependantXSD.xsd") mttXSD.setName(
"dependantXSD.xsd") mttXSD.setVersion(
"1")   go = DataFactory.INSTANCE.create(TypeConstants.SR_URI,TypeConstants.TYPE_GENERICOBJECT) go.setName(
"GenericObject") go.setVersion(
"1")   from com.ibm.serviceregistry.sdo.helper 

import BSRSDOHelper  ## If 

this imported at start, SRXMLHelper doesn
't work!   boList = [] boList.append(mttDoc) boList.append(mttXSD) boList.append(mttStubDoc) BSRSDOHelper.INSTANCE.addRelationship(go,
"mttstub",boList) bsrURI = mbeanConn.create(go)


This is the only way I've been able to deploy via CLI. It's not ideal because it creates a Concept.

Does this sound like the expected behaviour of WSRR? Thanks in advance.
Updated on 2011-04-13T06:01:39Z at 2011-04-13T06:01:39Z by SystemAdmin
  • John_Colgrave
    John_Colgrave
    8 Posts

    Re: Loading WSDLs to WSRR via CLI?

    ‏2011-04-06T12:59:01Z  
    The only time that dependencies are automatically resolved by documents already in WSRR is when there is only one matching document and that document does not have a version number. In any other situation when you want to resolve a dependency with a document that is already in WSRR you have to create a GenericObject that relates the new document being created with the appropriate existing documents. The GenericObject can be deleted once the documents have been published.
  • SystemAdmin
    SystemAdmin
    141 Posts

    Re: Loading WSDLs to WSRR via CLI?

    ‏2011-04-13T06:01:39Z  
    Will create test, but apparent defect with API, posting new topic in relation to this