The deployment descriptor needs some slight changes:
<?xml version="1.0"?>
<deployment name="defaultServerConfig" xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="progtutorial/core/providers/MathService" provider="Handler" style="wrapped">
<parameter name="name" value="MathService (with Operation Provider)"/>
<parameter name="schemaPath"
value="schema/progtutorial/MathService/Math_service.wsdl"/>
<parameter name="className"
value="org.globus.progtutorial.stubs.MathService.MathPortType"/>
<parameter name="baseClassName"
value="org.globus.ogsa.impl.ogsi.GridServiceImpl"/>
<parameter name="operationProviders"
value="org.globus.progtutorial.services.core.providers.impl.MathProvider"/>
<!-- Start common parameters -->
<parameter name="allowedMethods" value="*"/>
<parameter name="persistent" value="true"/>
<parameter name="handlerClass"
value="org.globus.ogsa.handlers.RPCURIProvider"/>
</service>
</deployment>
This file is $TUTORIAL_DIR/org/globus/progtutorial/services/core/providers/server-deploy.wsdd |
Notice how the baseClassName is no longer MathImpl, or any class programmed by us (such as MathProvider).
<parameter name="baseClassName" value="org.globus.ogsa.impl.ogsi.GridServiceImpl"/>
Now we're using this parameter to tell the Grid Services container that GridServiceImpl will provide the basic functionality of our Grid Service. The implementation of the methods in our Math PortType will be found in an operation provider, which we specify in the operationProviders parameter:
<parameter name="operationProviders" value="org.globus.progtutorial.services.core.providers.impl.MathProvider"/>
Finally, we need to specify the PortType of our GridService (remember that the operation providers don't have an "implements MathPortType", so the Grid Services container can't use the operation providers to figure out what the PortType is).
<parameter name="className" value="org.globus.progtutorial.stubs.MathService.MathPortType"/>
Now, let's build the Grid Service:
./tutorial_build.sh \ org/globus/progtutorial/services/core/providers \ schema/progtutorial/MathService/Math.gwsdl
Notice how we're reusing the GWSDL file used in the previous chapter. |
Finally, let's deploy it and start the Grid Services container:
ant deploy \ -Dgar.name=$TUTORIAL_DIR/build/lib/org_globus_progtutorial_services_core_providers.gar globus-start-container
Remember to run these commands from $GLOBUS_LOCATION with a user with write permissions in that directory. |