for 2.X 参考 http://jiapumin.iteye.com/blog/2109378

 AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [[AFHTTPResponseSerializer alloc] init];
[manager.requestSerializer setValue:@"application/soap+xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[manager.requestSerializer setValue:soapLength forHTTPHeaderField:@"Content-Length"];
NSMutableURLRequest *request = [manager.requestSerializer requestWithMethod:@"POST" URLString:@"http://www.webxml.com.cn/WebServices/WeatherWebService.asmx" parameters:nil];
[request setHTTPBody:[soapMessage dataUsingEncoding:NSUTF8StringEncoding]];
AFHTTPRequestOperation *operation = [manager HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSString *response = [[NSString alloc] initWithData:(NSData *)responseObject encoding:NSUTF8StringEncoding];
NSLog(@"%@, %@", operation, response);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSString *response = [[NSString alloc] initWithData:(NSData *)[operation responseObject] encoding:NSUTF8StringEncoding];
NSLog(@"%@, %@", operation, error);
}];
[manager.operationQueue addOperation:operation];
}

for 3.X (未验证)

     AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
NSMutableURLRequest *request = [manager.requestSerializer requestWithMethod:@"post" URLString:@"" parameters:nil error:nil];
[request setHTTPBody:nil];
NSURLSessionTask *task = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { }];
[task resume];

soap request by afnetworking2.X/3.X的更多相关文章

  1. HTTP SOAP Request

    public string SoapRequest(string url, string message, string type, Encoding encoding) { string resul ...

  2. 【转载】C# HttpWebRequest 发送SOAP XML

    调用webservice的几种方法: 方法一:添加web引用(简单/方便 局限客户端是.net) 方法二:Post xml(本文重点讲述) 方法三:使用微软MSXML2组件(好像在window ser ...

  3. 译-Web Service剖析: XML, SOAP 和WSDL 用于独立于平台的数据交换

    本文是翻译内容,原文参见: Anatomy of a Web Service: XML, SOAP and WSDL for Platform-independent Data Exchange We ...

  4. SOAP Binding: Difference between Document and RPC Style Web Services

    SOAP Binding: Difference between Document and RPC Style Web Services 20FLARES Twitter 1Facebook 9Goo ...

  5. 通过JavaScript调用SOAP终结点执行实体消息

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复148或者20150813可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 利用OData终结点可以方便的对 ...

  6. webService(SOAP)性能测试脚本

    本文以天气预报的webService为基础进行学习   webService地址:http://www.webxml.com.cn/WebServices/WeatherWebService.asmx ...

  7. C#,SOAP1.1与1.2的发布与禁用(SOAP 1.2 in .NET Framework 2.0)

    来源:https://www.codeproject.com/Articles/11878/SOAP-in-NET-Framework SOAP 1.2 in .NET Framework 2.0   ...

  8. Loadrunner 9.5_webservice(SOAP)性能测试

    WebService定义:Webservice是一种新的使用基于XML标准和协议来交换信息的WEB应用程序.是基于SOAP(简单对象访问协议)消息的应该协议,只是为WEB页面或可执行程序提供编程接口. ...

  9. (转)Java实现Web Service过程中处理SOAP Header的问题

    网上有篇文章,大致这么说的(如下文),最后我采用的wsimport  -XadditionalHeaders的方式. StrikeIron offers two authentication meth ...

随机推荐

  1. angular的post请求,SpringMVC后台接收不到参数值的解决方案

    http://www.ithao123.cn/content-6567265.html

  2. CF# Educational Codeforces Round 3 A. USB Flash Drives

    A. USB Flash Drives time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  3. Java NIO之缓冲区Buffer

    Java NIO的核心部件: Buffer Channel Selector Buffer 是一个数组,但具有内部状态.如下4个索引: capacity:总容量 position:下一个要读取/写入的 ...

  4. 【转】vim格式化C代码

    转自:http://blog.chinaunix.net/uid-24774106-id-3396220.html 在自己的目录下编辑自己的.vimrc, vim ~/.vimrc 添加下面的几行: ...

  5. Codeforces Round #352 (Div. 2) A Summer Camp

    Every year, hundreds of people come to summer camps, they learn new algorithms and solve hard proble ...

  6. Codeforces Round #228 (Div. 2) B. Fox and Cross

    #include <iostream> #include <string> #include <vector> #include <algorithm> ...

  7. [WP8.1UI控件编程]Windows Phone VirtualizingStackPanel、ItemsStackPanel和ItemsWrapGrid虚拟化排列布局控件

    11.2.2 VirtualizingStackPanel.ItemsStackPanel和ItemsWrapGrid虚拟化排列布局控件 VirtualizingStackPanel.ItemsSta ...

  8. PL/SQL无法连接,提示:pl/sql initialization error sql*net not properly installed

    各种找资料都不行,最后还是在公司的线上环境中去找不同点配置好的.不多说了,就做了如下配置: 服务器环境是:windows server 2008 64位操作系统 1.电脑系统环境变量PATH增加:x: ...

  9. Window.document对象 轮播练习

    Window.document对象 一.找到元素:     docunment.getElementById("id"):根据id找,最多找一个:     var a =docun ...

  10. next()与nextLine的区别

    next():    1.一定要读取到有效字符后才可以结束输入.    2.对输入有效字符之前遇到的空白,next() 方法会自动将其去掉.    3.只有输入有效字符后才将其后面输入的空白作为分隔符 ...