Package org.apache.synapse.util.resolver

Examples of org.apache.synapse.util.resolver.ResourceMap


        entry.setSrc(getClass().getResource("imported.wsdl"));
        synCfg.addEntry("imported_wsdl", entry);
        // Build the proxy service
        ProxyService proxyService = new ProxyService("Test");
        proxyService.setWSDLKey("root_wsdl");
        ResourceMap resourceMap = new ResourceMap();
        resourceMap.addResource("imported.wsdl", "imported_wsdl");
        resourceMap.addResource("imported.xsd", "imported_xsd");
        proxyService.setResourceMap(resourceMap);
        AxisService axisService = proxyService.buildAxisService(synCfg, axisCfg);
        // Serialize the WSDL. Note that we can't parse the WSDL because it will have imports
        // referring to locations such as "my-matches?xsd=xsd0.xsd".
        axisService.printWSDL(new ByteArrayOutputStream());
View Full Code Here


*/
public class ResourceMapFactory {
    private static final Log log = LogFactory.getLog(ResourceMapFactory.class);
   
    public static ResourceMap createResourceMap(OMElement elem) {
        ResourceMap resourceMap = null;
        Iterator it = elem.getChildrenWithName(
            new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "resource"));
        while (it.hasNext()) {
            // Lazily create the ResourceMap, so that when no <resource>
            // elements are found, the method returns null.
            if (resourceMap == null) {
                resourceMap = new ResourceMap();
            }
            OMElement resourceElem = (OMElement)it.next();
            OMAttribute location = resourceElem.getAttribute
                (new QName(XMLConfigConstants.NULL_NAMESPACE, "location"));
            if (location == null) {
                handleException("The 'location' attribute is required for a resource definition");
            }
            OMAttribute key = resourceElem.getAttribute(
                new QName(XMLConfigConstants.NULL_NAMESPACE, "key"));
            if (key == null) {
                handleException("The 'key' attribute is required for a resource definition");
            }
            resourceMap.addResource(location.getAttributeValue(), key.getAttributeValue());
        }
        return resourceMap;
    }
View Full Code Here

                    xsltKey.getKeyValue()),
                    providers);
        }

        if (xsltMediator.getResourceMap() != null) {
            ResourceMap resources = xsltMediator.getResourceMap();
            for (String key : resources.getResources().values()) {
                addProvider(new ConfigurationObject(ConfigurationObject.TYPE_ENTRY, key),
                        providers);
            }
        }
       
View Full Code Here

          String constructedPath =
                                   regWSDLDep.constructRegistryPathToRelativePath(relativeLocation);

          if (value.endsWith(constructedPath)) {
            if (resourceMap == null) {
              resourceMap = new ResourceMap();
            }
            resourceMap.addResource(relativeLocation, value);
            latestImportURI = relativeLocation;
            break;
          }
View Full Code Here

          String constructedPath =
                                   regWSDLDep.constructRegistryPathToRelativePath(schemaLocation);

          if (value.endsWith(constructedPath)) {
            if (resourceMap == null) {
              resourceMap = new ResourceMap();
            }
            resourceMap.addResource(schemaLocation, value);
            break;
          }
        }
View Full Code Here

            String constructedPath =
                                     regWSDLDep.constructRegistryPathToRelativePath(systemId);

            if (value.endsWith(constructedPath)) {
              if (resourceMap == null) {
                resourceMap = new ResourceMap();
              }
              resourceMap.addResource(systemId, value);
              break;
            }
          }
View Full Code Here

TOP

Related Classes of org.apache.synapse.util.resolver.ResourceMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.