Zrinity is the leader in enterprise-class email marketing
management solutions and content management solutions for marketing professionals and developers worldwide.
CFX_SOAP is a Free and Open Source simple SOAP client for ColdFusion. It allows soap requests to be constructed and sent, however is vary limited in scope. Currently SOAP params can only be of type string. The tag comes with working examples that connect to SOAP Services on XMethods.com, such as Temperature checker, ISBN Book price look up, and a Stock Price Grabber. Although some may view this implementation of a SOAP client as limited, the source code is included to extend the tag, we only ask that you let us know what improvments your are making, and if possible share the code so we can give it back to the community.
All Attributes
Attribute Name
Required
Data Type
Notes
URL
yes
URL
The SOAP Endpoint URL
URI
yes
string
Method Namespace URI
METHOD
yes
string
The name of the SOAP method you wish to call.
OUTPUT
no
variable name
The name of the variable the method's return will be stored in.
PARAMS
no
wddx
A WDDX structure of param names, it should be an Array of Structures, the structures should have a param called name which indicates the name of the SOAP method paramaeter, and a param called value which is the value of the SOAP param. Each SOAP param is a structure inside of an array, Create a WDDX packet with CFWDDX. This is not a robust and clean way to pass parameters, but the CFX API is limited, so it is the best possible solution.
Examples
This example will make a SOAP request to XMethods for the temperature in the zip code 13501.
  zip = "13501";
  p = ArrayNew(1);
  p[1] = StructNew();
  p[1].name = "zip";
  p[1].value = zip;
"CFML2WDDX" input="#p#" output="wddx"> "#wddx#" URL="http://services.xmethods.com:80/soap/servlet/rpcrouter" URI="urn:xmethods-Temperature" METHOD="getTemp" output="temperature">
Temperature in #zip# is #temperature#
If you are running Windows NT/2000 you should run Setup.exe ON YOUR WEB SERVER
If you are running any Other Platform please follow the instructions below...
1) Read And agree to License.txt
2) Copy lib/CFX_SOAP.jar to CFUSION/Java/Classes
3) Get a JVM, If you have not done so already goto http://java.sun.com/products/ and download the Java 2 Standard Edition JRE (Java Runtime Environment), install it.
4) Log into your ColdFusion Administrator, click on "Java" from the menu on the left.
5) If there is not already a value (There shouldn't be unless you already installed it) Enter the path to your Java Virtual Machine "JVM". The default on windows is c:program filesJavaSoftJRE.3inhotspotjvm.dll or /usr/java/jdk1.3/hotspot/libjvm.so
If you cannot find the locations try:
Start -> Find -> jvm.dll (Windows)
$> find / | grep libjvm.so (UNIX)
6) In the classpath setting (Still in the Java Settings of CF Administrator) add the path to CFX_SOAP.jar (the path including CFX_SOAP.jar)
c:cfusionjavaclassescfx_soap.jar;
If there are other values in this setting, seperate with a semi-colin (;) for windows, and with a colin (:) for UNIX.
Click "Apply"
10) Click on "CFX Tags" from the left menu. Enter in CFX_SOAP in the text box, and select "Java" for tag type, click add.
11) Under Class Name put: CFX_SOAP and enter a description, the supplied description is "A Simple SOAP Client by CFDEV.COM"