Class wwSoap (deprecated)

This class has been deprecated. For an automated way to call Web Services consider using .NET or the West Wind Web Service Proxy Generator

The wwSOAP class provides an easy way to call SOAP based Web Services from Visual FoxPro from Visual FoxPro code using an all Visual FoxPro implementation. It also provides the server side parsing tools so you can create a SOAP Server with any FoxPro based tool with just a few lines of code. In fact the Web Connection wwWebService class that provides the Web Connection Web Service interface does just that.

Athough Microsoft has the MSSOAP toolkit available there are a few issues with this product - namely that can't deal with complex data hardly at all. wwSOAP does a bunch of things that the MS Toolkit does not:

    • Works on non-WSDL Web Services
    • Can return typed results
    • Supports some Complex objects for inbound parameters and outbound results
    • XML DOM results for all other results
    • Low level methods that allow custom result parsing for objects/arrays etc.
    • Provides a SOAP proxy client class
    • Provides WSDL generation and Proxy Class generation code
    • Doesn't require the SOAP Toolkit on installations

    The real strong points of this class are its ability to create XML from objects to be used for sending in the SOAP packet and turning returned XML back into VFP objects. Even if you do use the SOAP Toolkit the methods of this class can greatly help you in getting your data conversions taken care of much easier.

    Dependencies:

    The following files are required in order to use wwSOAP in Visual FoxPro* wwUtils.prg

    • wwHTTP.prg
    • wwXML.vcx/vct
    • wconnect.h

    **Based on:** Relation **Stored in:** wwSOAP.prg
Custom
  wwSoap

Class Members

MemberDescription

AddParameter

Adds a parameter to a SOAP request.

o.AddParameter(lcName, lvValue,lcXMLType)

AddReturnValue

Use this method to return more than a single result value to the client before calling CreateSoapResponseXML. If you return a single return value you don't need this method.

o.AddReturnValue(lcName, lvValue, lcXMLType)

CallMethod

Low level SOAP method that is meant to wrap all the SOAP packaging and call mechanism from the client side into a single call.

o.CallMethod(lcMethod, lcUrl, lvResult)

CallSoapServer

Calls the remote server sends the SOAP request and returns the SOAP response back to the client. This is a lower level method that basically performs the HTTP request.

o.CallSoapServer(lcSOAPRequestXML)

CallWSDLMethod

Calls a SOAP Server method based on a WSDL description. Call AddParameter for any parameters you need to add to your Methods, then call this method with the name of the method.

o.CallWSDLMethod(lcMethod, lvWSDLURL)

CreateObjectFromSchema

This method allows creation of an empty FoxPro object that matches the properties of the schema definition in the WSDL so that this object can be used to populate values and use it as an input parameter.

o.CreateObjectFromSchema(lcWsdlTypeName)

CreateObjectXmlFromSchema

Creates Xml from an object with proper case field names based on the WSDL schema definition of the Web Service.

o.CreateObjectXmlFromSchema(loObject,lcTypeName,lcFieldName)

CreateSoapRequestXML

Creates a SOAP request XML package.

o.CreateSoapRequestXML(lcMethod)

CreateSoapResponseXML

Creates a SOAP Response XML package from the method name and value

o.CreateSoapResponseXML(lcMethod, lvValue, lcResultName)

GetNamedParameter

Returns a parameter or return value by name. This method must be called after parameter or return value parsing is complete.

o.GetNamedParameter(lcParm, llReturnValue)

ParseObject

This method parses an object type into a Fox object if a type definition exists in the WSDL file.

o.ParseObject(loObjectNode, lcTypeName)

ParseObject

This low level method parses an object based on the WSDL definition. A new empty object is created and the object is created on the fly and returned to you.

o.ParseObject(loObjectNode,lcTypeName)

ParseObjectArray

Parses a DOM node that contains an array of same type objects into an array.

o.ParseObjectArray(@laObjects,lcObjectType,loNodeHeader)

ParseServiceWSDL

Parses a WSDL document file into an object with an easily accessible structure.

o.ParseServiceWSDL(lcWSDLUrl,llParseTypes)

ParseSOAPParameters

Retrieves an array for all the parameters in a SOAP Request package.

o.ParseSOAPParameters(lcRequestXML, @aParameters)

ParseSoapResponse

Parses the SOAP Response package and returns the result parameter.

o.ParseSoapResponse(lcSoapResponse, lvStore)

SoapErrorResponse

Creates a SOAP error response using fault codes and string.

o.SoapErrorResponse(lcError, lnErrorCode)

aReturnValues

On the client side the array that holds the return values from a method call. On the server side it holds the return values that are to be returned by CreateSoapResponseXML.

cErrorMsg

Error Message set when an error occurs in a method call. Check return values from methods or lError for error conditions.

cExtraEnvelopeAttributes

String value that can be added to the SOAP Envelope root envelope. Useful to add namespace references to the SOAP envelope required by the soap body if you are manually creating parameter or the entire soap envelope.

cHttpProxy

Allows you to specify a proxy server for the SOAP request. Format is in <server>:<port> format.

cMethod

Method to call on the SOAP server.

cMethodNameSpace

Sets the method's namespace prefix. Some SOAP implementations require that the namespace be set for a particular method. Use in conjunction with the cMethodNameSpaceURI property.

cMethodNamespaceURI

Sets the method's namespace URI. Some SOAP implementations require that the namespace be set for a particular method. Use in conjunction with the cMethodNameSpace property which sets the prefix. Both properties must be set.

cPassword

Basic Authentication password. Not needed unless the SOAP implementation on the server uses Basic Auth internally.

cRequestXML

Stores the input SOAP XML when a SOAP call is made.

cResponseXML

Holds the SOAP Response XML in a SOAP call. This result always holds the raw HTTP response from the server.

cResultName

Name of the return value. By default this value is set to return and shouldn't need changing.

cSDL

SDL file to use for parameter and return value type information.

cServerUrl

The URL that services the SOAP call.

cSOAPNameSpace

The namespace reference used for the schema and embedded elements. The default is SOAP which is the same as the MS ROPE client uses (although SOAP-ENV is the spec).

cUserName

Basic Authentication username. Not needed unless the SOAP implementation on the server uses Basic Auth internally.

lError

Error flag set when an error occurs during any method calls. You can check this value after any method call to see if an error occurred.

lIncludeDataTypes

Determines whether SOAP packages are created with XML data typing (dt: namespace).

lRecurseObjects

If objects are to be returned this determines whether object properties are hierarchically recursed.

nHTTPConnectTimeout

Sets the timeout on the HTTP connection were applicable. Currently only applies if using nHTTPMode = 1 (HTTPGetLight).

nHTTPConnectType

HTTP Connection type that matches the wwIPStuff::nHTTPConnectType property. Applies only when using nHTTPMode of 0 (wwHTTP).

nReturnMode

Determines how return values are returned

oHTTP

Use this property to pass in a pre-configured HTTP object to allow you configure the HTTP operation of wwSOAP.

oSDL

Holds the last SDL file object parsed with the last call to ParseServiceWSDL.

vResult

This value is set on completion of the SOAP request and holds the final result value. If the result value includes data type information the return value is typed.

Requirements

Assembly: wwSoap.prg

See also:

Class wwXML (High Level Methods) | wwXML::LoadUrl

© West Wind Technologies, 1996-2022 • Updated: 06/29/19
Comment or report problem with topic