Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two web service questions
Message
From
12/09/2001 16:55:53
Bob Tracy
Independent Consultant
Driftwood, Texas, United States
 
 
To
10/09/2001 15:45:52
Bob Tracy
Independent Consultant
Driftwood, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00554872
Message ID:
00555711
Views:
15
I found some partial answers to the questions below that I'd like to pass along for whatever they are worth:

1. The problem with Intellisense giving me the SoapClient PEMs was an artifact of how I was using it. I had a small PRG that create a local variable typed as my registered web service (LOCAL oWS AS sampling), got the automatically created code that was generated, and then suspended the program. I then went to the command window to play with the object reference, that's when I got the wrong PEMs. This morning I was expanding the PRG and found that, as long as I was working in the program file, the correct PEMs were display for the object reference. Not a problem now that I know not to look for the PEMs in the command window.

2. The parameters problem is a COM thing. I don't have a solution but the only time the parameters must be completely stated is if I instantiate the class using the CREATEOBJECTEX() function or call the web service. Any other method is not sensitive to the optional parameters. I could still use some help on this if anyone has any ideas.

>Hi All,
>
>I have a VFP7 COM class that functions perfectly on my development machine and on a remote server as a COM+ class. I have published it as a web service using the SOAP Toolkit and registered the service with the VFP IntelliSense Manager. I can access the web service and get correct data returned from any web connected machine I've tried. There are two problems I haven't been able to solve:
>
>1. IntelliSense displays the SoapClient PEMs when I use the object reference (after declaring LOCAL oWS AS) for the web service instead of the PEMs for the client class. I can type in the method calls for the class and it functions properly (except for question 2).
>
>2. I used the new _COMATTRIB property in my class definition to set the number of optional parameters. It doen't seem to work. I have to send all parameters in a method call or I get an error message that the number of parameters is wrong. When instantiating the class as a COM or COM+ server, I can successfully call with a single parameter, leaving the rest as defaults. Here's the syntax I used, maybe I'm not using _COMATTRIB correctly (no compile-time error messages are generated):
>
>DIMENSION GetSampleSizeXML_COMATTRIB[5]
>GetSampleSizeXML_COMATTRIB[1] = 0
>GetSampleSizeXML_COMATTRIB[2] = "Returns the sampling plan as an XML document"
>GetSampleSizeXML_COMATTRIB[3] = "GetSampleSizeXML"
>GetSampleSizeXML_COMATTRIB[4] = ""
>GetSampleSizeXML_COMATTRIB[5] = 1
>
>Both methods that I've added the _COMATTRIB property to use the same syntax (except for the method name prefix). Both methods use the same number of parameters (4) and only the first is required, the code supplies defaults if the last three are empty. Both give the same error message in the web service mode.
>
>I'd appreciate any insight you may have on these problems. Thanks.
Bob Tracy

Never engage in a battle of wits if you're only half armed.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform