/** * Get the active message context. * * @return the current active message context */ public static MessageContext getCurrentContext() { return AxisEngine.getCurrentMessageContext(); }
public String getContext() { try { AxisEngine engine = AxisServer.getServer(null); return engine.getApplicationSession().toString(); } catch (AxisFault af) { log.error("Getting application context",af); return null; } }
/** Tell this service which engine it's deployed to. * */ public void setEngine(AxisEngine engine) { if (engine == null) throw new IllegalArgumentException( Messages.getMessage("nullEngine")); this.engine = engine; ((LockableHashtable)options).setParent(engine.getOptions()); TypeMappingRegistry tmr = engine.getTypeMappingRegistry(); getTypeMappingRegistry().delegate(tmr); }
if (action.equals("passwd")) { String newPassword = root.getFirstChild().getNodeValue(); engine.setAdminPassword(newPassword); doc = XMLUtils.newDocument(); doc.appendChild( root = doc.createElementNS("", "Admin" ) ); engine = engine.getClientEngine(); EngineConfiguration config = engine.getConfig(); if (config instanceof WSDDEngineConfiguration) { WSDDDeployment deployment = wsddDoc.deploy(deployment); engine.refreshGlobalOptions(); engine.saveConfiguration();
if (!engine.setOptionDefault(PROP_PASSWORD, DEFAULT_ADMIN_PASSWORD)) { engine.setAdminPassword( (String)engine.getOption(PROP_PASSWORD));
private Set getDeployedServiceNames(MessageContext msgContext) throws ConfigurationException { Set serviceNames = new HashSet(); Iterator deployedServicesIter = msgContext.getAxisEngine().getConfig().getDeployedServices(); while (deployedServicesIter.hasNext()) { ServiceDesc serviceDesc = (ServiceDesc) deployedServicesIter.next(); serviceNames.add(serviceDesc.getName()); } return serviceNames; }
/** * Default java service object comes from simply instantiating the * class wrapped in jc * */ protected Object makeNewServiceObject(MessageContext msgContext, String clsName) throws Exception { ClassLoader cl = msgContext.getClassLoader(); ClassCache cache = msgContext.getAxisEngine().getClassCache(); JavaClass jc = cache.lookup(clsName, cl); return jc.getJavaClass().newInstance(); }
/** * Returns the current TypeMappingRegistry or null. * * @return TypeMappingRegistry The registry */ public TypeMappingRegistry getTypeMappingRegistry() { return (engine.getTypeMappingRegistry()); }
setOptionDefault(PROP_ATTACHMENT_IMPLEMENTATION, AxisProperties.getProperty("axis." + PROP_ATTACHMENT_IMPLEMENTATION )); setOptionDefault(PROP_ATTACHMENT_IMPLEMENTATION, DEFAULT_ATTACHMENT_IMPL); final Object dotnet = getOption(PROP_DOTNET_SOAPENC_FIX); if (JavaUtils.isTrue(dotnet)) {
java.util.Hashtable opts= engine.getOptions(); String attachmentsdir= null; if(null!=opts) { String defaultSOAPVersion = (String)engine.getOption( AxisEngine.PROP_SOAP_VERSION); if (defaultSOAPVersion != null && "1.2".equals(defaultSOAPVersion)) { String singleSOAPVersion = (String)engine.getOption( AxisEngine.PROP_SOAP_ALLOWED_VERSION); if (singleSOAPVersion != null) {
public boolean shouldDoAutoTypes() { if(doAutoTypes != null) { return doAutoTypes.booleanValue(); } MessageContext msgContext = MessageContext.getCurrentContext(); if(msgContext != null) { if (msgContext.isPropertyTrue("axis.doAutoTypes") || (msgContext.getAxisEngine() != null && JavaUtils.isTrue(msgContext.getAxisEngine().getOption("axis.doAutoTypes")))) { doAutoTypes = Boolean.TRUE; } } if(doAutoTypes == null){ doAutoTypes = AxisProperties.getProperty("axis.doAutoTypes", "false") .equals("true") ? Boolean.TRUE : Boolean.FALSE; } return doAutoTypes.booleanValue(); }
if (messageContext != null) { SOAPService service = messageContext.getAxisEngine() .getService(sname); if ( service != null ) service.clearSessions();
/** * Get the merged actor list for this service, including engine-wide * actor URIs. * * @return */ public ArrayList getActors() { ArrayList acts = (ArrayList)actors.clone(); // ??? cache this? if (engine != null) { acts.addAll(engine.getActorURIs()); } return acts; }
/** * Default constructor - not much else to say. * * @param service the <code>Service</code> this <code>Call</code> will * work with */ public Call(Service service) { this.service = service ; AxisEngine engine = service.getEngine(); msgContext = new MessageContext( engine ); myProperties.setParent(engine.getOptions()); maintainSession = service.getMaintainSession(); }
if (action.equals("passwd")) { String newPassword = root.getFirstChild().getNodeValue(); engine.setAdminPassword(newPassword); doc = XMLUtils.newDocument(); doc.appendChild( root = doc.createElementNS("", "Admin" ) ); engine = engine.getClientEngine(); EngineConfiguration config = engine.getConfig(); if (config instanceof WSDDEngineConfiguration) { WSDDDeployment deployment = wsddDoc.deploy(deployment); engine.refreshGlobalOptions(); engine.saveConfiguration();
if (!engine.setOptionDefault(PROP_PASSWORD, DEFAULT_ADMIN_PASSWORD)) { engine.setAdminPassword( (String)engine.getOption(PROP_PASSWORD));
private Set getDeployedServiceNames(MessageContext msgContext) throws ConfigurationException { Set serviceNames = new HashSet(); Iterator deployedServicesIter = msgContext.getAxisEngine().getConfig().getDeployedServices(); while (deployedServicesIter.hasNext()) { ServiceDesc serviceDesc = (ServiceDesc) deployedServicesIter.next(); serviceNames.add(serviceDesc.getName()); } return serviceNames; }
/** * Default java service object comes from simply instantiating the * class wrapped in jc * */ protected Object makeNewServiceObject(MessageContext msgContext, String clsName) throws Exception { ClassLoader cl = msgContext.getClassLoader(); ClassCache cache = msgContext.getAxisEngine().getClassCache(); JavaClass jc = cache.lookup(clsName, cl); return jc.getJavaClass().newInstance(); }
/** * Returns the current TypeMappingRegistry or null. * * @return TypeMappingRegistry The registry */ public TypeMappingRegistry getTypeMappingRegistry() { return (engine.getTypeMappingRegistry()); }