1

I'm trying to send the request to IRS using WCF and file is attached as follows

TransmitterACAUIBusinessHeaderType manifestType = iRSSubmissionManifest;

ACASendService.BulkRequestTransmitterRequest request = new ACASendService.BulkRequestTransmitterRequest();

request.Security = GetSecurity();
request.ACATransmitterManifestReqDtl = GetACATransmitterManifestReqDtl(manifestType);
request.ACABusinessHeader = GetACATransmitterBusinessHeaderRequest(manifestType);

request.ACABulkRequestTransmitter = new ACABulkRequestTransmitterType();
byte[] uploadFile = StreamingHelper.Chunk(_submissionXmlFolderPath);
request.ACABulkRequestTransmitter.BulkExchangeFile = uploadFile;

ACASendService.BulkRequestTransmitterPortTypeClient _airClient = new ACASendService.BulkRequestTransmitterPortTypeClient();
ACASendService.ACABulkRequestTransmitterResponseType response = _airClient.BulkRequestTransmitter(request.ACASecurityHeader, request.Security, ref request.ACABusinessHeader, request.ACATransmitterManifestReqDtl, request.ACABulkRequestTransmitter);

When I look at the request I can see the binary data in Soap Body

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:us:gov:treasury:irs:ext:aca:air:7.0" xmlns:urn1="urn:us:gov:treasury:irs:common" xmlns:urn2="urn:us:gov:treasury:irs:msg:acabusinessheader" xmlns:urn3="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <Signature Id="SIG-57610A09584142FAA8ABFBD262776BF9" xmlns="http://www.w3.org/2000/09/xmldsig#">
            <SignedInfo>
                <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"/>
                <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
                <Reference URI="#TS-C126221AACCA4F37BDBBC1AE27A45F44">
                    <Transforms>
                        <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                            <InclusiveNamespaces PrefixList="wsse wsa soapenv urn urn1 urn2 urn3" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                        </Transform>
                    </Transforms>
                    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                    <DigestValue>DtSEqek9RuRdR/q8AlxobY/90+o=</DigestValue>
                </Reference>
                <Reference URI="#MF-D3C0AAF6624148A08627F799ECDDA387">
                    <Transforms>
                        <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                            <InclusiveNamespaces PrefixList="wsa soapenv urn1 urn2 urn3" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                        </Transform>
                    </Transforms>
                    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                    <DigestValue>adRdmNY8Gwrebd9fMaiBRCgz/3o=</DigestValue>
                </Reference>
                <Reference URI="#BH-CD8C12D6D4984DD3901CFE1D9E65A86A">
                    <Transforms>
                        <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                            <InclusiveNamespaces PrefixList="wsa soapenv urn urn1 urn3" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                        </Transform>
                    </Transforms>
                    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                    <DigestValue>dj4DhqNAJnNp40DT5dEdKGTOP48=</DigestValue>
                </Reference>
            </SignedInfo>
            <SignatureValue>Signature==</SignatureValue>
            <KeyInfo Id="KI-4174BEF920A14F639F7C4E9F825D53AE">
                <wsse:SecurityTokenReference wsu:Id="STR-192B01936AC24010A0DF60BD21F3A6FA">
                    <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" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">KeyData==</KeyIdentifier>
                </wsse:SecurityTokenReference>
            </KeyInfo>
        </Signature>
        <wsu:Timestamp wsu:Id="TS-C126221AACCA4F37BDBBC1AE27A45F44" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2016-04-18T12:03:46.570Z</wsu:Created>
            <wsu:Expires>2016-04-18T12:13:46.572Z</wsu:Expires>
        </wsu:Timestamp>
    </wsse:Security>
    <urn:ACATransmitterManifestReqDtl wsu:Id="MF-D3C0AAF6624148A08627F799ECDDA387" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <PaymentYr>2015</PaymentYr>
        <PriorYearDataInd>0</PriorYearDataInd>
        <EIN>EIN</EIN>
        <TransmissionTypeCd>O</TransmissionTypeCd>
        <TestFileCd>T</TestFileCd>
        <TransmitterNameGrp>
            <BusinessNameLine1Txt>Name</BusinessNameLine1Txt>
        </TransmitterNameGrp>
        <CompanyInformationGrp>
            <CompanyNm>Company</CompanyNm>
            <MailingAddressGrp>
                <USAddressGrp>
                    <AddressLine1Txt>Address1</AddressLine1Txt>
                    <CityNm>City</CityNm>
                    <USStateCd>MD</USStateCd>
                    <USZIPCd>ZIP</USZIPCd>
                </USAddressGrp>
            </MailingAddressGrp>
            <ContactNameGrp>
                <PersonFirstNm>First</PersonFirstNm>
                <PersonLastNm>Last</PersonLastNm>
            </ContactNameGrp>
            <ContactPhoneNum>Phone</ContactPhoneNum>
        </CompanyInformationGrp>
        <VendorInformationGrp>
            <VendorCd>I</VendorCd>
            <ContactNameGrp>
                <PersonFirstNm>First</PersonFirstNm>
                <PersonLastNm>Last</PersonLastNm>
            </ContactNameGrp>
            <ContactPhoneNum>Phone</ContactPhoneNum>
        </VendorInformationGrp>
        <TotalPayeeRecordCnt>1</TotalPayeeRecordCnt>
        <TotalPayerRecordCnt>1</TotalPayerRecordCnt>
        <SoftwareId></SoftwareId>
        <FormTypeCd>1094/1095C</FormTypeCd>
        <BinaryFormatCd>application/xml</BinaryFormatCd>
        <ChecksumAugmentationNum>4BDAA151D8543B25D9A3DCDFDBFF0F44</ChecksumAugmentationNum>
        <AttachmentByteSizeNum>3800</AttachmentByteSizeNum>
        <DocumentSystemFileNm>1094C_Request_TCC_20160418T062909155Z.xml</DocumentSystemFileNm>
    </urn:ACATransmitterManifestReqDtl>
    <urn2:ACABusinessHeader wsu:Id="BH-CD8C12D6D4984DD3901CFE1D9E65A86A" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <urn:UniqueTransmissionId xmlns:urn="urn:us:gov:treasury:irs:ext:aca:air:7.0">d5631c37-de39-4569-914f-41d482b780e6:SYS12:TCC::T</urn:UniqueTransmissionId>
        <urn1:Timestamp xmlns:urn1="urn:us:gov:treasury:irs:common">2016-04-18T17:33:53Z</urn1:Timestamp>
    </urn2:ACABusinessHeader>
    <wsa:Action>BulkRequestTransmitterService</wsa:Action>
</soapenv:Header>
<soapenv:Body>
    <urn3:ACABulkRequestTransmitter version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <urn1:BulkExchangeFile>PEZvcm0xMDk0OTVDVHJhbnNtaXR0YWxVcHN0cm_File_Bytes=</urn1:BulkExchangeFile>
    </urn3:ACABulkRequestTransmitter>
</soapenv:Body>

Am I missing anything? is there any specific bindings or encoding need to be added?

Ravi
  • 1,293
  • 6
  • 20
  • 31

1 Answers1

1

If I'm reading your generated XML correctly, it seems that you have embedded the file contents of your tax forms in the BulkExchangeFile element. Perhaps this is because when you looked at the wsdl file that the IRS distributes, the said element is described as xsd:base64Binary.

If you look at the page 84 of IRS' Composition Guide v4.3,https://www.irs.gov/PUP/for_taxpros/software_developers/information_returns/AIR%20Submission%20Composition%20and%20Reference%20Guide%20TY2015_v4.3_03_17_2016.pdf (or search for http://www.w3.org/2004/08/xop/include in the document), you will see that BulkExchangeFile should be populated like:

<inc:Include href="cid:yourAttachmentFile.xml" xmlns:inc="http://www.w3.org/2004/08/xop/include"/>

where yourAtachmentFile.xml is the file you want to send to the IRS-AIR-A2A system. As you'll see in the page, your tax data is expected to be received as an MTOM attachment.

In essence, your XML above has the tax data within the BulkExchangeElement and you aren't sending the data as an MTOM attachment.

I think you're a C# guy (I'm a java dude) so this thread might help you out: IRS-A2A BulkRequestTransmitter message not formmatted properly and/or cannot be interpreted

I had trouble sending our 1095 data to the IRS until I saw page 84 in the Composition Guide. One would think that complying to the WSDL should be enough to communicate with a web service ;)

Community
  • 1
  • 1
rjp
  • 151
  • 3