/* 146 */ if ((this.serviceName == null) || (this.serviceName.length() == 0)) {
/* 147 */ throw new IllegalArgumentException("MappingFileGenerator:Service Name is null");
/* */ }
/* 149 */ String targetNS = this.wsdlDefinitions.getTargetNamespace();
/* 150 */ String prefix = "serviceNS";
/* 151 */ ServiceInterfaceMapping sim = new ServiceInterfaceMapping(jwm);
/* 152 */ sim.setServiceInterface(this.packageName + "." + javaServiceName);
/* 153 */ sim.setWsdlServiceName(new QName(targetNS, this.serviceName, prefix));
/* */
/* 155 */ WSDLEndpoint[] endpoints = ser.getEndpoints();
/* 156 */ int lenendpoints = 0;
/* 157 */ if (endpoints != null)
/* 158 */ lenendpoints = endpoints.length;
/* 159 */ for (int j = 0; j < lenendpoints; j++)
/* */ {
/* 161 */ WSDLEndpoint endpt = endpoints[j];
/* 162 */ String portname = endpt.getName().getLocalPart();
/* */
/* 164 */ PortMapping pm = new PortMapping(sim);
/* 165 */ pm.setPortName(portname);
/* 166 */ pm.setJavaPortName(portname);
/* 167 */ sim.addPortMapping(pm);
/* */ }
/* 169 */ return sim;
/* */ }