Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XML Web Service Builder
Message
From
18/05/2006 09:49:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
XML Web Service Builder
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01123189
Message ID:
01123189
Views:
61
Update (05/19/2006) This is resolved. The length of the data sent to the webservice was set to the longest length sent in all attempts. Trimming the value of the textboxes before the login and password are sent to the webservice resolved the issue.
(It amazes me how often the resolution turns out to be something simple and basic! :o)





OVERVIEW:

I have successfully created a form which does the following:

1. Connects to a webservice.
2. Passes a login, password, and xml file to method of the service.
3. The method returns an object with a document property which is an xml result file.

4. Passes a login, password, and xml file (which is the xml file returned in step 3 above) to a 2nd method of the service.
5. The method returns an object with a docment property which is a pdf form containing the data from the xml file passed to it.

This all works great. I have buttons on the forms to do each step except for the initial connection. The results step 3 are stored in an edit box on a page in a pageframe and the results (pdf file) from step 5 are displayed in a webcontrol on a page in the same pageframe.

I have two fields on the form (not on the pageframe) which contain the values to be used for the loginid and password.

In the XML Web Service Builder:
Tab 2. Operations, Operations section, I have the name of the operation (CalcFinancing), the CalcFinancing method is selected in the dropdown box, for Set Parameter(s) I have 'Input Values now.'
For the LoginID parameter, I have the parameter source set to Control/Property and it the textbox containing the loginid is checked. 'Value' is chosen in the dropdown box below. the same settings are used for the password except the other textbox is chosen for the control/property.

When the form loads, everything is fine.

On the first page of the pagefram I display the xml file to send to calcfinancing() and the xml file returned from calcfinancing is sent to gencontract() as the 3rd parameter. The xml returned from calcfinancing() is displayed in the editbox on page2, and the pdf file returned from gencontract() is displayed on page3.

When I click on the button 'Calculate via Webservice', I have:

thisform.pageframe.pgresults.edit1.value=''
thisform.pageframe.pgresults.edit1.refresh()
thisform.pageframe.pgresults.edit1.bindme = .T.
thisform.pageframe.pgresults.edit1.refresh()

The results are displayed correctly as they should be.

If I then enter an invalid value for the loginid or password, and click on the same button, the results are displayed correctly: "Login Failed: Invalid Login ID." That is the correct result for an invalid login or password.

PROBLEM:

Here is the problem, if I then change the login or password AGAIN but change it back to the correct value, I still receive the "Login Failed: Invalid Login ID." result. When I change the value in the texbox for the login id the first time to an invalid login, the results come back correct. However, subsequent attempts to change it to the correct value don't seem to work. Why? It works the first time using correct values - it returns the xml file. If I change the login to an invalid login, it then returns the correct response of invalid login id. Why then does it constantly return invalid login id from that point on even when I change the value of the login id?

Is there a way to reset the wshandler from the button on the form before I set bindme to .t. again? I thought is would automatically read the values in the textbox which it seems to do until it returns the login failed response. From that point on it doesn't seem to or else it would pass the correct values the subsequent attempts.

Any ideas appreciated. I haven't used the builder much so I am learning the props.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Reply
Map
View

Click here to load this message in the networking platform