This project has moved. For the latest updates, please go here.

What is the correct endpoint URL for the openPDCServices.MetadataService in version 1.5

May 3, 2012 at 9:50 PM
Edited May 3, 2012 at 9:54 PM

Hello, I was able to add a service reference to my project at http://localhost:6152/?wsdl to gain access to the MetadataServiceClient, however no endpoints were automatically generated and when I created my own endpoint pointing to http://localhost:6151 using BassicHttpBinding, I keep getting the exception "base {System.SystemException} = {"There was no endpoint listening at http://localhost:6151/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."}" with an inner exception of "Message = "The remote server returned an error: (404) Not Found."" Is there documentation that illustrates how to properly implement this new data service? Any help would be appreciated, below is my endpoint definition if it helps.

Thanks,

Dave

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IMetadataService" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            maxBufferSize="6553600" maxBufferPoolSize="5242880" maxReceivedMessageSize="6553600"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
            useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="163840000"
              maxArrayLength="163840000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:6151/"
          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMetadataService"
          contract="MetadataServiceReference.IMetadataService" name="BasicHttpBinding_IMetadataService" />
    </client>
  </system.serviceModel>
Coordinator
May 7, 2012 at 4:57 PM

These are REST services by default, not SOAP - have tried changing the configuration to SOAP in the openPDC.exe.config file? See the following for reference:

    <statTimeSeriesDataService>
      <add name="Endpoints" value="http.soap://localhost:6052/historian"
        description="Semicolon delimited list of URIs where the web service can be accessed - this defaults to http.rest://localhost:6052/historian for the statistics time-series data service."
        encrypted="false" />
      <add name="Contract" value="TVA.Historian.DataServices.ITimeSeriesDataService, TVA.Historian"
        description="Assembly qualified name of the contract interface implemented by the web service."
        encrypted="false" />
      <add name="Singleton" value="True" description="True if the web service is singleton; otherwise False."
        encrypted="false" />
      <add name="SecurityPolicy" value="" description="Assembly qualified name of the authorization policy to be used for securing the web service."
        encrypted="false" />
      <add name="PublishMetadata" value="True" description="True if the web service metadata is to be published at all the endpoints; otherwise False."
        encrypted="false" />
      <add name="CloseTimeout" value="00:02:00" description="Maximum time allowed for a connection to close before raising a timeout exception."
        encrypted="false" />
    </statTimeSeriesDataService>
May 7, 2012 at 5:52 PM

Thanks for the reply. I tried switching the enpoint to http.soap in the openPDC.exe.config file but the web service wouldn't start. I then tried just http:// and it started. The ?wsdl url now has the following endpoint:

 <wsdl:service name="MetadataService">
 <wsdl:port name="BasicHttpBinding_IMetadataService" binding="tns:BasicHttpBinding_IMetadataService">
  <soap:address location="http://localhost:6151/historian" /> 
  </wsdl:port>
  </wsdl:service>
and when I refresh the service reference I get this in my app.config file:
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IMetadataService" />
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:6151/historian" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_IMetadataService" contract="MetadataServiceReference.IMetadataService"
        name="BasicHttpBinding_IMetadataService" />
    </client>
  </system.serviceModel>

however I still get an exception when I call ReadAllMetadataAsJson(): [System.ServiceModel.ServerTooBusyException] = {"The HTTP service located at http://localhost:6151/historian is unavailable.  This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the... 

with an inner exception of: InnerException = {"The remote server returned an error: (503) Server Unavailable."}. Is there documentation or a sample project illustrating how to implement it as a REST data service?    
    
      
    
 

Coordinator
May 7, 2012 at 6:03 PM

Can you post your web service configuration from openPDC.exe.config file? Also, are you accessing the service from the machine where openPDC is running or from a remote machine?

- Pinal

May 7, 2012 at 6:14 PM
Edited May 7, 2012 at 6:16 PM

I originally thought that the data service implementation had changed because http://localhost:6151/historian/metadata/read/json no longer worked in v1.5, now I'm begining to think the service is not starting correctly. Is this still the correct way to access the metadata as a rest service in version 1.5?

here is the configuration that allows for the soap endpoint:

    <ppaMetadataService>
      <clear />
      <add name="Endpoints" value="http://localhost:6151/historian"
        description="Semicolon delimited list of URIs where the web service can be accessed."
        encrypted="false" scope="Application" />
      <add name="Contract" value="TVA.Historian.DataServices.IMetadataService, TVA.Historian"
        description="Assembly qualified name of the contract interface implemented by the web service."
        encrypted="false" scope="Application" />
      <add name="Singleton" value="True" description="True if the web service is singleton; otherwise False."
        encrypted="false" scope="Application" />
      <add name="SecurityPolicy" value="" description="Assembly qualified name of the authorization policy to be used for securing the web service."
        encrypted="false" scope="Application" />
      <add name="PublishMetadata" value="True" description="True if the web service metadata is to be published at all the endpoints; otherwise False."
        encrypted="false" scope="Application" />
      <add name="CloseTimeout" value="00:02:00" description="Maximum time allowed for a connection to close before raising a timeout exception."
        encrypted="false" scope="Application" />
    </ppaMetadataService>

and here is what it looks like after a fresh install however the url http://localhost:6151/historian/metadata/read/json returns error 503 wheras in 1.4 SP1 it returns a json list of signals:

    <ppaMetadataService>
      <clear />
      <add name="Endpoints" value="http.rest://localhost:6151/historian"
        description="Semicolon delimited list of URIs where the web service can be accessed."
        encrypted="false" scope="Application" />
      <add name="Contract" value="TVA.Historian.DataServices.IMetadataService, TVA.Historian"
        description="Assembly qualified name of the contract interface implemented by the web service."
        encrypted="false" scope="Application" />
      <add name="Singleton" value="True" description="True if the web service is singleton; otherwise False."
        encrypted="false" scope="Application" />
      <add name="SecurityPolicy" value="" description="Assembly qualified name of the authorization policy to be used for securing the web service."
        encrypted="false" scope="Application" />
      <add name="PublishMetadata" value="True" description="True if the web service metadata is to be published at all the endpoints; otherwise False."
        encrypted="false" scope="Application" />
      <add name="CloseTimeout" value="00:02:00" description="Maximum time allowed for a connection to close before raising a timeout exception."
        encrypted="false" scope="Application" />
    </ppaMetadataService>
Coordinator
May 7, 2012 at 6:41 PM
Edited May 7, 2012 at 6:49 PM

Just checked in a change that may help with this - but can you try this from an admin command prompt:

netsh http delete urlacl url=http://+:6151/historian/

Do this while openPDC is running, then try page again.

Thanks!
Ritchie

May 7, 2012 at 7:30 PM
Edited May 7, 2012 at 7:31 PM

That did the trick, it now works with rest using http.rest://localhost:6151/historian and with soap using http://localhost:6151/historian. Thanks for your help.

Coordinator
May 7, 2012 at 7:46 PM

Good deal. We'll do another 1.5 release preview update this week that will contain a more permanent update for removing the HTTP namespace reservation when it's not needed.

Thanks!
Ritchie

May 11, 2012 at 2:08 PM

I am running into this problem in v1.4 SP2 on my production machine.  I am getting the service unavailable errors for calls to the 6151 and 6152 ports, the command prompt line above does fix the issue temporarily. I have several applications on different machines relying on the timeseriesdata service and have the firewalls opened to those port numbers, thus I would perfer not to change the port numbers. Is there a more permanent fix for removing the reservations on that version?

Coordinator
Jun 1, 2012 at 12:55 PM

We have released a new version of 1.5, release preview 2, which solves the web service access issue.

Thanks!
Ritchie