[英]WSO2 ESB Proxy to IS
I´m trying to make a proxy using WSO2 ESB to consume services like "services/UserIdentityManagementAdminService?wsdl" and scim like ""wso2/scim/Users" in wso2 IS, (I want to balance a IS in HA with a https address Endpoint) , I have a proxy and I can consume scim but when I try to get wsdl wso2 esb just sent a log like: 我正在尝试使用WSO2 ESB来创建代理,以使用wso2 IS中的服务(例如“ services / UserIdentityManagementAdminService?wsdl”)和scim(例如“ wso2 / scim / Users”),(我想平衡HA中具有IS地址的IS端点),我有一个代理,可以使用scim,但是当我尝试获取wsdl wso2 esb时,只发送了一条日志,如下所示:
INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/PRX_SC_IS_SERVICES/services/UserInformationRecoveryService?wsdl, MessageID: urn:uuid:10516b34-8004-4c70-9d4c-61957e4d9147, Direction: request, Envelope: {org.apache.synapse.mediators.builtin.LogMediator} 信息{org.apache.synapse.mediators.builtin.LogMediator}-到:/ services / PRX_SC_IS_SERVICES / services / UserInformationRecoveryService?wsdl,消息ID:urn:uuid:10516b34-8004-4c70-9d4c-61957e4d9147,方向:请求,信封: {} org.apache.synapse.mediators.builtin.LogMediator
I think that the problem is that in the URL use services after the proxy name because when I call another URL I haven´t problem. 我认为问题在于在URL中使用代理名称后的服务,因为当我调用另一个URL时,我没有问题。
My Proxy Config: 我的代理配置:
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="PRX_SC_IS_SERVICES"
transports="http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property xmlns:ns="http://org.apache.synapse/xsd"
name="Authorization"
expression="fn:concat('Basic ', base64Encode('admin:admin'))"
scope="transport"/>
<send>
<endpoint key="IS_EP_HTTPS"/>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
With WSO2 you can´t do a generic proxy and you can´t use the word services after a proxy name. 使用WSO2,您无法执行通用代理,也不能在代理名称后使用“服务”一词。 The easy way to do this is install a Nginx and use it like proxy reverse with a conf like this: 做到这一点的简单方法是安装Nginx并将其像conf反向代理一样使用conf:
upstream https.is{
server IP_IS01:9446;
server IP_IS02:9446;
}
server {
listen 8443 ssl;
server_name IP_HOST;
ssl_certificate ssl.crt;
ssl_certificate_key ssl.key;
location / {
proxy_pass https://https.is/;
proxy_set_header Host $http_host;
}
}
Another thing that you can do is move in the ESB the context services (axis2.xml and carbon.xml) to another context and deploy two APIs that rewrite the context /services and /wso2/scim, because now the proxy services should be redirect to another context and for example /services/UserAdmin to a IS wsdl. 您可以做的另一件事是将ESB上下文服务(axis2.xml和carbon.xml)移至另一个上下文,并部署两个重写上下文/ services和/ wso2 / scim的API,因为现在应该重定向代理服务。到另一个上下文,例如/ services / UserAdmin到IS wsdl。 API example: API示例:
<resource methods="POST" uri-template="/PRX*">
<inSequence>
<send>
<endpoint>
<address uri="http://HOST_ESB:PORT_ESB/newservicescontext/"></address>
</endpoint>
</send>
</inSequence>
<outSequence>
<send></send>
</outSequence>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.