/** * Obtains an operand and reports an error if it's not there. */ public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException { //if (i == args.length || args[i].startsWith("-")) { if (args[i].startsWith("-")) { throw new BadCommandLineException(WscompileMessages.WSCOMPILE_MISSING_OPTION_ARGUMENT(optionName)); } return args[i]; }
public void validate() throws BadCommandLineException { if (wsdls.isEmpty()) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_MISSING_FILE()); } if(wsdlLocation !=null && clientjar != null) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_WSDLLOCATION_CLIENTJAR()); } if(wsdlLocation == null){ wsdlLocation = wsdls.get(0).getSystemId(); } }
/** * Obtains an operand and reports an error if it's not there. */ public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException { //if (i == args.length || args[i].startsWith("-")) { if (args[i].startsWith("-")) { throw new BadCommandLineException(WscompileMessages.WSCOMPILE_MISSING_OPTION_ARGUMENT(optionName)); } return args[i]; }
public void validate() throws BadCommandLineException { if (wsdls.isEmpty()) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_MISSING_FILE()); } if(wsdlLocation !=null && clientjar != null) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_WSDLLOCATION_CLIENTJAR()); } if(wsdlLocation == null){ wsdlLocation = wsdls.get(0).getSystemId(); } }
private void validateArguments() throws BadCommandLineException { if (!genWsdl) { if (serviceName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(SERVICENAME_OPTION)); } if (portName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(PORTNAME_OPTION)); } } }
/** * Obtains an operand and reports an error if it's not there. */ public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException { //if (i == args.length || args[i].startsWith("-")) { if (args[i].startsWith("-")) { throw new BadCommandLineException(WscompileMessages.WSCOMPILE_MISSING_OPTION_ARGUMENT(optionName)); } return args[i]; }
public void validate() throws BadCommandLineException { if (wsdls.isEmpty()) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_MISSING_FILE()); } if(wsdlLocation !=null && clientjar != null) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_WSDLLOCATION_CLIENTJAR()); } if(wsdlLocation == null){ wsdlLocation = wsdls.get(0).getSystemId(); } }
private void validateArguments() throws BadCommandLineException { if (!genWsdl) { if (serviceName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(SERVICENAME_OPTION)); } if (portName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(PORTNAME_OPTION)); } } }
public void validate() throws BadCommandLineException { if (wsdls.isEmpty()) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_MISSING_FILE()); } if(wsdlLocation !=null && clientjar != null) { throw new BadCommandLineException(WscompileMessages.WSIMPORT_WSDLLOCATION_CLIENTJAR()); } if(wsdlLocation == null){ wsdlLocation = wsdls.get(0).getSystemId(); } }
private void validateArguments() throws BadCommandLineException { if (!genWsdl) { if (serviceName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(SERVICENAME_OPTION)); } if (portName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(PORTNAME_OPTION)); } } }
private void validateArguments() throws BadCommandLineException { if (!genWsdl) { if (serviceName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(SERVICENAME_OPTION)); } if (portName != null) { throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(PORTNAME_OPTION)); } } }
/** * Obtains an operand and reports an error if it's not there. */ public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException { //if (i == args.length || args[i].startsWith("-")) { if (args[i].startsWith("-")) { throw new BadCommandLineException(WscompileMessages.WSCOMPILE_MISSING_OPTION_ARGUMENT(optionName)); } return args[i]; }
/** * Parses arguments and fill fields of this object. * * @exception BadCommandLineException * thrown when there's a problem in the command-line arguments */ public void parseArguments( String[] args ) throws BadCommandLineException { for (int i = 0; i < args.length; i++) { if(args[i].length()==0) throw new BadCommandLineException(); if (args[i].charAt(0) == '-') { int j = parseArguments(args,i); if(j==0) throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i])); i += (j-1); } else { addFile(args[i]); } } if(destDir == null) destDir = new File("."); if(sourceDir == null) sourceDir = destDir; }
public void validate() throws BadCommandLineException { if(nonclassDestDir == null) nonclassDestDir = destDir; if (!protocols.contains(protocol)) { throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_PROTOCOL(protocol, protocols)); } if (endpoints.isEmpty()) { throw new BadCommandLineException(WscompileMessages.WSGEN_MISSING_FILE()); } if (protocol == null || protocol.equalsIgnoreCase(X_SOAP12) && !isExtensionMode()) { throw new BadCommandLineException(WscompileMessages.WSGEN_SOAP_12_WITHOUT_EXTENSION()); } if (nonstdProtocols.containsKey(protocol) && !isExtensionMode()) { throw new BadCommandLineException(WscompileMessages.WSGEN_PROTOCOL_WITHOUT_EXTENSION(protocol)); } if (inlineSchemas && !genWsdl) { throw new BadCommandLineException(WscompileMessages.WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL()); } validateEndpointClass(); validateArguments(); } /**
public void validate() throws BadCommandLineException { if(nonclassDestDir == null) nonclassDestDir = destDir; if (!protocols.contains(protocol)) { throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_PROTOCOL(protocol, protocols)); } if (endpoints.isEmpty()) { throw new BadCommandLineException(WscompileMessages.WSGEN_MISSING_FILE()); } if (protocol == null || protocol.equalsIgnoreCase(X_SOAP12) && !isExtensionMode()) { throw new BadCommandLineException(WscompileMessages.WSGEN_SOAP_12_WITHOUT_EXTENSION()); } if (nonstdProtocols.containsKey(protocol) && !isExtensionMode()) { throw new BadCommandLineException(WscompileMessages.WSGEN_PROTOCOL_WITHOUT_EXTENSION(protocol)); } if (inlineSchemas && !genWsdl) { throw new BadCommandLineException(WscompileMessages.WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL()); } validateEndpointClass(); validateArguments(); } /**
public void validate() throws BadCommandLineException { if(nonclassDestDir == null) nonclassDestDir = destDir; if (!protocols.contains(protocol)) { throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_PROTOCOL(protocol, protocols)); } if (endpoints.isEmpty()) { throw new BadCommandLineException(WscompileMessages.WSGEN_MISSING_FILE()); } if (protocol == null || protocol.equalsIgnoreCase(X_SOAP12) && !isExtensionMode()) { throw new BadCommandLineException(WscompileMessages.WSGEN_SOAP_12_WITHOUT_EXTENSION()); } if (nonstdProtocols.containsKey(protocol) && !isExtensionMode()) { throw new BadCommandLineException(WscompileMessages.WSGEN_PROTOCOL_WITHOUT_EXTENSION(protocol)); } if (inlineSchemas && !genWsdl) { throw new BadCommandLineException(WscompileMessages.WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL()); } validateEndpointClass(); validateArguments(); } /**
private void validateBinding() throws BadCommandLineException { if (genWsdl) { BindingID binding = BindingID.parse(endpoint); if ((binding.equals(BindingID.SOAP12_HTTP) || binding.equals(BindingID.SOAP12_HTTP_MTOM)) && !(protocol.equals(X_SOAP12) && isExtensionMode())) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(binding.toString(), endpoint.getName())); } if (binding.equals(BindingID.XML_HTTP)) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(binding.toString(), endpoint.getName())); } } }
private void validateBinding() throws BadCommandLineException { if (genWsdl) { BindingID binding = BindingID.parse(endpoint); if ((binding.equals(BindingID.SOAP12_HTTP) || binding.equals(BindingID.SOAP12_HTTP_MTOM)) && !(protocol.equals(X_SOAP12) && isExtensionMode())) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(binding.toString(), endpoint.getName())); } if (binding.equals(BindingID.XML_HTTP)) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(binding.toString(), endpoint.getName())); } } }
private void validateBinding() throws BadCommandLineException { if (genWsdl) { BindingID binding = BindingID.parse(endpoint); if ((binding.equals(BindingID.SOAP12_HTTP) || binding.equals(BindingID.SOAP12_HTTP_MTOM)) && !(protocol.equals(X_SOAP12) && isExtensionMode())) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(binding.toString(), endpoint.getName())); } if (binding.equals(BindingID.XML_HTTP)) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(binding.toString(), endpoint.getName())); } } }
private void validateBinding() throws BadCommandLineException { if (genWsdl) { BindingID binding = BindingID.parse(endpoint); if ((binding.equals(BindingID.SOAP12_HTTP) || binding.equals(BindingID.SOAP12_HTTP_MTOM)) && !(protocol.equals(X_SOAP12) && isExtensionMode())) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(binding.toString(), endpoint.getName())); } if (binding.equals(BindingID.XML_HTTP)) { throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(binding.toString(), endpoint.getName())); } } }