com.raritantechnologies.federated.SOAP
Class SOAPSearchSourceFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
      extended bycom.raritantechnologies.federated.SOAP.SOAPSearchSourceFactory
All Implemented Interfaces:
IXMLSearchSourceFactory

public class SOAPSearchSourceFactory
extends XMLSearchSourceFactory

Responsible for constructing SOAPSearchSource objects from <SourceType> XML tags.

XML Configuration Template:
  <SourceType name="AmazonWebService" type="SOAPSearchSource" displayName="Federated SOAP - Amazon"
             multiThreaded="false"  // shared resource
             sourceFactoryClass="com.raritantechnologies.federated.SOAP.SOAPSearchSourceFactory" 
             queryProcessor="com.raritantechnologies.federated.SOAP.SOAPQueryProcessor"
             IDField="[ field that has document ID ]"
             URLField="[ field that has document URL ]"
             titleField="[ field that has document title ]" >

    <!-- LoginProcess for secure sources -->
    <LoginProcess UserName="[ user name ]" Password="[ clear password ]" PasswordEnc="[ DES encrypted password ]" />

    <!-- =================================================================================  -->
    <!-- Describes mapping of abstract fields defined in FieldSpecs section and of the      -->
    <!-- to the field names in the SOAP source.                                             -->
    <!-- =================================================================================  -->
    <Fields>
      <Field ID="[ abstract field ID ]" sourceName="[ name of field in source ]" />
      <!-- etc...  -->
    </Fields>

    <!-- =================================================================================  -->
    <!-- Describes the SOAP service.                                                        -->
    <!-- =================================================================================  -->
    <SOAPServiceDef
        targetObjectURI="[ from WSDL service/port/soap:address tag, location attribute ]"
        xslTransform="BASE_PATH/SOAP/AmazonProductInfo.xsl"
        htmlParserClass="[ class to do HTML parsing ]"
        scrapeXML="[ path to HTMLScraper XML config]"
        scrapeXSL="[ path to scraper xslt ]" />

    <SOAPMethodSequence >
      <method name="[a method name  - links to SOAPMethod tag]" >
         <!-- selection parameters for this method - input parameters must match all -->
         <parameter name="[ input parameter to select this method ]" value="[ parameter value ]" />
      </method>
      <method name="[another method - links to SOAPMethod tag]" />
    </SOAPMethodSequence>

    - or -

    <ProgramSOAPMethodSequence separator="," >
       <[CDATA[
           print "method1,method2,...";
       ]]>
    </SOAPMethodSequence>

    <SOAPMethod methodName="[ from WSDL message tag, name attribute ]" 
                   namespace="ns1" 
                   SOAPAction="[ from WSDL binding/operation/soap:operation tag, soapAction attribute ]"
                   requestXMLType="[ same as WSDL request message/part tag, type attribute]" 
                   responseXMLType="[ from WSDL response message/part tag, type attribute]"
                   namespaceHost="http://soap.amazon.com" >

      <!-- One or more parameter elements -->
      <parameter name="[ name or parameter in SOAP request ]"
                    type="[ xsd type: e.g. xsd:string or xsd:int ]"
                    field="[ field in request ]" 
                    value="[ fixed value ]"
                    computeFrom="[ formula used by IntegerCalculator e.g.: (START_REC / 10) + 1) ]"
                    nil="true|false  send empty field ]"
                    inputFrom="[ value previously extracted by a ResponseProcess ]" >

        <StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >

        </StringFilter>

      </parameter>

      <!-- etc. . . -->

      <!-- Complex SOAP parameters:  contain nested SOAP structures -->


      <!-- handles intermediate result parameters: saves them to a context so that subsequent methods can use them -->
      <ResponseProcess>
        <!-- One or more ResponseParameter elements -->
        <ResponseParameter path="[ path in SOAP Response with data ]"
                              outputTo="[ name of temporary variable in Context ]" />
        <!-- etc. . . -->

      </ResponseProcess>
          
    </SOAPMethod>

    <!--     A SOAPMethod with complex structure: -->
    <SOAPMethod>
      <ComplexParameter name="[name of complex param]" type="[ type ?? ]">

      </ComplexParameter>
    </SOAPMethod>

  </SourceType>
 

Relationship of SOAP Configuration parameters to WSDL parameters:

/SOAPServiceDef/targetObjectURI /SOAPServiceDef/soapURL /SOAPMethod methodName attribute /SOAPMethod/SOAPAction /SOAPMethod/requestXMLType /SOAPMethod/responseXMLType /SOAPMethod/namespaceHost
Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
SOAPSearchSourceFactory()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
 SOAPMethod createSOAPMethod(org.w3c.dom.Element methodElem, SOAPSearchSource soapSS, ISearchFieldMapFactory factory)
           
 
Methods inherited from class com.raritantechnologies.searchApp.XMLSearchSourceFactory
changeBasePath, initializeFieldFormatters, initializeSource, initializeStaticFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOAPSearchSourceFactory

public SOAPSearchSourceFactory()
Method Detail

createSearchSources

public SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem,
                                          ISearchFieldMapFactory factory)
Specified by:
createSearchSources in interface IXMLSearchSourceFactory
Specified by:
createSearchSources in class XMLSearchSourceFactory

createSOAPMethod

public SOAPMethod createSOAPMethod(org.w3c.dom.Element methodElem,
                                   SOAPSearchSource soapSS,
                                   ISearchFieldMapFactory factory)