I'm developing a WS with Globus toolkit 4.2.1. This WS needs to behave
as a client for the VMware VI API WebService which uses axis 1.4. My
problem appears with http handler: VMware VI API uses
org.apache.axis.transport.http.HTTPSender and Globus uses
org.globus.axis.transport.commons.HTTPSender. My globus WSs also need to
comunicate and call between them; I mean that one globus WS calls
services from another globus WS deployed in the same server. I define
the http handler for VMware in the client-config.wsdd but I need in
runtime to set the handler for the http for the internal calls between
globus WSs. I found the way to do this:
private static void registerClientHandlers(
ComputerServiceAddressingLocator locator) {
try {
// ======================================
// Register Clientside Handler
// ======================================
javax.xml.namespace.QName portName = new QName(
"https://federica.i2cat.net:8443/wsrf/services/",
"manticore/ComputerResourceService");
javax.xml.rpc.handler.HandlerRegistry hr = locator
.getHandlerRegistry();
java.util.List handlerChain = hr.getHandlerChain(portName);
javax.xml.rpc.handler.HandlerInfo hInfo = new
javax.xml.rpc.handler.HandlerInfo();
hInfo
.setHandlerClass(org.globus.axis.transport.commons.HTTPSender.class);
handlerChain.add(hInfo);
} catch (Exception e) {
System.out
.println("Caught an exception when registering the
clientside handler: "
+ e.getMessage());
}
}
But I don't know exactly which QName I need to use. The handler chain I
get with this code is empty and I only add a handler to an empty handler
chain. What I want to do is to change a handler chain. My service is
deployed as follows:
https://federica.i2cat.net:8443/wsrf/services/manticore/ComputerResourceService
And my deploy-server.wsdd is the next:
<?xml version="1.0" encoding="UTF-8"?>
<deployment name="defaultServerConfig"
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- Instance Service -->
<service name="manticore/ComputerResourceService" provider="Handler"
use="literal" style="document">
<parameter name="className"
value="cat.i2cat.manticore.services.computer.impl.ComputerService"/>
<wsdlFile>share/schema/computer/Computer_service.wsdl</wsdlFile>
<parameter name="securityDescriptor"
value="/srv/inocybe/etc/ComputerService-security.xml"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="handlerClass"
value="org.globus.axis.providers.RPCProvider"/>
<parameter name="scope" value="Application"/>
<parameter name="providers" value="GetRPProvider
QueryRPProvider SubscribeProvider
GetCurrentMessageProvider
DestroyProvider
SetTerminationTimeProvider
GetMRPProvider"/>
<parameter name="loadOnStartup" value="true"/>
</service>
<!-- Instance Service -->
<service name="manticore/ComputerResourceFactoryService"
provider="Handler" use="literal" style="document">
<parameter name="className"
value="cat.i2cat.manticore.services.computer.impl.ComputerFactoryService"/>
<wsdlFile>share/schema/computer/ComputerFactory_service.wsdl</wsdlFile>
<parameter name="securityDescriptor"
value="/srv/inocybe/etc/ComputerService-security.xml"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="handlerClass"
value="org.globus.axis.providers.RPCProvider"/>
<parameter name="scope" value="Application"/>
<parameter name="loadOnStartup" value="true"/>
</service>
</deployment>
Does anyone know which QName I need to use or how can I solve this
issue? Is it possible to change the http handler in runtime in globus
toolkit? Thanks for the help,
Alejandro
--
Alejandro Berna Juan
Network Technologies Cluster (CTX)
Fundació i2Cat, Internet i Innovació Digital a Catalunya
C/ Gran Capità 2 - 4, Nexus I building, 2nd floor, office 203
08034 Barcelona, Catalonia, Spain
P: +34 93 553 2522
F: +34 93 553 2520