XML Soap Calls with CF Web Services

JammyOne

Registered
Hi all,

Can anyone tell me how to add a xmlns:tns="xxxxxxxxx" and a xmlns:types="xxxxxxxx" to my web services soap invocation please?

I have the following code:

// Create the invocation
url = CFURLCreateWithString(kCFAllocatorDefault, server, kCFEncodingASCII);
refInvocation = WSMethodInvocationCreate(url, methodname, kWSSOAP2001Protocol);

// Add my 1 parameter
paramnames[0] = cfsParam;
paramvalues[0] = cfsValue;
dictParameters = CFDictionaryCreate(......);
WSMethodInvocationSetParameters(refInvocation, dictParameters, NULL);

// Setup soap action
paramnames[0] = cfsSoapActName;
paramvalues[0] = cfsSoapActValue;
dictProperty = CFDictionaryCreate(......);
WSMethodInvocationSetProperty(refInvocation, kWSHTTPExtraHeaders, dictProperty);

// ** NOTE I thought I could add them to the above dictionary but if I do
// ** that they still dont appear in the outgoing XML.

// I also tried the following...
paramnames[0] = .... // = "tns"
paramvalues[0] = .... // = "xxxxxxxxx"
WSMethodInvocationSetProperty(refInvocation, paramnames[0], paramvalues[0]);
// But this still doesnt appear in the outgoing XML.

// Next i set the default namespace uri
WSMethodInvocationSetProperty(refInvocation, kWSSOAPMethodNamespaceURI, cfsNameSpace);

// Set encoding style
WSMethodInvocationSetProperty(refInvocation, kWSSOAPBodyEncodingStyle, kWSSOAPStyleRPC);

// Set debug outgoing XML
WSMethodInvocationSetProperty(refInvocation, kWSDebugOutgoingBody, kCFBooleanTrue);

// Now invoke the call
dictResult = WSMethodInvocationInvoke(refInvocation);


So... How can I add my xmlns:tns="xxxxxxxxx" and xmlns:types="xxxxxxxx". The reason I need to do this is because the XML body that I get back (in a CFDictionary) is incomplete - It is only 6 pages of XML when dumped but im expecting more like 16!

Thanks in advance,
Jammy
 
Back
Top