iOS调用webservice接口.docxVIP

  • 0
  • 0
  • 约2.16千字
  • 约 3页
  • 2017-06-12 发布于北京
  • 举报
iOS调用webservice接口   首先了解下webservice三要素   SOAP:基于XML的一种协议规范,用来描述传递信息的格式(接口调用要遵循此格式)   WSDL:描述如何调用或访问具体的接口   UDDI:管理,查询webservice   (注:调用接口最重要的就是要遵循SOAP协议格式)   SOAP协议一般格式 ?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 //Body之间是需要调用的方法以及参数列表 /soap:Body /soap:Envelope   下图是具体示例:   调用 - (void)requestData { //soap格式要和接口吻合,下面的str仅为参考 NSString *str = [NSString stringWithFormat:@?xml version=\1.0\ encoding=\utf-8\?\

文档评论(0)

1亿VIP精品文档

相关文档