【问题标题】:ASIHTTPRequest and web services securedASIHTTPRequest 和 Web 服务安全
【发布时间】:2011-06-10 08:59:55
【问题描述】:

我在我的 IOS 应用程序中使用 ASIHTTPRequest 来调用 wsdl/SOAP Web 服务。我的客户使用安全模块(使用他的 ModSecurity / PHP 代码)。

我正在使用这个:

NSData *xmlData =  // I construct the soap message witk soapui

NSURL *url = [NSURL URLWithString:@"https:myUrlWSDL"];
self.currentRequest = [ASIFormDataRequest requestWithURL:url];
[self.currentRequest appendPostData:xmlData];
[self.currentRequest setDelegate:self];
[self.currentRequest startAsynchronous];

但是服务器向我发送了 400 床请求。

请问,我怎样才能使用所有这些安全模式调用我的 wsdl/web 服务?调用 Web 服务所需的 http 标头是什么?谢谢你的回答

我已禁用安全模块。现在我有这个错误: WSDLSOAP-ERROR: Parsing WSDL: could not load from 'http://...?wsdl' : failed to load external entity "http://...?wsdl"

【问题讨论】:

标签: iphone web-services asihttprequest


【解决方案1】:

这就是您使用 ASI 调用安全连接的方式 - 您所做的一切都是正确的。

问题一定出在您创建 xmlData 的代码中 - 您可以从客户端服务器返回哪些其他错误信息?

您可能还需要向请求添加更多标头(尽管这也是您的客户应该能够告诉您的) - 例如

[request addRequestHeader:@"Referer" value:@"http://allseeing-i.com/"];

【讨论】:

  • 我已禁用安全模块。现在我有这个错误:schemas.xmlsoap.org/soap/envelope/…: Parsing WSDL: Couldn't load from 'http ://...?wsdl' : 未能加载外部实体“http://...?wsdl”
  • 这告诉我这与安全性无关,而与 SOAP 无关。我对 SOAP 一无所知,所以不能再帮忙了,对不起!我会问一个关于堆栈溢出的新问题并将其标记为已回答!
猜你喜欢
  • 2014-07-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多