javax.wsdl.Service wsdlService = def.createService();
wsdlService.setQName(name);
for (Iterator itr = service.getBindings().iterator(); itr.hasNext();)
{
Binding binding = (Binding) itr.next();
javax.wsdl.Binding wbinding = binding.createBinding(this, portType);
Port port = binding.createPort(this, wbinding);
if (port != null)
{
wsdlService.addPort(port);
}
// Add in user defined endpoints
Collection endpoints = service.getEndpoints(binding.getName());
if (endpoints == null)
continue;
for (Iterator eitr = endpoints.iterator(); eitr.hasNext();)
{
Endpoint ep = (Endpoint) eitr.next();
port = binding.createPort(ep, this, wbinding);
if (port != null)
{
wsdlService.addPort(port);
}
}