[jboss-user] [JBossWS] - Re: Null pointer exception when using JBOSSWS 1.0.4 GA vesio

clebert.suconic@jboss.com do-not-reply at jboss.com
Thu May 17 00:20:01 EDT 2007


Or at least change ToolsHelper to do some sanity check.. and throw a proper message saying.. "You User didn't set Location property as expected!"

if null.. throw  a message to System.out than fail the tas/batch

  public void handleWSDLToJavaGeneration(Configuration config, String outDir)
  |    {
  |       WSDLToJavaConfig w2jc = config.getWSDLToJavaConfig(false);
  |       GlobalConfig glc = config.getGlobalConfig(false);
  | 
  |       WSDLToJava wsdlToJava = new WSDLToJava();
  |       wsdlToJava.setTypeMapping(new LiteralTypeMapping());
  | 
  |       WSDLDefinitions wsdl = null;
  |       try
  |       {
  |          URL wsdlURL = null;
  |          try
  |          {
  |             wsdlURL = new URL(w2jc.wsdlLocation);
  |          }
  |          catch (MalformedURLException e)
  |          {
  |             // ignore
  |          }
  | 
  |          if (wsdlURL == null)
  |          {
  |             File wsdlFile = new File(w2jc.wsdlLocation); <<<<---- Here..
  |             if (wsdlFile.exists())
  |             {
  |                wsdlURL = wsdlFile.toURL();
  |             }
  |          }
  | 

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

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



More information about the jboss-user mailing list