wood burning stoves 2.0*
The moose likes Web Services and the fly likes Creating Web Services With Apache Axis with more than One Argument Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Creating Web Services With Apache Axis with more than One Argument" Watch "Creating Web Services With Apache Axis with more than One Argument" New topic
Author

Creating Web Services With Apache Axis with more than One Argument

Sabbir Manandhar
Greenhorn

Joined: Jul 22, 2011
Posts: 1
i have created a web service in intellijIdea. I have a function in server as

@WebMethod
public int sum(Integer x, Integer y){
System.out.println("summing...");
return x + y;
}


when i call the function from client, the parameter x is ok, but y becomes null, hence exception is thrown at client.

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:NET

java.lang.NullPointerException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
....................



the service call is alright for the services with single argument as for:

@WebMethod
public Test setTest(String name){
Test test = new Test();
test.setName(name);

return test;
}

and
@WebMethod
public String showNumber(int num){
return new String(num + "");
}

Any suggestions where i am gone wrong?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Web Services With Apache Axis with more than One Argument
 
Similar Threads
how to write java web service client
Null Pointer Exception encountered when accessing a simple Hello webservice
InvocationTargetException
question about stateful webservice
Web service development using Axis 2