Web Service Connection - Works in 'Preview' - Errors after 'Publish' - InfoPath Dev
in

InfoPath Dev

Web Service Connection - Works in 'Preview' - Errors after 'Publish'

Last post 08-14-2009 10:57 AM by warrtalon. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 08-05-2009 10:08 AM

    Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    Building a complex browser enabled form that has multiple Data Connections to the UpdateListItems web service for the same site. (2 Different lists, 3 different connections.)

    Retrieve Data Connection - SharePoint List
    Submit Data Connection - Web Service w/ CAML query (programatically generated) - Updates Existing Item
    Submit Data Connection - Web Service w/ CAML query (programatically generated) - Creates New Item

    (At first, each of these data connections were created through the GUI in InfoPath. After some researching, I switched these data connections to UDC's stored on the same SharePoint site.)


    The form is fully trusted. Published to a SharePoint server with InfoPath Forms Services.

    All 3 web service connections work flawlessly while in 'Preview' mode. Once it's published, the two submission web services return with an exception.

    Thrown Error:

    System.Net.WebException: The remote server returned an error: (403) Forbidden.
    at System.Net.HttpWebRequest.GetResponse()
    at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.GetResponseHelper(WebRequest request, DataAdapterTimer dataAdapterTimer, DataAdapterCredentials credentials, Stopwatch timer, ExecWebRequestExceptionState state, String adapterName, Boolean isQuery) at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int64 timeOutMillisec, Solution solution, Document document, String name, Boolean isQuery, DataAdapterTimer dataAdapterTimer, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf)

    An entry has been added to the Windows event log of the server.
    Log ID:5337

    Corresponding SharePoint Log Entries:

    08/05/2009 12:55:00.47 w3wp.exe (0x0B98) 0x18E4 Forms Server Forms Services Data Objects 13zh Exception System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.HttpWebRequest.GetResponse() at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.GetResponseHelper(WebRequest request, DataAdapterTimer dataAdapterTimer, DataAdapterCredentials credentials, Stopwatch timer, ExecWebRequestExceptionState state, String adapterName, Boolean isQuery) at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int64 timeOutMillisec, Solution solution, Document document, String name, Boolean isQuery, DataAdapterTimer dataAdapterTimer, DataAdapt... e66d480a-d5df-4812-b417-4622655454a4

    08/05/2009 12:55:00.47* w3wp.exe (0x0B98) 0x18E4 Forms Server Forms Services Data Objects 13zh Exception ...erCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf) e66d480a-d5df-4812-b417-4622655454a4

    08/05/2009 12:55:00.47 w3wp.exe (0x0B98) 0x18E4 Forms Server Forms Services Runtime - Busine 82g6 Warning Business logic failed due to an exception. (User: XXXX\xxxxxx, Form Name: FormName, IP: , Request: http://sharepointserver/_layouts/Postback.FormServer.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:FormName:-myXSD-2009-07-02T13-36-04, Type: WebException, Exception Message: The remote server returned an error: (403) Forbidden. The remote server returned an error: (403) Forbidden.) e66d480a-d5df-4812-b417-4622655454a4

    08/05/2009 12:55:00.49 w3wp.exe (0x0B98) 0x18E4 Forms Server Forms Services Object Model 7tge Assert Exception thrown from business logic event listener StackTrace: at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.CallFormCodeWithExceptionHandling(UserMessages userMessages, OMCall d) at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.<>c__DisplayClass2.b__0() at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.Click(Document document, XPathNavigator container) at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventClick.Play(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Event.PlayEvent(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor) at Microsoft.Office.InfoPath.Server... e66d480a-d5df-4812-b417-4622655454a4

    08/05/2009 12:55:00.49* w3wp.exe (0x0B98) 0x18E4 Forms Server Forms Services Object Model 7tge Assert ....DocumentLifetime.EventLogProcessor.<>c__DisplayClass1.b__0() at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventLogProcessor.ExecuteLog(Int32 expectedEventLogID) at Microsoft.Office.InfoPath.Serv e66d480a-d5df-4812-b417-4622655454a4

  • 08-06-2009 02:04 PM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    If it works from your client but not from the browser, it's most likely a double hop authentication issue. Especially if Web Service reside on a different server? If so, you need to configure SharePoint to access it. You can use SSO for that.

    By the way: Full Trust is bad practice - you shouldn't need it.

    Patrick Halstead
    Project Manager at Qdabra
  • 08-06-2009 02:12 PM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    I'm referencing the same Web Service 3 times.  All on the same server.

    Unless I'm mistaken, I thought all Browser Enabled forms with managed code require Full Trust?

     

    Some more info: 1st web service retrieves the data, then the next two either add a new item, or update an item.  (Both on button clicks)

    For the time being, I created another button on the default view (loads before the 1st web service call) which can call one of the submit web services.  I get the same error on this button click.

    Double-hop referring to 2 web service connections on different servers or the SharePoint Server with InfoPath Forms Service and the Web Service on different servers?

  • 08-06-2009 04:53 PM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    No they don't require Full Trust but they do require Admin Deploy.

    If InfoPath Forms Services and the Web Services are on different servers, you have a double hop issue.

    Patrick Halstead
    Project Manager at Qdabra
  • 08-06-2009 05:49 PM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    Same server. Would setting up SSO effect anything if they were on the same server. Might do this just in case this is a weird resolution issue.
  • 08-07-2009 06:31 AM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    Is this not accurate?

  • 08-07-2009 06:35 AM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    Just tried Domain level security.... Preview mode fails with this error (on button click to query the web service):

    System.Security.SecurityException
    Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
    at System.Security.CodeAccessPermission.Demand()
    at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
    at System.Net.HttpRequestCreator.Create(Uri Uri)
    at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
    at System.Net.WebRequest.Create(Uri requestUri)
    at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
    at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at EWC_Massage_Signup.EWC_Lists.Lists.GetListAndView(String listName, String viewName)
    at EWC_Massage_Signup.FormCode.CTRL4_13_Clicked(Object sender, ClickedEventArgs e)
    at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
    at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)


    Once I put it back to Full Trust, the web service queries work fine and I don't receive any errors (in preview mode).....

    Published form is still throwing an exception :( Any other ideas??
  • 08-13-2009 05:33 PM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    Too much to read - are the web service data connections converted to UDC?

  • 08-14-2009 10:08 AM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    From the original post.....

    (At first, each of these data connections were created through the GUI in InfoPath. After some researching, I switched these data connections to UDC's stored on the same SharePoint site.)
  • 08-14-2009 10:57 AM In reply to

    Re: Web Service Connection - Works in 'Preview' - Errors after 'Publish'

    K.

    When I've worked with web services to read/write to back-end data sources, I had to not only convert to UDC but also create an SSO app def and edit the UDC to make the permissions pass through properly.

Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.