Are you asking in general or are you working on a specific problem? I'm asking because we're running into a problem using that same workflow. We request an XML response from doPublish and the base64 string it returns has illegal characters after the padding. It errors in EWPS before we can handle it in our application's code.
Was just curious if you were seeing the same thing.
I was asking more in general. For example. if I pass an XML with an invalid Key1 / Key2 combination, I get a generic 'EWPS failed. Contact your Administrator' response. I'd like it to tell me what the error actually is, like what is written in the error.log file on the disk.
Unfortunately (or fortunately!) I have not seen the illegal characters that you are in the base64.
Does it appear to take a significant amount of time before EWPS has failed? It could be that EWPS has timed out waiting for a response. Usually if EWPS has error details at hand it will respond with the same.
If you happen to be running 12.6.2 shared objects then this Bug that I help get created may be your problem: Bug 30800079 - SHARED OBJECTS 12.6.2 CAUSES ISSUES ON ENCODING MESSAGE
If you have the chance to downgrade shared objects to 12.6, then the invalid base64 encoding goes away.