Hi,
I'm having difficulties submitting an InfoPath 2007 form to a C# 2.0 WebService. The WS submit on the InfoPath side seems to go fine (I used Fiddler to capture the soap stream, and it seems correct, and no error is reported in InfoPath)
Here is what I have done :
- I created an InfoPath form from a blank template using the fields I need.
- I saved the form as source files
- in the source folder, "xsd.exe myschema.xsd /classes /l:cs /n:WebServices" from the .Net 2.0 SDK command line (and WebSevices is the namespace of my WebService)
- I add the newly created "myschema.cs" file to my Visual Studio 2008 project (that has .NET 2.0 target compilation)
- I add a new WebMethod to a WebService, as this :
[WebMethod]
public void submitForm(myFields form)
{
// do stuff, but mainly I have a breakpoint at the start so I can debug the WS before I do anything crazy
}
- I compile the WS and run it in debug mode in the built-in VS test IIS server (no problem so far)
- In the InfoPath form, I add a new submit to webservice data connexion to the test server (using myFields as root, and submitting as XML tree and everything)
- I run the form and fill it, submit (no error), then it brings me back to Visual Studio (it stops on my breakpoint in the WebMethod)
then I inspect the "form" element (the one the WebService gets from InfoPath). It is not null, but every attribute has either a null value (even sections), or false (for bools)...
Am I missing something ?
(The SOAP submit query from InfoPath seems correct, there are values in it, and I also tried sending the XML through as text, or sending the full document. Neither works any better)
My guess would be that the WebService is unable to parse the SOAP stream, so it creates an empty myFields object. How could I be able to debug that?
Thanks.
nTuX