Sabbir Manandhar

Greenhorn
+ Follow
since Jul 22, 2011
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sabbir Manandhar

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?
11 years ago