}
private void validate() throws ToolException {
if (isBindingExisted()) {
Message msg = new Message("BINDING_ALREADY_EXIST", LOG);
throw new ToolException(msg);
}
if (!isPortTypeExisted()) {
Message msg = new Message("PORTTYPE_NOT_EXIST", LOG);
throw new ToolException(msg);
}
if (!nameSpaceCheck()) {
Message msg = new Message("SOAPBINDING_STYLE_NOT_PROVIEDED", LOG);
throw new ToolException(msg);
}
if (WSDLConstants.RPC.equalsIgnoreCase((String)env.get(ToolConstants.CFG_STYLE))) {
Iterator it = portType.getOperations().iterator();
while (it.hasNext()) {
Operation op = (Operation)it.next();
Input input = op.getInput();
if (input != null && input.getMessage() != null) {
Iterator itParts = input.getMessage().getParts().values().iterator();
while (itParts.hasNext()) {
Part part = (Part)itParts.next();
if (part.getTypeName() == null || "".equals(part.getTypeName().toString())) {
Message msg = new Message("RPC_PART_ILLEGAL", LOG, new Object[] {part.getName()});
throw new ToolException(msg);
}
}
}
Output output = op.getOutput();
if (output != null && output.getMessage() != null) {
Iterator itParts = output.getMessage().getParts().values().iterator();
while (itParts.hasNext()) {
Part part = (Part)itParts.next();
if (part.getTypeName() == null || "".equals(part.getTypeName().toString())) {
Message msg = new Message("RPC_PART_ILLEGAL", LOG, new Object[] {part.getName()});
throw new ToolException(msg);
}
}
}
}
}