I am working on integrating the A2A channel for the IRS through their WSDL using WCF. I'm able to get passed any code related errors sending the request but currently receiving the following error back from the IRS:
<faultstring>The message was not formatted properly and/or cannot be interpreted. Please review the XML standards outlined in Section 3 of Publication 5258 (...), correct any issues, and try again.</faultstring>
<detail>
<errorcode>TPE1105</errorcode>
<uniqueTransmissionID/>
</detail>
I'm assuming based on the additional node of <uniqueTransmissionID/>
in the response it has something to do with the UTID. I've looked over the format of the UTID and the Soap Envelope examples countless times and can't for the life of me figure out what may be out of place. I tried a small suggestion by fatherOfWine in a previous answer of moving the BusinessHeader up above the Manifest but it returns the same error.
I've added the full request with the Soap Envelope, whitespace appears to be stripped during the request but I've re-formatted it coming from Fiddler.
POST [AATS URL] HTTP/1.1
Content-Type: multipart/related; type="application/xop+xml";start="<rootpart>";start-info="text/xml";boundary="--023e657d-66f5-4e92-8e6e-c223338c205a"
SOAPAction: "BulkRequestTransmitter"
Host: la.www4.irs.gov
Content-Length: 15820
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
----023e657d-66f5-4e92-8e6e-c223338c205a
Content-Type: application/xop+xml; type="text/xml"; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-Id:<rootpart>
<soapenv:Envelope xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:us:gov:treasury:irs:ext:aca:air:ty18"
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:acasecurityheader"
xmlns:urn4="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-E508633998DD41B6AE062D27D0AC9A48"
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-BAC31544F1954B5F8C8441167B91A388">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<InclusiveNamespaces PrefixList="wsse wsa oas1 soapenv urn urn1 urn2 urn3 urn4"
xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>[VALUE]</DigestValue>
</Reference>
<Reference URI="#id-870747663BAB4D6FB43FFAD2034013F1">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<InclusiveNamespaces PrefixList="wsa oas1 soapenv urn1 urn2 urn3 urn4"
xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>[VALUE]</DigestValue>
</Reference>
<Reference URI="#id-1A336736A6134B16831D45A0C8785D10">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<InclusiveNamespaces PrefixList="wsa oas1 soapenv urn urn1 urn3 urn4"
xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>[VALUE]</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>[VALUE]</SignatureValue>
<KeyInfo Id="KI-42CB9363E8BE47F2B3E0CD8A743C2D7C">
<wsse:SecurityTokenReference wsu:Id="STR-9EE1B09DD6794A64B00B496CC9DC3804">
<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">[KEY]</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</KeyInfo>
</Signature>
<wsu:Timestamp wsu:Id="TS-BAC31544F1954B5F8C8441167B91A388">
<wsu:Created>2018-12-27T17:42:39.593Z</wsu:Created>
<wsu:Expires>2018-12-27T17:52:39.593Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
<urn:ACATransmitterManifestReqDtl wsu:Id="id-DB1DDC6A020C433CB71FF38200026E55"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<urn:PaymentYr>2018</urn:PaymentYr>
<urn:PriorYearDataInd>0</urn:PriorYearDataInd>
<urn1:EIN>[EIN]</urn1:EIN>
<urn:TransmissionTypeCd>O</urn:TransmissionTypeCd>
<urn:TestFileCd>T</urn:TestFileCd>
<urn:TransmitterNameGrp>
<urn:BusinessNameLine1Txt>[Name]</urn:BusinessNameLine1Txt>
</urn:TransmitterNameGrp>
<urn:CompanyInformationGrp>
<urn:CompanyNm>[Name]</urn:CompanyNm>
<urn:MailingAddressGrp>
<urn:USAddressGrp>
<urn:AddressLine1Txt>[Address]</urn:AddressLine1Txt>
<urn1:CityNm>[City]</urn1:CityNm>
<urn:USStateCd>[ST]</urn:USStateCd>
<urn1:USZIPCd>[ZIP]</urn1:USZIPCd>
</urn:USAddressGrp>
</urn:MailingAddressGrp>
<urn:ContactNameGrp>
<urn:PersonFirstNm>[FirstName]</urn:PersonFirstNm>
<urn:PersonLastNm>[LastName]</urn:PersonLastNm>
</urn:ContactNameGrp>
<urn:ContactPhoneNum>[PhoneNumber]</urn:ContactPhoneNum>
</urn:CompanyInformationGrp>
<urn:VendorInformationGrp>
<urn:VendorCd>I</urn:VendorCd>
<urn:ContactNameGrp>
<urn:PersonFirstNm>[FirstName]</urn:PersonFirstNm>
<urn:PersonLastNm>[LastName]</urn:PersonLastNm>
</urn:ContactNameGrp>
<urn:ContactPhoneNum>[PhoneNumber]</urn:ContactPhoneNum>
</urn:VendorInformationGrp>
<urn:TotalPayeeRecordCnt>3</urn:TotalPayeeRecordCnt>
<urn:TotalPayerRecordCnt>1</urn:TotalPayerRecordCnt>
<urn:SoftwareId>[SoftwareID]</urn:SoftwareId>
<urn:FormTypeCd>1094/1095C</urn:FormTypeCd>
<urn1:BinaryFormatCd>application/xml</urn1:BinaryFormatCd>
<urn1:ChecksumAugmentationNum>[CheckSum]</urn1:ChecksumAugmentationNum>
<urn1:AttachmentByteSizeNum>[Bytes]</urn1:AttachmentByteSizeNum>
<urn:DocumentSystemFileNm>1094C_Request_[TCC]_20181226T161942345Z.xml</urn:DocumentSystemFileNm>
</urn:ACATransmitterManifestReqDtl>
<urn2:ACABusinessHeader wsu:Id="id-E71242CFDF04487D9ECA0AC2E1544E90"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<urn:UniqueTransmissionId>6de74234-d0fd-45b2-ad45-b408fd137201:SYS12:[TCC]::T</urn:UniqueTransmissionId>
<urn1:Timestamp>2018-12-26T16:19:42Z</urn1:Timestamp>
</urn2:ACABusinessHeader>
<urn3:ACASecurityHeader>
<urn2:UserId>1#######</urn2:UserId>
</urn3:ACASecurityHeader>
<wsa:Action>BulkRequestTransmitter</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<urn4:ACABulkRequestTransmitter version="1.0">
<urn1:BulkExchangeFile>
<inc:Include href="cid:1094C_Request_[TCC]_20181226T161942345Z.xml"
xmlns:inc="http://www.w3.org/2004/08/xop/include" />
</urn1:BulkExchangeFile>
</urn4:ACABulkRequestTransmitter>
</soapenv:Body>
</soapenv:Envelope>
----023e657d-66f5-4e92-8e6e-c223338c205a
Content-Type: application/xml
Content-Transfer-Encoding: 7bit
Content-Id: <1094C_Request_[TCC]_20181226T161942345Z.xml>
Content-Disposition: attachment; filename="1094C_Request_[TCC]_20181226T161942345Z.xml"
<?xml version="1.0" encoding="utf-8"?>
<n1:Form109495CTransmittalUpstream xmlns="urn:us:gov:treasury:irs:ext:aca:air:ty18"
xmlns:irs="urn:us:gov:treasury:irs:common"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xsi:schemaLocation="urn:us:gov:treasury:irs:msg:form1094-1095Ctransmitterupstreammessage IRS-Form1094-1095CTransmitterUpstreamMessage.xsd"
xmlns:n1="urn:us:gov:treasury:irs:msg:form1094-1095Ctransmitterupstreammessage">
[Removed for Space]
</n1:Form109495CTransmittalUpstream>
----023e657d-66f5-4e92-8e6e-c223338c205a--
Update: I added the Security Header and have gotten passed this specific problem, now working on resolving the WS-Security error. I've also updated my envelope with what has changed.
Just throwing this out in the wind (more of a comment but too long), but it looks like you are missing these to elements from their example:
<urn4:ACASecurityHeader xmlns:urn4="urn:us:gov:treasury:irs:msg:acasecurityheader" />
<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401- wss-wssecurity-secext-1.0.xsd" />
You are using this prefix for urn3, which is not referenced in any elements from what I can tell. Not sure if it makes any difference or not, but the above to elements do precede the section that is giving you an error. Feel free to disregard if it sounds like non-sense to you.