다음은 SOAP 서버에 대한 SOAP 1.1 요청의 샘플이지만 그 내용은 중요하지 않습니다. 비누 내용 길이
POST /_vti_bin/lists.asmx HTTP/1.1
Host: 192.168.0.25
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/GetList"
<?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>
<GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>string</listName>
</GetList>
</soap:Body>
</soap:Envelope>
필드 콘텐츠 길이
: 길이 필요는 실제 값으로 대체합니다. 그 가치는 무엇입니까? 어디서 볼 수 있니? 또는 요청 전에 값을 계산하는 방법은 무엇입니까?UPD1. 은 내가 Content-Length
값이 첫 번째 <
로 시작하고 여기에 몸의 마지막 문자, >
아니면 개행 문자로 끝나는 몸의 (바이트) 길이
headerPropertyObj = new HeaderProperty("Content-Length", "383"); // should be calc before
headerList.add(headerPropertyObj);
transport.setUrl(URL);
request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("listName", "Tasks");
envelope.setOutputSoapObject(request);
transport.call(SOAP_ACTION, envelope, headerList);
SOAP 요청을 어떻게 작성하고 있습니까? – McDowell
이 링크는 도움이 될 수도 있습니다. http://stackoverflow.com/questions/290172/calculating-soap-content-length – Xara
** transport.call (SOAP_ACTION, envelope, headerList);에서 전체 쿼리를 볼 수 있습니다. ** ,하지만 난이 방법 전에 calc content-length가 필요하다. – Gorets