title: IRS ACA 1095C SOAP Fault : Error in assertion processing
body: <p>Randomly I'm getting an error while submitting 1094/1095C to IRS ACA site. It has been a working code since a while I made no changes to the code all of a sudden I started seeing this error for few submissions. </p>
  
  <p>The code is in java. We are still able to make success full submissions but certain submitions are returning a SOAP fault error. </p>
  
  <pre class="lang-java prettyprint-override"><code>
  ........
   org.apache.cxf.endpoint.Client yclient = (org.apache.cxf.endpoint.Client) factory.create();
              GZIPInInterceptor ininterceptor = new GZIPInInterceptor();
              yclient.getInInterceptors().add(ininterceptor);
              Endpoint eEndpoint = yclient.getEndpoint();
              EndpointInfo einfo = eEndpoint.getEndpointInfo();
              BindingInfo b = einfo.getBinding();
              ProviderFactory pf = ServerProviderFactory.getInstance();
              eEndpoint.put(ProviderFactory.class.getName(), pf);
  
              yclient.getRequestContext().put("soap.env.ns.map", nsMap);
              yclient.getRequestContext().put("org.apache.cxf.client", Boolean.FALSE);
              Collection&lt;BindingOperationInfo&gt; c = b.getOperations();
              Iterator&lt;BindingOperationInfo&gt; it = c.iterator();
              while (it.hasNext()) {
                  BindingOperationInfo bi = it.next();
                  QName name = bi.getOperationInfo().getName();
  
                  System.out.println(name.toString());
                  GZIPOutInterceptor interceptor = new GZIPOutInterceptor();
                  interceptor.setForce(true);
                  yclient.getOutInterceptors().add(interceptor);
  
                  Map&lt;String, Object&gt; ycontext = yclient.getRequestContext();
                  ycontext.put(MessageContext.HTTP_REQUEST_HEADERS, head);
                  Map&lt;Integer, Class&lt;?&gt;&gt; wssConfigActions = new HashMap&lt;Integer, Class&lt;?&gt;&gt;();
                  Map&lt;String, Object&gt; serverOutParams = createServerOutParams(wssConfigActions, true);
  
                  yclient.getOutInterceptors().add(new SOAPSecurityInterceptor());
                  yclient.getOutInterceptors().add(new SecurityHeaderHandler(null));
                  AIRXMLSignInterceptor sigInterceptor = new AIRXMLSignInterceptor(serverOutParams, true);
                  sigInterceptor.privateKey = PrivateKey;
                  yclient.getOutInterceptors().add(sigInterceptor);
                  AddressingProperties maps = new AddressingProperties();
                  AttributedURIType iri = new AttributedURIType();
                  iri.setValue("RequestSubmissionStatusDetail");
                  maps.setAction(iri);
  
                  ACABulkRequestTransmitterStatusDetailRequestType statusRequest = new ACABulkRequestTransmitterStatusDetailRequestType();
                  statusRequest.setId("id-00E7E0006E615C14D6000736030986000");
                  statusRequest.setVersion("1.0");
  
                  ACABulkReqTrnsmtStsReqGrpDtlType reqDetail = new ACABulkReqTrnsmtStsReqGrpDtlType();
                  reqDetail.setReceiptId(submissionRecord.StatusInfo.ReceiptId);
                  statusRequest.setACABulkReqTrnsmtStsReqGrpDtl(reqDetail);
                  ACABulkBusinessHeaderRequestType businessHeader = new ACABulkBusinessHeaderRequestType();
                  businessHeader.setId("id-00E7E0006E615C14D6000736030986000");
                  businessHeader.setUniqueTransmissionId(submissionRecord.StatusInfo.UniqueTransmissionId);
  
                  GregorianCalendar gregory = new GregorianCalendar();
                  TimeZone utc = TimeZone.getTimeZone("UTC");
                  gregory.setTime(UTCDate.now());
                  gregory.setTimeZone(utc);
                  XMLGregorianCalendar calendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(gregory);
                  BusinessHeaderTimeStamp bhts = new BusinessHeaderTimeStamp(calendar);
                  businessHeader.setTimestamp(bhts);
  
                  System.out.println(bhts.toXMLFormat());
  
                  javax.xml.ws.Holder&lt;ACABulkBusinessHeaderRequestType&gt; businessHeaderWrapper = new javax.xml.ws.Holder&lt;ACABulkBusinessHeaderRequestType&gt;();
                  businessHeaderWrapper.value = businessHeader;
                  SecurityHeaderType securityHeader = configureSecurityHeader(now);
  
                  System.out.println("Polling receiptId: " + submissionRecord.StatusInfo.ReceiptId);
                  TransmitterACASecurityHeaderType acaSecurityHeader = new TransmitterACASecurityHeaderType();
                  acaSecurityHeader.setUserId(ASID);
  
                  Object[] res1 = yclient.invoke(bi, statusRequest, acaSecurityHeader, securityHeader,
                          businessHeaderWrapper);
  
                  ACABulkRequestTransmitterStatusDetailResponseType response = (ACABulkRequestTransmitterStatusDetailResponseType) res1[0];
                  submissionRecord.StatusInfo.Response = response;
  
                  String xml = submissionRecord.StatusInfo.toXML();
                  return xml;
  
  ......
  
  </code></pre>
  
  <p>Final Request : </p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:irs="urn:us:gov:treasury:irs:common" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:us:gov:treasury:irs:ext:aca:air:ty18" xmlns:urn2="urn:us:gov:treasury:irs:msg:acabusinessheader" xmlns:urn3="urn:us:gov:treasury:irs:srv:irsacabulkrequesttransmitter"
   xmlns:urn4="urn:us:gov:treasury:irs:msg:acasecurityheader" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt;
      &lt;soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"&gt;
          &lt;wsse:Security xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
              &lt;ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SIG-0000E45A7D26C7FA400002296060180000"&gt;
                  &lt;ds:SignedInfo&gt;
                      &lt;ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"/&gt;
                      &lt;ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/&gt;
                      &lt;ds:Reference URI="#TS-0000E45A7D26C7FA471572296060100000"&gt;
                          &lt;ds:Transforms&gt;
                              &lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;
                                  &lt;InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse wsa irs soapenv urn urn2 urn3 urn4 wsse"/&gt;
                              &lt;/ds:Transform&gt;
                          &lt;/ds:Transforms&gt;
                          &lt;ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/&gt;
                          &lt;ds:DigestValue&gt;2+tTV2cozq0boqXSgb+K6FY2EqjM5fCvBMiwbBR97sE=&lt;/ds:DigestValue&gt;
                      &lt;/ds:Reference&gt;
                      &lt;ds:Reference URI="#id-081a1c66-00d0-45cd-9d00-bf8c4eddf19e"&gt;
                          &lt;ds:Transforms&gt;
                              &lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;
                                  &lt;InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsa irs soapenv urn2 urn3 urn4 wsse"/&gt;
                              &lt;/ds:Transform&gt;
                          &lt;/ds:Transforms&gt;
                          &lt;ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/&gt;
                          &lt;ds:DigestValue&gt;ENBnod7vKlXCLiWqft1H4duETdaR4MxotsJ8JVUhZDc=&lt;/ds:DigestValue&gt;
                      &lt;/ds:Reference&gt;
                      &lt;ds:Reference URI="#id-E68EBBF1696C5DD4AA143353323390578"&gt;
                          &lt;ds:Transforms&gt;
                              &lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;
                                  &lt;InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsa irs soapenv urn urn3 urn4 wsse"/&gt;
                              &lt;/ds:Transform&gt;
                          &lt;/ds:Transforms&gt;
                          &lt;ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/&gt;
                          &lt;ds:DigestValue&gt;0gJBTeYumHhBgwSM08x0lAQeiFb9xGlsacSe7E5GzeQ=&lt;/ds:DigestValue&gt;
                      &lt;/ds:Reference&gt;
                  &lt;/ds:SignedInfo&gt;
                  &lt;ds:SignatureValue&gt;eXaUaEVZMzg1Bxsy+EVoIG4d4to3lrUW+7==&lt;/ds:SignatureValue&gt;
                  &lt;ds:KeyInfo Id="KI-1057E45A7D26C7FA471572296060184463"&gt;
                      &lt;wsse:SecurityTokenReference wsu:Id="STR-1057E45A7D26C7FA471572296060184464"&gt;
                          &lt;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"&gt;MIIGNTCCBR2gAwIBAgIQQAF...VIrQSgw&lt;/wsse:KeyIdentifier&gt;
                      &lt;/wsse:SecurityTokenReference&gt;
                  &lt;/ds:KeyInfo&gt;
              &lt;/ds:Signature&gt;
              &lt;wsu:Timestamp wsu:Id="TS-1057E45A7D26C7FA471572296060184461"&gt;
                  &lt;wsu:Created&gt;2019-10-28T20:54:20.184Z&lt;/wsu:Created&gt;
                  &lt;wsu:Expires&gt;2019-10-28T21:04:20.184Z&lt;/wsu:Expires&gt;
              &lt;/wsu:Timestamp&gt;
          &lt;/wsse:Security&gt;
  
          &lt;Action xmlns="http://www.w3.org/2005/08/addressing"&gt;BulkRequestTransmitter&lt;/Action&gt;
          &lt;MessageID xmlns="http://www.w3.org/2005/08/addressing"&gt;urn:uuid:d0711332-e90f-4587-848b-3ee0da27c2e9&lt;/MessageID&gt;
          &lt;To xmlns="http://www.w3.org/2005/08/addressing"&gt;https://la.www4.irs.gov/airp/aca/a2a/1095BC_Transmission&lt;/To&gt;
          &lt;ReplyTo xmlns="http://www.w3.org/2005/08/addressing"&gt;
              &lt;Address&gt;http://www.w3.org/2005/08/addressing/anonymous&lt;/Address&gt;
          &lt;/ReplyTo&gt;
          &lt;urn4:ACASecurityHeader xmlns:ns6="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns8="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter"&gt;
              &lt;irs:UserId&gt;0aB0000&lt;/irs:UserId&gt;
          &lt;/urn4:ACASecurityHeader&gt;
          &lt;urn2:ACABusinessHeader xmlns:ns6="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns8="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" ns7:Id="id-E00EBBF0000C5DD4AA143353323390000"&gt;
              &lt;urn:UniqueTransmissionId&gt;65fc42c9-8ecd-46f2-0000-00000d58b9be:SYS12:BB01F::T&lt;/urn:UniqueTransmissionId&gt;
              &lt;irs:Timestamp&gt;2019-10-28T20:54:20Z&lt;/irs:Timestamp&gt;
          &lt;/urn2:ACABusinessHeader&gt;
          &lt;urn:ACATransmitterManifestReqDtl xmlns:ns6="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns8="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" ns7:Id="id-00000c66-00d0-45cd-9d00-bf8c4eddf19e"&gt;
              &lt;urn:PaymentYr&gt;2016&lt;/urn:PaymentYr&gt;
              &lt;urn:PriorYearDataInd&gt;1&lt;/urn:PriorYearDataInd&gt;
              &lt;irs:EIN&gt;000000000&lt;/irs:EIN&gt;
              &lt;urn:TransmissionTypeCd&gt;O&lt;/urn:TransmissionTypeCd&gt;
              &lt;urn:TestFileCd&gt;P&lt;/urn:TestFileCd&gt;
              &lt;urn:TransmitterNameGrp&gt;
                  &lt;urn:BusinessNameLine1Txt&gt;First Capitol Consulting&lt;/urn:BusinessNameLine1Txt&gt;
              &lt;/urn:TransmitterNameGrp&gt;
              &lt;urn:CompanyInformationGrp&gt;
                  &lt;urn:CompanyNm&gt;F  Co&lt;/urn:CompanyNm&gt;
                  &lt;urn:MailingAddressGrp&gt;
                      &lt;urn:USAddressGrp&gt;
                          &lt;urn:AddressLine1Txt&gt;Abc Blvd&lt;/urn:AddressLine1Txt&gt;
                          &lt;urn:AddressLine2Txt&gt;Suite 000&lt;/urn:AddressLine2Txt&gt;
                          &lt;irs:CityNm&gt;L city&lt;/irs:CityNm&gt;
                          &lt;urn:USStateCd&gt;aA&lt;/urn:USStateCd&gt;
                          &lt;irs:USZIPCd&gt;00000&lt;/irs:USZIPCd&gt;
                      &lt;/urn:USAddressGrp&gt;
                  &lt;/urn:MailingAddressGrp&gt;
                  &lt;urn:ContactNameGrp&gt;
                      &lt;urn:PersonFirstNm&gt;a&lt;/urn:PersonFirstNm&gt;
                      &lt;urn:PersonLastNm&gt;b&lt;/urn:PersonLastNm&gt;
                  &lt;/urn:ContactNameGrp&gt;
                  &lt;urn:ContactPhoneNum&gt;0000000000&lt;/urn:ContactPhoneNum&gt;
              &lt;/urn:CompanyInformationGrp&gt;
              &lt;urn:VendorInformationGrp&gt;
                  &lt;urn:VendorCd&gt;I&lt;/urn:VendorCd&gt;
                  &lt;urn:ContactNameGrp&gt;
                      &lt;urn:PersonFirstNm&gt;f&lt;/urn:PersonFirstNm&gt;
                      &lt;urn:PersonLastNm&gt;a&lt;/urn:PersonLastNm&gt;
                  &lt;/urn:ContactNameGrp&gt;
                  &lt;urn:ContactPhoneNum&gt;0000000000&lt;/urn:ContactPhoneNum&gt;
              &lt;/urn:VendorInformationGrp&gt;
              &lt;urn:TotalPayeeRecordCnt&gt;180&lt;/urn:TotalPayeeRecordCnt&gt;
              &lt;urn:TotalPayerRecordCnt&gt;1&lt;/urn:TotalPayerRecordCnt&gt;
              &lt;urn:SoftwareId&gt;00A0000000&lt;/urn:SoftwareId&gt;
              &lt;urn:FormTypeCd&gt;1094/1095C&lt;/urn:FormTypeCd&gt;
              &lt;irs:BinaryFormatCd&gt;application/xml&lt;/irs:BinaryFormatCd&gt;
              &lt;irs:ChecksumAugmentationNum&gt;dc4206d79d71cc9c8d5e9183677580e0b68b2a708543409aaec7a407c66d6a0e&lt;/irs:ChecksumAugmentationNum&gt;
              &lt;irs:AttachmentByteSizeNum&gt;336472&lt;/irs:AttachmentByteSizeNum&gt;
              &lt;urn:DocumentSystemFileNm&gt;1094C_Request_BB01F_20191028T205416001Z.xml&lt;/urn:DocumentSystemFileNm&gt;
          &lt;/urn:ACATransmitterManifestReqDtl&gt;
      &lt;/soapenv:Header&gt;
  
      &lt;soapenv:Body&gt;
          &lt;ns8:ACABulkRequestTransmitter xmlns:ns6="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns8="urn:us:gov:treasury:irs:msg:irsacabulkrequesttransmitter" version="1.0"&gt;
              &lt;irs:BulkExchangeFile&gt;
                  &lt;xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:734ca002-8275-4680-a24c-923694dc777e-93@urn%3Aus%3Agov%3Atreasury%3Airs%3Acommon"/&gt;
              &lt;/irs:BulkExchangeFile&gt;
          &lt;/ns8:ACABulkRequestTransmitter&gt;
      &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  --uuid:c82296c0-0eaf-4133-971d-7838bafae222
  
  </code></pre>
  
  <p>I am getting the following error (500) </p>
  
  <p>ID: 98
  Response-Code: 500<br>
  Encoding: UTF-8<br>
  Content-Type: text/xml;charset=utf-8<br>
  Headers: {connection=[close], Content-Length=[613], content-type=[text/xml;charset=utf-8], Date=[Mon, 28 Oct 2019 20:54:36 GMT], Set-Cookie=[dc=dcd;Path=/;Version=1;Secure;Httponly;Max-Age=900], Strict-Transport-Security=[max-age=31536000], X-Cnection=[close]}</p>
  
  <p>Payload: </p>
  
  <p></p>
  
  <pre><code>&lt;soapenv:Fault&gt;
  
    &lt;faultcode&gt;soapenv:Server&lt;/faultcode&gt;
  
    &lt;faultstring&gt;Error in assertion processing&lt;/faultstring&gt;
  
    &lt;faultactor&gt;ssg&lt;/faultactor&gt;
  
    &lt;detail&gt;
  
      &lt;l7:policyResult xmlns:l7="http://www.layer7tech.com/ws/policy/fault" status="Multipart stream ended before a terminating boundary was encountered"/&gt;
  
    &lt;/detail&gt;
  
  &lt;/soapenv:Fault&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p>can somebody please explain what is that I am missing or doing wrong.</p>