URL wsdlURL = DescriptionTestUtils2.getWSDLURL("WSDLMultiTests.wsdl");
QName service1QN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_1);
Service service1 = Service.create(wsdlURL, service1QN);
assertNotNull(service1);
ServiceDelegate service1Delegate = DescriptionTestUtils2.getServiceDelegate(service1);
assertNotNull (service1Delegate);
ServiceDescription service1Desc = service1Delegate.getServiceDescription();
assertNotNull(service1Desc);
List<QName> service1PortsList = service1Desc.getPorts();
assertNotNull(service1PortsList);
assertEquals(3, service1PortsList.size());
AddNumbersPortType addNumbersPortS1P1 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S1P1), AddNumbersPortType.class);
service1PortsList = service1Desc.getPorts();
assertEquals(3, service1PortsList.size());
AddNumbersPortType addNumbersPortS1P3 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S1P3), AddNumbersPortType.class);
assertEquals(3, service1PortsList.size());
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1"), null, null);
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P2"), null, null);
service1PortsList = service1Desc.getPorts();
assertEquals(5, service1PortsList.size());
Iterator<QName> service1PortIterator = service1.getPorts();
assertQNameIteratorSameAsList(service1PortIterator, service1PortsList);
QName service2QN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_2);
Service service2 = Service.create(wsdlURL, service2QN);
assertNotNull(service2);
ServiceDelegate service2Delegate = DescriptionTestUtils2.getServiceDelegate(service2);
assertNotNull (service2Delegate);
ServiceDescription service2Desc = service2Delegate.getServiceDescription();
assertNotNull(service2Desc);
List<QName> service2PortsList = service2Desc.getPorts();
assertNotNull(service2PortsList);
assertEquals(4, service2PortsList.size());
AddNumbersPortType addNumbersPortS2P1 = service2.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S2P1), AddNumbersPortType.class);