Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
141 Posts
ACCEPTED ANSWER

Pinned topic Defect with WSRR API

‏2011-04-13T06:52:28Z |
Running WSRR 7.0 on RHEL 5.5.

There seems to be a problem when I import SRXMLHelper and BSRSDOHelper through wsrrcli.sh, and try to create a WSDL Document.

I am exporting this env vars:

export PATH=$PATH:/opt/ibm/jython export WAS_HOME=/opt/ibm/WebSphere/ServiceRegistry export WSRR_HOME=/opt/ibm/WebSphere/ServiceRegistry/WSRR


And as per my previous post I am doing something like this:

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.sdo.helper 

import DataFactory from com.ibm.serviceregistry 

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

import BSRSDOHelper   aDoc = SRXMLHelper.INSTANCE.load(FileInputStream(
"/home/user/thisWsdl.wsdl"),TypeConstants.TYPE_WSDLDOCUMENT);


The above does not work. It produces the below:

Traceback (most recent call last): File 
"<stdin>", line 1, in <module> at com.ibm.sr.emf.ecore.util.EcoreUtil.create(EcoreUtil.java:2971) at org.apache.tuscany.sdo.util.DataObjectUtil.create(DataObjectUtil.java:2399) at org.apache.tuscany.sdo.impl.DataGraphImpl.createRootObject(DataGraphImpl.java:602) at com.ibm.sr.sdo.helper.impl.BSRSDOHelperImpl.setObjectAsRoot(BSRSDOHelperImpl.java:533) at com.ibm.sr.api.SRXMLHelperImpl.getDocumentImpl(SRXMLHelperImpl.java:192) at com.ibm.sr.api.SRXMLHelperImpl.load(SRXMLHelperImpl.java:271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600)   java.lang.NullPointerException: java.lang.NullPointerException


This looks like a defect. Is this a known issue?