Error while executing locally deployed web-service

Hi,
I am trying to execute a web-service deployed on my local machine on Axis using Mediator. However, I get this exception:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
soapenv:Body
soapenv:Fault
soapenv:Server.userException
java.lang.NullPointerException

<ns1:hostname xmlns:ns1=“http://xml.apache.org/axis/”>pcinprch</ns1:hostname>

</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Can anyone shed some light as to why I get this exception? I am also attaching the WSDL file for your reference.

Is the WSDL generated properly??
CalcRPCWebService.wsdl (1.38 KB)

Hi Prashanto,

I have several questions:

  1. Since you are using a pre-release version of Mediator, which one?
  2. What sort of client program are you using?
  3. Have you been able to invoke the WS using the Execute panel in the Studio’s WSDL editor?
  4. Can you determine, from the Mediator’s ComponentFactory log, if the sequence associated with the web service was invoked?

Hi Mike,
Thanks for your quick response. Actually I am a PS guy trying to help the QE guys here in deploying a sequence as a web-service. I am using Calculator Java program as the service. I was successful in deploying this as a document style web-service and I got a successful response. However, when trying to deploy this as a RPC service I get the error as mentioned earlier. As per your questions;

  1. I am using the not yet released 7.4.2 (one of the nightly builds)
  2. I am using the new-webservice feature as my client (It gets deployed properly but fails execution)
  3. Studio’s WSDL editor’s execute fails when trying to invoke this web-service
  4. The sequence never gets invoked (neither there are any logging messages in message-log nor any error messages in xbd-log)

My payload is:

<?xml version="1.0" encoding="UTF-8"?>
<ns:add xmlns:ns=“404”>
10
10

</ns:add>

My sequence is:

<?xml version="1.0" encoding="UTF-8"?>

















My Java program is:

[i]package samples;

public class Calculator
{
public String add(String s, String s1)
{
return String.valueOf(Integer.parseInt(s) + Integer.parseInt(s1));
}

public String subtract(String s, String s1)
{
    return String.valueOf(Integer.parseInt(s) - Integer.parseInt(s1));
}

}[/i]

Are the stubs and skeletons for the service generated properly? Or maybe I have made some mistake.

Appreciate your help and guidance,
Prashanto Chatterjee

PS: I tried sending a SOAP request via a telnet session and even that failed. I got the same afforesaid error.

Hi Mike,
I could locate my problem. Actually I tried to model my payload on lines of an RPC SOAP request and therein lied the problem. I changed my payload to:

<?xml version="1.0" encoding="UTF-8"?>

10
10


This gave me the expected result.

Deep thanks for your involvement,
Prashanto