Hide TOC

Web Services Core Foundation Constants

WSTypes Constants

WSTypeID

Web Services Core uses the following enumeration when serializing between Core Foundation and XML types. Because CFTypes are defined at runtime, it isn't always possible to produce a static mapping to a particular CFTypeRef. This enum and associated API allows for static determination of the expected serialization.

enum WSTypeID {
   eWSUnknownType                = 0,
   eWSNullType                   = 1,
   eWSBooleanType                = 2
   eWSIntegerType                = 3,
   eWSDoubleType                 = 4,
   eWSStringType                 = 5,
   eWSDateType                   = 6,
   eWSDataType                   = 7,
   eWSArrayType                  = 8
   eWSDictionaryType             = 9};

Constants
eWSUnknownType

No mapping is known for this type.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSNullType

Maps to CFNullRef.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSBooleanType

Maps to CFBooleanRef.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSIntegerType

Maps to CFNumberRef for 8, 16, 32 bit integers.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSDoubleType

Maps to CFNumberRef for long, double, or real numbers.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSStringType

Maps to CFStringRef.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSDateType

Maps to CFDateRef.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSDataType

Maps to CFDataRef.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSArrayType

Maps to CFArrayRef.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

eWSDictionaryType

Maps to CFDictionaryRef.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

String Constants

Protocol Constants

Pass these constants as arguments for supported protocols when creating a method invocation or protocol handler reference.

CFStringRef kWSXMLRPCProtocol;
CFStringRef kWSSOAP1999Protocol;
CFStringRef kWSSOAP2001Protocol;

Constants
kWSXMLRPCProtocol

XML-RPC protocol.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

kWSSOAP1999Protocol

SOAP v1.1 protocol.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

kWSSOAP2001Protocol

SOAP v1.2 protocol.

Available in Mac OS X v10.2 and later.

Declared in WSTypes.h.

Result and Fault Constants

These string constants identify method results, faults, or network problems.

CFStringRef kWSMethodInvocationResult;
CFStringRef kWSFaultString;
CFStringRef kWSFaultCode;
CFStringRef kWSFaultExtra;
CFStringRef kWSNetworkStreamFaultString;
CFStringRef kWSStreamErrorMessage;
CFStringRef kWSStreamErrorDomain;
CFStringRef kWSStreamErrorError;

Constants
kWSMethodInvocationResult

Dictionary entry if the invocation result is not a fault. If you don't know what field to ask for, you can ask for this key. You can also specify the name of a reply parameter in the invocation using kWSMethodInvocationResultParameterName. This will add an alias for the given name to the result dictionary so that this key will return the named parameter.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSFaultString

If the result is a fault, this key returns a CFString with the fault type. If the fault type is kWSNetworkStreamFaultString, then the fault is a network error. In the case of a network error, kWSFaultCode should be ignored, and kWSFaultExtra returns a dictionary indicating the network error.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSFaultCode

If the result is a fault, this key returns a CFNumber with the fault code, unless the fault is a network error, in which case this field should be ignored.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSFaultExtra

If the result is a fault, and the fault is a network error, the key returns a CFDictionary with the network error. This key may also return a CFString, or NULL.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSNetworkStreamFaultString

If kWSFaultExtra is a dictionary, this key returns a CFString from that dictionary for debug purposes.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSStreamErrorMessage

If kWSFaultExtra is a dictionary, this key returns a CFString from that dictionary containing the stream error message.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSStreamErrorDomain

If kWSFaultExtra is a dictionary, this key returns a CFNumberRef from that dictionary containing domain number. See CFStream.h for domain numbers.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSStreamErrorError

If kWSFaultExtra is a dictionary, this key returns a CFNumberRef from that dictionary containing error number. See CFStream.h for error numbers.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

HTTP Message Constants

You can specify a CFHTTPMessageRef as a property to be used instead of creating a new outgoing HTTP or HTTPS message for method invocations. The CFHTTPMessageRef can contain header, proxy, and authentication information. The body of the message will be ignored and replaced with the outgoing, serialized invocation. After the invocation has executed, you can retrieve a copy of the actual CFHTTPMessageRef, containing the details of the invocation using kWSHTTPResponseMessage. Attempting to retrieve the response message property before the invocation completes will return NULL.

CFStringRef kWSHTTPMessage;
CFStringRef kWSHTTPResponseMessage;

Constants
kWSHTTPMessage

The message.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSHTTPResponseMessage

The response.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

HTTP Message Propereties

To avoid having to create an entire CFHTTPMessageRef, these properties are individually settable. If they are set, they will override any CFHTTPMessageRef previously specified.

CFStringRef kWSHTTPVersion;
CFStringRef kWSHTTPExtraHeaders;
CFStringRef kWSHTTPProxy;
CFStringRef kWSHTTPFollowsRedirects;

Constants
kWSHTTPVersion

The CFHTTPMessageRef version such as “http/1.1”.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSHTTPExtraHeaders

A CFDictionary of { key (CFString), val (CFString) } pairs.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSHTTPProxy

The CFURLRef of the SOCKS proxy.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSHTTPFollowsRedirects

A CFBoolean that controls whether the invocation follows redirects (default is false).

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

Debug Properties

These flags will populate the WSInvocationResultRef with debugging information. The property name of the flag is the same as the the field in the result dictionary.

CFStringRef kWSDebugOutgoingHeaders;
CFStringRef kWSDebugOutgoingBody;
CFStringRef kWSDebugIncomingHeaders;
CFStringRef kWSDebugIncomingBody;

Constants
kWSDebugOutgoingHeaders

If this flag is set, the result includes the outgoing message headers.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSDebugOutgoingBody

If this flag is set, the result includes the outgoing message body.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSDebugIncomingHeaders

If this flag is set, the result includes the incoming message headers.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSDebugIncomingBody

If this flag is set, the result includes the incoming message body.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

SOAP Message Properties

This is an array of CFStringRefs which contain valid XML header elements that are sent with the message. These are only applicable to the header of a SOAP message.

CFStringRef kWSSOAPMessageHeaders;

Constants
kWSSOAPMessageHeaders

A CFArrayRef of XML header elements, as CFStringRefs.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

Message Modifier Properties

When serializing a dictionary, setting these properties can modify the behavior of the serialization.

CFStringRef kWSRecordParameterOrder;
CFStringRef kWSRecordNamespaceURI;
CFStringRef kWSRecordType;

Constants
kWSRecordParameterOrder

A CFArrayRef of CFStringRefs containing the parameter names, in order.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSRecordNamespaceURI

A CFStringRef containing the namespace.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

kWSRecordType

A CFStringRef containing the record type.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.

Result Parameter Name

You can force the deserializer to create an alias to a parameter as the invocation result by setting the parameter name.

CFStringRef kWSMethodInvocationResultParameterName;

Constants
kWSMethodInvocationResultParameterName

Set this property to create an alias to a parameter to be returned by kWSMethodInvocationResult. Pass in the parameter name as a CFStringRef.

Available in Mac OS X v10.2 and later.

Declared in WSMethodInvocation.h.



Hide TOC


© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-01-06)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.