Wso2 通过代理服务命中终结点时发生授权错误
我是WSO2新手,我创建了一个代理服务,它通过POST方法命中嵌入端点中的URL,为了命中该URL,我需要通过POSTMAN获得3个头,因此我将这些头嵌入WSO2 ESB中的头中介器中。当通过邮递员点击时,它不需要任何授权(邮递员的授权部分中有“无授权”) 当我运行代理服务时,它会给我“org.apache.axis2.AxisFault:Transport error:401 error:Unauthorized”错误 下面是我的代码:-Wso2 通过代理服务命中终结点时发生授权错误,wso2,wso2esb,Wso2,Wso2esb,我是WSO2新手,我创建了一个代理服务,它通过POST方法命中嵌入端点中的URL,为了命中该URL,我需要通过POSTMAN获得3个头,因此我将这些头嵌入WSO2 ESB中的头中介器中。当通过邮递员点击时,它不需要任何授权(邮递员的授权部分中有“无授权”) 当我运行代理服务时,它会给我“org.apache.axis2.AxisFault:Transport error:401 error:Unauthorized”错误 下面是我的代码:- <proxy name="SampleProx
<proxy name="SampleProxy" startOnLoad="true" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<class description="classname" name="com.rocky.myclass"/>
<log description="Log" level="custom">
<property expression="get-property('sampleProperty')" name="Property_From_class"/>
</log>
<header name="Authorization" scope="transport" value="get-property('sampleProperty')"/>
<header name="Host" scope="transport" value="hostname"/>
<header name="Content-Type" scope="transport" value="text/plain"/>
<send>
<endpoint key="MyEP"/>
</send>
</inSequence>
<outSequence>
<respond/>
</outSequence>
<faultSequence/>
</target>
如何解决问题有什么帮助吗?能否提供使用类中介的原因?你能确认它是否在类中介之后进行日志记录吗?你是从类中介获得sample属性的吗?你能不能同时提到端点,比如你使用的是哪种端点。我能解决它。没有问题-)很好,但下次你的问题要更具描述性,因为你的问题中遗漏了很多东西。