我需要我的标题看起来像这样:
<soap:Header>
<ListAuthenticationHeader XmlAttribute="" xmlns="http://example.com/services">
<ApiKey>1234567890</ApiKey>
</ListAuthenticationHeader>
</soap:Header>
我试过
List<HeaderProperty> headerPropertyList = new ArrayList<HeaderProperty>();
headerPropertyList.add(new HeaderProperty("ApiKey","1234567890"));
HttpTransportSE ht = new HttpTransportSE(URL);
ht.call(SOAP_ACTION, envelope, headerPropertyList);
但是这不起作用,服务器响应拒绝访问。