Why does the service exchange strings rather than typed XML? If it's a
web service, it should define its interface using a
language-independent API, such as WSDL or a schema. Did the service
provider at least provide you with a description of the expected
string format? The first place I'd look is at the input message. My
guess is that it isn't formatted properly.

Anne

On Tue, May 20, 2008 at 9:41 AM,  <[EMAIL PROTECTED]> wrote:
>
> 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?
>
> ________________________________
>
> This communication is for informational purposes only. It is not intended as
> an offer or solicitation for the purchase or sale of any financial
> instrument or as an official confirmation of any transaction. All market
> prices, data and other information are not warranted as to completeness or
> accuracy and are subject to change without notice. Any comments or
> statements made herein do not necessarily reflect those of JPMorgan Chase &
> Co., its subsidiaries and affiliates. This transmission may contain
> information that is privileged, confidential, legally privileged, and/or
> exempt from disclosure under applicable law. If you are not the intended
> recipient, you are hereby notified that any disclosure, copying,
> distribution, or use of the information contained herein (including any
> reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any
> attachments are believed to be free of any virus or other defect that might
> affect any computer system into which it is received and opened, it is the
> responsibility of the recipient to ensure that it is virus free and no
> responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and
> affiliates, as applicable, for any loss or damage arising in any way from
> its use. If you received this transmission in error, please immediately
> contact the sender and destroy the material in its entirety, whether in
> electronic or hard copy format. Thank you. Please refer to
> http://www.jpmorgan.com/pages/disclosures for disclosures relating to UK
> legal entities.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to