본문 바로가기

.NET/MOSS

WebServiceConnection ==>MOSS


Moss를 사용시 WebServiceConnection class 사용법

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);
링크 주소 =>
http://www.developerfood.com/how-to-use-webserviceconnection-to-call-webservoce/microsoft-public-infopath/e6344bd5-bc13-4b74-93eb-318e419b6ae0/article.aspx