2

我可以成功地向 IRS 发送 BulkRequestTransmitterService 请求。但我坚持使用 ACAGetTransmitterBulkRequestStatus。TPE1122 出现故障:“消息中的 WS 安全标头无效”。

我正在使用 java 和 apache xmlsec 生成请求,BulkRequestTransmitterService 和 ACAGetTransmitterBulkRequestStatus 的类相同,但 BulkRequestTransmitterService 成功且 ACAGetTransmitterBulkRequestStatus 失败。

我已经添加了 InclusiveNamespaces 并调整了前缀,但仍然是 TPE1122:“消息中的 WS 安全标头无效”。我已经询问过技术支持,但他们给了我标准的回复“检查文档、检查标题等”。

我已经读过:

无效的 WS 安全标头 - IRS ACA SOAP 请求

IRS Soap 故障 - 无效的 WS 安全标头

获取“消息中的 WS 安全标头无效”。调用 ACAGetTransmitterBulkRequestStatus 时

IRS ACA 1095B BulkRequestTransmitter:无效的 WS 安全标头 - SOAP UI

我没有新的想法,请告诉我我做错了什么,我的要求和回应:

---[HTTP request - https://la.www4.irs.gov/airp/aca/a2a/1095BC_Status_Request_AATS2016]---
Accept: text/xml, multipart/related
Accept-Encoding: gzip,deflate 
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: "RequestSubmissionStatusDetail"
User-Agent: Metro/2.3 (tags/2.3-7528; 2013-04-29T19:34:10+0000) JAXWS-RI/2.2.8 JAXWS/2.2 svn-revision#unknown
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SIG-8ACB711D603109F02FCD341CD1D73E7A">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#TS-E69C3A9C6891CCFE1FFECE43A0B7B5E7">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="ds oas1 soapenv urn urn1 urn2 urn3 wsse wsu"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>J/gI5JSDeM3z5gRnLV7b1cd7/kY=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#BH-D4F0B9B3093469091486C9515FDA764E">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="ds oas1 soapenv urn urn1 urn2 urn3 wsse wsu"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>KMvmV76a1jkXtTD0XPW7maTUjCs=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#ST-D4D9163B8E3EB6106D2D64BD4E155B2F">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="ds oas1 soapenv urn urn1 urn2 urn3 wsse wsu"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>zgTna1cbhsw3bMhOQyqv+Ku1OiM=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
PhQWcToQ3LO7YUaGFhMpCaaktAwpjSLKCRtMzMFfoflru4SK/+rNQOD3p8IiEqd0wXL8CDz2vnoY
oiw4utsIpMvOKeQDVyZpUAvWiwBBe8QWyUi8CPYwC3rjREUP4+BRt1cKSc/QpEhyhHCeyDAfi9A7
6CllipUVNs9VE6rPPppuMncyhLdPWeHGswkaWiXwwOH88UFkY1KFmxrnk8I+o5+M+U1MEqHPuUqF
kXz5bknLp8/MZtGRp8i/GUlvW68E7E7aL+2lXCDAnK3LZ3AkgFr/MG6vgawymkQ8i6cxiZCAeLcc
3VZY90oHYC9e+efdqdBwmnFPz3Fi5xPQ5O7ZdQ==
</ds:SignatureValue>

<ds:KeyInfo><wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STR-E68EBBF1696C5DD4AA143353323390476"><wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3">REMOVED</wsse:KeyIdentifier></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature><wsu:Timestamp xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:urn1="urn:us:gov:treasury:irs:ext:aca:air:7.0" xmlns:urn2="urn:us:gov:treasury:irs:common" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="TS-E69C3A9C6891CCFE1FFECE43A0B7B5E7"><wsu:Created>2016-05-25T14:52:08.961Z</wsu:Created><wsu:Expires>2016-05-25T15:02:08.961Z</wsu:Expires></wsu:Timestamp></wsse:Security><urn:ACABusinessHeader xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:urn="urn:us:gov:treasury:irs:msg:acabusinessheader" xmlns:urn1="urn:us:gov:treasury:irs:ext:aca:air:7.0" xmlns:urn2="urn:us:gov:treasury:irs:common" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="BH-D4F0B9B3093469091486C9515FDA764E"><urn1:UniqueTransmissionId>a02b754e-4f78-4c44-8c77-654b2713dd16:SYS12:REMOVED::T</urn1:UniqueTransmissionId><urn2:Timestamp>2016-05-25T14:52:03Z</urn2:Timestamp></urn:ACABusinessHeader><wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">RequestSubmissionStatusDetail</wsa:Action></soapenv:Header><soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><urn:ACABulkRequestTransmitterStatusDetailRequest xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:urn="urn:us:gov:treasury:irs:msg:irstransmitterstatusrequest" xmlns:urn1="urn:us:gov:treasury:irs:ext:aca:air:7.0" xmlns:urn2="urn:us:gov:treasury:irs:common" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" version="1.0" wsu:Id="ST-D4D9163B8E3EB6106D2D64BD4E155B2F"><urn1:ACABulkReqTrnsmtStsReqGrpDtl><urn2:ReceiptId>1095C-16-00056212</urn2:ReceiptId></urn1:ACABulkReqTrnsmtStsReqGrpDtl></urn:ACABulkRequestTransmitterStatusDetailRequest></soapenv:Body></soapenv:Envelope>--------------------

---[HTTP response - https://la.www4.irs.gov/airp/aca/a2a/1095BC_Status_Request_AATS2016 - 500]---
null: HTTP/1.1 500 Internal Server Error
Connection: close
Content-Length: 781
Content-Type: text/xml;charset=utf-8
Date: Wed, 25 May 2016 14:52:09 GMT
Server: Apache-Coyote/1.1
Set-Cookie: dc=dcd;Max-Age=900;Secure;Path=/;Version=1;
X-Cnection: close
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Client</faultcode>
            <faultstring>The WS Security Header in the message is invalid. Please review the transmission instructions outlined in Section 5 of the AIR Submission Composition and Reference Guide located at https://www.irs.gov/for-Tax-Pros/Software-Developers/Information-Returns/Affordable-Care-Act-Information-Return-AIR-Program, correct any issues, and try again.</faultstring>
            <detail>
               <errorcode>TPE1122</errorcode>
               <uniqueTransmissionID/>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>--------------------
4

1 回答 1

2

解决了,

IRS 为 ACABusinessHeader 使用不同的命名空间。

对于 BulkRequestTransmitterService,它应该是 urn:us:gov:treasury:irs:msg:acabusinessheader

对于 ACAGetTransmitterBulkRequestStatus 它应该是 urn:us:gov:treasury:irs:msg:irstransmitterstatusrequest

于 2016-05-26T04:21:11.343 回答