Skip to main content
Question

U2 Basic submitRequest returns "SOAP Request is not well formed" ERROR

  • Nov 6, 2026 2:25 PM UTC
  • 6 replies
  • 34 views

Nelson Schroth
Forum|alt.badge.img+2

We have been trying for weeks to get our CCN transmissions connected to the bank’s test machine using their new certs.  Would appreciate ANY useful suggestions to resolve this problem.

Details below:

RESULT=setHTTPDefault("HEADERS","")
RESULT=setHTTPDefault("VERSION","1.1")
RESULT=setHTTPDefault("BUFSIZE","8192")
RESULT=createSecurityContext(CMP_CONTEXT,"TLSv1.2:Min")
RESULT=addAuthenticationRule(CMP_CONTEXT,2,"ServerName","a-b.c.com")
RESULT=addAuthenticationRule(CMP_CONTEXT,2,"VerificationStrength","Generous")
     (there is a chain.pem that includes both root & issuing certs , but it did not 
      like that, so we added them seperately.)
RESULT=addCertificate("/a/b/c/ROOT CA.pem",2,1,1,CMP_CONTEXT)
RESULT=addCertificate("/a/b/c/ISSUING CA 01.pem",2,1,1,CMP_CONTEXT)
RESULT=addCertificate("/a/b/c/xxx.com.pem",1,1,1,CMP_CONTEXT)
RESULT=setPrivateKey("/a/b/c/xxx.com_pvtkey",1,2,"zzzzzzzz",1,CMP_CONTEXT)
RESULT=createSecureRequest("https://bank.services",CMP_METHOD,CMP_REQHANDLE,CMP_CONTEXT)
ENCODESTATUS = ENCODE("BASE64", 1, "username:password", 1, ENCODEDSTR, 1)
RESULT=setRequestHeader(CMP_REQHANDLE, "Authorization:Basic", ENCODEDSTR)
RESULT=setRequestHeader(CMP_REQHANDLE,"Content-Type","test/xml;charset=utf-8")
RESULT=submitRequest(CMP_REQHANDLE,
                        CMP_TIMEOUT,
                        CMP_POSTDATA,    <-- the actual SOAPenvelope
                        CMP_RESPHDRS,
                        CMP_RESPDATA,
                        CMP_RESPSTATUS)
                        
The RESPDATA comes back:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/
envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:
Client</faultcode><faultstring xml:lang="en">CompassAuthException</faultstring><
detail>Input SOAP Request is not well-formed. The Exception is org.xml.sax.SAXPa
rseException; lineNumber: 1; columnNumber: 1; Premature end of file.</detail>
</S
OAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

The RESPSTATUS comes back:  200ýOK

However, submitting via openSSL works fine?
The bank's tech support folks feel that U2 Basic is doing something to the 
payload that their parser doesn’t like, while their PostMan and OpenSSL
test all work fine.
Google makes this error sound like the SOAP package is blank.

Hoping for some ideas.

Nelson

6 replies

Mike Hulls
  • New Participant
  • Nov 6, 2026 2:37 PM UTC

We have had serveral problems with updated websites due to the requirement of SNI auth headers. The implementation of these in not consistent so the responses can be inconsistent.

To add a SNI auth header:
 

    SERVER.NAME                 = FIELD(ACCESS.TOKEN.URL,"/",1,1)    ERRLVL = addAuthenticationRule(SECURITY.CONTEXT, 2, "ServerName", SERVER.NAME)

Another suggestion is to turn on the http log and review it:
 

    IF USE.PROTOCOL.LOGGING THEN        ERRLVL = protocolLogging("/tmp/servicetrackersendws.log","ON",10)    ENDGood luck

Dave Weinstein
Forum|alt.badge.img

Nelson,

How is the  CMP_POSTDATA being formed? Read from a record or something else?

Can you inspect for control chars or marks in the CMP_POSTDATA request? Specifically at beginning of the response I would think based on the location reported in the error.

It’s getting a 200 so we can reach the server. I’d focus on the formation of the SOAP request.

-Dave


Joseph von Arx
Forum|alt.badge.img
  • Participating Frequently
  • Nov 6, 2026 3:26 PM UTC

Nelson,

 

In addition to the SNI response Dave provided, in our experience, the Basic authorization structure does not need the encoding performed.  Universe seems to do that itself behind the scenes.  Whenever I tried what you are doing and encoding it and then passing the encoded value, I never had any success.  I would try doing something like the following:

 

credStr = (“username:password”)

setRequestHeader(request_handle, 'Authorization', credStr)

 

 

Joseph


Jonathan Smith
Forum|alt.badge.img+4

If you turn on the protocolLogging and send us the results it would give us a lot better of understanding of what is happening under the covers.

 


Jonathan Smith
Forum|alt.badge.img+4

A few comments from looking at the code … 

Your certs are fine — no need to debug TLS
You got a SOAP envelope back with 200 OK. That means the handshake completed, the chain validated, and the bank's application answered you. This is a request-header problem, not a cert problem.

Check "Authorization:Basic" as I don't think that is a header name 
Check — test/xml is a typo for text/xml
Check — no SOAPAction header

 

RESULT = setHTTPDefault("HEADERS","")
RESULT = setHTTPDefault("VERSION","1.1")
RESULT = setHTTPDefault("BUFSIZE","8192")
RESULT = protocolLogging("/a/b/c/httplog","ON",3)

RESULT = createSecurityContext(CMP_CONTEXT,"TLSv1.2:Min")
RESULT = addAuthenticationRule(CMP_CONTEXT,2,"ServerName","a-b.c.com")
RESULT = addAuthenticationRule(CMP_CONTEXT,2,"VerificationStrength","Generous")
RESULT = addCertificate("/a/b/c/ROOT CA.pem",2,1,1,CMP_CONTEXT)
RESULT = addCertificate("/a/b/c/ISSUING CA 01.pem",2,1,1,CMP_CONTEXT)
RESULT = addCertificate("/a/b/c/xxx.com.pem",1,1,1,CMP_CONTEXT)
RESULT = setPrivateKey("/a/b/c/xxx.com_pvtkey",1,2,"zzzzzzzz",1,CMP_CONTEXT)

CMP_METHOD = "POST"
RESULT = createSecureRequest("https://bank.services",CMP_METHOD,CMP_REQHANDLE,CMP_CONTEXT)

RESULT = setRequestHeader(CMP_REQHANDLE,"Authorization","username:password")
RESULT = setRequestHeader(CMP_REQHANDLE,"Content-Type","text/xml; charset=utf-8")
RESULT = setRequestHeader(CMP_REQHANDLE,"SOAPAction",'"urn:fromTheirWSDL"')

RESULT = submitRequest(CMP_REQHANDLE, CMP_TIMEOUT, CMP_POSTDATA,
                       CMP_RESPHDRS, CMP_RESPDATA, CMP_RESPSTATUS)

IF LEN(CMP_POSTDATA) = 0 THEN STOP "POSTDATA IS EMPTY"
IF INDEX(CMP_POSTDATA,@AM,1) OR INDEX(CMP_POSTDATA,@VM,1) THEN STOP "POSTDATA HAS MARKS"


Jon Card
Forum|alt.badge.img+1
  • Participating Frequently
  • Nov 6, 2026 4:02 PM UTC

check the BASE64 in  ENCODESTATUS = ENCODE("BASE64", 1, "username:password", 1, ENCODEDSTR, 1) I think it should be BASE64A