Programmatically Submit Form to WSS

C

chrispragash

Hello All,

I'm trying to submit an InfoPath Form to WSS using a Web Service. I
have the form template published on a WSS Site. When the user selects
submit, I want to be able to publish all the information to a web
service which inturn does some extra processing and should finally also
add the data to WSS.

Any ideas how I could programmatically submit infopath data to wss?

Thanks in advance,
Chris
 
B

Bart

hi chris,

you can either submit it through the dataconnection to a webservice or
either through custom script(avilable somewhere on the msdn), once you recive
the xml use sharepoint object model to add a file to the form library
(avilable in the wss sdk).

note: when u submit the document to a ebservice infopath adds a parent
element to the Xmldocument

look at the following code i created a webservice function that receives an
xml document and then i manipulate it.

public void HelloWorld(XmlDocument xx)
{
try
try
{
kk= new XmlDocument();
kk=xx;
oxml=kk.OuterXml;
XmlNamespaceManager nm=new XmlNamespaceManager(kk.NameTable);
nm.AddNamespace("my","http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-20T13:32:11");
nm.PushScope();
string ContractName=kk.SelectSingleNode("//my:ContractName",nm).InnerText;
string QueryType=kk.SelectSingleNode("//my:QueryName",nm).InnerText;
string
QueryDescription=kk.SelectSingleNode("//my:QuertDetails",nm).InnerText;
string
QuerySubmittedBy=kk.SelectSingleNode("//my:QuerySubmittedBy",nm).InnerText;
string Phoneno=kk.SelectSingleNode("//my:phoneno",nm).InnerText;
string EmailID=kk.SelectSingleNode("//my:EmailID",nm)

after this use the sharepoint object model to add the file to the form
library.

cheers
Bart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top