AnsweredAssumed Answered

CustomObjectInstance Web service using Java client: Error

Question asked by abarbosa on Jun 8, 2017
Latest reply on Jun 10, 2017 by nick_darlington

Hi guys.

 

I'm using "wsimport" java tool/command to generate java code to call web services in Clarity CA. When I use the client to call, for instance, the web service API InvokeAction, everything works.

 

Now, I'm trying to read an object, a custom object, using the webservice Object (CustomObjectInstance). I generated the client using the same command 

wsimport -keep -verbose -s src -p mypackage.ws.object.customobjects ./wsdl/CustomObjectInstances.wsdl

But, for some reason I'm getting this error

 

java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:221)
at org.apache.xalan.transformer.TransformerIdentityImpl.setDocumentLocator(TransformerIdentityImpl.java:880)

 

Code: 

 

 

// Invoke process
Auth header = factory.createAuth();
header.setSessionID(sessionId);

Document xmlDoc = params.createNikuDataBusReadCustomObjectInstances();
Object data = xmlDoc.getDocumentElement();

 

NikuDataBus nikuDBInput = factory.createNikuDataBus();
nikuDBInput.setAny(data);

NikuDataBus nikuDBOutput = port.readCustomObjectInstance(nikuDBInput, header);

 

The value of data is a XML Document with the following format:

 

<CustomObjectInstanceQuery>

<Filter criteria="EQUALS" name="objectCode">process_manager</Filter>
<Filter criteria="EQUALS" name="instanceCode">a123456</Filter>

</CustomObjectInstanceQuery>

 

Anyone knows, what I'm doing wrong?

Outcomes