if (binding == null) {
throw new IOException(Messages.getMessage("emitFailNoBinding01",
new String[] {p.getName()}));
}
BindingEntry bEntry =
symbolTable.getBindingEntry(binding.getQName());
if (bEntry == null) {
throw new IOException(Messages.getMessage("emitFailNoBindingEntry01",
new String[] {binding.getQName().toString()}));
}
PortTypeEntry ptEntry = symbolTable.getPortTypeEntry(
binding.getPortType().getQName());
if (ptEntry == null) {
throw new IOException(Messages.getMessage("emitFailNoPortType01",
new String[] {binding.getPortType().getQName().toString()}));
}
// If this isn't an SOAP binding, skip it
if (bEntry.getBindingType() != BindingEntry.TYPE_SOAP) {
continue;
}
// JSR 101 indicates that the name of the port used
// in the java code is the name of the wsdl:port. It
// does not indicate what should occur if the
// wsdl:port name is not a java identifier. The
// TCK depends on the case-sensitivity being preserved,
// and the interop tests have port names that are not
// valid java identifiers. Thus the following code.
String portName = p.getName();
if (!JavaUtils.isJavaId(portName)) {
portName = Utils.xmlNameToJavaClass(portName);
}
String stubClass = bEntry.getName() + "Stub";
String bindingType = (String) bEntry.getDynamicVar(JavaBindingWriter.INTERFACE_NAME);
// getPort(Class) must return a stub for an interface. Collect all
// the port interfaces so the getPort(Class) method can be constructed.
if (getPortIfaces.contains(bindingType)) {
printGetPortNotice = true;