}
if (wsdlService != null) {
String port = configuration.getPortName();
WSDLEndpoint wsdlEndpoint = null;
if (port == null) {
for (Iterator iterator = wsdlService.getEndpoints().values()
.iterator(); iterator.hasNext();) {
wsdlEndpoint = (WSDLEndpoint) iterator.next();
port = wsdlEndpoint.getName().getLocalPart();
configuration.setPortName(port);
break;
}
} else {
wsdlEndpoint = wsdlService.getEndpoint(new QName(port));
}
if (wsdlEndpoint == null) {
System.err.println("no wsdl:port found for the service");
return;
}
WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
wsdlInterface = wsdlBinding.getBoundInterface();
for (Iterator iterator = wsdlInterface.getOperations().values()
.iterator(); iterator.hasNext();) {
WSDLOperation wsdlOperation = (WSDLOperation) iterator.next();
Policy policy = util.getPolicyForOperation(wsdlEndpoint.getName(),
wsdlOperation.getName());
if (policy != null) {
processPolicies(document, rootElement, policy,
wsdlEndpoint, wsdlOperation);