if (this.serviceName == null || serviceName.length() == 0)
throw new IllegalArgumentException("MappingFileGenerator:Service Name is null");
String targetNS = wsdlDefinitions.getTargetNamespace();
String prefix = WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_SERVICE_PREFIX;
ServiceInterfaceMapping sim = new ServiceInterfaceMapping(jwm);
String className = ToolsUtils.firstLetterUpperCase(javaServiceName);
sim.setServiceInterface(getPackageName(targetNS) + "." + className);
sim.setWsdlServiceName(new QName(targetNS, serviceName, prefix));
WSDLEndpoint[] endpoints = ser.getEndpoints();
int lenendpoints = 0;
if (endpoints != null)
lenendpoints = endpoints.length;
for (int j = 0; j < lenendpoints; j++)
{
WSDLEndpoint endpt = endpoints[j];
String portname = endpt.getName().getLocalPart();
//port mapping
PortMapping pm = new PortMapping(sim);
pm.setPortName(portname);
pm.setJavaPortName(portname);
sim.addPortMapping(pm);
}
return sim;
}