Apache COM Pluggable Provider is a demonstration of accessing Window's component object model (COM) through SOAP services on Windows 2000 or Windows NT® servers. The COM Pluggable provider is an Apache SOAP pluggable provider that takes in coming requests to the SOAP server and delegates them to a COM object.
The COM pluggable provider is configured by Apache SOAP deployment descriptors. The following is an example of the deployment descriptor provided with the adder demo in the Apache install directory java\samples\com\server\adder.xml:
1. <!--Apache SOAP
specific deployment descriptor (ie loads
this service into Apache SOAP.--> 2. <isd:service xmlns:isd=http://xml.apache.org/xml-soap/deployment 3. isd:serviceid="urn:adder-COM"> 4. <isd:provider type="org.apache.soap.providers.com.RPCProvider" 5. scope="Application" 6. methods="add"> 7. <isd:java class="required not needed for COMProvider"/> 8. <isd:option key="progid" value="Apacheadder.adder" /> 9. <isd:option key="threadmodel" value="MULTITHREADED" /> 10. </isd:provider> 11. <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener> 12. </isd:service> |
Once the deployment descriptor is written it can be used to
configure the Apache SOAP server as follows:
java org.apache.soap.server.ServiceManagerClient
http://<hostname>:<port>/soap/servlet/rpcrouter deploy <Full path of the deployment descriptor file>
|
Two COM implemented SOAP services are provided. They are located in java\samples\com. In this directory there are two subdirectories: client and server. With the following files:
client\Addit.class | The Java class file requesting the adder SOAP service. |
client\Addit.java | The Java source code for the above file. |
client\Sum.class | The Java class file requesting the totals SOAP service. |
client\Sum.java | The Java source code for the above file. |
server\adder.cls | The Visual Basic® class source code for the adder service. It can be viewed with a text editor, but should be updated only by Microsoft Visual Basic®. |
server\adder.xml | Apache SOAP Deployment descriptor for the adder service. |
server\rundemo.bat | A batch file making it easier to set up the server side of the demo. |
server\APACHEADDER.dll | The COM object implementing the adder service. |
server\APACHEADDER.vbp | The Visual Basic® project file for the adder service. Double clicking on this will bring up Microsoft Visual Basic® if installed to work on the adder service. |
server\APACHEADDER.vbw | The Visual Basic® workspace file for the adder service. |
server\APACHESUM.dll | The COM object implementing the totals service. |
server\APACHESUM.vbp | The Visual Basic® project file for the totals service. Double clicking on this will bring up Microsoft Visual Basic® if installed to work on the totals service. |
server\APACHESUM.vbw | The Visual Basic® workspace file for the totals service. |
server\totals.cls | The Visual Basic® class source code for the totals service. It can be viewed with a text editor, but should be updated only by Microsoft Visual Basic®. |
server\sum.xml | Apache SOAP Deployment descriptor for the totals service. |
rundemo deploy
java samples.com.client.Addit 3 4
java samples.com.client.Sum 4
java samples.com.client.Sum -set 9
rundemo undeploy
.