|
|
|
S O A P C
o n n e c t
.
. .
Cypresslogic
SoapConnect
provides an easy interface to add XML Web service functionality to any .NET application.
SoapConnect allows developers to dynamically
call Web services using simple APIs. For example, the following C# code shows
how to call the LocalTimeByZipCode method in http://www.alethea.net/webservices/LocalTime.asmx
: string[] outputs =
SoapConnect.InvokeMethod( System.Diagnostics.Debug.WriteLine(outputs[0]);
// Check the set of outputs In
addition to simple Web service invocations, SoapConnect also supports: Network
credentials and password based authentication schemes such as as basic,
digest, NTLM, and Kerberos authentication. Web
proxies Sessions Timeouts Custom
SOAP requests, SOAP Action and Location Requirements You can add a reference to SoapConnect from
within Visual Studio.NET in all .NET languages (i.e., C#, Managed C++, VB.NET
etc). SoapConnect Members Public
Constructors Public
Properties Public
Static Methods Public
Methods Invokes
a method in the Web service with the specified inputs public
string[] InvokeMethod(
string
strMethod, string[] astrInputs) Parameters strMethod
- Name of the Web service method that is being invoked astrInputs
- Array of strings specifying the input values Return
value Returns
an array of strings that contain the array of output values Example: using System;
public static void Main() Creates
a SOAP request for the specified method and inputs public
string CreateRequest(
string
strMethod, string[] astrInputs) Parameters strMethod
- Name of the Web service method astrInputs
- Array of strings specifying the input values Return
value Returns
the SOAP Request message
Example: using System; Sets
the network credentials and password authentication information public
void
SetAuthentication(
string
strUsername,
string
strPassword,
string
strDomain,
bool
bPreAuthenticate) Parameters strUsername
- Name of the Web service method strPassword
- Name of the Web service method strDomain
- Name of the Web service method bPreAuthenticate
- Name of the Web service method Return
value This
method has no return value. Example: using using SoapConnect;class MappointTestClass{ public static void Main() { // Invoke a Mappoint web serviceSoapConnect sc = new SoapConnect("http://staging.mappoint.net/standard-30/mappoint.wsdl");sc.SetAuthentication ("user", "pass", null, true); // Set authenticationstring[] outputs = sc.InvokeMethod("GetMap", new string[] {... GetMap input ...});} }
SoapConnect.InvokeMethodDirect Invokes a method in the Web service with the specified SOAP request,
Parameters
Return value Returns true if the method succeeds; else false.
Example:
|
||||||||||||||||||||||||||||
|
All contenl © 2001 - 2003 Cypresslogic Systems Inc. Patent Pending unless otherwise stated. All rights reserved. |
|||||||||||||||||||||||||||||