How to load a XML file generated by Infopath to a web page

N

Nicholas

I need to load the XML file generated by Infopath to a web page(.aspx) and
submit it to the server. How can I reach this?

The reason why I need to do this based on this scenario: all clients can
fill the form but just administrator can submit the content in the form to
server.

One way to solve this problem is desing an administrator version from with
submit function and a client version without submit function, but the problem
is administrator version can not read the XML file generated by client
version. So I want to load the xml file to a aspx web page and submit it to
server, of course, this page just can be opened by administrator.

Because I don't use Sharepoint, this is the most friendly way I can figure
out, any suggestion weil be apperciated!
 
S

S.Y.M. Wong-A-Ton

Your scenario is not entirely clear to me. Submitting an InfoPath form to a
web page (whether ASP or ASPX or any other kind) is possible by using the
option to submit the form to a "Web server (HTTP)" under "Tools > Submitting
Forms". The web page will receive the entire form including processing
instructions, and you can then extract it as a binary stream within the web
page. The part that is not clear to me is how you are going to use the web
page thereafter to submit the form to the server. Are you going to save the
forms in SQL Server through the web page? What kind of server are you
submitting to?
 
N

Nicholas

Sorry for the unclearing description, the scenario is: I have an ASP.NET
website used SQL database, visitor of this website can download a form
designed by InfoPath from this website and then fill it.
But visitor can not submit this form to SQL database by themself, visitor
must send the XML file to administrator and administrator will do the submit
job after evluation.

Two questions:
1, how to just let administrator can submit this form.
2, what is the best way to submit this form with out SharePoint Portal
Server? use HTTP, WebService or something else.

For the question one, I think can design two forms with the same XML schema,
one for visitor, one for administrator. Just administrator version inclding
submit logic. The problem is InfoPath will mark the XML file generated by
visitor version. when we try to open that XML file through administrator
version, we just get an error message.
Another solution for question one is we just tread the XML file sent by
visitor as a "pure" XML file. we programly retrive the information from this
XML file and then submit it to SQL through a ASPX webpage. But I am not very
clearly about how to implement this now.

Many thanks for your help!!
 
S

S.Y.M. Wong-A-Ton

Have you already looked into using Roles? And, are you using InfoPath 2003 or
2007?

With InfoPath 2007 you can load a form into an InfoPath control that can be
hosted either in a Windows or Web application. If you are using InfoPath 2003
and just want to use an .aspx page, the XML files could be stored somewhere
on disk, and then the administrator could open each XML file using a File
control. Once the XML is loaded within the web page, you can parse it to show
the content of relevant form fields on the web page. And after the
administrator approves the content, you can just write the originally loaded
XML in its entirety to SQL Server. If you have SQL Server 2005, you can use
the new XML data type for a field in a table where you will be saving the
InfoPath forms in.

Perhaps it might be easier to create a WinForms application to load and view
the InfoPath forms in and then save them to the SQL database...
 
N

Nicholas

Many many thanks for your help, your reply has pointed out the way about how
to solve this problem.

Because I use Infopath 2003 and SQL 2000, loading XML file into HTML form in
ASPX page will be good.
 

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