I have installed Web Services on a client server, but is there a quick way to test that I have exposed AF data? IE- something like this from a web browser or something similar? Fictional path below:
I'm going to be going on vacation soon, so hopefully my quick response can get you going. Go to the following directory on the machine where PI WS is installed: PIPC\PI Web Services\Help\Samples. Here you will find several sample web.config files. To get up and running quickly, you can try using the "web_config_basic_no_security.config". To do so, rename you current web.config in PIPC\PI Web Services directory to web.config.original and copy that sample file into this directory and rename it to web.config. Open the web.config for editing and remove any references to version 220.127.116.11 in the assemblies.
<add assembly="OSIsoft.PIDataServices.DataAccess, Version=18.104.22.168, Culture=neutral, PublicKeyToken=53b77d1d3d7a979b" />
<add assembly="OSIsoft.PIDataServices.DataAccess, Culture=neutral, PublicKeyToken=53b77d1d3d7a979b" />
Do this for all assemblies that have a reference to version 22.214.171.124. Save the file, and recycle the app pool that PI WS runs under. You should now be able to run your PowerShell query successfully. Please keep in mind this is to get you started, and the config has very limited security settings. For higher security you'll have to make some more modification, but this should get you to see values. Also, WCF Storm is a good tool to use as Harry mentioned earlier.
Storm is a useful open source tool for testing out web services without having to write your own app. The proprietary version, WCF Storm, is good as well. Additionally, this can be done with PowerShell. If you have a membership on vCampus I suggest you check out Mathieu's Easy test script for PI Web Services on the subject.
The script is a function with parameters as shown below:
param ($EndPoint, $Item, $StartTime, $EndTime, $NumValues)
It ends by calling the function with a set of dummy parameters as shown below. It looks like you updated the piserver to point to yours and left the rest to defaults. In the process I think you forgot to change the place holder "http://endpoint" to the URL for your PI Web Services endpoint (http://
PIWS-TestGetPIArchiveDataWithSOAP "http://endpoint" "pi:\\piserver\cdt158" "*-30d" "*" "10"
Hi Harry- thanks! As you can probably tell I am not too good with scripting! I have fixed as you suggested, and now get a new error! What am I missing on this one?
It looks like your endpoint is still not quite right. As Harry suggested, try:
If you get another error, I would expect it to be a 415 error, in which case we may need to modify the web.config file. Hopefully you'll be able to get values though. Let us know what the results are with trying this new endpoint.
I think I did that- maybe I posted the wrong screen capture. Here is a new one, as well as the script:
Retrieving data ...