@Override public Void run() { WebServiceClient wsc =sc.getAnnotation(WebServiceClient.class); if(wsc==null) { throw new WebServiceException("Service Interface Annotations required, exiting..."); } String tns = wsc.targetNamespace(); try { JAXWSUtils.getFileOrURL(wsc.wsdlLocation()); } catch (IOException e) { // TODO: report a reasonable error message throw new WebServiceException(e); } for (Method method : sc.getDeclaredMethods()) { WebEndpoint webEndpoint = method.getAnnotation(WebEndpoint.class); if (webEndpoint != null) { String endpointName = webEndpoint.name(); QName portQName = new QName(tns, endpointName); portQNames.add(portQName); } Class<?> seiClazz = method.getReturnType(); if (seiClazz!=void.class) { classes.add(seiClazz); } } return null; } });
public static String getFileOrURLName(String fileOrURL) { try{ try { return escapeSpace(new URL(fileOrURL).toExternalForm()); } catch (MalformedURLException e) { return new File(fileOrURL).getCanonicalFile().toURL().toExternalForm(); } } catch (Exception e) { // try it as an URL return fileOrURL; } }
private WSDLService getWSDLModelfromSEI(final Class sei) { WebService ws = AccessController.doPrivileged(new PrivilegedAction<WebService>() { public WebService run() { return (WebService) sei.getAnnotation(WebService.class); } }); if (ws == null || ws.wsdlLocation().equals("")) return null; String wsdlLocation = ws.wsdlLocation(); wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); Source wsdl = new StreamSource(wsdlLocation); WSDLService service = null; try { URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId()); WSDLModel model = parseWSDL(url, wsdl, sei); service = model.getService(this.serviceName); if (service == null) throw new WebServiceException( ClientMessages.INVALID_SERVICE_NAME(this.serviceName, buildNameList(model.getServices().keySet()))); } catch (MalformedURLException e) { throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId())); } return service; }
wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); wsdl = new StreamSource(wsdlLocation); URL url = wsdl.getSystemId()==null ? null : JAXWSUtils.getEncodedURL(wsdl.getSystemId()); WSDLModel model = parseWSDL(url, wsdl, serviceClass); service = model.getService(this.serviceName);
if (entityResolver == null) { if (catalog != null && catalog.length() > 0) entityResolver = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); } else if (catalog != null && catalog.length() > 0) { EntityResolver er = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); entityResolver = new ForkEntityResolver(er, entityResolver);
boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true;
private WSDLService getWSDLModelfromSEI(final Class sei) { WebService ws = AccessController.doPrivileged(new PrivilegedAction<WebService>() { public WebService run() { return (WebService) sei.getAnnotation(WebService.class); } }); if (ws == null || ws.wsdlLocation().equals("")) return null; String wsdlLocation = ws.wsdlLocation(); wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); Source wsdl = new StreamSource(wsdlLocation); WSDLService service = null; try { URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId()); WSDLModel model = parseWSDL(url, wsdl, sei); service = model.getService(this.serviceName); if (service == null) throw new WebServiceException( ClientMessages.INVALID_SERVICE_NAME(this.serviceName, buildNameList(model.getServices().keySet()))); } catch (MalformedURLException e) { throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId())); } return service; }
wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); wsdl = new StreamSource(wsdlLocation); URL url = wsdl.getSystemId()==null ? null : JAXWSUtils.getEncodedURL(wsdl.getSystemId()); WSDLModel model = parseWSDL(url, wsdl, serviceClass); service = model.getService(this.serviceName);
if (entityResolver == null) { if (catalog != null && catalog.length() > 0) entityResolver = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); } else if (catalog != null && catalog.length() > 0) { EntityResolver er = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); entityResolver = new ForkEntityResolver(er, entityResolver);
boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true;
private WSDLService getWSDLModelfromSEI(final Class sei) { WebService ws = AccessController.doPrivileged(new PrivilegedAction<WebService>() { public WebService run() { return (WebService) sei.getAnnotation(WebService.class); } }); if (ws == null || ws.wsdlLocation().equals("")) return null; String wsdlLocation = ws.wsdlLocation(); wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); Source wsdl = new StreamSource(wsdlLocation); WSDLService service = null; try { URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId()); WSDLModel model = parseWSDL(url, wsdl, sei); service = model.getService(this.serviceName); if (service == null) throw new WebServiceException( ClientMessages.INVALID_SERVICE_NAME(this.serviceName, buildNameList(model.getServices().keySet()))); } catch (MalformedURLException e) { throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId())); } return service; }
wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); wsdl = new StreamSource(wsdlLocation); URL url = wsdl.getSystemId()==null ? null : JAXWSUtils.getEncodedURL(wsdl.getSystemId()); WSDLModel model = parseWSDL(url, wsdl, serviceClass); service = model.getService(this.serviceName);
if (entityResolver == null) { if (catalog != null && catalog.length() > 0) entityResolver = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); } else if (catalog != null && catalog.length() > 0) { EntityResolver er = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); entityResolver = new ForkEntityResolver(er, entityResolver);
@Override public Void run() { WebServiceClient wsc =sc.getAnnotation(WebServiceClient.class); if(wsc==null) { throw new WebServiceException("Service Interface Annotations required, exiting..."); } String tns = wsc.targetNamespace(); try { JAXWSUtils.getFileOrURL(wsc.wsdlLocation()); } catch (IOException e) { // TODO: report a reasonable error message throw new WebServiceException(e); } for (Method method : sc.getDeclaredMethods()) { WebEndpoint webEndpoint = method.getAnnotation(WebEndpoint.class); if (webEndpoint != null) { String endpointName = webEndpoint.name(); QName portQName = new QName(tns, endpointName); portQNames.add(portQName); } Class<?> seiClazz = method.getReturnType(); if (seiClazz!=void.class) { classes.add(seiClazz); } } return null; } });
boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true;
public static String getFileOrURLName(String fileOrURL) { try{ try { return escapeSpace(new URL(fileOrURL).toExternalForm()); } catch (MalformedURLException e) { return new File(fileOrURL).getCanonicalFile().toURL().toExternalForm(); } } catch (Exception e) { // try it as an URL return fileOrURL; } }
wsdlLocation).toExternalForm(); } catch (MalformedURLException e) { wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation));
if (entityResolver == null) { if (catalog != null && catalog.length() > 0) entityResolver = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); } else if (catalog != null && catalog.length() > 0) { EntityResolver er = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog)))); entityResolver = new ForkEntityResolver(er, entityResolver);
@Override public Void run() { WebServiceClient wsc =sc.getAnnotation(WebServiceClient.class); if(wsc==null) { throw new WebServiceException("Service Interface Annotations required, exiting..."); } String tns = wsc.targetNamespace(); try { JAXWSUtils.getFileOrURL(wsc.wsdlLocation()); } catch (IOException e) { // TODO: report a reasonable error message throw new WebServiceException(e); } for (Method method : sc.getDeclaredMethods()) { WebEndpoint webEndpoint = method.getAnnotation(WebEndpoint.class); if (webEndpoint != null) { String endpointName = webEndpoint.name(); QName portQName = new QName(tns, endpointName); portQNames.add(portQName); } Class<?> seiClazz = method.getReturnType(); if (seiClazz!=void.class) { classes.add(seiClazz); } } return null; } });
"but port QName passed to parser is null"); boolean parseChain = JAXWSUtils.matchQNames(portName, XMLStreamReaderUtil.getElementQName(reader)); if (!parseChain) { "but service QName passed to parser is null"); boolean parseChain = JAXWSUtils.matchQNames( serviceName, XMLStreamReaderUtil.getElementQName(reader));