-
-
Notifications
You must be signed in to change notification settings - Fork 75
SoapAction attributes
Danilo edited this page Jun 19, 2020
·
3 revisions
The actionAttributes
, actionQuotes
and actionNamespaceSlash
properties allow to set namespaces, double quotes and slashes in everything related the called method, also called soapAction
.
In the example below can see how sets the namespace eg. tmp=http://tempuri.org.
SOAPEngine *soap = [[SOAPEngine alloc] init];
soap.actionAttributes = @{@"xmlns:tmp" : @"http://tempuri.org"};
[soap setValue:@"ABCD" forKey:@"tmp:text"];
[soap requestURL:@"http://my-site/my-service.asmx" soapAction:@"http://my-site/GetData"];
<GetData xmlns:tmp="http://tempuri.org" xmlns="http://my-site/">
<tmp:text>ABCD</tmp:text>
</GetData>
In the example below can see how encloses the SOAPAction
value in the header of request in double quotes eg. "http://my-site/GetData"
soap.actionQuotes = YES;
Accept: "text/xml; charset=utf-8"
Content-Type: "text/xml; charset=utf-8"
SOAPAction: "http://my-site/GetData"
In the example below can see how adds the final slash to method namespace eg. http://my-site/.
soap.actionNamespaceSlash = YES;
[soap setValue:@"ABCD" forKey:@"tmp:text"];
[soap requestURL:@"http://my-site/my-service.asmx" soapAction:@"http://my-site/GetData"];
<GetData xmlns="http://my-site/">
<tmp:text>ABCD</tmp:text>
</GetData>