@Test public void nonExistingPort() throws Exception { try { WSDLService.fromWSDL("HelloWebService.wsdl", "hello"); } catch (WSDLReaderException e) { boolean exceptionMatches = e.getMessage().contains("SWITCHYARD012800"); Assert.assertTrue(exceptionMatches); } }
public static WSDLService fromWSDL(final String wsdlLocationURI) throws WSDLReaderException { int index = wsdlLocationURI.indexOf("#"); if (index > 0) { String wsdlLocation = wsdlLocationURI.substring(0, index); String localPart = wsdlLocationURI.substring(index + 1); String portName = null; if (localPart.contains(PORTTYPE)) { portName = localPart.substring(PORTTYPE.length() + 1, localPart.length() - 1); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterfacePart(wsdlLocationURI); } return fromWSDL(wsdlLocation, portName); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterface(wsdlLocationURI); } }
WSDLService extends BaseService { public static WSDLService fromWSDL(final String wsdlLocationURI) throws WSDLReaderException { int index = wsdlLocationURI.indexOf("#"); if (index > 0) { String wsdlLocation = wsdlLocationURI.substring(0, index); String localPart = wsdlLocationURI.substring(index + 1); String portName = null; if (localPart.contains(PORTTYPE)) { portName = localPart.substring(PORTTYPE.length() + 1, localPart.length() - 1); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterfacePart(wsdlLocationURI); } return fromWSDL(wsdlLocation, portName); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterface(wsdlLocationURI); } } }
WSDLService extends BaseService { public static WSDLService fromWSDL(final String wsdlLocationURI) throws WSDLReaderException { int index = wsdlLocationURI.indexOf("#"); if (index > 0) { String wsdlLocation = wsdlLocationURI.substring(0, index); String localPart = wsdlLocationURI.substring(index + 1); String portName = null; if (localPart.contains(PORTTYPE)) { portName = localPart.substring(PORTTYPE.length() + 1, localPart.length() - 1); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterfacePart(wsdlLocationURI); } return fromWSDL(wsdlLocation, portName); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterface(wsdlLocationURI); } } private  WSDLService(QName portType, final Set<ServiceOperation> operations, final String wsdlLocation); }
WSDLService extends BaseService { public static WSDLService fromWSDL(final String wsdlLocationURI) throws WSDLReaderException { int index = wsdlLocationURI.indexOf("#"); if (index > 0) { String wsdlLocation = wsdlLocationURI.substring(0, index); String localPart = wsdlLocationURI.substring(index + 1); String portName = null; if (localPart.contains(PORTTYPE)) { portName = localPart.substring(PORTTYPE.length() + 1, localPart.length() - 1); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterfacePart(wsdlLocationURI); } return fromWSDL(wsdlLocation, portName); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterface(wsdlLocationURI); } } private  WSDLService(QName portType, final Set<ServiceOperation> operations, final String wsdlLocation); static WSDLService fromWSDL(final String wsdlLocationURI); static WSDLService fromWSDL(final String wsdlLocation, final String portName); String getWSDLLocation(); QName getPortType(); }
WSDLService extends BaseService { public static WSDLService fromWSDL(final String wsdlLocationURI) throws WSDLReaderException { int index = wsdlLocationURI.indexOf("#"); if (index > 0) { String wsdlLocation = wsdlLocationURI.substring(0, index); String localPart = wsdlLocationURI.substring(index + 1); String portName = null; if (localPart.contains(PORTTYPE)) { portName = localPart.substring(PORTTYPE.length() + 1, localPart.length() - 1); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterfacePart(wsdlLocationURI); } return fromWSDL(wsdlLocation, portName); } else { throw WSDLExtensionsMessages.MESSAGES.invalidWSDLInterface(wsdlLocationURI); } } private  WSDLService(QName portType, final Set<ServiceOperation> operations, final String wsdlLocation); static WSDLService fromWSDL(final String wsdlLocationURI); static WSDLService fromWSDL(final String wsdlLocation, final String portName); String getWSDLLocation(); QName getPortType(); static final String TYPE; }