Hello,
i'm implementing functionality that consumes Visa Alias Directory API.
While working mint when running from command line, i'm experiencing some issues while my code is deployed on WebLogic server.
I'm using Apache-HttpClient/4.5.2 and from it's logs i can tell that i'm having no SSL-related issues, but if my request have non-empty body, im getting 400 status code and HTML code in body, that looks like web-server 400 template.
In my logs i'm calling Create Alias method.
I don't use MLE at this case, and i'ts not enforced in my project rn.
17:58:48,108 DEBUG org.apache.http.client.protocol.RequestAddCookies: CookieSpec selected: default
17:58:48,108 DEBUG org.apache.http.client.protocol.RequestAuthCache: Auth cache not set in the context
17:58:48,108 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager: Connection request: [route: {s}->https://sandbox.api.visa.com:443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
17:58:48,108 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager: Connection leased: [id: 1][route: {s}->https://sandbox.api.visa.com:443][total kept alive: 1; route allocated: 2 of 2; total allocated: 2 of 20]
17:58:48,108 DEBUG org.apache.http.impl.execchain.MainClientExec: Opening connection {s}->https://sandbox.api.visa.com:443
17:58:48,229 DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator: Connecting to sandbox.api.visa.com/198.241.195.228:443
17:58:48,229 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: Connecting socket to sandbox.api.visa.com/198.241.195.228:443 with timeout 100000
17:58:48,440 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: Enabled protocols: [TLSv1.2]
17:58:48,440 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, ...]
17:58:48,440 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: Starting handshake
17:58:48,678 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: Secure session established
17:58:48,678 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: negotiated protocol: TLSv1.2
17:58:48,678 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: negotiated cipher suite: TLS_RSA_WITH_AES_256_GCM_SHA384
17:58:48,678 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: peer principal: CN=*.api.visa.com, O=Visa International Service Association, L=Foster City, ST=California, C=US
17:58:48,678 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: peer alternative names: [*.api.visa.com]
17:58:48,678 DEBUG org.apache.http.conn.ssl.SSLConnectionSocketFactory: issuer principal: CN=DigiCert SHA2 Secure Server CA, O=DigiCert Inc, C=US
17:58:48,678 DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator: Connection established 10.8.113.33:50366<->198.241.195.228:443
17:58:48,678 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1: set socket timeout to 100000
17:58:48,678 DEBUG org.apache.http.impl.execchain.MainClientExec: Executing request POST /visaaliasdirectory/v1/manage/createalias HTTP/1.1
17:58:48,678 DEBUG org.apache.http.impl.execchain.MainClientExec: Proxy auth state: UNCHALLENGED
17:58:48,678 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> POST /visaaliasdirectory/v1/manage/createalias HTTP/1.1
17:58:48,678 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Accept: application/json,application/octet-stream
17:58:48,678 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Authorization: Basic UTRPV0szSEI2NkVJTFNSMkhSNEgyMWFMVzRwY19ud090bmFKYy1PU2tqVmVtVWdBZzo2Ym5UUFY5QXk5NEEwM0FlaDVCcEtBQUdFRXdHMWxXSmg=
17:58:48,678 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Content-Type: application/json
17:58:48,678 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Cache-Control: no-cache
17:58:48,678 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Accept-Charset: big5, big5-hkscs, cesu-8, ...
17:58:48,693 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Content-Length: 412
17:58:48,693 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Host: sandbox.api.visa.com
17:58:48,693 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Connection: Keep-Alive
17:58:48,693 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_231)
17:58:48,693 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 >> Accept-Encoding: gzip,deflate
17:58:48,693 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "POST /visaaliasdirectory/v1/manage/createalias HTTP/1.1[\r][\n]"
17:58:48,693 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Accept: application/json,application/octet-stream[\r][\n]"
17:58:48,693 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Authorization: Basic UTRPV0szSEI2NkVJTFNSMkhSNEgyMWFMVzRwY19ud090bmFKYy1PU2tqVmVtVWdBZzo2Ym5UUFY5QXk5NEEwM0FlaDVCcEtBQUdFRXdHMWxXSmg=[\r][\n]"
17:58:48,693 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Content-Type: application/json[\r][\n]"
17:58:48,693 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Cache-Control: no-cache[\r][\n]"
17:58:48,693 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Accept-Charset: big5, big5-hkscs, cesu-8, euc-jp, euc-kr, gb18030, gb2312, gbk, ibm-thai, ibm00858, ibm01140, ibm01141, ibm01142, ibm01143, ibm01144, ibm01145, ibm01146, ibm01147, ibm01148, ibm01149, ibm037, ibm1026, ibm1047, ibm273, ibm277, ibm278, ibm280, ibm284, ibm285, ibm290, ibm297, ibm420, ibm424, ibm437, ibm500, ibm775, ibm850, ibm852, ibm855, ibm857, ibm860, ibm861, ibm862, ibm863, ibm864, ibm865, ibm866, ibm868, ibm869, ibm870, ibm871, ibm918, iso-2022-cn, iso-2022-jp, iso-2022-jp-2, iso-2022-kr, iso-8859-1, iso-8859-13, iso-8859-15, iso-8859-2, ...[\r][\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Content-Length: 412[\r][\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Host: sandbox.api.visa.com[\r][\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_231)[\r][\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "[\r][\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "{[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""country":"UA",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""recipientLastName":"SKUB",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""recipientMiddleName":null,[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""city":"M.KIYIV",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""address2":null,[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""recipientFirstName":"ROMAN",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""recipientPrimaryAccountNumber":"9304071103429967",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""address1":null,[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""issuerName":"CREDIT-DNEPR",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""postalCode":"01001",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""cardType":"Visa Classic",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""consentDateTime":"2020-09-01 00:00:00",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""aliasType":"01",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""guid":"0981d7edfafd4c2cbfaa89a9b4254286",[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> ""alias":"380674409868"[\n]"
17:58:48,709 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 >> "}"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "HTTP/1.1 400 [\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "Server: nginx[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "Date: Thu, 02 Sep 2021 14:58:48 GMT[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "Content-Type: text/html;charset=utf-8[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "Content-Length: 435[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "Connection: keep-alive[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "Content-Language: en[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "X-CORRELATION-ID: 1630594728_870_836461085_l73c013_VDP_WS[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "X-SERVED-BY: l73c013[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "[\r][\n]"
17:58:48,955 DEBUG org.apache.http.impl.conn.Wire: http-outgoing-1 << "<!doctype html><html lang="en"><head><title>HTTP Status 400 [0xe2][0x80][0x93] Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 [0xe2][0x80][0x93] Bad Request</h1></body></html>"
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << HTTP/1.1 400
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << Server: nginx
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << Date: Thu, 02 Sep 2021 14:58:48 GMT
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << Content-Type: text/html;charset=utf-8
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << Content-Length: 435
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << Connection: keep-alive
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << Content-Language: en
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << X-CORRELATION-ID: 1630594728_870_836461085_l73c013_VDP_WS
17:58:48,978 DEBUG org.apache.http.impl.conn.LoggingManagedHttpClientConnection: http-outgoing-1 << X-SERVED-BY: l73c013
NOTE 1: This same code works OK when used not on WebLogic
NOTE 2: If the request doesn't have body, API responds correctly.
Hi @Greyscale,
Can you please provide the following information so we may investigate further?
Did you try other API endpoints on the WebLogic Server? Any issues?