使用PHP curl使用XML提交多部分/相关内容类型

时间:2018-06-18 12:54:56

标签: xml curl soap multipartform-data soap-client

我和以下链接中解决的问题一样 - php submitting multipart and xml together to web service sending xml and headers via curl , 但是在mime边界之前和结束最后的mime边界(266c和0)之后附加了两个整数,以下是响应 -

我不知道他们出现在哪里,请帮忙。

POST /cgi/abc.cgi HTTP/1.1
Host:test.somthing.com
Accept: */*
Content-Type: multipart/related; type="application/xop+xml"; 
start="0.urn:uuid:test_start_321"; start-info="application/soap+xml"; 
action="urn:ihe:iti:2007:SoapactionTest-b" boundary="MIMEBoundaryurn_uuid_123"
Transfer-Encoding:chunked
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,     like Gecko) Chrome/66.0.3359.181 Safari/537.36
Content-length:1234

266c
--MIMEBoundaryurn_uuid_123
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml
Content-Transfer-Encoding: binary
Content-length:9413
Expect:
Content-ID:0.urn:uuid:test_start_321

<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing"
 xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
    <a:Action s:mustUnderstand="1">urn:ihe:iti:2007:SoapactionTest-b</a:Action>
    <a:To>https://abc.efc.org:20000/repository</a:To>
</s:Header>
<s:Body>
        <Document id=\"Document1\">
                <xop:Include href=\"cid:1.urn:uuid:test_cid_123\"
                xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
        </Document>
    </SoapactionTest>
</s:Body>
</s:Envelope>

--MIMEBoundaryurn_uuid_123
Content-Type: text/plain;
Content-Transfer-Encoding: binary
Content-length:24
Expect:
Content-ID:1.urn:uuid:test_cid_123
dGhpcyBpcyBTaGl2J3MgZG9j
--MIMEBoundaryurn_uuid_123--    
0

HTTP/1.1 200 OK
Content-type: text/plain
Content-Length: 7
Connection: close
Date: Fri, 15 Jun 2018 07:06:24 GMT
Server: info
HELLO

0 个答案:

没有答案