0

我需要我的标题看起来像这样:

  <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);

但这不起作用,服务器响应拒绝访问。

4

0 回答 0