Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

How to use WebServiceConnection to call webservoce ...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wozza - 23 Feb 2007 12:52 GMT
Does anybody know how to use this method to update data using a web service
call ....

I am getting the following error!

"Exception from HRESULT: 0x8004304D"
  at
Microsoft.Office.InfoPath.Internal.MomExceptionHelper.ExecuteDataConnectionAction(OMCall
d)
   at
Microsoft.Office.InfoPath.Internal.WebServiceConnectionHost.Execute(XPathNavigator
input, XPathNavigator output, XPathNavigator errors)
   at InfoPathBook.FormCode.btnSubmit_Clicked(Object sender,
ClickedEventArgs e)

My code is ...

// Create XmlDocuments.

XmlDocument inputDocument = new XmlDocument();

XmlDocument outputDocument = new XmlDocument();

XmlDocument errorsDocument = new XmlDocument();

// Create XPathNavigator objects for documents.

XPathNavigator inputNav = this.MainDataSource.CreateNavigator();

XPathNavigator outputNav = outputDocument.CreateNavigator();

XPathNavigator errorsNav = errorsDocument.CreateNavigator();

WebServiceConnection wsc =
(WebServiceConnection)this.DataConnections["MyServicePUT"];

Trace.WriteLine(inputNav.OuterXml);

wsc.Execute(inputNav, outputNav, errorsNav);
Wozza - 23 Feb 2007 13:24 GMT
Some more detail ...

1. If null is passed as the inputNav then the call seems to work
(documentation says "If the input parameter is specified as null then the
declarative settings are used.")

2. If the inputNav XPathNavigator is specified the errorNav.Value is:
[5208] soap:ServerSystem.Web.Services.Protocols.SoapException: Server was
unable to process request. ---> System.ArgumentNullException: Value cannot
be null.
[5208] Parameter name: s
[5208]    at System.IO.StringReader..ctor(String s)
[5208]    at System.Xml.XmlDocument.LoadXml(String xml)
[5208]    at Audit.Service.PutAuditDocument(String xmlDocument) in
P:\Projects\Audit\Audit.Service\AuditService.asmx.cs:line 457
[5208]    --- End of inner exception stack trace ---
[5208] System.Net.WebException
[5208] Exception from HRESULT: 0x8004304D
[5208]    at
Microsoft.Office.InfoPath.Internal.MomExceptionHelper.ExecuteDataConnectionAction(OMCall
d)
[5208]    at
Microsoft.Office.InfoPath.Internal.WebServiceConnectionHost.Execute(XPathNavigator
input, XPathNavigator output, XPathNavigator errors)
[5208]    at InfoPathBookControlSizing.FormCode.btnSubmit_Clicked(Object
sender, ClickedEventArgs e)

> Does anybody know how to use this method to update data using a web
> service call ....
[quoted text clipped - 35 lines]
>
> wsc.Execute(inputNav, outputNav, errorsNav);
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.