我使用以下查询获取服务响应,但它给我错误:调用服务时请求异常中缺少wsse:安全标头
curl -s -H 'Content-Type: text/xml; charset=utf-8' -o GetCardType_output.xml -k -d@GetCardType.xml http://localhost:8180/axis2/services/MetadataService?wsdl
似乎没有读取包含标头的XML文件:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ifor="XXXXXX">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XXXXXX">
<wsse:Username>XXXXX</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ifor:getCardListForProjectInput>
<ifor:projectId>1</ifor:projectId>
<ifor:userLoginId></ifor:userLoginId>
</ifor:getCardListForProjectInput>
</soapenv:Body>
</soapenv:Envelope>