There is a web service that I am accessing that provides a method,
SCIncidentProcessing(String inputString) which will also return a string
of XML data.
Axis2/Java generates the stubs with the method
SCIncidentProcessing(OMElement sCIncidentProcessing0). I am getting an
exception back from the web service when I invoke it from a client class.
The following is what I get when I display the output:
<?xml version="1.0" encoding="utf-8"
standalone="yes"?><SCIncidentWebService
action="unknown"><response><returnCode>1</returnCode><error><number>914</number><description>An
exception has occurred during the ErrorProcessing functionality of the
SCIncidentWebService. Please check the output logs and notify the system
administrator.</description><exception>System.NullReferenceException:
Object reference not set to an instance of an object.
at
SCIncidentWebService.SCIncidentWebService.SCIncidentProcessing(String
inputString)</exception></error></response></SCIncidentWebService>
Does this mean the web service is not handling the object passed in
correctly?
I am invoking the webservice in a client class with the following section
of code:
String xmldata = "sample data";
SCIncidentWebServiceStub stub = new SCIncidentWebServiceStub();
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace("http://namespace.com",
"namespace");
OMElement input = fac.createOMElement("query",omNs);
input.addChild(fac.createOMText(xmldata));
OMElement output = stub.SCIncidentProcessing(input);
String results = output.getFirstElement().getText();
System.out.println(results);
What do you guys think?