2012-05-28 81 views
0

你好我'在Xcode &客觀-C新如何使用方法和參數調用WSDL?

現在我有應用程序通過XML從服務器獲取數據

但是如果我想通過WSDL與方法來改變XML Web服務來參數&如何 我可以做

前。 WS網址

http://HOST:PORT/ExportingReportWebservice/ExportingReportWebservice?wsdl 

方法名是getReport 參數爲java.lang.String的

SOAP響應

<?xml version="1.0" encoding="UTF-8"?> 
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> 
    <S:Body> 
     <ns2:getReportResponse xmlns:ns2="http://controller.exportingreportwebservice.lox.org/"> 
      <return> 
       <exportId>4</exportId> 
       <readFG>N</readFG> 
       <receiverId>2711</receiverId> 
       <referenceId>21</referenceId> 
       <referenceName>???????????????????????? ?????????????????????????????????????????????</referenceName> 
       <reportFullPath>http://10.3.24.202:8081/ExportingReportAdmin/Reports/55126a88-dcec-45d1-b156-e1eb9ab2b48e.pdf</reportFullPath> 
       <reportName>55126a88-dcec-45d1-b156-e1eb9ab2b48e.pdf</reportName> 
       <senderId>7615</senderId> 
       <senderName>???????????????????????? ??????????????????</senderName> 
       <sentDate>2012-05-23 10:40:01.0</sentDate> 
       <subject>Report Surgical</subject> 
      </return> 
      <return> 
       <exportId>8</exportId> 
       <readFG>N</readFG> 
       <receiverId>2711</receiverId> 
       <referenceId>20</referenceId> 
       <referenceName>????????????????????? ???????????????????????????</referenceName> 
       <reportFullPath>http://10.3.24.202:8081/ExportingReportAdmin/Reports/691766e9-44eb-4ca9-9908-1b1846327acc.pdf</reportFullPath> 
       <reportName>691766e9-44eb-4ca9-9908-1b1846327acc.pdf</reportName> 
       <senderId>7615</senderId> 
       <senderName>???????????????????????? ??????????????????</senderName> 
       <sentDate>2012-05-23 10:41:28.0</sentDate> 
       <subject>prime face user guide</subject> 
      </return> 
      <return> 
       <exportId>13</exportId> 
       <readFG>N</readFG> 
       <receiverId>2711</receiverId> 
       <referenceId>21</referenceId> 
       <referenceName>???????????????????????? ?????????????????????????????????????????????</referenceName> 
       <reportFullPath>http://10.3.24.202:8081/ExportingReportAdmin/Reports/c4f4f1fd-1c67-4bad-9447-f536fd2b46db.pdf</reportFullPath> 
       <reportName>c4f4f1fd-1c67-4bad-9447-f536fd2b46db.pdf</reportName> 
       <senderId>7615</senderId> 
       <senderName>???????????????????????? ??????????????????</senderName> 
       <sentDate>2012-05-23 11:21:23.0</sentDate> 
       <subject>icefaces getting start</subject> 
      </return> 
     </ns2:getReportResponse> 
    </S:Body> 
</S:Envelope> 

三江源verymucth

PS。對不起我的英語技能。

回答

1

您可以使用NSURL類編寫自己的實現來連接到Web服務並使用NSXML來解析接收到的響應,或者您可以檢出此線程(How to access SOAP services from iPhone)並使用其中提到的框架之一。