Methods Summary |
---|
protected void | addHandler(WSDDHandler handler)
handlers.put(handler.getQName(), handler);
|
protected void | addService(WSDDService service)
WSDDService oldService = (WSDDService) services.get(service.getQName());
if (oldService != null) {
oldService.removeNamespaceMappings(this);
}
services.put(service.getQName(), service);
|
protected void | addTransport(WSDDTransport transport)
transports.put(transport.getQName(), transport);
|
public void | configureEngine(org.apache.axis.AxisEngine engine)
this.engine = engine;
|
public void | deployHandler(WSDDHandler handler)Put a WSDDHandler into this deployment, replacing any other
WSDDHandler which might already be present with the same QName.
handler.deployToRegistry(this);
|
private void | deployMapping(WSDDTypeMapping mapping)
try {
String encodingStyle = mapping.getEncodingStyle();
if (encodingStyle == null) {
encodingStyle = Constants.URI_DEFAULT_SOAP_ENC;
}
TypeMapping tm = tmr.getOrMakeTypeMapping(encodingStyle);
SerializerFactory ser = null;
DeserializerFactory deser = null;
// Try to construct a serializerFactory by introspecting for the
// following:
// public static create(Class javaType, QName xmlType)
// public <constructor>(Class javaType, QName xmlType)
// public <constructor>()
//
// The BaseSerializerFactory createFactory() method is a utility
// that does this for us.
//log.debug("start creating sf and df");
if (mapping.getSerializerName() != null &&
!mapping.getSerializerName().equals("")) {
ser = BaseSerializerFactory.createFactory(mapping.getSerializer(),
mapping.getLanguageSpecificType(),
mapping.getQName());
}
if ((mapping instanceof WSDDArrayMapping) && (ser instanceof ArraySerializerFactory)) {
WSDDArrayMapping am = (WSDDArrayMapping) mapping;
ArraySerializerFactory factory = (ArraySerializerFactory) ser;
factory.setComponentType(am.getInnerType());
}
//log.debug("set ser factory");
if (mapping.getDeserializerName() != null &&
!mapping.getDeserializerName().equals("")) {
deser = BaseDeserializerFactory.createFactory(mapping.getDeserializer(),
mapping.getLanguageSpecificType(),
mapping.getQName());
}
//log.debug("set dser factory");
tm.register(mapping.getLanguageSpecificType(), mapping.getQName(), ser, deser);
//log.debug("registered");
} catch (ClassNotFoundException e) {
log.error(Messages.getMessage("unabletoDeployTypemapping00", mapping.getQName().toString()), e);
throw new WSDDNonFatalException(e);
} catch (Exception e) {
throw new WSDDException(e);
}
|
public void | deployService(WSDDService service)Put a WSDDService into this deployment, replacing any other
WSDDService which might already be present with the same QName.
service.deployToRegistry(this);
|
public void | deployToRegistry(org.apache.axis.deployment.wsdd.WSDDDeployment target)
WSDDGlobalConfiguration global = getGlobalConfiguration();
if (global != null) {
target.setGlobalConfiguration(global);
}
Iterator i = handlers.values().iterator();
while (i.hasNext()) {
WSDDHandler handler = (WSDDHandler) i.next();
target.deployHandler(handler);
}
i = transports.values().iterator();
while (i.hasNext()) {
WSDDTransport transport = (WSDDTransport) i.next();
target.deployTransport(transport);
}
i = services.values().iterator();
while (i.hasNext()) {
WSDDService service = (WSDDService) i.next();
service.deployToRegistry(target);
}
i = typeMappings.values().iterator();
while (i.hasNext()) {
WSDDTypeMapping mapping = (WSDDTypeMapping) i.next();
target.deployTypeMapping(mapping);
}
|
public void | deployTransport(WSDDTransport transport)Put a WSDDTransport into this deployment, replacing any other
WSDDTransport which might already be present with the same QName.
transport.deployToRegistry(this);
|
public void | deployTypeMapping(WSDDTypeMapping typeMapping)
QName qname = typeMapping.getQName();
String encoding = typeMapping.getEncodingStyle();
// We have to include the encoding in the key
// because otherwise we would overwrite exiting mappings
typeMappings.put(qname + encoding, typeMapping);
if (tmrDeployed)
deployMapping(typeMapping);
|
public java.util.Iterator | getDeployedServices()Get an enumeration of the services deployed to this engine
ArrayList serviceDescs = new ArrayList();
for (Iterator i = services.values().iterator(); i.hasNext();) {
WSDDService service = (WSDDService) i.next();
try {
service.makeNewInstance(this);
serviceDescs.add(service.getServiceDesc());
} catch (WSDDNonFatalException ex) {
// If it's non-fatal, just keep on going
log.info(Messages.getMessage("ignoringNonFatalException00"), ex);
}
}
return serviceDescs.iterator();
|
public org.apache.axis.deployment.wsdd.WSDDDeployment | getDeployment()
return this;
|
protected javax.xml.namespace.QName | getElementName()
return QNAME_DEPLOY;
|
public org.apache.axis.AxisEngine | getEngine()
return engine;
|
public WSDDGlobalConfiguration | getGlobalConfiguration()Get our global configuration
return globalConfig;
|
public java.util.Hashtable | getGlobalOptions()
return globalConfig.getParametersTable();
|
public org.apache.axis.Handler | getGlobalRequest()
if (globalConfig != null) {
WSDDRequestFlow reqFlow = globalConfig.getRequestFlow();
if (reqFlow != null)
return reqFlow.getInstance(this);
}
return null;
|
public org.apache.axis.Handler | getGlobalResponse()
if (globalConfig != null) {
WSDDResponseFlow respFlow = globalConfig.getResponseFlow();
if (respFlow != null)
return respFlow.getInstance(this);
}
return null;
|
public org.apache.axis.Handler | getHandler(javax.xml.namespace.QName name)Return an instance of the named handler.
WSDDHandler h = (WSDDHandler) handlers.get(name);
if (h != null) {
return h.getInstance(this);
}
return null;
|
public WSDDHandler[] | getHandlers()
WSDDHandler [] handlerArray = new WSDDHandler[handlers.size()];
handlers.values().toArray(handlerArray);
return handlerArray;
|
public java.util.List | getRoles()
return globalConfig == null ? new ArrayList() : globalConfig.getRoles();
|
public org.apache.axis.handlers.soap.SOAPService | getService(javax.xml.namespace.QName name)Retrieve an instance of the named service.
WSDDService s = (WSDDService) services.get(name);
if (s != null) {
return (SOAPService) s.getInstance(this);
}
return null;
|
public org.apache.axis.handlers.soap.SOAPService | getServiceByNamespaceURI(java.lang.String namespace)
WSDDService s = (WSDDService) namespaceToServices.get(namespace);
if (s != null) {
return (SOAPService) s.getInstance(this);
}
return null;
|
public WSDDService[] | getServices()Return an array of the services in this deployment
WSDDService [] serviceArray = new WSDDService[services.size()];
services.values().toArray(serviceArray);
return serviceArray;
|
public org.apache.axis.Handler | getTransport(javax.xml.namespace.QName name)Retrieve an instance of the named transport.
WSDDTransport t = (WSDDTransport) transports.get(name);
if (t != null) {
return t.getInstance(this);
}
return null;
|
public WSDDTransport[] | getTransports()
WSDDTransport [] transportArray = new WSDDTransport[transports.size()];
transports.values().toArray(transportArray);
return transportArray;
|
public org.apache.axis.encoding.TypeMapping | getTypeMapping(java.lang.String encodingStyle)
return (TypeMapping) getTypeMappingRegistry().getTypeMapping(encodingStyle);
|
public org.apache.axis.encoding.TypeMappingRegistry | getTypeMappingRegistry()
if (false == tmrDeployed) {
Iterator i = typeMappings.values().iterator();
while (i.hasNext()) {
WSDDTypeMapping mapping = (WSDDTypeMapping) i.next();
deployMapping(mapping);
}
tmrDeployed = true;
}
return tmr;
|
public WSDDTypeMapping[] | getTypeMappings()
WSDDTypeMapping[] t = new WSDDTypeMapping[typeMappings.size()];
typeMappings.values().toArray(t);
return t;
|
public WSDDHandler | getWSDDHandler(javax.xml.namespace.QName qname)
return (WSDDHandler) handlers.get(qname);
|
public WSDDService | getWSDDService(javax.xml.namespace.QName qname)Return the WSDD description for a given named service
return (WSDDService) services.get(qname);
|
public WSDDTransport | getWSDDTransport(javax.xml.namespace.QName qname)
return (WSDDTransport) transports.get(qname);
|
public void | registerNamespaceForService(java.lang.String namespace, WSDDService service)Register a particular namepsace which maps to a given WSDDService.
This will be used for namespace-based dispatching.
namespaceToServices.put(namespace, service);
|
public void | removeNamespaceMapping(java.lang.String namespace)Remove a namespace -> WSDDService mapping.
namespaceToServices.remove(namespace);
|
public void | setGlobalConfiguration(WSDDGlobalConfiguration globalConfig)
this.globalConfig = globalConfig;
|
public void | undeployHandler(javax.xml.namespace.QName qname)Remove a named handler
handlers.remove(qname);
|
public void | undeployService(javax.xml.namespace.QName qname)Remove a named service
WSDDService service = (WSDDService) services.get(qname);
if (service != null) {
service.removeNamespaceMappings(this);
services.remove(qname);
}
|
public void | undeployTransport(javax.xml.namespace.QName qname)Remove a named transport
transports.remove(qname);
|
public void | writeEngineConfig(org.apache.axis.AxisEngine engine)
|
public void | writeToContext(org.apache.axis.encoding.SerializationContext context)
context.registerPrefixForURI(NS_PREFIX_WSDD, URI_WSDD);
context.registerPrefixForURI(NS_PREFIX_WSDD_JAVA, URI_WSDD_JAVA);
context.startElement(QNAME_DEPLOY, null);
if (globalConfig != null) {
globalConfig.writeToContext(context);
}
Iterator i = handlers.values().iterator();
while (i.hasNext()) {
WSDDHandler handler = (WSDDHandler) i.next();
handler.writeToContext(context);
}
i = services.values().iterator();
while (i.hasNext()) {
WSDDService service = (WSDDService) i.next();
service.writeToContext(context);
}
i = transports.values().iterator();
while (i.hasNext()) {
WSDDTransport transport = (WSDDTransport) i.next();
transport.writeToContext(context);
}
i = typeMappings.values().iterator();
while (i.hasNext()) {
WSDDTypeMapping mapping = (WSDDTypeMapping) i.next();
mapping.writeToContext(context);
}
context.endElement();
|