Can't Trigger the Event for submitting the data to DB

Apr 24, 2008 at 8:50 AM
I have used your tools to test my form server. It's okay. But it cannot trigger the event that submit the data.
How to make it work?
Thanks a lot and proud of your working
Coordinator
Apr 24, 2008 at 10:04 PM
Edited Apr 24, 2008 at 10:13 PM
The event that triggers the submit of the data should be in one of the postback requests.

Double check that all the requests that were made to /_layouts/Postback.FormServer.aspx have a corresponding web service request in your web test. If you want, I can take a look at a Fiddler capture and/or your web test to help debug.

What kind of submit is your form using?
Are you seeing an error in the response for the data submit ("There was an error submitting..."), or are you not seeing your submitted form data after running the test? Either case may indicate that you need to use a context parameter for some dynamic data. For example, if your submit logic is using some data from the form to name the saved form, you probably would want that value defined in a context parameter. Then substitute context parameter in the Event Log of the postback request string bodys.
Apr 25, 2008 at 2:03 AM
the fiddler is captured in the following

I don't know why it can't trigger the event of btnSaveForm. There is a onclick function.

8;0;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;162;1;633446191742641000;;canary 1;btnNext1;V1_I1;

8;2;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;137;1;633446191742641000;;canary 0;V1I1O12;;Mr 0;V1I1T17;0;asd 0;V1I1T18;0;asd 0;V1I1T28;0;asd 0;V1I1D30;;2ea6789d-61cc-4a54-a590-20a1053aface 0;V1I1T38;0;3123123 0;V1I1T49;0;asd 0;V1I1O59;;Owned 0;V1I1D58;;aeb9f0d9-d3b1-4ec8-95d8-fb21b5234039 0;V1I1T32;0;11 0;V1I1T33;0;11 0;V1I1T34;0;2001 0;V1I1D76;;905a53a2-1a7e-44af-86a0-d154995b1ccc

8;3;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;162;1;633446191742641000;;canary 1;btnNext2;V1_I1;

8;4;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;162;1;633446191742641000;;canary 0;V1I1T28;0;a123 1;btnNext2;V1_I1;

8;6;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;162;1;633446191742641000;;canary 1;btnNext4;V1_I1;

8;8;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;162;1;633446191742641000;;canary 0;V1I1O22;;4999999 0;V1I1O28;;29999999 0;V1I1O54;;LIMITED2 1;btnNext5;V1_I1;

8;10;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;162;1;633446191742641000;;canary 0;V1I1C15;;true 0;V1I1D17;;0f1c18c4-0cf8-4766-b7bd-11a1abaaf1ac 0;V1I1O19;;ENG 0;V1I1O24;;ENG 1;btnPreview;V1_I1;

8;12;editingSessionId;solutionId;0;;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FFormServerTemplates%2FAccountOpeningFormN.xsn;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2F;http%3A%2F%2Fntuacodb01%3A6444;http%3A%2F%2Fntuacodb01%3A6444%2FAOForm%2FForms%2FAllItems.aspx;1;1;0;162;1;633446191742641000;;canary 1;btnSaveForm;V1_I1;
Coordinator
Apr 25, 2008 at 5:40 PM
Edited Apr 25, 2008 at 6:15 PM
The second item in EventLog info is the postback counter. This number increments with every postback. From the eventlogs you posted, the postback counters are (0,2,3,4,6,8,10,12). There are some missing numbers in the sequence (1,5,9,11), which means the webtest is missing some postbacks that occured when you captured your form actions.

I think my instructions/plugins are missing some information. InfoPath actually does two types of postbacks - partial postback and full page postback. Right now, my project only supports partial postbacks.

In your fiddler capture, were there additional requests to /_layouts/FormServer.aspx in between the requests to /_layouts/Postback.FormServer.aspx? Those requests would be the full page postbacks. Inside the full page postback's string body, you should be able to find an eventlog. Those eventlogs should contain the missing postback counters (1,5,9,11).

Thank you for the feedback. I will work on support for full page postbacks.
Coordinator
Apr 29, 2008 at 12:42 AM
It looks like you shouldn't need to do anything too special for full page postbacks to work. Look for requests to /_layouts/FormServer.aspx and move them along with their string body to your web test. Then do the same types of steps you would for a partial postback.
  1. Find the eventlog in the string body
  2. Substitute editingSessionId, solutionId, and canary context parameters
  3. Add ExtractPostbackCanary extraction rule

Let me know if that works.
Jun 11, 2008 at 2:20 PM

What happens if we do not use a custom button for submit like you do in your example but rather use the default submit button of sharepoint?
The requests that i get from  to /_layouts/Postback.FormServer.aspx when i hit the submit button is the following.
So the form is not submited at the library.

8;5;5e1f8646-ee77-4fde-b867-6851d3da9300;677291e9-0976-49e3-a287-29aeafd309fa:ver:1.0.0.1694;0;;http%3A%2F%2Fspsupgrade%2FFormServerTemplates%2FExpenseReport.xsn;http%3A%2F%2Fspsupgrade%2FFormServerTemplates%2FExpenseReport.xsn;http%3A%2F%2Fspsupgrade%2FExpenseListHQ%2F;http%3A%2F%2Fspsupgrade;http%3A%2F%2Fspsupgrade%2FGlassExpenseListHQ%2FForms%2FAllItems.aspx;1;1;0;9;0;633487873928904000;;4vGF1XsXCT7TVpAlQsDf0MPXHVainRLLIVoevEsA74b1qBQojSbOJ+dmW8R/AhBKZbuUD2Jm6Onrz7k/k0p9sQ==|633487874962087402 9;;;
How can i make it work?
Thanks a lot..

Coordinator
Jun 12, 2008 at 1:17 AM
Using the default submit button should cause a postback and trigger InfoPath's SharePoint submit data connection.  Adding that postback to your webtest should be the same as adding any other InfoPath postback.  Take a look at the instructions on this project's wiki if you haven't already.

However, one of the important details of a SharePoint submit data connection is the file name of the submitted form.  How is the SharePoint submit data connection defined in your form template?  What are you using to determine the name of the submitted file?  Is "Allow overwrite if file exists" checked?

Think about what you do when you manually use the form in the browser.  Does a value typed in one of the form's fields determine the name of the submitted form?  If so, I would recommend binding that value to context parameter.  The action of typing a value gets written to the event log.  If this is the case, I can walk you through the steps to find out where to put the context parameter in the event log.

Are you trying to use the web test in a load test?  If so, you likely want the submitted file names to be unique.  Again, I can give you more details if that is the case.
Nov 19, 2009 at 9:09 AM

Hi,

I have the same issue. Values typed in to form fields are in the event log. My event log display as follows.

8;0;8d8d14e5-5a39-4c41-a5b6-560194d4b17c;57bb9c56-7873-4e0f-b096-662a16d4e426:ver:1.0.0.3518;0;;http%3A%2F%2Fedstrial.Commen.co.in%2FFormServerTemplates%2FTreeCutting8_2.xsn;http%3A%2F%2Fedstrial.Commen.co.in%2FFormServerTemplates%2FTreeCutting8_2.xsn;http%3A%2F%2Fedstrial.Commen.co.in%2Fpermits%2FTree%20Cutting%20Permit%2F;http%3A%2F%2Fedstrial.Commen.co.in%2Fpermits;;1;0;0;0;0;633941432791735000;;ufIwaCplu6FgfsaepRJDt5YtAn+jY8+DZhd5/RCHEwJi/29TpnvFO3EFntaWCH01qc8h9z72BRnptLgXDY66RA==|633941432791578438 0;V1_I1_S21_I1_T2;0;111111111V 0;V1_I1_S21_I1_T5;0;BBBBB 0;V1_I1_S21_I1_T7;0;BBBBB 0;V1_I1_S21_I1_T7;0;ADDBBBBB 0;V1_I1_S21_I1_D11;;Matta 0;V1_I1_S21_I1_T13;1;2009-12-14 0;V1_I1_S21_I1_S15_I1_D3;;EDS%5Ccertificate_officer1 1;btnTreeDetails;V1_I1; 0;V1_I1_S22_I1_D2;;Modara 0;V1_I1_S22_I1_R8_I1_D1;;Mango 0;V1_I1_S22_I1_R8_I1_T2;1;12 0;V1_I1_S22_I1_R8_I1_T3;1;1 0;V1_I1_S22_I1_R8_I1_T4;1;7 0;V1_I1_S22_I1_R8_I1_D5;;Electrical 1;btnOwnerDetails;V1_I1; 0;V1_I1_S23_I1_T2;1;12121 0;V1_I1_S23_I1_T5;1;50.0 0;V1_I1_S23_I1_T12;0;addowner 0;V1_I1_S23_I1_T22;0;ownername 1;btnSupportingDocuments;V1_I1; 20;V1_I1_S25_I1_R4_I1_FAC3_FAI1_F1;null;null

Values display in red color are the values that I have entered.

I have changed these values to some other and re-ran the web test. But even though run is successful it was unable to create record in application (with new value). I’m not quite  sure is it issue with submit button or something else.

Where i can find "Allow overwrite if file exists" option?

Thanks.

Coordinator
Nov 19, 2009 at 5:40 PM

In your webtest results, look at the text in the response for the postback doing the submit.  InfoPath could be indicating an error even though the webtest shows as a pass.  For example, you may see some text like "There was an error submitting...".

The "Allow overwrite if file exists" option is a property of the submit data connection.  This property is set when designing an InfoPath form template.  If you already have a data connection, you can change the property and republish.  To do this:

  1. Open your form template in InfoPath designer
  2. Click Tools on the menu bar, then click Data Connections
  3. Select your data connection and click the Modify button
  4. Click through the wizard and you should see the "Allow overwrite if file exists" checkbox on one of the pages

I'm not sure "Allow overwrite if file exists" is available on all types of submit data connections.  I know it is available if you are submitting to a SharePoint document library.  What kind of submit connection are you using?

Nov 20, 2009 at 5:11 AM

Thanks for reply

I checked response for submit. But I was unable find any error. Server response header in submit as follows:

---------------------------------------------------------------------------

HTTP/1.1 200 OK

Content-Encoding : gzip

Vary : Accept-Encoding

Cache-Control : private

Content-Type : text/html; charset=utf-8

Set-Cookie : WSS_KeepSessionAuthenticated=80; path=/,MSOWebPartPage_AnonymousAccessCookie=80; expires=Fri, 20-Nov-2009 06:18:00 GMT; path=/,_InfoPath_Sentinel=1; path=/

Server : Microsoft-IIS/7.0

X-AspNet-Version : 2.0.50727

X-Powered-By : ASP.NET

MicrosoftSharePointTeamServices : 12.0.0.6219

Date : Fri, 20 Nov 2009 05:47:59 GMT

Content-Length : 31796

-------------------------------------------------------------------------------------------------

Scenario that I’m recording there is a file uploading part. When I record same scenario without uploading file, typed values to form displayed in String Body. In there I was able to create new record in application after changing the typed values in the recording. I guess there infopath form use partial postback.   

 

When I record scenario with file upload, values typed in fields display in _EventLog. When I click upload button to upload file FormContainer.aspx and Postback.FormServer.aspx requests are created. In FormContainer.aspx contain _EventLog values. In Event Log  I changed typed values and re-ran the test. But it doesn’t create the new record in application.

Also EventLog in postback request doing the submit, does not contain any typed values.

In your comment you have mentioned like this :(The action of typing a value gets written to the event log.  If this is the case, I can walk you through the steps to find out where to put the context parameter in the event log.)

I think I have same issue like values are written to event log. Please guide me to resolve this issue.

My requirement is to refer those values(manually entered values at record time) from csv and run the load test.

Thanks.

 

Nov 20, 2009 at 10:27 AM

Hi

For file upload there is a form with links upload and cancel. After clicking upload link request is generated with _Eventlog. How can I handle this upload button.

 Thanks.

Coordinator
Nov 20, 2009 at 5:27 PM

I haven't tried file uploads with this tool, so there may be bugs around that especially if the InfoPath eventlog is being sent with a request to FormContainer.aspx.  I'll need to try that out.

When you are looking for an InfoPath error in the server response, you need to check the string body.  The response header can be OK, but the InfoPath application may indicate an error in the string body.  You may have to check a box that says something like "Raw Result" to see the contents of the response.  Does that make sense?

Which plugin are you using?  I'd recommend using ExtractAndSubstituteDynamicInfoPathData.  Also, what kind of submit connection is in your form template?

 

You asked for help binding your dynamic values to the event log.  In your case you will need some additional steps because you are using a datasource for your dynamic values.  First add your csv data source.  There are instructions in this walkthrough article.

Next, you need to bind the data source values to the InfoPath event logs.  It looks like you have noticed how what you type in the browser gets propagated to the eventlog.  The first step is to identify the pieces you want to be dynamic.  When you are recording your webtest use values that you can easily find in the eventlog like FIRSTNAME.  After you have recorded your webtest, you need to edit the event logs that contain your dynamic data.  You will be replacing the value you typed (FIRSTNAME) with the corresponding context parameters you get from your data source. I think it will look something like: {{DataSource1.Users#csv.FirstName}}.

Nov 23, 2009 at 10:58 AM

Thanks for reply,

Yes i'm using ExtractAndSubstituteDynamicInfoPathData plug-in. As you have said i observed Errors in Response Body that upload the document. Following are the locations that errors observed.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<HTML dir="ltr">
<HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" /><meta HTTP-EQUIV="Expires" content="0" /><meta name="ROBOTS" content="NOHTMLINDEX" /><title>
 
 Error

</title><link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/core.css?rev=5msmprmeONfN6lJ3wtbAlA%3D%3D"/>
<script type="text/javascript" language="javascript" src="/_layouts/1033/init.js?rev=ck%2BHdHQ8ABQHif7kr%2Bj7iQ%3D%3D"></script>
<script type="text/javascript" language="javascript" src="/_layouts/1033/core.js?rev=S5dt4K8TJGVTYU9HrW6enw%3D%3D"></script>

 <meta name="Robots" content="NOINDEX " />
 <meta name="SharePointError" content=""/>
</HEAD>

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<form name="aspnetForm" method="post" action="../error.aspx?Xsn=Tree8_2.xsn&amp;Save=Tree+Cutting" id="aspnetForm" onsubmit="return _spFormOnSubmitWrapper();">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<TD valign=top width="100%" style="padding-top: 10px">
    <span id="ctl00_PlaceHolderMain_LabelMessage">Unknown Error</span>
    <P><span>
  <span id="ctl00_PlaceHolderMain_helptopic_troubleshooting"><A Title="Troubleshoot issues with Windows SharePoint Services. - Opens in new window" HREF="javascript:HelpWindowKey('troubleshooting')">Troubleshoot issues with Windows SharePoint Services.</A></span>
  
  </span>
 </TD>

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I don't have any idea from where the error triggers. :(

Please share your thoughts.

Thanks.