/** * Test assertion Description-1006. Tests whether the target namespace * specified is an absolute IRI. * * @param descElement The description element for which to check the target namespace. * @param errorReporter The error reporter. * @return True if the assertion passes, false otherwise. * @throws WSDLException */ protected boolean testAssertionDescription1006(DescriptionElement descElement, ErrorReporter errorReporter) throws WSDLException { URI targetNS = descElement.getTargetNamespace(); if(!targetNS.isAbsolute()) { errorReporter.reportError(new ErrorLocatorImpl(), "Description-1006", new Object[]{targetNS}, ErrorReporter.SEVERITY_ERROR); return false; } return true; }
/** * Test assertion Description-1006. Tests whether the target namespace * specified is an absolute IRI. * * @param descElement The description element for which to check the target namespace. * @param errorReporter The error reporter. * @return True if the assertion passes, false otherwise. * @throws WSDLException */ protected boolean testAssertionDescription1006(DescriptionElement descElement, ErrorReporter errorReporter) throws WSDLException { URI targetNS = descElement.getTargetNamespace(); if(!targetNS.isAbsolute()) { errorReporter.reportError(new ErrorLocatorImpl(), "Description-1006", new Object[]{targetNS}, ErrorReporter.SEVERITY_ERROR); return false; } return true; }
public WSDL20ToAxisServiceBuilder(String wsdlUri, String name, String interfaceName) throws WSDLException { String fullPath = wsdlUri; if (!wsdlUri.startsWith("http://")) { File file = new File(wsdlUri); fullPath = file.getAbsolutePath(); } setBaseUri(fullPath); Description description; try { description = readInTheWSDLFile(fullPath); } catch (AxisFault axisFault) { throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault); } DescriptionElement descriptionElement = description.toElement(); savedTargetNamespace = descriptionElement.getTargetNamespace() .toString(); namespacemap = descriptionElement.getDeclaredNamespaces(); this.description = description; this.serviceName = null; if (name != null) { serviceName = new QName(descriptionElement.getTargetNamespace().toString(), name); } this.interfaceName = interfaceName; this.axisService = new AxisService(); setPolicyRegistryFromService(axisService); }
public WSDL20ToAxisServiceBuilder(String wsdlUri, String name, String interfaceName) throws WSDLException { String fullPath = wsdlUri; if (!wsdlUri.startsWith("http://")) { File file = new File(wsdlUri); fullPath = file.getAbsolutePath(); } setBaseUri(fullPath); Description description; try { description = readInTheWSDLFile(fullPath); } catch (AxisFault axisFault) { throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault); } DescriptionElement descriptionElement = description.toElement(); savedTargetNamespace = descriptionElement.getTargetNamespace() .toString(); namespacemap = descriptionElement.getDeclaredNamespaces(); this.description = description; this.serviceName = null; if (name != null) { serviceName = new QName(descriptionElement.getTargetNamespace().toString(), name); } this.interfaceName = interfaceName; this.axisService = new AxisService(); setPolicyRegistryFromService(axisService); }
URI tns = desc.getTargetNamespace(); if (tns != null) { namespace[0] = tns.toString();
URI tns = desc.getTargetNamespace(); if (tns != null) { namespace[0] = tns.toString();
public WSDL20ToAxisServiceBuilder(Description descriptionComp, QName wsdlServiceName, String interfaceName) { DescriptionElement descriptionElement = descriptionComp.toElement(); savedTargetNamespace = descriptionElement.getTargetNamespace().toString(); namespacemap = descriptionElement.getDeclaredNamespaces(); this.description = descriptionElement.toComponent(); this.serviceName = null; if (wsdlServiceName != null) { serviceName = wsdlServiceName; } this.interfaceName = interfaceName; this.axisService = new AxisService(); setPolicyRegistryFromService(axisService); }
public WSDL20ToAxisServiceBuilder(Description descriptionComp, QName wsdlServiceName, String interfaceName) { DescriptionElement descriptionElement = descriptionComp.toElement(); savedTargetNamespace = descriptionElement.getTargetNamespace().toString(); namespacemap = descriptionElement.getDeclaredNamespaces(); this.description = descriptionElement.toComponent(); this.serviceName = null; if (wsdlServiceName != null) { serviceName = wsdlServiceName; } this.interfaceName = interfaceName; this.axisService = new AxisService(); setPolicyRegistryFromService(axisService); }
public void validate(Object target, WodenContext wodenCtx) throws WSDLException { DescriptionElement descElem = (DescriptionElement) target; URI tns = descElem.getTargetNamespace(); try { URI resolvedUri = wodenCtx.getUriResolver().resolveURI(tns); URI uri = resolvedUri != null ? resolvedUri : tns; String scheme = uri.getScheme(); // Only check if the scheme is a type that we can locate. // TODO: See if the searchable schemes should be extensible. Object o = null; if(searchableSchemes.indexOf(scheme)!=-1) { URL url = uri.toURL(); o = url.getContent(); } if(o == null) { throw new Exception(); } } catch (WSDLException e2) { // A WSDLException may be thrown due to a problem with the URI resolver so we should report this exception. throw e2; } catch (Exception e) { // Any other exception including IOExceptoin, MalformedURLException, UnknownHostException, and // FileNotFoundException means that the namespace was not resolvable. wodenCtx.getErrorReporter().reportError( new ErrorLocatorImpl(), getId(), new Object[] {tns}, ErrorReporter.SEVERITY_WARNING); } }
public void validate(Object target, WodenContext wodenCtx) throws WSDLException { DescriptionElement descElem = (DescriptionElement) target; URI tns = descElem.getTargetNamespace(); try { URI resolvedUri = wodenCtx.getUriResolver().resolveURI(tns); URI uri = resolvedUri != null ? resolvedUri : tns; String scheme = uri.getScheme(); // Only check if the scheme is a type that we can locate. // TODO: See if the searchable schemes should be extensible. Object o = null; if(searchableSchemes.indexOf(scheme)!=-1) { URL url = uri.toURL(); o = url.getContent(); } if(o == null) { throw new Exception(); } } catch (WSDLException e2) { // A WSDLException may be thrown due to a problem with the URI resolver so we should report this exception. throw e2; } catch (Exception e) { // Any other exception including IOExceptoin, MalformedURLException, UnknownHostException, and // FileNotFoundException means that the namespace was not resolvable. wodenCtx.getErrorReporter().reportError( new ErrorLocatorImpl(), getId(), new Object[] {tns}, ErrorReporter.SEVERITY_WARNING); } }
savedTargetNamespace = descriptionElement.getTargetNamespace().toString(); namespacemap = descriptionElement.getDeclaredNamespaces(); this.description = description;
savedTargetNamespace = descriptionElement.getTargetNamespace().toString(); namespacemap = descriptionElement.getDeclaredNamespaces(); this.description = description;
Constants.ELEM_DESCRIPTION, desEle); pw.print('<' + tagName); URI targetNamespace=desEle.getTargetNamespace(); if(targetNamespace!=null){ String targetNamespaceStr =targetNamespace.toString();
Constants.ELEM_DESCRIPTION, desEle); pw.print('<' + tagName); URI targetNamespace=desEle.getTargetNamespace(); if(targetNamespace!=null){ String targetNamespaceStr = targetNamespace.toString();
Constants.ELEM_DESCRIPTION, desEle); pw.print('<' + tagName); URI targetNamespace=desEle.getTargetNamespace(); if(targetNamespace!=null){ String targetNamespaceStr = targetNamespace.toString();