XMLDA.NET Reference
WCF Test Client
Send comments on this topic.

Glossary Item Box

The WCF XMLDA Test Client requires .NET3, 3.5 or 4 can access XML DA web services in different ways:

  • Access any XML DA web service without security handling (basicHttp binding)
  • Access WCF hosted XML DA servers using any WCF supported transport and security handling

The test client application configuration file has to be modified to select the required communication mode.
The default configuration is set for HTTP access without security.

 

The test client can be used to:


 

 

Usage:

The TestClient reflects the OPC XML-DA concept and does not use permanent connections. This means that the server methods can be called without first making a connection. To access another server only the URL needs to be changed.

Subscriptions are an exception in a way that the SubscriptionPolledRefresh and SubscriptionCancel functions depend on the previous Subscribe function. A Subscribe starts a subscription in the server that is active until it is cancelled or has timed-out. When tehe client starts subscriptions in multiple XML-DA servers then the proper URL has to be selected before a SubscriptionPolledRefresh  is executed. Otherwise the poll request is sent to the wrong server, which doesn't know the subscription handle and returns an error.
Subscriptions to multiple OPC-DA servers all go through the same one Wrapper and can be polled in one call. If currently an OPC-DA server URL is defined then the poll request goes to the OPC-DA wrapper and it knows the subscriptions of all it's OPC-DA servers.

Server URL
The URL of XML-DA servers must start with http: and has the form   http://localhost/webservicedirectory/servername.asmx
OPC-DA servers are specified as:
a) the ProgId only for local OPC DA-Servers.  E.g.   Advosol.SimDAServer.1
b) with computer name for remote servers.  E.g.   //I-3000/ Advosol.SimDAServer.1
c) with access definitions.E.g. //I-3000/Advosol.SimDAServer.1?User=xx&Password=xx&Domain=xx
d) optionally the definition can be preceded with opda:   E.g.  opcda://I-3000/ Advosol.SimDAServer.1


WCF Configuration
The transport and communication protocol used by WCF is defined in the application configuration file and can be configured using the WCF configuration tool.
The default configuration definitions shown below are for a server access through HTTP without authentication or encryption. With this configuration any standard XML DA server can be accessed.

XMLDATestClientWCF.exe.config

<? xml version =" 1.0" encoding="utf-8"?>

< configuration >

    < system.serviceModel >

        < bindings >

            < basicHttpBinding >

                < binding name =" Service" closeTimeout=" 00:01:00" openTimeout=" 00:01:00"

                    receiveTimeout =" 00:10:00" sendTimeout=" 00:01:00" allowCookies=" false"

                    bypassProxyOnLocal =" false" hostNameComparisonMode="StrongWildcard"

                    maxBufferSize =" 65536" maxBufferPoolSize=" 524288" maxReceivedMessageSize="65536"

                    messageEncoding =" Text" textEncoding="utf-8" transferMode="Buffered"

                    useDefaultWebProxy =" true">

                    < readerQuotas maxDepth =" 32" maxStringContentLength="8192" maxArrayLength="16384"

                        maxBytesPerRead =" 4096" maxNameTableCharCount="16384" />

                    < security mode =" None">

                        < transport clientCredentialType =" None" proxyCredentialType=" None"

                            realm ="" />

                        < message clientCredentialType =" UserName" algorithmSuite=" Default" />

                    </ security >

                </ binding >

            </ basicHttpBinding >

        </ bindings >

        < client >

            < endpoint binding =" basicHttpBinding" bindingConfiguration="Service"

                contract =" Service" name="XmlDA10" />

        </ client >

    </ system.serviceModel >

</ configuration >

      

 

© 2002-2012 Advosol Inc. All Rights Reserved.