0

We are sending a data to IRS site for 1094/1095C form submission. To Send this we have created a HTTP request as

   HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://la.www4.irs.gov/airp/aca/a2a/1095BC_Transmission_AATS2016");

            request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
            request.Headers.Add(HttpRequestHeader.ContentEncoding, "gzip");
            request.Headers.Add("Content-Transfer-Encoding", "8bit");
            request.Headers.Add("SOAPAction", "BulkRequestTransmitter");

            request.Method = "POST";

            request.Headers.Add("MIME-Version", "1.0");
            request.ContentType = "multipart/related; type=\"application/xop+xml;\" boundary=\"" + saperator+ "\";start=\"<root.message@cxf.apache.org>\"; start-info=\"text/xml\"\r\n";
            request.Headers.Add("Content-ID", "<root.message@cxf.apache.org>");
            request.Headers.Add("Payload", "--"+saperator);

and formed a final request as

--uuid:bb8b365a-f8d6-49f0-9426-192c5408bf0f
        <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">
          <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 part
          </wsse:Security>
            <urn:ACATransmitterManifestReqDtl wsu:Id="id-E68EBBF1696C5DD4AA143353323390577" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            .... Manifest data
            </urn:ACATransmitterManifestReqDtl>
            <urn2:ACABusinessHeader wsu:Id="id-E68EBBF1696C5DD4AA143353323390578" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            .... Business header 
            </urn2:ACABusinessHeader>
            <wsa:Action>BulkRequestTransmitter</wsa:Action>
          </soapenv:Header>
          <soapenv:Body>
            <urn:ACABulkRequestTransmitter version="1.0">
              <urn1:BulkExchangeFile>
                cid:1094C_Request_[TCCID]_20160312T161033882Z.xml
              </urn1:BulkExchangeFile>
            </urn:ACABulkRequestTransmitter>
          </soapenv:Body>
        </soapenv:Envelope>

        --uuid:bb8b365a-f8d6-49f0-9426-192c5408bf0f
        Content-Type: application/xml
        Content-Transfer-Encoding:7bit
        Content-ID:1094C_Request_[TCCID]_20160315T132809462Z.xml
        Content-Disposition: attachment; name="1094C_Request_[TCCID]_20160315T132809462Z.xml"
        <?xml version="1.0" encoding="UTF-8"?>
        <n1:Form109495CTransmittalUpstream xmlns:n1="urn:us:gov:treasury:irs:msg:form1094-1095Ctransmitterupstreammessage" xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0" xmlns:irs="urn:us:gov:treasury:irs:common" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:us:gov:treasury:irs:msg:form1094-1095Ctransmitterupstreammessage IRS-Form1094-1095CTransmitterUpstreamMessage.xsd">
          .... Form109495CTransmittalUpstream data
        </n1:Form109495CTransmittalUpstream>
        --uuid:bb8b365a-f8d6-49f0-9426-192c5408bf0f--

but when we try to make HTTPRequest using above, getting error as

 <?xml version="1.0" encoding="UTF-8"?>
        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
            <soapenv:Body>
                <soapenv:Fault>
                    <faultcode>soapenv:Server</faultcode>
                    <faultstring>Error in assertion processing</faultstring>
                    <faultactor>ssg</faultactor>
                    <detail>
                        <l7:policyResult
                            status="Multipart stream ended before a terminating boundary was encountered" xmlns:l7="http://www.layer7tech.com/ws/policy/fault"/>
                    </detail>
                </soapenv:Fault>
            </soapenv:Body>
        </soapenv:Envelope>

Do you have any reference on this, how can we pass this? or how to send a file as a MTOM attachment in .NET?

Oxygen
  • 831
  • 4
  • 17
  • 42

2 Answers2

0

I had the same error that I reported IRS ACA SOAP boundary error.

Try adding header Content-Encoding gzip. I had asked IRS about this error. Below is the response I got, might be useful to you.

• utf-8 must be in all caps UTF-8 for both the manifest and form data file 

• make sure your Timestamps follow these examples:

EXAMPLE (allow 10 minutes between create and expire:

<wsu:Timestamp wsu:Id="TS-9850525DA06CE28ED91448475206407141"> 

<wsu:Created>2015-11-25T18:13:26.407Z</wsu:Created> 

<wsu:Expires>2015-11-25T18:23:26.407Z</wsu:Expires> 

</wsu:Timestamp>

EXAMPLE:

<urn1:Timestamp>2015-07-09T13:41:09Z</urn1:Timestamp>
Community
  • 1
  • 1
user2596613
  • 67
  • 1
  • 9
  • Note, the first Timestamp in the above example, is the Timestamp that is a child of the Security element; and the second Timestamp is a child element of the ACA Business Header. – Russ Mar 16 '16 at 22:15
0

I believe that one of the issues (may or may not be directly related to what you're experiencing), is that the value of your of

<urn1:BulkExchangeFile>

should actually be

<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" 
             href="cid:1094C_Request_TCCID_20160312T161033882Z.xml" />
Russ
  • 678
  • 8
  • 26