aspose file tools*
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
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?
 
Don't get me started about those stupid light bulbs.
 
subject: Creating Web Services With Apache Axis with more than One Argument