HighTechTalks DotNet Forums  

Help in accessing a class

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Help in accessing a class in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Moojjoo
 
Posts: n/a

Default Help in accessing a class - 12-05-2007 , 12:17 PM






I have created an mySchema.cs file from the scheme myScheme.xsd from an
InfoPath form using XSD.exe I then created a Web services using the
mySchema.cs to access the data to input the data into a backend SQL Server
for later SQL Reporting.

I have completed the db scheme for reporting and the SQL Report and must say
it looks sweet.

Now to my problem:

The schema of the Data Source in the InfoPath form has a nested, nested
group such as the following:

myFields
- Group1
- RepeatingGroup1 (no problem getting to this data)
- GroupInSideGroup2
- RepeatingGroup2 (cannot get to this data or better yet I do not
know how)

Below is the code I am using


[WebMethod]
public void SubmitForm(myFields newForm)
{
DatabaseHelper db = new DatabaseHelper();

This works fine
//Code to Insert Objectives
// KeyRisks = RiskAssessment[] myFields.KeyRisks
foreach (Object businessObjective in newForm.KeyRisks)
{
db.AddParameter("@SumID", sumID);
db.AddParameter("@RaID", raID);
db.AddParameter("@Objective",
((XXX.CoveragePlan.WebService.BusObjective)(busine ssObjective)).BusObjective1);
db.ExecuteNonQuery("InsertObjective");
}
}

newForm does not seem to let me access the nested, nested group. Any help
would be great. If you need more details let me know.
--
<moojjoo/>

Reply With Quote
  #2  
Old   
Moojjoo
 
Posts: n/a

Default RE: Help in accessing a class - 12-06-2007 , 10:01 AM






Prayer works - I found the solution.

The problem was not in the CLASS file but rather in the InfoPath form.

In order to access that data you have to pass the deep groups of data as
seperate parameters.

You have to explicity tell the InfoPath for what root elements to pass in
the parameter so it will pass the root and child only.

So to all you InfoPather's be informed.
--
<moojjoo/>


"Moojjoo" wrote:

Quote:
I have created an mySchema.cs file from the scheme myScheme.xsd from an
InfoPath form using XSD.exe I then created a Web services using the
mySchema.cs to access the data to input the data into a backend SQL Server
for later SQL Reporting.

I have completed the db scheme for reporting and the SQL Report and must say
it looks sweet.

Now to my problem:

The schema of the Data Source in the InfoPath form has a nested, nested
group such as the following:

myFields
- Group1
- RepeatingGroup1 (no problem getting to this data)
- GroupInSideGroup2
- RepeatingGroup2 (cannot get to this data or better yet I do not
know how)

Below is the code I am using


[WebMethod]
public void SubmitForm(myFields newForm)
{
DatabaseHelper db = new DatabaseHelper();

This works fine
//Code to Insert Objectives
// KeyRisks = RiskAssessment[] myFields.KeyRisks
foreach (Object businessObjective in newForm.KeyRisks)
{
db.AddParameter("@SumID", sumID);
db.AddParameter("@RaID", raID);
db.AddParameter("@Objective",
((XXX.CoveragePlan.WebService.BusObjective)(busine ssObjective)).BusObjective1);
db.ExecuteNonQuery("InsertObjective");
}
}

newForm does not seem to let me access the nested, nested group. Any help
would be great. If you need more details let me know.
--
moojjoo/

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.