continue; String nextPath = environment.createRelativePath(path, location); Document importDoc = environment.getDocument(nextPath);
public Bundle getDelegateBundle(){ Environment env = getEnvironment(); EndpointReference epr = env.getAddressingContext().getToAddress(); String address = epr.getAddress().toString(); Iterator keys = contextToBundleMap.keySet().iterator(); while(keys.hasNext()){ String currentKey = (String)keys.next(); if(address.endsWith(currentKey)){ return (Bundle)contextToBundleMap.get(currentKey); } } return null; }
bundle = ResourceBundle.getBundle(_REQUIRED_CAPABILITIES, Locale.getDefault(), env.getClassLoader());
Document wsdl = environment.getDocument(wsdlPath);
protected File createLogFile(Element logging, Environment env) { QName qname = DescriptorConstants.LOG_FILE_QNAME; String location = XmlUtils.getElementText(logging, qname); boolean absolute = false; outer: if (location.contains("${")) { String placeholder = "${catalina.home}"; int index = location.indexOf(placeholder); if (index >= 0) { String catalinaHome = System.getProperty("catalina.base"); if (catalinaHome != null) { location = location.replace(placeholder, catalinaHome); absolute = true; } break outer; } //other placeholders... } if (absolute) { return new File(location); } else { return new File(env.getRealDirectory(), location); } }
continue; String nextPath = environment.createRelativePath(wsdlPath, location);
env.addAddressingContext(addressing); env.removeAddressingContext();
/** * * This is a convenience constructor that calls * this(EndpointReference, EndpointReference, SoapClient) with * the SoapClient provided by the given Environment. * * @see #AbstractResourceClient(EndpointReference, EndpointReference, SoapClient) * @see Environment#getSoapClient() * */ public AbstractResourceClient(EndpointReference destination, EndpointReference source, Environment environment) { this(destination, source, environment.getSoapClient()); }
String address = manager.getEnvironment().getDefaultURI(); int lastSlash = address.lastIndexOf('/'); address = address.substring(0, lastSlash + 1) + contextPath;
EndpointReference uniqueEPR = env.getDeploymentEPR();
DeploymentDescriptor dd = createDeploymentDescriptor(); Document ddXML = env.getDocument(DescriptorConstants.DESCRIPTOR_FILE_NAME); dd.load(ddXML, env);
/** * * @return The File directory that was specified as the persistence location * in muse.xml. The directory may not exist, so use File.exists() * and/or File.mkdirs() to prevent I/O errors. * */ protected File getPersistenceDirectory() { String path = getPersistenceLocation(); if (path == null) throw new RuntimeException(_MESSAGES.get("NoPersistenceLocation")); File workingDir = getResourceManager().getEnvironment().getRealDirectory(); return new File(workingDir, path); }
String nextPath = environment.createRelativePath(path, relative); Document includeDoc = environment.getDocument(nextPath); Element nextSchema = XmlUtils.getFirstElement(includeDoc); XmlUtils.moveSubTree(nextSchema, finalSchema, includes[n]);
protected Class createImplementationClass(Element xml, Environment env) { String className = XmlUtils.getElementText(xml, DescriptorConstants.JAVA_CAPABILITY_QNAME); // // null return value necessary to support default/required capability // implementations for some vendors // if (className == null) return null; return ReflectUtils.getClass(className, env.getClassLoader()); }
protected void subscribeInitialConsumer() throws SoapFault { String fileName = getInitializationParameter(_CONSUMER_EPR_PARAM); // // pre-existing consumer is optional - other consumers can // still subscribe using WS-N // if (fileName != null) { Environment env = getResource().getEnvironment(); Document eprDoc = env.getDocument(fileName); Element eprXML = XmlUtils.getFirstElement(eprDoc); EndpointReference epr = new EndpointReference(eprXML); NotificationProducer wsn = (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI); wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_CREATION_TOPIC), null, null); wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC), null, null); } } }
String absolutePath = env.getRealDirectory().getAbsolutePath();
MessageHeaders wsa = env.getAddressingContext();
String path = env.createRelativePath(getWsdlPath(), rmdPath); Document rmdDoc = env.getDocument(path);
protected Class createPersistenceClass(Element persistenceXML, Environment env) { String className = XmlUtils.getElementText(persistenceXML, DescriptorConstants.JAVA_PERSISTENCE_QNAME); ClassLoader loader = env.getClassLoader(); Class theClass = ReflectUtils.getClass(className, loader); // // make sure this class is an instance of RouterPersistence // if (!Persistence.class.isAssignableFrom(theClass)) { Object[] filler = { className, RouterPersistence.class.getName() }; String message = _MESSAGES.get("IncorrectPersistenceRoot", filler); throw new RuntimeException(message); } return theClass; }
String absolutePath = env.getRealDirectory().getAbsolutePath();