Öncelikle, WSLD2OBJC Genelde
1)
kullanılmayacak kadar şişirilmiş, SABUN kendisi güvenli değildir.
POST /WebService/Common.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://example.com/someSOAPmethod"
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">
<soap:Body>
<SomeSOAPmethod xmlns=\"http://example.com/\">
<encryptedMessage>%@</encryptedMessage> //<-- this is vary, depends on your parameter
</SomeSOAPmethod>
</soap:Body>
</soap:Envelope>
% @ SOAP sabitlemek için Encryped verilerle geçmesi gerekir: Eğer SABUN v1.0 ile .NET özelliğini [WebMethod]
kullanırsanız bu SABUN vücudu düşünüldüğünde someSOAPmethod. Her türlü şifrelemeyi kullanabilirsiniz ancak ben AES'u tercih ederim. Daha da fazla HTTPS bağlantısı (RSA şifreleme) eklemek için.
2) Kendi çözümlemenizi WSLD2OBJC kullanarak yapabilirsiniz. Bazı SOAPmethodörneğinden. Nasıl yönteme yukarıdaki kullanmak
-(NSMutableURLRequest *)encapsulateSOAP:(NSString *)encryptedMessage withSoapMethod:(NSString *)soapMethod andBaseURL:(NSURL *)baseURL { NSString* soapMessage = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><%@ xmlns=\"http://example.com/\"><encryptedMessage>%@</encryptedMessage></%@></soap:Body></soap:Envelope>", soapMethod, encryptedMessage, soapMethod]; NSString* msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]]; NSMutableURLRequest* theRequest = [NSMutableURLRequest requestWithURL:baseURLl]; [theRequest addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest addValue:[NSString stringWithFormat:@"%@%@", @"http://example.com/", soapMethod ] forHTTPHeaderField:@"SOAPAction"]; [theRequest setHTTPMethod:@"POST"]; [theRequest addValue:msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; [theRequest setTimeoutInterval:10]; return theRequest; }
: NSString *encryptedMessage = //some encrypted message
NSString *soapMethod = @"someSOAPmethod";
NSURL *baseURL = [NSURL urlWithString:@"http://example.com"];
NSMutableURLRequest *requestQueue = [self encapsulateSOAPRequest:encryptedMessage withSoapMethod:soapMethod andBaseURL:baseURL];
//then request using AFNetworking, ASIHTTP or your own networking library
3) Evet, NSXMLParse
veya SABUN isteği veya unbind SABUN yanıtını bağlamak gibi herhangi bir 3. parti kitaplığını kullanabilirsiniz.
Arka uçta .NET, PHP veya Ruby kullanmayı düşünüyor musunuz? Neden REST yerine SOAP kullanmak istersiniz? –
arka uç .NET'tedir. –