Ejemplo n.º 1
0
    private void SendMessage()
    {
        string url                   = "http://83.82.26.17:6371/SetTextAppService.svc";
        string operationName         = "Show";
        string interfaceName         = "ISetTextAppService";
        string soapAction            = String.Format("http://tempuri.org/{0}/{1}", interfaceName, operationName);
        int    timeoutInMilliseconds = 3000;

        string stringToSend = GetStringToSend();

        _resultString = AppServiceHelper.SendSoapMessage(url, soapAction, stringToSend, timeoutInMilliseconds);
    }
Ejemplo n.º 2
0
    void OnGUI()
    {
        int y = _spacing;

        GUI.Label(new Rect(_spacing, y, _width, _lineHeight), "SOAP Test", _labelStyle);

        y += _lineHeight;
        y += _spacing;

        if (GUI.Button(new Rect(_spacing, y, _width, _lineHeight), "Send Request"))
        {
            //string url = "http://localhost:6371/SetTextAppService.svc";
            string url                 = "http://83.82.26.17:6371/SetTextAppService.svc";
            string operationName       = "Show";
            string interfaceName       = "ISetTextAppService";
            string soapAction          = String.Format("http://tempuri.org/{0}/{1}", interfaceName, operationName);
            int    timeoutInMillsecods = 10000;

            string stringToSend = GetStringToSend();
            try
            {
                _resultString = AppServiceHelper.SendSoapMessage(url, soapAction, stringToSend, timeoutInMillsecods);
                Debug.Log("Status = Ok");
                Debug.Log(_resultString);
            }
            catch (Exception ex)
            {
                _resultString = ex.Message;
                Debug.Log(_resultString);
            }
        }
        y += _lineHeight;
        y += _spacing;

        GUI.Label(new Rect(_spacing, y, 400, 600), _resultString, _labelStyle);
    }