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);