原理 根据 WebService 提供的 请求示例进行编写!
不多说 直接放代码 下面是关键的代码:
#define my_web_address @"http://192.168.1.133/"
#define my_web_service @"CatWebService/CatUserService.asmx"
#define my_web_namespace @"http://www.xxxx.com/"
//返回Soap Body
+(NSString *)getSoapBody:(NSString *)funcationName parameter:(NSString *)content
{
if(content == nil)
{
content = @"";
}
return [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=\"%@\">"
"%@"
"</%@>"
"</soap:Body></soap:Envelope>",funcationName,