/** * @see org.overlord.sramp.common.visitors.HierarchicalArtifactVisitorAdapter#visit(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlDocument) */ @Override public void visit(WsdlDocument artifact) { super.visit(artifact); artifact.setTargetNamespace(getProperty(jcrNode, "sramp:targetNamespace")); //$NON-NLS-1$ }
/** * @see org.overlord.sramp.common.derived.XsdDeriver#derive(java.util.Collection, org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BaseArtifactType, org.overlord.sramp.common.derived.AbstractXmlDeriver.XmlDeriverContext) */ @Override protected void derive(Collection<BaseArtifactType> derivedArtifacts, BaseArtifactType artifact, XmlDeriverContext xmlDeriverContext) throws IOException { String targetNS = xmlDeriverContext.getRootElement().getAttribute("targetNamespace"); //$NON-NLS-1$ ((WsdlDocument) artifact).setTargetNamespace(targetNS); try { processDefinitions((IndexedArtifactCollection) derivedArtifacts, artifact, xmlDeriverContext.getRootElement(), xmlDeriverContext.getXpath()); } catch (Exception e) { throw new IOException(e); } }
/** * @see org.artificer.common.visitors.HierarchicalArtifactVisitor#visit(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.WsdlDocument) */ @Override public void visit(WsdlDocument artifact) { super.visit(artifact); artifact.setTargetNamespace(getProperty("targetNamespace")); try { artifact.getImportedXsds().addAll(getRelationships( "importedXsds", artificerArtifact, XsdDocumentTarget.class)); artifact.getIncludedXsds().addAll(getRelationships( "includedXsds", artificerArtifact, XsdDocumentTarget.class)); artifact.getRedefinedXsds().addAll(getRelationships( "redefinedXsds", artificerArtifact, XsdDocumentTarget.class)); artifact.getImportedWsdls().addAll(getRelationships( "importedWsdls", artificerArtifact, WsdlDocumentTarget.class)); } catch (Exception e) { throw new RuntimeException(e); } }
@Override protected void derive() throws IOException { targetNS = rootElement.getAttribute("targetNamespace"); if (getPrimaryArtifact() instanceof WsdlDocument) { ((WsdlDocument) getPrimaryArtifact()).setTargetNamespace(targetNS); } try { // Get derived content from all of the schemas embedded in this WSDL NodeList schemas = (NodeList) this.query(rootElement, "./wsdl:types/xsd:schema", XPathConstants.NODESET); for (int idx = 0; idx < schemas.getLength(); idx++) { Element schema = (Element) schemas.item(idx); deriveXsd(schema); String xsdTargetNS = schema.getAttribute("targetNamespace"); processImportedXsds(((WsdlDocument) getPrimaryArtifact()).getImportedXsds(), schema, xsdTargetNS); processIncludedXsds(((WsdlDocument) getPrimaryArtifact()).getIncludedXsds(), schema, xsdTargetNS); processRedefinedXsds(((WsdlDocument) getPrimaryArtifact()).getRedefinedXsds(), schema, xsdTargetNS); } processWsdlImports(); processMessages(); processPortTypes(); processBindings(); processServices(); } catch (Exception e) { throw new IOException(e); } }