1

I am posting a GZip compressed SOAP request to IRS ACA webservice using httpClient. Below you will find the SOAP request. I get boundary error quoted below. Can anyone point to problems with my request?

Multipart stream ended before a terminating boundary was encountered

POST URL HTTP/1.1
SOAPAction: BulkRequestTransmitter
Accept-Encoding: gzip, deflate
Content-Type: multipart/related; type="application/xop + xml"; start="< http://tempuri.org/SOAP>"; start-info="text/xml"; boundary="------------030003010806000401010306"
MIME-Version: 1.0
Host: HOST
Content-Length: 17797
Expect: 100-continue
Connection: Keep-Alive

--------------030003010806000401010306
Content-Type: application/xop+xml; type="text/xml"; charset=utf-8
Content-ID: <http://tempuri.org/SOAP>
Content-Transfer-Encoding: 8bit

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header soap:mustunderstand="1" 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">
        <wsse:Security>
            <ds:Signature Id="SIG-9c4e3c69-8d46-4868-90ce-6f3a8e6585b2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                <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-7b0551e0-3c09-44e5-9de8-e1e55db97921">
                        <ds:Transforms>
                            <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                                <InclusiveNamespaces PrefixList="ds" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" />
                            </ds:Transform>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
                        <ds:DigestValue>Reference1DigestValue</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#id-77b05a65-5962-4ad3-9987-068ff21bc387">
                        <ds:Transforms>
                            <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
                        <ds:DigestValue>Reference2DigestValue=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#id-c0901773-b32f-4870-a934-6812ad67f5a6">
                        <ds:Transforms>
                            <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
                        <ds:DigestValue>Reference3DigestValue=</ds:DigestValue>
                    </ds:Reference>
                </ds:SignedInfo>
                <ds:SignatureValue>SignedInfo Signature Value</ds:SignatureValue>
                <ds:KeyInfo Id="KI-e3234134-1755-481b-a113-49ab4b692d94">
                    <wsse:SecurityTokenReference wsu:Id="STR-2a97bc36-9cb7-482d-90bb-2769b971d362">
                        <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">Public Key</wsse:KeyIdentifier>
                    </wsse:SecurityTokenReference>
                </ds:KeyInfo>
            </ds:Signature>
            <wsu:Timestamp wsu:Id="TS-7b0551e0-3c09-44e5-9de8-e1e55db97921">
                <wsu:Created>2016-03-07T16:25:11Z</wsu:Created>
                <wsu:Expires>2016-03-07T16:35:11Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
        <ACATrnsmtManifestReqDtlType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" wsu:Id="id-77b05a65-5962-4ad3-9987-068ff21bc387" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <PaymentYr xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">2015</PaymentYr>
            <PriorYearDataInd xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">0</PriorYearDataInd>
            <EIN xmlns="urn:us:gov:treasury:irs:common">EIN</EIN>
            <TransmissionTypeCd xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">O</TransmissionTypeCd>
            <TestFileCd xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">T</TestFileCd>
            <TransmitterNameGrp xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">
                <BusinessNameLine1Txt>Busness Name</BusinessNameLine1Txt>
            </TransmitterNameGrp>
            <CompanyInformationGrp xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">
                <CompanyNm>Busness Name</CompanyNm>
                <MailingAddressGrp>
                    <USAddressGrp>
                        <AddressLine1Txt>Street Address</AddressLine1Txt>
                        <CityNm xmlns="urn:us:gov:treasury:irs:common">City</CityNm>
                        <USStateCd>State</USStateCd>
                        <USZIPCd xmlns="urn:us:gov:treasury:irs:common">Zip</USZIPCd>
                    </USAddressGrp>
                </MailingAddressGrp>
                <ContactNameGrp>
                    <PersonFirstNm>FirstName</PersonFirstNm>
                    <PersonLastNm>Last Name</PersonLastNm>
                </ContactNameGrp>
                <ContactPhoneNum>Contact Phone</ContactPhoneNum>
            </CompanyInformationGrp>
            <VendorInformationGrp xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">
                <VendorCd>I</VendorCd>
                <ContactNameGrp>
                    <PersonFirstNm>FirstName</PersonFirstNm>
                    <PersonLastNm>Last Name</PersonLastNm>
                </ContactNameGrp>
                <ContactPhoneNum>Contact Phone</ContactPhoneNum>
            </VendorInformationGrp>
            <TotalPayeeRecordCnt xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">2</TotalPayeeRecordCnt>
            <TotalPayerRecordCnt xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">1</TotalPayerRecordCnt>
            <SoftwareId xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">15A0000488</SoftwareId>
            <FormTypeCd xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">1094/1095B</FormTypeCd>
            <BinaryFormatCd xmlns="urn:us:gov:treasury:irs:common">application/xml</BinaryFormatCd>
            <ChecksumAugmentationNum xmlns="urn:us:gov:treasury:irs:common">HASH</ChecksumAugmentationNum>
            <AttachmentByteSizeNum xmlns="urn:us:gov:treasury:irs:common">8919</AttachmentByteSizeNum>
            <DocumentSystemFileNm xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">1094B_Request_TCC_Timestamp.xml</DocumentSystemFileNm>
        </ACATrnsmtManifestReqDtlType>
        <ACABulkBusinessHeaderRequestType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" wsu:Id="id-c0901773-b32f-4870-a934-6812ad67f5a6" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <UniqueTransmissionId xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">UniqueTransmissionId</UniqueTransmissionId>
            <Timestamp xmlns="urn:us:gov:treasury:irs:common">2016-03-07T08:25:08Z</Timestamp>
        </ACABulkBusinessHeaderRequestType>
    </soap:Header>
    <soap:Body>
        <ns0:ACABulkRequestTransmitter xmlns:ns0="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" version="1.0">
            <ns1:BulkExchangeFile xmlns:ns1="urn:us:gov:treasury:irs:common">
                <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1094B_Request_TCC_Timestamp.xml" />
            </ns1:BulkExchangeFile>
        </ns0:ACABulkRequestTransmitter>
    </soap:Body>
</soap:Envelope>

--------------030003010806000401010306
Content-Type: application/xml
Content-ID: 1094B_Request_TCC_Timestamp.xml
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; name="1094B_Request_TCC_Timestamp.xml"
name: 1094B_Request_TCC_Timestamp.xml

<Form109495BTransmittalUpstream xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:us:gov:treasury:irs:msg:form1094-1095Btransmitterupstreammessage">
  <Form1094BUpstreamDetail recordType="" lineNum="0" xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0">
    <SubmissionId>1</SubmissionId>
    <TaxYr xmlns="urn:us:gov:treasury:irs:common">2015</TaxYr>
    <BusinessName>
      <BusinessNameLine1Txt>FilerBusinessName</BusinessNameLine1Txt>
    </BusinessName>
    <TINRequestTypeCd xmlns="urn:us:gov:treasury:irs:common">BUSINESS_TIN</TINRequestTypeCd>
    <EmployerEIN xmlns="urn:us:gov:treasury:irs:common">000000151</EmployerEIN>
    <ContactNameGrp>
      <PersonFirstNm>TestFirstName</PersonFirstNm>
      <PersonLastNm>TestLastName</PersonLastNm>
    </ContactNameGrp>
    <ContactPhoneNum>Phone</ContactPhoneNum>
    <MailingAddressGrp>
      <USAddressGrp>
        <AddressLine1Txt>StreetAddress</AddressLine1Txt>
        <CityNm xmlns="urn:us:gov:treasury:irs:common">City</CityNm>
        <USStateCd>State</USStateCd>
        <USZIPCd xmlns="urn:us:gov:treasury:irs:common">Zip</USZIPCd>
      </USAddressGrp>
    </MailingAddressGrp>
    <Form1095BAttachedCnt>2</Form1095BAttachedCnt>
    <Form1095BUpstreamDetail recordType="" lineNum="0">
      <RecordId>1</RecordId>
      <CorrectedInd>0</CorrectedInd>
      <TaxYr xmlns="urn:us:gov:treasury:irs:common">2015</TaxYr>
      <ResponsibleIndividualGrp>
        <ResponsibleIndividualName>
          <PersonFirstNm>TestFirstName</PersonFirstNm>
          <PersonMiddleNm>TestMiddleName</PersonMiddleNm>
          <PersonLastNm>TestLastName</PersonLastNm>
        </ResponsibleIndividualName>
        <TINRequestTypeCd xmlns="urn:us:gov:treasury:irs:common">INDIVIDUAL_TIN</TINRequestTypeCd>
        <SSN xmlns="urn:us:gov:treasury:irs:common">000000101</SSN>
        <MailingAddressGrp>
          <USAddressGrp>
            <AddressLine1Txt>StreetAddress</AddressLine1Txt>
            <CityNm xmlns="urn:us:gov:treasury:irs:common">City</CityNm>
            <USStateCd>State</USStateCd>
            <USZIPCd xmlns="urn:us:gov:treasury:irs:common">Zip</USZIPCd>
          </USAddressGrp>
        </MailingAddressGrp>
        <PolicyOriginCd>D</PolicyOriginCd>
      </ResponsibleIndividualGrp>
      <SponsoringEmployerInfoGrp />
      <IssuerInfoGrp>
        <BusinessName>
          <BusinessNameLine1Txt>BusinessName</BusinessNameLine1Txt>
        </BusinessName>
        <TINRequestTypeCd xmlns="urn:us:gov:treasury:irs:common">BUSINESS_TIN</TINRequestTypeCd>
        <EIN xmlns="urn:us:gov:treasury:irs:common">000000151</EIN>
        <ContactPhoneNum>Phone</ContactPhoneNum>
        <MailingAddressGrp>
          <USAddressGrp>
            <AddressLine1Txt>StreetAddress</AddressLine1Txt>
            <CityNm xmlns="urn:us:gov:treasury:irs:common">City</CityNm>
            <USStateCd>State</USStateCd>
            <USZIPCd xmlns="urn:us:gov:treasury:irs:common">Zip</USZIPCd>
          </USAddressGrp>
        </MailingAddressGrp>
      </IssuerInfoGrp>
      <CoveredIndividualGrp>
        <CoveredIndividualName>
          <PersonFirstNm>TestFirstName</PersonFirstNm>
          <PersonMiddleNm>TestMiddleName</PersonMiddleNm>
          <PersonLastNm>TestLastName</PersonLastNm>
        </CoveredIndividualName>
        <TINRequestTypeCd xmlns="urn:us:gov:treasury:irs:common">INDIVIDUAL_TIN</TINRequestTypeCd>
        <SSN xmlns="urn:us:gov:treasury:irs:common">000000101</SSN>
        <CoveredIndividualAnnualInd>1</CoveredIndividualAnnualInd>
        <CoveredIndividualMonthlyIndGrp>
          <JanuaryInd>0</JanuaryInd>
          <FebruaryInd>0</FebruaryInd>
          <MarchInd>0</MarchInd>
          <AprilInd>0</AprilInd>
          <MayInd>0</MayInd>
          <JuneInd>0</JuneInd>
          <JulyInd>0</JulyInd>
          <AugustInd>0</AugustInd>
          <SeptemberInd>0</SeptemberInd>
          <OctoberInd>0</OctoberInd>
          <NovemberInd>0</NovemberInd>
          <DecemberInd>0</DecemberInd>
        </CoveredIndividualMonthlyIndGrp>
      </CoveredIndividualGrp>
      <CoveredIndividualGrp>
        <CoveredIndividualName>
          <PersonFirstNm>TestFirstName</PersonFirstNm>
          <PersonLastNm>TestLastName</PersonLastNm>
        </CoveredIndividualName>
        <TINRequestTypeCd xmlns="urn:us:gov:treasury:irs:common">INDIVIDUAL_TIN</TINRequestTypeCd>
        <SSN xmlns="urn:us:gov:treasury:irs:common">000000102</SSN>
        <CoveredIndividualAnnualInd>1</CoveredIndividualAnnualInd>
        <CoveredIndividualMonthlyIndGrp>
          <JanuaryInd>0</JanuaryInd>
          <FebruaryInd>0</FebruaryInd>
          <MarchInd>0</MarchInd>
          <AprilInd>0</AprilInd>
          <MayInd>0</MayInd>
          <JuneInd>0</JuneInd>
          <JulyInd>0</JulyInd>
          <AugustInd>0</AugustInd>
          <SeptemberInd>0</SeptemberInd>
          <OctoberInd>0</OctoberInd>
          <NovemberInd>0</NovemberInd>
          <DecemberInd>0</DecemberInd>
        </CoveredIndividualMonthlyIndGrp>
      </CoveredIndividualGrp>
    </Form1095BUpstreamDetail>
    <Form1095BUpstreamDetail recordType="" lineNum="0">
      <RecordId>2</RecordId>
      <CorrectedInd>0</CorrectedInd>
      <TaxYr xmlns="urn:us:gov:treasury:irs:common">2015</TaxYr>
      <ResponsibleIndividualGrp>
        <ResponsibleIndividualName>
          <PersonFirstNm>TestFirstName</PersonFirstNm>
          <PersonLastNm>TestLastName</PersonLastNm>
        </ResponsibleIndividualName>
        <BirthDt xmlns="urn:us:gov:treasury:irs:common">1973-02-06</BirthDt>
        <MailingAddressGrp>
          <USAddressGrp>
            <AddressLine1Txt>StreetAddress</AddressLine1Txt>
            <CityNm xmlns="urn:us:gov:treasury:irs:common">City</CityNm>
            <USStateCd>State</USStateCd>
            <USZIPCd xmlns="urn:us:gov:treasury:irs:common">Zip</USZIPCd>
          </USAddressGrp>
        </MailingAddressGrp>
        <PolicyOriginCd>D</PolicyOriginCd>
      </ResponsibleIndividualGrp>
      <SponsoringEmployerInfoGrp />
      <IssuerInfoGrp>
        <BusinessName>
          <BusinessNameLine1Txt>BusinessName</BusinessNameLine1Txt>
        </BusinessName>
        <TINRequestTypeCd xmlns="urn:us:gov:treasury:irs:common">BUSINESS_TIN</TINRequestTypeCd>
        <EIN xmlns="urn:us:gov:treasury:irs:common">000000151</EIN>
        <ContactPhoneNum>Phone</ContactPhoneNum>
        <MailingAddressGrp>
          <USAddressGrp>
            <AddressLine1Txt>StreetAddress</AddressLine1Txt>
            <CityNm xmlns="urn:us:gov:treasury:irs:common">City</CityNm>
            <USStateCd>State</USStateCd>
            <USZIPCd xmlns="urn:us:gov:treasury:irs:common">Zip</USZIPCd>
          </USAddressGrp>
        </MailingAddressGrp>
      </IssuerInfoGrp>
      <CoveredIndividualGrp>
        <CoveredIndividualName>
          <PersonFirstNm>TestFirstName</PersonFirstNm>
          <PersonLastNm>TestLastName</PersonLastNm>
        </CoveredIndividualName>
        <BirthDt xmlns="urn:us:gov:treasury:irs:common">DOB</BirthDt>
        <CoveredIndividualAnnualInd>0</CoveredIndividualAnnualInd>
        <CoveredIndividualMonthlyIndGrp>
          <JanuaryInd>0</JanuaryInd>
          <FebruaryInd>0</FebruaryInd>
          <MarchInd>0</MarchInd>
          <AprilInd>0</AprilInd>
          <MayInd>0</MayInd>
          <JuneInd>1</JuneInd>
          <JulyInd>1</JulyInd>
          <AugustInd>1</AugustInd>
          <SeptemberInd>1</SeptemberInd>
          <OctoberInd>1</OctoberInd>
          <NovemberInd>1</NovemberInd>
          <DecemberInd>1</DecemberInd>
        </CoveredIndividualMonthlyIndGrp>
      </CoveredIndividualGrp>
      <CoveredIndividualGrp>
        <CoveredIndividualName>
          <PersonFirstNm>TestFirstName</PersonFirstNm>
          <PersonLastNm>TestLastName</PersonLastNm>
        </CoveredIndividualName>
        <TINRequestTypeCd xmlns="urn:us:gov:treasury:irs:common">INDIVIDUAL_TIN</TINRequestTypeCd>
        <SSN xmlns="urn:us:gov:treasury:irs:common">000000120</SSN>
        <CoveredIndividualAnnualInd>0</CoveredIndividualAnnualInd>
        <CoveredIndividualMonthlyIndGrp>
          <JanuaryInd>0</JanuaryInd>
          <FebruaryInd>0</FebruaryInd>
          <MarchInd>0</MarchInd>
          <AprilInd>0</AprilInd>
          <MayInd>0</MayInd>
          <JuneInd>1</JuneInd>
          <JulyInd>1</JulyInd>
          <AugustInd>1</AugustInd>
          <SeptemberInd>1</SeptemberInd>
          <OctoberInd>1</OctoberInd>
          <NovemberInd>1</NovemberInd>
          <DecemberInd>1</DecemberInd>
        </CoveredIndividualMonthlyIndGrp>
      </CoveredIndividualGrp>
    </Form1095BUpstreamDetail>
  </Form1094BUpstreamDetail>
</Form109495BTransmittalUpstream>
--------------030003010806000401010306--
Russ
  • 678
  • 8
  • 26
user2596613
  • 67
  • 1
  • 9

1 Answers1

0

Sorry, I did not see your comments on the other post.

Unfortunately, I don't recall what exactly I had to do to fix the issue I reported in this post. I've had to go through a lot of iterations of code trying different things in order to get to where I am, and I'm still somewhere in the last half of the tunnel that is this project.

However, in reviewing what you posted and comparing against what I (currently) have working (with errors, but not the above error), try removing the two extra dash characters from beginning of your boundary definition.

You defined your MIME boundary as --------------030003010806000401010306 but the references in your parts have two extra dashes at the beginning of your reference.

Here's what I have in my current "working" code.

  • I have my boundary set to something simple: MIME_boundary.
  • In the MIME Header prior to the SOAP Envelope root element AND prior to the start of the FormData file, it says --MIME_boundary.
  • Then, at the bottom of the request, it says --MIME_boundary--.
Community
  • 1
  • 1
Russ
  • 678
  • 8
  • 26
  • Thanks for responding. Unless I am missing something I have the same boundary definition you say, it has two eiphens less(12) compared to separation markers(14). And end of boundary marker has two more eiphens. – user2596613 Mar 08 '16 at 22:47
  • 1
    After removing new line characters "\r\n" at end of the request I was able to get past this error. Now onto next error "The WS Security Header in the message is invalid" – user2596613 Mar 09 '16 at 00:11
  • I'm getting that error when submitting attempting to submit a Status Check, and a error _Message not formatted properly and/or cannot be interpreted_ when sending a Transmittal Request. – Russ Mar 09 '16 at 00:15
  • Does your transmittal upload fine from UI? Have you tried with a mock SOAPUI service? – user2596613 Mar 09 '16 at 00:43
  • I looked a bit into SOAPUI, but found it very cumbersome and confusing to me. However, I will most likely be looking into that again. – Russ Mar 09 '16 at 01:47
  • If you don't have SoapUI already I don't think you will need now as you have AATS. I started with SoapUI(before AATS access) and now use both to get different error messages. My transmittal has been accepted in UI part hoping I don't have problems in A2A with same transmittal. – user2596613 Mar 09 '16 at 05:58
  • In the reference guide section 5.3.2.4 that has a sample has this element BulkRequestTransmitterService. But in another example in section 8.1.1 this element is not there. And it has two extra elements . Do you know which one is correct? – user2596613 Mar 09 '16 at 16:20
  • @user2596613 I have been going under the assumption that section 5.3.2.4 is the more correct and complete version of what needs to be sent. Section 8.1.1 seems like it is more of an example of the manifest; this is evident to me due to the inclusion of both the `ACASecurityHeader` element and the `Security` element. I believe that one is for the UI channel and the other is for the A2A channel. – Russ Mar 09 '16 at 16:29
  • 1
    Thanks. You are correct AcaSecurityHeader is not for A2A but for UI. Weird because I didn't use it for my UI transmittal submissions. BTW to resolve the boundary error CONTENT-ENCODING had to be set to gzip. – user2596613 Mar 09 '16 at 17:20
  • Were you able to get past WS Security header error? – user2596613 Mar 09 '16 at 22:23
  • Does anyone passed - The request message must be MTOM encoded. error in SOAP UI? If yes then any pointers, we have set enable MTOM to true – Oxygen Mar 15 '16 at 11:32
  • @Oxygen The SOAP Request message should be gzip encoded, not MTOM. However, the Form Data attachment should be MTOM encoded. – Russ Mar 15 '16 at 15:12
  • @user2596613 has this issue been resolved? And yes, what was the workaround? – user3841581 Jul 14 '20 at 11:11