R
rkauzlick
I'm attempting to write a simple web service that uses InfoPath.
In Info Path, I created a very simple form with one field. I then
used "Extract Form Files" to get the myschema.xsd file, which in turn
I then run the xsd.exe..... command to generate the .cs file.
I have added the .cs file to my .NET project.
Here is the .cs file code:
public partial class myFields {
private string shipment_IDField;
private System.Xml.XmlAttribute[] anyAttrField;
/// <remarks/>
public string Shipment_ID {
get {
return this.shipment_IDField;
}
set {
this.shipment_IDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAnyAttributeAttribute()]
public System.Xml.XmlAttribute[] AnyAttr {
get {
return this.anyAttrField;
}
set {
this.anyAttrField = value;
}
}
}
Here is the .asmx code.
[WebMethod]
public void SubmitForm(myFields info)
{
//I need code here to extract the value that was submitted
from Info path
// Ultimately I want to write a SQL statement to Insert/
Update a database in the database
stSQL = "UPDATE TABLE SET VALUE = '" + info.ShipmentID
}
I have no clue how to extract the data that was submitted by InfoPath.
When I debug the data, it always comes back as null.
In Info Path, I created a very simple form with one field. I then
used "Extract Form Files" to get the myschema.xsd file, which in turn
I then run the xsd.exe..... command to generate the .cs file.
I have added the .cs file to my .NET project.
Here is the .cs file code:
public partial class myFields {
private string shipment_IDField;
private System.Xml.XmlAttribute[] anyAttrField;
/// <remarks/>
public string Shipment_ID {
get {
return this.shipment_IDField;
}
set {
this.shipment_IDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAnyAttributeAttribute()]
public System.Xml.XmlAttribute[] AnyAttr {
get {
return this.anyAttrField;
}
set {
this.anyAttrField = value;
}
}
}
Here is the .asmx code.
[WebMethod]
public void SubmitForm(myFields info)
{
//I need code here to extract the value that was submitted
from Info path
// Ultimately I want to write a SQL statement to Insert/
Update a database in the database
stSQL = "UPDATE TABLE SET VALUE = '" + info.ShipmentID
}
I have no clue how to extract the data that was submitted by InfoPath.
When I debug the data, it always comes back as null.