[jboss-user] [JBossWS] - Re: JSR181 Web Service Client

sappenin do-not-reply at jboss.com
Tue Aug 8 08:31:36 EDT 2006


In your client, when you call the endpoint, can you confirm that the "System.getProperty("user.name")" call is returning a non-null value?


  |  String ret = port.getHello(System.getProperty("user.name"));
  | 

My guess is that "System.getProperty("user.name")" might be returning null on you.  Try the demo/test with a hand-coded string instead.

Also, in you Endpoint's code, you might want to check for a null string   passed into the function, and deal with it so that the code doesn't barf.  Perhaps something like this:


  | @WebMethod
  |     public String getHello(String name)
  |     {
  |          if(name == null || "".equals(name))
  |          {
  |              return "Invalid Name";
  |           }
  |          else
  |                 return "Hello " + name + "!";
  |           }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963782#3963782

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963782



More information about the jboss-user mailing list