Skip to main content
To call a NetServer service through a custom proxy as a web service you have to set up the web services as an application in IIS.

Alternative .NET Solutions

There are two immediate alternatives to using the SuperOffice.Services.dll for .NET developers.
  • Simply add a Service Reference to the specific web service and make calls through that proxy.
  • Use Microsoft’s SVCUTIL tool to generate a client proxy for each web service you’re interesting in, such as Appointment.svc or Contact.svc.
After giving a name to the added web service you can use that web service name in the using section of your code file in the following manner:
Having multiple services that share the same carrier objects is a scenario that is not well supported in Visual Studio.

Direct authentication with SoCredentials

The following example demonstrates how to call the web service through a Visual Studio WebReference proxy object.
The first thing is to instantiate a Contact proxy object. Next, before any methods are called, the SoCredentials proxy property is set to a new SoCredentialsHeader instance, and then set accordingly. SoCredentials is an object representation of the SoCredentialsHeader element, which is an element in the SOAP message header. Each time a method is called against the web service, these credentials are sent along with it. This is mandatory the order to successfully authenticate against the web service.
If any one of these values is wrong, the most likely result will be a SoapHeaderException, accompanied by the “Server unavailable, please try later” message.

Connection management

Both alternatives generate method stubs to make asynchronous calls.However, there are still system limitations imposed when making more than two simultaneous calls. To remedy that you’ll need to look further into how the .Net framework manages connections. The following configuration snippet allows you to configure your application to allow more than two, the default, simultaneous connections. Otherwise, when there are more than two, they are queued and executed synchronously. Example connectionManagement section:

Alternative Java solutions

When consuming .NET web services from other platforms, like Java and PHP, there is additional complexity as well. For Java developers, there is, an excellent section explaining how to create a proxy class for Java clients on Sun’s website. When it comes to authentication and authorization, each web request requires an SoCredentialsHeader element. In that element is a Ticket element. Because the ticket is a composite of data, it can be tricky to generate one correctly. Also, the ticket needs to be prepacked with the UTF-8 Byte Order Mark (BOM).