/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this service wrapper you may modify the generated sub-class of this class - Agtloc_service.as.
 */
package services.agtloc_service
{
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.services.wrapper.WebServiceWrapper;
import com.adobe.serializers.utility.TypeUtility;
import mx.rpc.AbstractOperation;
import mx.rpc.AsyncToken;
import mx.rpc.soap.mxml.Operation;
import mx.rpc.soap.mxml.WebService;
import valueObjects.AgentLocatorResponse;
import valueObjects.EmailConfirmation;
import valueObjects.PingInputType;
import valueObjects.PingResultType;

[ExcludeClass]internal class _Super_Agtloc_service extends com.adobe.fiber.services.wrapper.WebServiceWrapper
{
     
    // Constructor
    public function _Super_Agtloc_service()
    {
        // initialize service control
        _serviceControl = new mx.rpc.soap.mxml.WebService();
        var operations:Object = new Object();
        var operation:mx.rpc.soap.mxml.Operation;

        operation = new mx.rpc.soap.mxml.Operation(null, "locateAgentsByName");
         operation.resultType = valueObjects.AgentLocatorResponse;
        operations["locateAgentsByName"] = operation;

        operation = new mx.rpc.soap.mxml.Operation(null, "sendLeadToAgent");
         operation.resultType = valueObjects.EmailConfirmation;
        operations["sendLeadToAgent"] = operation;

        operation = new mx.rpc.soap.mxml.Operation(null, "ping");
         operation.resultType = valueObjects.PingResultType;
        operations["ping"] = operation;

        operation = new mx.rpc.soap.mxml.Operation(null, "locateNearestAgentsByZIPCode");
         operation.resultType = valueObjects.AgentLocatorResponse;
        operations["locateNearestAgentsByZIPCode"] = operation;

        operation = new mx.rpc.soap.mxml.Operation(null, "assignNearestAgentByAddress");
         operation.resultType = valueObjects.AgentLocatorResponse;
        operations["assignNearestAgentByAddress"] = operation;

        operation = new mx.rpc.soap.mxml.Operation(null, "locateNearestAgentsByAddress");
         operation.resultType = valueObjects.AgentLocatorResponse;
        operations["locateNearestAgentsByAddress"] = operation;

        _serviceControl.operations = operations;
        try
        {
            _serviceControl.convertResultHandler = com.adobe.serializers.utility.TypeUtility.convertResultHandler;
        }
        catch (e: Error)
        { /* Flex 3.4 and eralier does not support the convertResultHandler functionality. */ }



        _serviceControl.service = "AgentLocatorService";
        _serviceControl.port = "AgentLocatorServiceHttpPort";
        wsdl = "http://apps.amfam.com/agtloc_service/flash/agtloc_service.wsdl";
        model_internal::loadWSDLIfNecessary();


        model_internal::initialize();
    }

    /**
      * This method is a generated wrapper used to call the 'locateAgentsByName' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function locateAgentsByName(firstName:String, lastName:String, licensedState:String) : mx.rpc.AsyncToken
    {
        model_internal::loadWSDLIfNecessary();
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("locateAgentsByName");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(firstName,lastName,licensedState) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'sendLeadToAgent' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function sendLeadToAgent(emailTo:String, emailFrom:String, emailSubject:String, emailMessage:String, leadInfo:String) : mx.rpc.AsyncToken
    {
        model_internal::loadWSDLIfNecessary();
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("sendLeadToAgent");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(emailTo,emailFrom,emailSubject,emailMessage,leadInfo) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'ping' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function ping(PingInput:valueObjects.PingInputType) : mx.rpc.AsyncToken
    {
        model_internal::loadWSDLIfNecessary();
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("ping");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(PingInput) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'locateNearestAgentsByZIPCode' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function locateNearestAgentsByZIPCode(zipcode:String, numberOfOfficesToLocate:int, licensedState:String, languageSpoken:String, enrolledInProgram:String) : mx.rpc.AsyncToken
    {
        model_internal::loadWSDLIfNecessary();
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("locateNearestAgentsByZIPCode");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(zipcode,numberOfOfficesToLocate,licensedState,languageSpoken,enrolledInProgram) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'assignNearestAgentByAddress' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function assignNearestAgentByAddress(address:String, city:String, state:String, zipcode:String, licensedState:String, languageSpoken:String, enrolledInProgram:String) : mx.rpc.AsyncToken
    {
        model_internal::loadWSDLIfNecessary();
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("assignNearestAgentByAddress");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(address,city,state,zipcode,licensedState,languageSpoken,enrolledInProgram) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'locateNearestAgentsByAddress' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function locateNearestAgentsByAddress(address:String, city:String, state:String, zipcode:String, numberOfOfficesToLocate:int, licensedState:String, languageSpoken:String, enrolledInProgram:String) : mx.rpc.AsyncToken
    {
        model_internal::loadWSDLIfNecessary();
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("locateNearestAgentsByAddress");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(address,city,state,zipcode,numberOfOfficesToLocate,licensedState,languageSpoken,enrolledInProgram) ;

        return _internal_token;
    }
     
}

}