webform WebServiceConnection empty result - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

webform WebServiceConnection empty result

Last post 09-23-2012 02:15 AM by michaelr524. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-23-2012 02:15 AM

    webform WebServiceConnection empty result

    Hi Everybody,

    Very strange situation over here.
    We get some data from a soap service here from our form code.
    Works fine in the client version of the form but when deployed as a web form we just receive an empty result.
    No exception, errors result is empty and output result is also empty.
    We have gone as far as inspecting the http traffic from the server using WireShark and saw that the request actually returns a result but for some strange reason it does not show up in the form (?!).
    Has anyone experienced anything like this?

     Thanks, Michael

    this is my code:

     public class ServiceQuery
        {
            publicServiceQuery(WebServiceConnectionserviceConnection,
                                StringserviceUrl,
                                StringsoapAction)
            {
                ServiceConnection =serviceConnection;
                ServiceUrl = serviceUrl;
                SoapAction = soapAction;
            }
     
            public Boolean Run(Stringparameters)
            {
                IsQuerySucceeded = false;
     
                try
                {
                    XmlDocument inDoc = newXmlDocument();
                    XmlDocument outDoc = newXmlDocument();
                    XmlDocument errorDoc = newXmlDocument();
     
                    inDoc.LoadXml(parameters);
     
                    XPathNavigator inNav =inDoc.CreateNavigator();
                    XPathNavigator outNav =outDoc.CreateNavigator();
                    XPathNavigator errorNav =errorDoc.CreateNavigator();
     
                    ServiceConnection.ServiceUrl = newUri(ServiceUrl);
                    ServiceConnection.SoapAction = newUri(SoapAction);
                    ServiceConnection.Execute(inNav, outNav, errorNav);
     
                    Result = outNav;
                    ErrorResult = errorNav;
     
                    IsQuerySucceeded = true;
                }
                catch (Exception e)
                {
                    CaughtException = e;
                    IsQuerySucceeded = false;
                }
     
                return IsQuerySucceeded;
            }
     
            public WebServiceConnectionServiceConnection { get; set; }
            public String ConnectionName {get; set; }
            public String ServiceUrl { get;set; }
            public String SoapAction { get;set; }
     
            public XPathNavigator Result {get; set; }
            public XPathNavigator ErrorResult { get; set; }
            public Exception CaughtException {get; set; }
            public Boolean IsQuerySucceeded {get; set; }
        }
     
    Filed under: , ,
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.