public void testSelectPort_portType() { QName portTypeName = new QName("http://example.com/translator", "textTranslator"); SoapEndpointReference reference = getReference(); reference.setPortTypeName(portTypeName); Port port = reference.selectPort(catalog); assertEquals(portTypeName, port.getBinding().getPortType().getQName()); }
public void testSelectPort_service() { QName portTypeName = new QName("urn:samples:ATMService", "atm"); QName serviceName = new QName("urn:samples:ATMService", "atmService"); SoapEndpointReference reference = getReference(); reference.setPortTypeName(portTypeName); reference.setServiceName(serviceName); Port port = reference.selectPort(catalog); assertEquals(portTypeName, port.getBinding().getPortType().getQName()); assertTrue(hasPort(serviceName, port)); }
public void testSelectPort_portType_address() { QName portTypeName = new QName("http://example.com/translator", "textTranslator"); String address = "http://mirror.example.com/translator/text"; SoapEndpointReference reference = getReference(); reference.setPortTypeName(portTypeName); reference.setAddress(address); Port port = reference.selectPort(catalog); assertEquals(portTypeName, port.getBinding().getPortType().getQName()); assertEquals(address, SoapEndpointReference.getSoapAddress(port)); }
public void testSelectPort_service_port() { QName portTypeName = new QName("http://example.com/translator", "documentTranslator"); QName serviceName = new QName("http://example.com/translator", "translatorService"); String portName = "documentTranslatorPort"; SoapEndpointReference reference = getReference(); reference.setPortTypeName(portTypeName); reference.setServiceName(serviceName); reference.setPortName(portName); Port port = reference.selectPort(catalog); assertEquals(portTypeName, port.getBinding().getPortType().getQName()); assertTrue(hasPort(serviceName, port)); assertEquals(portName, port.getName()); }