Correct URL to get the output
-
Monday, November 19, 2012 5:26 PM
Using Stream Insight 2.1 / VS 2012
I’ve download the sample 2.1 WCF app from the team. Gone through and commented it up until I kind of understand the flow of the code.
So long as I run all three executable as Administrator (Dashboard, Generator, and WCF Demo) it works.
Now I want to try displaying the outputs from the WCF Demo in a new console app. I’m pretty sure that I need to add a service reference to the WCF demo to get the events to work with but I’m absolutely stumped as to the URL I should be using.
I’ve tried copying the URL of the service reference the sample dash board uses (http://localhost:8088/wcf/ReceiveEvents) but it tells me that –
--------------
There was an error downloading 'http://localhost:8088/wcf/ReceiveEvents/_vti_bin/ListData.svc/$metadata'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost:8088/wcf/ReceiveEvents'.
There was no endpoint listening at http://localhost:8088/wcf/ReceiveEvents that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.
If the service is defined in the current solution, try building the solution and adding the service reference again.
----------------
I’ve tried every other URL I can think of. Am I just using the wrong URL or am I doing something fundamentally wrong?
All Replies
-
Monday, November 19, 2012 6:59 PMIf the WCF service isn't running, you won't be able to connect to the metadata output. Your best option is probably to start up the StreamInsight WCF Demo project and then connect to the URLs.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful. -
Monday, November 19, 2012 8:15 PM
I built all three projects (WCF Demo, Event Generator and Dashboard). I started all three executables as Administrator. I can see the generator pushing event to the console. The Dash board is receiving them and charting. (See Image)
If the dash board can get info from the WCF Demo then I would think that URL would be available to add as a refere
nce - hence my puzzelement.
-
Monday, November 19, 2012 8:47 PM
Actually, in looking a little closer at the service code, the URLs are configured as follows:
string port = "8088"; string wcfSourceURL = String.Format(@"http://localhost:{0}/StreamInsight/wcf/Source/", port); string wcfSinkURL = String.Format(@"http://localhost:{0}/StreamInsight/wcf/Sink/", port);Which means that the correct URL for you to use when generating the service proxies is http://localhost:8080/StreamInsight/wcf/Sink/.
Note, please, that this isn't an issue with StreamInsight, but a challenge when configuring WCF duplex. You can always simply copy the files generated from the Service Reference ... dig in and find the Reference.cs file from the service reference folder. Honestly, that usually works better anyway.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful.- Marked As Answer by Iric WenModerator Tuesday, November 27, 2012 9:12 AM
-
Monday, November 19, 2012 9:03 PM
I tried that URL before posting. It's returning
---There was an error downloading 'http://localhost:8080/StreamInsight/wcf/Sink/_vti_bin/ListData.svc/$metadata'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8080
Metadata contains a reference that cannot be resolved: 'http://localhost:8080/StreamInsight/wcf/Sink/'.
There was no endpoint listening at http://localhost:8080/StreamInsight/wcf/Sink/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8080
If the service is defined in the current solution, try building the solution and adding the service reference again.
---When I go into the dashboard from the example and configure the service reference to see what URL it is using is shows http://localhost:8088/wcf/ReceiveEvents.
I get that the problem is WCF and not StreamInsight. I'll see if I have any luck in the WCF Fourms
Thanks,
-
Monday, November 19, 2012 11:53 PM
Before I posted my previous reply, I went to that URL (http://localhost:8080/StreamInsight/wcf/Sink/) and was able to create the client proxy from the metadata.
You can, as I mentioned earlier, also just use the Reference.cs file from the existing metadata. It has only the contracts ... and that's really what you need.
DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful.- Marked As Answer by Iric WenModerator Tuesday, November 27, 2012 9:12 AM


