Newbie Q - XData WebCore TXDataWebConnection

So actually getting some time on my project now....

I have questions on my handish coded xdata server (following Holgers https://www.youtube.com/watch?v=2SCvzw0L27o) and not being able to connect in anything other than the browser interactively.  Can't work out what to put into the TXDataWebConnection  for the URL.

For the moment I am just trying to get some of my data where I am controlling what is available on a web page.  In Holgers example he writes a School list and a schools list using batch move.

I created something almost identical and the 
http://localhost:2001/tms/FB15DataDTest/$model
returns the bit at the bottom (See {....).
The youtube clip goes on to consume this in the desktop client, but I want it in the web, so I created a simple webcore app and tried using a TXDataWebConnection , but when I put in the URL (http://localhost:2001/tms/FB15DataDTest) and connect (at design time) I get....
 
---------------------------
Error
---------------------------
Could not perform WinHttp operation.
Error: (12005) The URL is not valid
Could not create connection.
---------------------------
OK   Details >>   
---------------------------



{
    "Title": "Server API",
    "Version": "1.0",
    "Schemas": [
        {
            "Namespace": "XData.Default",
            "EntityTypes": [],
            "EntityContainers": [
                {
                    "Name": "Default",
                    "EntitySets": []
                }
            ],
            "EnumTypes": [],
            "Controllers": [
                {
                    "Name": "SIPPTestService",
                    "Actions": [
                        {
                            "Name": "Sum",
                            "Parameters": [
                                {
                                    "Name": "A",
                                    "BindingMode": "FromURI",
                                    "Input": true,
                                    "Type": "Double"
                                },
                                {
                                    "Name": "B",
                                    "BindingMode": "FromURI",
                                    "Input": true,
                                    "Type": "Double"
                                }
                            ],
                            "HttpMethod": "GET",
                            "OperationId": "ISIPPTestService.Sum"
                        },
                        {
                            "Name": "EchoString",
                            "Parameters": [
                                {
                                    "Name": "Value",
                                    "Input": true
                                }
                            ],
                            "HttpMethod": "POST",
                            "OperationId": "ISIPPTestService.EchoString"
                        },
                        {
                            "Name": "GetAccessAreas",
                            "Parameters": [],
                            "HttpMethod": "GET",
                            "IsResultStream": true,
                            "IsResultSingleObject": true,
                            "OperationId": "ISIPPTestService.GetAccessAreas"
                        },
                        {
                            "Name": "GetAccessAreasBatch",
                            "Parameters": [],
                            "HttpMethod": "GET",
                            "IsResultStream": true,
                            "IsResultSingleObject": true,
                            "OperationId": "ISIPPTestService.GetAccessAreasBatch"
                        }
                    ]
                }
            ]
        }
    ]
}

Hi Jason,

That should be a really simple and self-explanatory error.
In theory it's just an invalid URL. The URL should indeed be what you defined, are you sure that maybe you don't have spaces, or extra characters before or after the URL that you might be overlooking?

NNNOOOOOOOOO - an extra space before the http :-(.  That's the problem when you are a newbie, did you miss by an inch or a mile.  I thought it was because the $model was missing elements as I was wasn't using the full XData magic!  I had pasted in a number of times as well.  When you paste into the browser, it strips off the leading space, so I was pasting into both.


Sorry for the schoolboy error.
JAC.

I'm now re-reading the Xdata_manual.pdf - pages for Web Applications with TMS WebCore and beginning to get a feel from how I think you parse the URL/$model, to fulfill your TXDataWebDataSet EntitySet Name, i.e. EntityTypes for list and then EntityContainers for the actual data.

Another Gotcha is the CORS, so when I run my little application, I get "not connected" and in the console (you see - learning slowly) I get: SEC7120: [CORS] The origin 'http://localhost:8000' did not find 'http://localhost:8000' in the Access-Control-Allow-Origin response header for cross-origin  resource at 'http://localhost:2001/tms/FB15DataDTest/$model'.

Indeed, you have to either add CORS to your XData server, or just use in XData server url the same port used by the TMS Web Core server in your development machine (port 8000)