Bitspan Knowledge Base Article - 100003

How to Automate Bitspan FEST™ with SOAP/HTTP

 

 

SUMMARY

This article provides an overview of programming Bitspan FESTä Agent using Automation from another program.

MORE INFORMATION

Bitspan provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Bitspan support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Bitspan Certified Partner or the Bitspan fee-based consulting line at (604) 926-3242. For more information about Bitspan Certified Partners, please visit the following Bitspan Web site:

http://www.bitspan.com/partner/referral/

For more information about the support options that are available and about how to contact Bitspan, visit the following Bitspan Web site:

http://www.bitspan.com/

Automation (formerly OLE Automation) allows one program to control another program by either issuing commands or retrieving information programmatically. You can use the code examples in this article from virtually any application that can make a SOAP, HTTP GET/POST.

 

The Bitspan FEST™ Agent Object Model

The Bitspan FEST model provides functionality to check whether an email is SPAM or not.

SOAP

The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.

POST /BSAS/SpamProcessor.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/IsSpam"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <IsSpam xmlns="http://tempuri.org/">
      <sLicense>string</sLicense>
      <body>string</body>
      <subject>string</subject>
      <attachmentNames>
        <string>string</string>
        <string>string</string>
      </attachmentNames>
      <dReceived>dateTime</dReceived>
      <header>string</header>
      <from>string</from>
      <to>string</to>
      <cc>string</cc>
    </IsSpam>
  </soap:Body>
</soap:Envelope>


 
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <IsSpamResponse xmlns="http://tempuri.org/">
      <IsSpamResult>boolean</IsSpamResult>
    </IsSpamResponse>
  </soap:Body>
</soap:Envelope>
    
  
 


HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /BSAS/SpamProcessor.asmx/IsSpam?sLicense=string&body=string&subject=string&attachmentNames=string&attachmentNames=string&dReceived=string&header=string&from=string&to=string&cc=string HTTP/1.1
Host: localhost
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<boolean xmlns="http://tempuri.org/">boolean</boolean>
 

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.


POST /BSAS/SpamProcessor.asmx/IsSpam HTTP/1.1 Host: localhost Content-Type: application/x-www-form-urlencoded Content-Length: length sLicense=string&body=string&subject=string&attachmentNames=string&attachmentNames=string&dReceived=string&header=string&from=string&to=string&cc=string



 
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<boolean xmlns="http://tempuri.org/">boolean</boolean>

REFERENCES

For more information about creating solutions with Bitspan FESTä, please see the following articles in the Bitspan Knowledge Base:

100001 How to Automated Bitspan FEST™ from Visual Basic
100002 How to Automated Bitspan FEST from Visual C++


The information in this article applies to:

Last Reviewed:

4/04/2004 (1.0)

Keywords:

kbdtacode kbhowto kbProgramming kbusage KB100002