0

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.

The code is in java. We are still able to make success full submissions but certain submitions are returning a SOAP fault error.


........
 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<BindingOperationInfo> c = b.getOperations();
            Iterator<BindingOperationInfo> 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<String, Object> ycontext = yclient.getRequestContext();
                ycontext.put(MessageContext.HTTP_REQUEST_HEADERS, head);
                Map<Integer, Class<?>> wssConfigActions = new HashMap<Integer, Class<?>>();
                Map<String, Object> 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<ACABulkBusinessHeaderRequestType> businessHeaderWrapper = new javax.xml.ws.Holder<ACABulkBusinessHeaderRequestType>();
                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;

......

Final Request :

<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">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <wsse:Security xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SIG-0000E45A7D26C7FA400002296060180000">
                <ds:SignedInfo>
                    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"/>
                    <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
                    <ds:Reference URI="#TS-0000E45A7D26C7FA471572296060100000">
                        <ds:Transforms>
                            <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                                <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse wsa irs soapenv urn urn2 urn3 urn4 wsse"/>
                            </ds:Transform>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                        <ds:DigestValue>2+tTV2cozq0boqXSgb+K6FY2EqjM5fCvBMiwbBR97sE=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#id-081a1c66-00d0-45cd-9d00-bf8c4eddf19e">
                        <ds:Transforms>
                            <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                                <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsa irs soapenv urn2 urn3 urn4 wsse"/>
                            </ds:Transform>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                        <ds:DigestValue>ENBnod7vKlXCLiWqft1H4duETdaR4MxotsJ8JVUhZDc=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#id-E68EBBF1696C5DD4AA143353323390578">
                        <ds:Transforms>
                            <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                                <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsa irs soapenv urn urn3 urn4 wsse"/>
                            </ds:Transform>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                        <ds:DigestValue>0gJBTeYumHhBgwSM08x0lAQeiFb9xGlsacSe7E5GzeQ=</ds:DigestValue>
                    </ds:Reference>
                </ds:SignedInfo>
                <ds:SignatureValue>eXaUaEVZMzg1Bxsy+EVoIG4d4to3lrUW+7==</ds:SignatureValue>
                <ds:KeyInfo Id="KI-1057E45A7D26C7FA471572296060184463">
                    <wsse:SecurityTokenReference wsu:Id="STR-1057E45A7D26C7FA471572296060184464">
                        <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">MIIGNTCCBR2gAwIBAgIQQAF...VIrQSgw</wsse:KeyIdentifier>
                    </wsse:SecurityTokenReference>
                </ds:KeyInfo>
            </ds:Signature>
            <wsu:Timestamp wsu:Id="TS-1057E45A7D26C7FA471572296060184461">
                <wsu:Created>2019-10-28T20:54:20.184Z</wsu:Created>
                <wsu:Expires>2019-10-28T21:04:20.184Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>

        <Action xmlns="http://www.w3.org/2005/08/addressing">BulkRequestTransmitter</Action>
        <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d0711332-e90f-4587-848b-3ee0da27c2e9</MessageID>
        <To xmlns="http://www.w3.org/2005/08/addressing">https://la.www4.irs.gov/airp/aca/a2a/1095BC_Transmission</To>
        <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
            <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
        </ReplyTo>
        <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">
            <irs:UserId>0aB0000</irs:UserId>
        </urn4:ACASecurityHeader>
        <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">
            <urn:UniqueTransmissionId>65fc42c9-8ecd-46f2-0000-00000d58b9be:SYS12:BB01F::T</urn:UniqueTransmissionId>
            <irs:Timestamp>2019-10-28T20:54:20Z</irs:Timestamp>
        </urn2:ACABusinessHeader>
        <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">
            <urn:PaymentYr>2016</urn:PaymentYr>
            <urn:PriorYearDataInd>1</urn:PriorYearDataInd>
            <irs:EIN>000000000</irs:EIN>
            <urn:TransmissionTypeCd>O</urn:TransmissionTypeCd>
            <urn:TestFileCd>P</urn:TestFileCd>
            <urn:TransmitterNameGrp>
                <urn:BusinessNameLine1Txt>First Capitol Consulting</urn:BusinessNameLine1Txt>
            </urn:TransmitterNameGrp>
            <urn:CompanyInformationGrp>
                <urn:CompanyNm>F  Co</urn:CompanyNm>
                <urn:MailingAddressGrp>
                    <urn:USAddressGrp>
                        <urn:AddressLine1Txt>Abc Blvd</urn:AddressLine1Txt>
                        <urn:AddressLine2Txt>Suite 000</urn:AddressLine2Txt>
                        <irs:CityNm>L city</irs:CityNm>
                        <urn:USStateCd>aA</urn:USStateCd>
                        <irs:USZIPCd>00000</irs:USZIPCd>
                    </urn:USAddressGrp>
                </urn:MailingAddressGrp>
                <urn:ContactNameGrp>
                    <urn:PersonFirstNm>a</urn:PersonFirstNm>
                    <urn:PersonLastNm>b</urn:PersonLastNm>
                </urn:ContactNameGrp>
                <urn:ContactPhoneNum>0000000000</urn:ContactPhoneNum>
            </urn:CompanyInformationGrp>
            <urn:VendorInformationGrp>
                <urn:VendorCd>I</urn:VendorCd>
                <urn:ContactNameGrp>
                    <urn:PersonFirstNm>f</urn:PersonFirstNm>
                    <urn:PersonLastNm>a</urn:PersonLastNm>
                </urn:ContactNameGrp>
                <urn:ContactPhoneNum>0000000000</urn:ContactPhoneNum>
            </urn:VendorInformationGrp>
            <urn:TotalPayeeRecordCnt>180</urn:TotalPayeeRecordCnt>
            <urn:TotalPayerRecordCnt>1</urn:TotalPayerRecordCnt>
            <urn:SoftwareId>00A0000000</urn:SoftwareId>
            <urn:FormTypeCd>1094/1095C</urn:FormTypeCd>
            <irs:BinaryFormatCd>application/xml</irs:BinaryFormatCd>
            <irs:ChecksumAugmentationNum>dc4206d79d71cc9c8d5e9183677580e0b68b2a708543409aaec7a407c66d6a0e</irs:ChecksumAugmentationNum>
            <irs:AttachmentByteSizeNum>336472</irs:AttachmentByteSizeNum>
            <urn:DocumentSystemFileNm>1094C_Request_BB01F_20191028T205416001Z.xml</urn:DocumentSystemFileNm>
        </urn:ACATransmitterManifestReqDtl>
    </soapenv:Header>

    <soapenv:Body>
        <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">
            <irs:BulkExchangeFile>
                <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"/>
            </irs:BulkExchangeFile>
        </ns8:ACABulkRequestTransmitter>
    </soapenv:Body>
</soapenv:Envelope>
--uuid:c82296c0-0eaf-4133-971d-7838bafae222

I am getting the following error (500)

ID: 98 Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml;charset=utf-8
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]}

Payload:

<soapenv:Fault>

  <faultcode>soapenv:Server</faultcode>

  <faultstring>Error in assertion processing</faultstring>

  <faultactor>ssg</faultactor>

  <detail>

    <l7:policyResult xmlns:l7="http://www.layer7tech.com/ws/policy/fault" status="Multipart stream ended before a terminating boundary was encountered"/>

  </detail>

</soapenv:Fault>

can somebody please explain what is that I am missing or doing wrong.

scrounger
  • 48
  • 8
  • 1
    Try modifying your CXF configuration; we added AllowChunking="false" and secureSocketProtocol="TLSv1.2" in order to get it to work again. AllowChunking="false"/> – Tim Schumacher Nov 18 '19 at 21:49

5 Answers5

2

We were able to get this working with Apache CXF v3.1.4 by modifying our configuration; we added AllowChunking="false" and secureSocketProtocol="TLSv1.2". Prior to this change, we were also getting the response back "Error in assertion processing" since beginning of October 2019 for any transmissions greater than around 60 KB. Here's the change in the Apache CXF XML configuration that we made:

  <http-conf:conduit name="*.http-conduit">
                      AllowChunking="false"
    />
    <http-conf:tlsClientParameters
            secureSocketProtocol="TLSv1.2"
    />
</http-conf:conduit>
Tim Schumacher
  • 321
  • 3
  • 19
1

I have been working on this for awhile and eliminated the first 2 things the mailbox suggested(TLS 1.2, FIPS and network issues on my end). My suspicion is they changed/updated a middle tier to broadcom (formerly Layer7 and CA). I am going to test by turning off http chunked encoding as I have it on by default. If you are not sure how to turn it off you can just use http 1.0 because it is only supported in http 1.1. I updated to turn off chunked encoding on the http protocol (policy in WebSphere) and I was able to go from sending 35 to 3000 and higher.

  • Hi @nicholasglen thank you. It seems for me the content transfer encoding is set to "binary". Still I am getting the error. – scrounger Nov 05 '19 at 19:23
  • `Address: https://la.www4.irs.gov/airp/aca/a2a/1095BC_Transmission Encoding: UTF-8 Http-Method: POST Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:cc"; start=""; start-info="text/xml" Headers: {Accept=[*/*], Accept-Encoding=[gzip,gzip;q=1.0, identity; q=0.5, *;q=0, deflate], Content-Encoding=[gzip], SOAPAction=["BulkRequestTransmitter"]} Messages: (message truncated to 49152 bytes) Payload: --uuid:cc Content-Type: application/xop+xml; charset=UTF-8; type="text/xml" Content-Transfer-Encoding: binary` – scrounger Nov 05 '19 at 19:25
  • how do i trun off http chunked encoding? we are using org.apache.cxf. – scrounger Nov 05 '19 at 19:47
  • The IRS has responded with the following msg : "transmitters experiencing the issue should attempt to transmit with multipart streaming disabled on their end". how do i disable multipart streaming? we r using package org.apache.cxf.jaxws. – scrounger Nov 05 '19 at 20:00
  • 1
    I can look at we are using WebSphere which you set on the http application policy set. One solution which you can try is change from http 1.1 to 1.0 which doesn't support chunking. Don't think of content encoding as the same as chunked transfer. Chunked transfer is managed at the http protocol level and just breaks the large chunk into small chunks. Hopefully the IRS turns on chunking as I have sent my findings to them. https://en.wikipedia.org/wiki/Chunked_transfer_encoding – nicholasglen Nov 06 '19 at 15:23
  • I would look at this recent stackoverflow article as it is related. https://stackoverflow.com/questions/52000026/disable-chunked-transfer-encoding-for-jax-ws-client-in-wildfly-8 It points to the cxf configuration for this. https://docs.jboss.org/author/display/JBWS/Apache+CXF+integration#ApacheCXFintegration-HTTPConduitconfiguration – nicholasglen Nov 06 '19 at 15:33
  • Also, to get you up and going I noticed I was able to send 25 originals or corrections before it decided to chunk. If you struggle and don't have millions to send like I do see what the natural limit is and cxf will decide not to chunk if small enough. I would just see how to configure chunking to be turned off however. – nicholasglen Nov 06 '19 at 15:37
  • Hi @nicholasglen thank you for the help. This is what I did to disable chunking at Http protocol level. `Map> head = getTransmissionHeaders(); org.apache.cxf.endpoint.Client yclient = (org.apache.cxf.endpoint.Client) factory.create(); Map ycontext = yclient.getRequestContext(); ycontext.put(MessageContext.HTTP_REQUEST_HEADERS, head);` – scrounger Nov 07 '19 at 01:00
  • `private Map> getTransmissionHeaders() { Map> head = new HashMap<>(); head.put(HttpHeaderHelper.CHUNKED, Arrays.asList("false")); return head;}` Not sure if this is the right way of doing? Also, how can I check to ensure the chunked has been disabled? – scrounger Nov 07 '19 at 01:01
  • Http sends a Transfer-Encoding with chunked so you might be able to see that. The way I found it worked it I went from sending 25 to 7,000 so I just got my program working. I did mine through WebSphere so configuration but just changes it under the covers with a property I am sure. If it doesn't work try the jboss documentation I have above. – nicholasglen Nov 07 '19 at 02:11
  • I would recommend you do it with config instead of code if you can. I have to assume they IRS didn't enable this on purpose and they will eventually enable chunking which of course is more efficient. They should be allowing it with MTOM attachments. I have let them know but if they do turn it on a config file is easier than a code build. – nicholasglen Nov 07 '19 at 02:17
1

I have been experiencing the same issues, but we did find a way to manually get these to go through. I wanted to share in case it helps you figure out whats going on, although I think a change needs to happen at the IRS.

There were 3 issues to deal with.

  1. In the header there are timestamps for Create and Expired and we had to add milliseconds onto those.

  2. Mentioned some above we had to remove the Transfer-Encoding: chunked from the transmission (which we did manually in Fiddler).

  3. I had to gzip the entire message on its own. The program does a gzip of the message, but when I look at the compressed message in code and the final message being sent there were 8 Characters added to the beginning and part of the very end was changed. If I take the body and gzip it on its own and past that back into fiddler (with the chunked removed) then I get a successful response.

zeroend
  • 31
  • 1
1

Thanks Tim Schumacher I am able to make it work with this solution, made changes to my custom ssl socket factory

    HTTPConduit http = (HTTPConduit) client.getConduit();
    TLSClientParameters tlsParms = new TLSClientParameters();
    tlsParms.setSSLSocketFactory(sslContext.getSocketFactory());
    tlsParms.setSecureSocketProtocol("TLSv1.2");
    http.setTlsClientParameters(tlsParms);
    HTTPClientPolicy policy = new HTTPClientPolicy();
    policy.setAllowChunking(false);
    http.setClient(policy);
V1ma-8
  • 71
  • 1
  • 5
0

I do experiencing the same problem. I don't see any problems in your code or SOAP envelop, so my only suggestion is to write to the IRS AIR mailbox and they will investigate. This is what they currently do now with my case.

Maksim
  • 41
  • 4
  • ok thank you @Maksim. I will write to IRS AIR mailbox. If you happen to hear back from them with a solution please post the updates here. I will also do as well. – scrounger Oct 31 '19 at 17:27
  • The IRS has responded with the following msg : "transmitters experiencing the issue should attempt to transmit with multipart streaming disabled on their end". @Maksim any pointers on how how to disable multipart streaming. – scrounger Nov 01 '19 at 19:48
  • Hi @scrounger. I use JaxWsClientProxy client and not sure if I can disable multipart streaming without tweaking the internal properties. Do you have any success on your side? – Maksim Nov 05 '19 at 21:59
  • we are using JaxWsProxyFactoryBean client. I haven't yet figured out on what properties I need to tweak in order to disable multipart streaming. – scrounger Nov 06 '19 at 00:04