gpt4 book ai didi

http - 无法通过其 http 端点 URL 访问 WSO2 ESB 代理服务

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:23:22 26 4
gpt4 key购买 nike

我们有这个 WSO2 ESB 代理服务,可以通过它的 https 端点访问。我想配置此服务,以便它也可以通过 http 访问。我检查了 carbon 管理控制台中的服务配置,并确认 https 和 http 端点都已启用: https://10.20.0.20:8245/services/<service_name>
http://10.20.0.20:8282/services/<service_name>

此外,ESB_HOME}/repository/conf/axis2/中的 axis2.xml 文件似乎配置得很好。

<!-- ================================================= -->
<!-- Transport Ins (Listeners) -->
<!-- ================================================= -->

<!-- the non blocking http transport based on HttpCore + NIO extensions -->
<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
<!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
<!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
<parameter name="disableRestServiceDispatching" locked="false">true</parameter>
</transportReceiver>

<!-- the non blocking https transport based on HttpCore + SSL-NIO extensions -->
<transportReceiver name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener">
<parameter name="port" locked="false">8243</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
<!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
<!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
<parameter name="disableRestServiceDispatching" locked="false">true</parameter>
<parameter name="keystore" locked="false">
<KeyStore>
<Location>repository/resources/security/iaascol.jks</Location>
<Type>JKS</Type>
<Password>***</Password>
<KeyPassword>rotcelloc</KeyPassword>
</KeyStore>
</parameter>
<parameter name="truststore" locked="false">
<TrustStore>
<Location>repository/resources/security/client-truststore.jks</Location>
<Type>JKS</Type>
<Password>***</Password>
</TrustStore>
</parameter>
<!--<parameter name="SSLVerifyClient">require</parameter>
supports optional|require or defaults to none -->
</transportReceiver>

ESB_HOME}/repository/conf/carbon.xml 中的端口偏移设置为 2。

<Offset>2</Offset>

我似乎无法通过其 http 端点 URL 访问此代理服务。 WSO2 ESB 的版本是 4.5.0。请让我知道我必须检查/设置哪个配置。提前致谢。

编辑:下面是代理服务配置以及 netstat 结果。

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="disbursement" statistics="disable"
trace="enable" transports="https,http">
<target>
<inSequence>
<property action="set" name="EXECUTION_CONTEXT"
scope="default" type="STRING" value="disbursement"/>
<property action="set"
expression="fn:concat(//*[local-name()='Header']/*[local-name()='TrackingID'], '.xml')"
name="DumpFileName" scope="default" type="STRING"/>
<log category="INFO" level="full" separator=",">
<property name="EVENT_TYPE" value="PROCESSING_STARTED"/>
<property expression="get-property('DumpFileName')" name="FILENAME"/>
</log>
<property action="set" name="DumpFilePath" scope="default"
type="STRING" value="/home/user1/data/disbursement/incoming"/>
<class name="se.seman.wso2.mediator.WriteFile"/>
<property action="set" name="TopicName" scope="default"
type="STRING" value="VirtualTopic.seman.iaas.user1.topic.disbursement.out"/>
<property action="set" name="ResultCode" scope="default"
type="STRING" value="0"/>
<!--
TODO correct problem with xpath
validate source="/default/xpath">
<on-fail>
<property action="set" name="ResultCode"
scope="default" type="STRING" value="100"/>
<property action="set"
expression="get-property('ERROR_MESSAGE')"
name="ResultMessage" scope="default"
type="STRING"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Namespaces.user1.se:Cmf:InfoModel:FinancialManagement:Payment:Disbursment:0002"/>
<log category="INFO" level="full" separator=",">
<property name="MESSAGE" value="Schema validation failed"/>
<property
expression="get-property('ERROR_CODE')"
name="ERROR_CODE"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Namespaces.user1.se:Cmf:InfoModel:FinancialManagement:Payment:Disbursment:0002"/>
<property
expression="get-property('ERROR_MESSAGE')"
name="ERROR_MESSAGE"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Namespaces.user1.se:Cmf:InfoModel:FinancialManagement:Payment:Disbursment:0002"/>
</log>
<property action="set" name="RESPONSE"
scope="default" type="STRING" value="true"/>
</on-fail>
<schema key="conf:user1/ESBConfig/Common/NetPosti/resources/Disbursement_0002.xsd"/>
</validate -->
<log category="INFO" level="headers" separator=",">
<property name="MESSAGE" value="Before Topic"/>
<property expression="get-property('ERROR')" name="ERROR"/>
</log>
<filter xpath="get-property('ResultCode') = '0'">
<then>
<property action="set" name="ResultMessage"
scope="default" type="STRING" value="OK"/>
<class name="se.seman.wso2.mediator.WriteActiveMQTopic"/>
</then>
<else/>
</filter>
<header action="remove" name="To"/>
<property action="remove" name="NO_ENTITY_BODY" scope="axis2"/>
<property action="set" name="RESPONSE" scope="default"
type="STRING" value="true"/>
<payloadFactory>
<format>
<disr:DisbursementResponse xmlns:disr="urn:Namespaces.user1.se:Service:FinancialManagement:Payment:Disbursement:Response:0001">
<disr:ResponseCode>$1</disr:ResponseCode>
<disr:Message>$2</disr:Message>
</disr:DisbursementResponse>
</format>
<args>
<arg expression="get-property('ResultCode')"/>
<arg expression="get-property('ResultMessage')"/>
</args>
</payloadFactory>
<log category="INFO" level="full" separator=","/>
<send/>
</inSequence>
<outSequence>
<log category="INFO" level="full" separator=",">
<property name="MESSAGE" value="On the way back.."/>
</log>
<send/>
</outSequence>
<faultSequence>
<log category="INFO" level="full" separator=",">
<property name="MESSAGE" value="Error in Call!"/>
</log>
<property action="set" name="RESPONSE" scope="default"
type="STRING" value="true"/>
<enrich>
<source clone="true" type="inline">
<disr:DisbursementResponse xmlns:disr="urn:Namespaces.user1.se:Service:FinancialManagement:Payment:Disbursement:0001">
<disr:ResponseCode>900</disr:ResponseCode>
<disr:Message>General error</disr:Message>
</disr:DisbursementResponse>
</source>
<target action="replace" type="body"/>
</enrich>
</faultSequence>
</target>
<publishWSDL key="conf:user1/ESBConfig/Common/NetPosti/resources/DisbursementService0002.wsdl">
<resource
key="conf:user1/ESBConfig/Common/NetPosti/resources/Disbursement_0002.xsd" location="Disbursement_0002.xsd"/>
</publishWSDL>

[user1@ip-10-20-0-20 ~]$ netstat -pnlt
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 :::8245 :::*
LISTEN 2454/java
tcp 0 0 :::8282 :::*
LISTEN 2454/java

最佳答案

原来这只是一个防火墙问题。端口 8282 在 wso2 防火墙 (iptables) 中被阻止。感谢所有答案!

关于http - 无法通过其 http 端点 URL 访问 WSO2 ESB 代理服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49692105/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com