2017-08-03 135 views

回答

1

您可以创建在EI/ESB直通代理像下面

<?xml version="1.0" encoding="UTF-8"?> 
<proxy xmlns="http://ws.apache.org/ns/synapse" name="token" startOnLoad="true" transports="http https"> 
    <target> 
     <inSequence> 
     <endpoint> 
      <address uri="https://:9443/oauth2/token" /> 
     </endpoint> 
     </inSequence> 
     <outSequence> 
     <send /> 
     </outSequence> 
     <faultSequence /> 
    </target> 
</proxy> 
+0

喜Jenananthan 它需要身体形态grant_type =密码和用户名=管理员和密码=管理员触发的https://本地主机:9443 /的oauth2 /令牌,当我按照上面提到的那样触发通过代理时会出现错误。 错误日志如下: TID:[-1234] [] [2017-08-10 12:30:48,900]错误{org.apache.synapse.transport.passthru.util.RelayUtils} - 构建Passthrough流时出错{ org.apache.synapse.transport.passthru.util.RelayUtils} org.apache.axiom.om.OMException:com.ctc.wstx.exc.WstxEOFException:在序列中的意外EOF at [row,col {unknown-source} ]:[1,0] –

+0

在axis2.xml中启用此2个条目后工作