Ejemplo n.º 1
0
/// <summary>
/// Completes the _NAME_ service.
/// </summary>
    public _NAME_Response End_NAME_(IAsyncResult result)
    {
        InvokeServiceResponseMessage response = null;

        try
        {
            response = Channel.EndInvokeService(result);
        }
        catch (FaultException <ServiceFault> e)
        {
            throw HandleSoapFault(e);
        }

        CheckForFault(response);

        return((_NAME_Response)BinaryDecoder.DecodeMessage(response.InvokeServiceResponse, typeof(_NAME_Response), CreateContext()));
    }
Ejemplo n.º 2
0
// ***START***
#if (!OPCUA_EXCLUDE__NAME_)
/// <summary>
/// Invokes the _NAME_ service.
/// </summary>
    public _NAME_Response _NAME_(_NAME_Request request)
    {
        BinaryMessageContext context = CreateContext();

        byte[] buffer = BinaryEncoder.EncodeMessage(request, context);

        InvokeServiceResponseMessage response = null;

        try
        {
            response = Channel.InvokeService(new InvokeServiceMessage(buffer));
        }
        catch (FaultException <ServiceFault> e)
        {
            throw HandleSoapFault(e);
        }

        CheckForFault(response);

        return((_NAME_Response)BinaryDecoder.DecodeMessage(response.InvokeServiceResponse, typeof(_NAME_Response), context));
    }