错误请求 - 使用对端点的调用无效 URL

Bad Request - Invalid URL using a call towards an endpoint

我一直在努力理解为什么会这样。我的 ESB 调用 https://login.microsoftonline.com/ 以获得令牌,我用它来调用端点。问题是,当通过我的 ESB 发送呼叫时,我得到:

[2021-11-01 14:42:17,226] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "HTTP/1.1 400 Bad Request[\r][\n]"
[2021-11-01 14:42:17,226] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Content-Type: text/html; charset=us-ascii[\r][\n]"
[2021-11-01 14:42:17,227] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Date: Mon, 01 Nov 2021 12:42:16 GMT[\r][\n]"
[2021-11-01 14:42:17,228] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Connection: close[\r][\n]"
[2021-11-01 14:42:17,228] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Content-Length: 324[\r][\n]"
[2021-11-01 14:42:17,229] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "[\r][\n]"
[2021-11-01 14:42:17,230] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">[\r][\n]"
[2021-11-01 14:42:17,231] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "<HTML><HEAD><TITLE>Bad Request</TITLE>[\r][\n]"
[2021-11-01 14:42:17,231] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>[\r][\n]"
[2021-11-01 14:42:17,232] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "<BODY><h2>Bad Request - Invalid URL</h2>[\r][\n]"
[2021-11-01 14:42:17,233] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "<hr><p>HTTP Error 400. The request URL is invalid.</p>[\r][\n]"
[2021-11-01 14:42:17,234] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "</BODY></HTML>[\r][\n]"
[2021-11-01 14:42:17,259] ERROR {RelayUtils} - Error while building Passthrough stream org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,50]
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
        at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
        at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:165)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:169)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:122)
        at org.apache.synapse.mediators.AbstractListMediator.buildMessage(AbstractListMediator.java:152)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:260)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:809)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:309)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:583)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:197)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:285)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool.run(NativeWorkerPool.java:172)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,50]
        at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
        at com.ctc.wstx.sr.BasicStreamReader.startDTD(BasicStreamReader.java:2487)
        at com.ctc.wstx.sr.BasicStreamReader.nextFromPrologBang(BasicStreamReader.java:2403)
        at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2063)
        at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
        at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
        at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
        ... 19 more

[2021-11-01 14:42:17,261] ERROR {SequenceMediator} - {api:smp-serviceability-check-api} Error while building message. Error while building Passthrough stream org.apache.axis2.AxisFault: Error while building Passthrough stream
        at org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:452)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:215)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:122)
        at org.apache.synapse.mediators.AbstractListMediator.buildMessage(AbstractListMediator.java:152)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:260)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:809)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:309)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:583)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:197)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:285)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool.run(NativeWorkerPool.java:172)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,50]
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
        at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
        at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:165)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:169)
        ... 14 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,50]
        at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
        at com.ctc.wstx.sr.BasicStreamReader.startDTD(BasicStreamReader.java:2487)
        at com.ctc.wstx.sr.BasicStreamReader.nextFromPrologBang(BasicStreamReader.java:2403)
        at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2063)
        at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
        at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
        at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
        ... 19 more

[2021-11-01 14:42:17,277]  INFO {LogMediator} - {api:smp-serviceability-check-api} To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:dcbc17c0-5dc7-46d5-b7f6-db5f3e571506, Direction: request, MESSAGE = An unexpected error occured, message = Error while building message. Error while building Passthrough stream, message = 601000, message = org.apache.synapse.SynapseException: Error while building message. Error while building Passthrough stream
        at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:376)
        at org.apache.synapse.mediators.AbstractListMediator.buildMessage(AbstractListMediator.java:154)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:260)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:809)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:309)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:583)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:197)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:285)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool.run(NativeWorkerPool.java:172)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.axis2.AxisFault: Error while building Passthrough stream
        at org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:452)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:215)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:122)
        at org.apache.synapse.mediators.AbstractListMediator.buildMessage(AbstractListMediator.java:152)
        ... 12 more
Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,50]
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
        at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
        at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:165)
        at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:169)
        ... 14 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
 at [row,col {unknown-source}]: [1,50]
        at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
        at com.ctc.wstx.sr.BasicStreamReader.startDTD(BasicStreamReader.java:2487)
        at com.ctc.wstx.sr.BasicStreamReader.nextFromPrologBang(BasicStreamReader.java:2403)
        at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2063)
        at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
        at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
        at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
        ... 19 more
, message = org.apache.synapse.SynapseException: Error while building message. Error while building Passthrough stream, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope>

我经历了很多场景,其中有不需要的 Cookie、Header 参数、错误的内容类型等,我使用以下字段删除了这些:

<!-- Chaning ContentType to none-->
<property name="ContentType" scope="axis2" type="STRING" value="none"/>
<!-- Removing custom Header Params -->
<property action="remove" name="x-ms-ests-server" scope="transport"/>
<property action="remove" name="x-ms-request-id" scope="transport"/>
<!-- Removing all the header params and cookies -->
<property action="remove" name="EXCESS_TRANSPORT_HEADERS" scope="axis2"/>
<property action="remove" name="TRANSPORT_HEADERS" scope="axis2"/>
<property action="remove" name="Set-Cookie" scope="transport"/>
<!-- Removing /query parameter received by the API -->
<property name="REST_URL_POSTFIX" scope="axis2" type="STRING" value=""/>

最后,我刚刚创建了一个简单的调用请求,它使用硬编码 URL、不记名令牌和所有内容直接发送到端点。 (它没有获得令牌,它跳过了那部分,因此整个过程只是对端点的一次调用)。

    <property name="Authorization" scope="transport" type="STRING" value="Bearer TOKEN_IS_HERE"/>
<property name="REST_URL_POSTFIX" scope="axis2" type="STRING" value=""/>
<property action="remove" name="ContentType" scope="axis2"/>
<property name="messageType" scope="axis2" type="STRING" value="none"/>
<property name="HTTP_METHOD" scope="axis2" type="STRING" value="GET"/>
<call>
    <endpoint>
        <address statistics="enable" trace="enable" uri="https://sub-domain.dns.net?qparam=999999999">
            <suspendOnFailure>
                <initialDuration>-1</initialDuration>
                <progressionFactor>1</progressionFactor>
            </suspendOnFailure>
            <markForSuspension>
                <retriesBeforeSuspension>0</retriesBeforeSuspension>
            </markForSuspension>
        </address>
    </endpoint>
</call>

而且我仍然不断收到错误请求 - 无效 URL。使用 postman,直接调用没有问题,我从 MI 日志中复制了所有参数。我还测试了在简化代码之前发送的每个参数,方法是手动将它们添加到邮递员要求查看它是否会坏掉,但 none 人确实坏了。我尝试了不同的 messageTypes 和 ContentTypes 但都是一样的。

这是我的 get 调用在电汇日志中的样子

[2021-11-01 14:57:40,243]  INFO {TRACE_LOGGER} - Sending message through endpoint : null resolving to address = https://sub-domain.dns.net?qparam=999999999
[2021-11-01 14:57:40,243]  INFO {TRACE_LOGGER} - SOAPAction: null
[2021-11-01 14:57:40,245]  INFO {TRACE_LOGGER} - WSA-Action: null
[2021-11-01 14:57:40,254]  INFO {TimeoutHandler} - This engine will expire all callbacks after GLOBAL_TIMEOUT: 120 seconds, irrespective of the timeout action, after the specified or optional timeout
[2021-11-01 14:57:41,045] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "GET ?qparam=999999999 HTTP/1.1[\r][\n]"
[2021-11-01 14:57:41,046] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Authorization: Bearer THE_TOKEN[\r][\n]"
[2021-11-01 14:57:41,047] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Accept: */*[\r][\n]"
[2021-11-01 14:57:41,047] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Postman-Token: 69862f3a-1404-4f4b-b6a7-cc67d1197b5c[\r][\n]"
[2021-11-01 14:57:41,048] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Accept-Encoding: gzip, deflate, br[\r][\n]"
[2021-11-01 14:57:41,049] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Content-Type: none[\r][\n]"
[2021-11-01 14:57:41,049] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Host: sub-domain.dns.net[\r][\n]"
[2021-11-01 14:57:41,049] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Connection: Keep-Alive[\r][\n]"
[2021-11-01 14:57:41,050] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2021-11-01 14:57:41,050] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "[\r][\n]"

我尝试的其他方法是将调用端点更改为

    <endpoint>
       <http method="get" uri-template="https://sub-domain.dns.net?qparam=999999999"/>
    </endpoint> 

但没用。任何想法都真正适用于为什么会发生这种情况。

编辑:使用 http 和 https 中的免费 API 进行测试,它们可以正常工作..

HTTP:

[2021-11-02 11:13:11,121] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "GET /users?_limit=2 HTTP/1.1[\r][\n]"
[2021-11-02 11:13:11,122] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "Accept: */*[\r][\n]"
[2021-11-02 11:13:11,123] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "Postman-Token: 945d1aa2-9553-42dd-a471-e9dd106f09df[\r][\n]"
[2021-11-02 11:13:11,125] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "Accept-Encoding: gzip, deflate, br[\r][\n]"
[2021-11-02 11:13:11,126] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "eti-organizationid: org634bbfb6[\r][\n]"
[2021-11-02 11:13:11,126] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "Content-Type: none[\r][\n]"
[2021-11-02 11:13:11,127] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "Host: fakeapi.jsonparseronline.com[\r][\n]"
[2021-11-02 11:13:11,128] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "Connection: Keep-Alive[\r][\n]"
[2021-11-02 11:13:11,129] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2021-11-02 11:13:11,129] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 << "[\r][\n]"
[2021-11-02 11:13:11,254] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "HTTP/1.1 200 OK[\r][\n]"
[2021-11-02 11:13:11,255] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Server: Cowboy[\r][\n]"
[2021-11-02 11:13:11,256] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Connection: keep-alive[\r][\n]"
[2021-11-02 11:13:11,256] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "X-Powered-By: Express[\r][\n]"
[2021-11-02 11:13:11,257] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Vary: Origin, Accept-Encoding[\r][\n]"
[2021-11-02 11:13:11,257] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Access-Control-Allow-Credentials: true[\r][\n]"
[2021-11-02 11:13:11,257] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Cache-Control: no-cache[\r][\n]"
[2021-11-02 11:13:11,258] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Pragma: no-cache[\r][\n]"
[2021-11-02 11:13:11,258] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Expires: -1[\r][\n]"
[2021-11-02 11:13:11,258] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "X-Total-Count: 50[\r][\n]"
[2021-11-02 11:13:11,259] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Access-Control-Expose-Headers: X-Total-Count[\r][\n]"
[2021-11-02 11:13:11,259] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "X-Content-Type-Options: nosniff[\r][\n]"
[2021-11-02 11:13:11,259] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Content-Type: application/json; charset=utf-8[\r][\n]"
[2021-11-02 11:13:11,260] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Etag: W/"4c9-6aU1Y/ePEQDvH83MhgvZYvJUcUg"[\r][\n]"
[2021-11-02 11:13:11,261] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Content-Encoding: gzip[\r][\n]"
[2021-11-02 11:13:11,261] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Date: Tue, 02 Nov 2021 09:13:11 GMT[\r][\n]"
[2021-11-02 11:13:11,261] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Transfer-Encoding: chunked[\r][\n]"
[2021-11-02 11:13:11,262] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "Via: 1.1 vegur[\r][\n]"
[2021-11-02 11:13:11,262] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "[\r][\n]"
[2021-11-02 11:13:11,263] DEBUG {wire} - HTTP-Sender I/O dispatcher-1 >> "a[\r][\n]"
...

HTTPS:

[2021-11-02 11:07:23,301] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "GET /entries?title=Open%20Skills HTTP/1.1[\r][\n]"
[2021-11-02 11:07:23,302] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Accept: */*[\r][\n]"
[2021-11-02 11:07:23,303] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Postman-Token: a4c8fdcf-4957-46b1-8b35-589215ac89d6[\r][\n]"
[2021-11-02 11:07:23,305] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Accept-Encoding: gzip, deflate, br[\r][\n]"
[2021-11-02 11:07:23,306] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "eti-organizationid: org634bbfb6[\r][\n]"
[2021-11-02 11:07:23,306] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Content-Type: none[\r][\n]"
[2021-11-02 11:07:23,307] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Host: api.publicapis.org[\r][\n]"
[2021-11-02 11:07:23,309] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "Connection: Keep-Alive[\r][\n]"
[2021-11-02 11:07:23,310] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2021-11-02 11:07:23,311] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 << "[\r][\n]"
[2021-11-02 11:07:23,445] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "HTTP/1.1 200 OK[\r][\n]"
[2021-11-02 11:07:23,445] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Access-Control-Allow-Origin: *[\r][\n]"
[2021-11-02 11:07:23,446] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Content-Length: 245[\r][\n]"
[2021-11-02 11:07:23,447] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Content-Type: application/json[\r][\n]"
[2021-11-02 11:07:23,448] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Date: Tue, 02 Nov 2021 09:07:23 GMT[\r][\n]"
[2021-11-02 11:07:23,448] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "Server: Caddy[\r][\n]"
[2021-11-02 11:07:23,449] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "X-Rate-Limit-Duration: 1[\r][\n]"
[2021-11-02 11:07:23,450] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "X-Rate-Limit-Limit: 10.00[\r][\n]"
[2021-11-02 11:07:23,452] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "X-Rate-Limit-Request-Forwarded-For: 20.75.122.9[\r][\n]"
[2021-11-02 11:07:23,454] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "X-Rate-Limit-Request-Remote-Addr: 172.17.0.1:49674[\r][\n]"
[2021-11-02 11:07:23,454] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "[\r][\n]"
[2021-11-02 11:07:23,454] DEBUG {wire} - HTTPS-Sender I/O dispatcher-1 >> "{"count":1,"entries":[{"API":"Open Skills","Description":"Job titles, skills and related jobs data","Auth":"","HTTPS":false,"Cors":"unknown","Link":"https://github.com/workforce-data-initiative/skills-api/wiki/API-Overview","Category":"Jobs"}]}[\n]"
[2021-11-02 11:07:23,478]  INFO {LogMediator} - {api:smp-serviceability-check-api} Finished.......... = Hello, Result = {"count":1,"entries":[{"API":"Open Skills","Description":"Job titles, skills and related jobs data","Auth":"","HTTPS":false,"Cors":"unknown","Link":"https://github.com/workforce-data-initiative/skills-api/wiki/API-Overview","Category":"Jobs"}]}

[2021-11-02 11:07:23,482] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 200 OK[\r][\n]"
[2021-11-02 11:07:23,483] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "X-Rate-Limit-Request-Forwarded-For: 20.75.122.9[\r][\n]"
[2021-11-02 11:07:23,483] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Server: Caddy[\r][\n]"
[2021-11-02 11:07:23,484] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Access-Control-Allow-Origin: *[\r][\n]"
[2021-11-02 11:07:23,485] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "X-Rate-Limit-Duration: 1[\r][\n]"
[2021-11-02 11:07:23,486] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Access-Control-Allow-Methods: GET[\r][\n]"
[2021-11-02 11:07:23,487] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "X-Rate-Limit-Limit: 10.00[\r][\n]"
[2021-11-02 11:07:23,487] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "X-Rate-Limit-Request-Remote-Addr: 172.17.0.1:49674[\r][\n]"
[2021-11-02 11:07:23,488] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Access-Control-Allow-Headers: [\r][\n]"
[2021-11-02 11:07:23,488] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Content-Type: application/json; charset=UTF-8[\r][\n]"
[2021-11-02 11:07:23,489] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Date: Tue, 02 Nov 2021 09:07:23 GMT[\r][\n]"
[2021-11-02 11:07:23,489] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2021-11-02 11:07:23,490] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
[2021-11-02 11:07:23,490] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2021-11-02 11:07:23,491] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "f5[\r][\n]"
[2021-11-02 11:07:23,492] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "{"count":1,"entries":[{"API":"Open Skills","Description":"Job titles, skills and related jobs data","Auth":"","HTTPS":false,"Cors":"unknown","Link":"https://github.com/workforce-data-initiative/skills-api/wiki/API-Overview","Category":"Jobs"}]}[\n]"
[2021-11-02 11:07:23,493] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2021-11-02 11:07:23,493] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2021-11-02 11:07:23,494] DEBUG {wire} - HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
...

我猜目标端点可能有问题,即使它适用于 Postman..

集成工作室 7.2.0 微积分器 1.2.0

此问题已解决。问题是 https://sub-domain.dns.net?qparam=999999999 使用具有基本配置的 json 服务器。它与 Postman 一起正常工作,但由于某种原因,它无法与来自 MI 的 wso2 调用一起工作。通过 json 服务器的正确配置,问题在客户端得到解决。