Send SOAP messages via WCF with MTOM and Content-Transfer-Encoding: 7-bit -


i trying send soap message via wcf irs, , keeps getting rejected because mtom attachment formatted incorrectly.

i've narrowed down issue content-transfer-encoding value. set binary (shorthand 8-bit).

the irs service wants me use 7-bit, 8-bit-encoded attachment (in other words, encode utf-8 , guarantee i'm not using non-ascii characters).

i'm using custom message encoder in order gzip requests (responses come plain-text, ugh). writemessage looks right now.

public override arraysegment<byte> writemessage(message message, int maxmessagesize, buffermanager buffermanager, int messageoffset) {     // instance of underlying encoder     var encoder = new mtommessageencodingbindingelement() {             messageversion = messageversion.soap11wsaddressing10,             writeencoding = system.text.encoding.utf8         }.createmessageencoderfactory().encoder;      // write message contents     var uncompressed = encoder.writemessage(message, maxmessagesize, buffermanager, messageoffset);      // compresses resulting byte array     return compressbuffer(uncompressed, buffermanager, messageoffset); } 

any ideas? when change writeencoding property ascii or utf7 .net throws argumentexception , tells me format not supported.

i using java apache cxf , wss4j irs solution, if getting error "the message not formatted and/or cannot interpreted. please review xml standards outlined in section 3 of air submission composition , reference guide located @ https://www.irs.gov/for-tax-pros/software-developers/information-returns/affordable-care-act-information-return-air-program, correct issues, , try again." because irs expecting this:

content-type: application/xml content-transfer-encoding: 7bit content-id: <6920edd2-a3c7-463b-b336-323a422041d4-1@blahurn:us:gov:treasury:irs:common> content-disposition: attachment;name="1094b_request_bbbbb_20151019t121002000z.xml"  

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -