1
请帮我创建ASIHTTPRequest,它应该发送xml数据(soap请求)。我使用ASIHTTPRequest来创建通常的请求,但从来没有肥皂。 在我的iPhone项目中,我需要发送与请求相同的请求,而我的Mac上的其他程序也这样做。我使用WireShark来做到这一点。ASIHTTPRequest SOAP问题
这里是Wireshark的PrintScreens:
获取Assinded乔布斯请求(第1部分):full image
获取Assinded职位要求(第2部分):full image
我有创建ASIHTTPRequest的经验,但它是JSON数据。我明白,如何用适当的标题创建请求。但我不知道如何用xml创建请求。
更新
完整的XML(对不起,1串,但Wireshark的让XML来我以这种方式):
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://com.test/types/AstoriaObjectProperties" xmlns:ns1="http://com.test/wsdl/AstoriaObjectProperties" xmlns:ns2="http://java.sun.com/jax-rpc-ri/internal"><env:Body><ns1:getObjectEnumerationProperties env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><String_1 xsi:type="xsd:string">00000013UF10YZ</String_1><arrayOfString_2 xsi:type="ns0:ArrayOfstring" enc:arrayType="xsd:string[0]" xsi:nil="1"/><HashMap_3 xsi:type="ns2:hashMap" enc:arrayType="ns2:mapEntry[7]"><item xsi:type="ns2:mapEntry"><key xsi:type="xsd:string">ancestorIds</key><value xsi:type="xsd:anyType" xsi:nil="1"/></item><item xsi:type="ns2:mapEntry"><key xsi:type="xsd:string">getAssignedJobs</key><value xsi:type="xsd:anyType" xsi:nil="1"/></item><item xsi:type="ns2:mapEntry"><key xsi:type="xsd:string">description</key><value xsi:type="xsd:anyType" xsi:nil="1"/></item><item xsi:type="ns2:mapEntry"><key xsi:type="xsd:string">name</key><value xsi:type="xsd:anyType" xsi:nil="1"/></item><item xsi:type="ns2:mapEntry"><key xsi:type="xsd:string">custAttrs</key><value xsi:type="enc:boolean">true</value></item><item xsi:type="ns2:mapEntry"><key xsi:type="xsd:string">itemFlavor</key><value xsi:type="xsd:anyType" xsi:nil="1"/></item><item xsi:type="ns2:mapEntry"><key xsi:type="xsd:string">defaultProperties</key><value xsi:type="xsd:anyType" xsi:nil="1"/></item></HashMap_3></ns1:getObjectEnumerationProperties></env:Body></env:Envelope>
预先感谢您。
请添加您到目前为止的代码,并让我们确切知道您有哪些问题。有很多关于在iOS上执行SOAP的教程/问题。 – JosephH 2012-08-10 08:54:06