简体   繁体   English

WSO2 ESB与MB一起使用

[英]WSO2 ESB work with MB

I'm trying to send a message from a local client to ESB and redirect it to MB on the same server. 我正在尝试从本地客户端向ESB发送消息,并将其重定向到同一服务器上的MB。 The message delieved MB. 该消息被认为是MB。 The client is waiting for response until application server throws error. 客户端正在等待响应,直到应用程序服务器引发错误。

My environment as below WSO2 ESB 4.8.0 (port offset 1) WSO2 MB 2.1.1 (port offset 2) IBM WebSphere Application Server 8.5.5.1 我的环境如下WSO2 ESB 4.8.0(端口偏移1)WSO2 MB 2.1.1(端口偏移2)IBM WebSphere Application Server 8.5.5.1

The proxy service configuration of ESB ESB的代理服务配置

<proxy name="SMSQProdProxy" transports="http" startOnLoad="true" trace="enable">
    <target>
        <inSequence>
            <property name="OUT_ONLY" value="true"/>
            <send>
                <endpoint>
                    <address uri="jms:/SMSQ?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&amp;java.naming.provider.url=repository/conf/jndi.properties&amp;transport.jms.DestinationType=queue"/>
                </endpoint>
            </send>
         </inSequence>
         <outSequence>
            <send/>
         </outSequence>
    </target>
    <publishWSDL key="gov:/trunk/services/SendToSMSQProxy.wsdl">
       <resource location="SMSWSService_schema1.xsd"
               key="gov:/trunk/services/SMSWSService_schema1.xsd"/>
    </publishWSDL>
</proxy>

jndi.properties jndi.properties

connectionfactory.QueueConnectionFactory = amqp://admin:admin@carbon/carbon?brokerlist='tcp://localhost:5674'
connectionfactory.TopicConnectionFactory = amqp://admin:admin@carbon/carbon?brokerlist='tcp://localhost:5674'
queue.SMSQ = SMSQ

wso2-esb-errors.log wso2-esb-errors.log

2014-03-21 14:18:54,276 [-] [HTTP-Listener I/O dispatcher-1] WARN SourceHandler Connection time out after request is read: http-incoming-3 2014-03-21 14:18:54,276 [-] [HTTP侦听器I / O调度程序-1]读取请求后,WARN SourceHandler连接超时:http-incoming-3

wso2-esb-trage.log wso2-esb-trage.log

INFO TRACE_LOGGER Proxy Service SMSQProdProxy 
received a new message from : xx.xx.xx.xx
INFO TRACE_LOGGER Message To: /services/SMSQProdProxy
INFO TRACE_LOGGER SOAPAction:
INFO TRACE_LOGGER WSA-Action:
INFO TRACE_LOGGER Using the anonymous in-sequence of the proxy service for mediation
INFO TRACE_LOGGER Start : Sequence <anonymous>
INFO TRACE_LOGGER Sequence <SequenceMediator> :: mediate()
INFO TRACE_LOGGER Mediation started from mediator position : 0
INFO TRACE_LOGGER Start : Property mediator
INFO TRACE_LOGGER Setting property : OUT_ONLY at scope : default to : true (i.e. constant : true)
INFO TRACE_LOGGER End : Property mediator
INFO TRACE_LOGGER Start : Send mediator
INFO TRACE_LOGGER Sending message through endpoint : null resolving to address = jms:/SMSQ?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&java.naming.provider.url=repository/conf/jndi.properties&transport.jms.DestinationType=queue
INFO TRACE_LOGGER SOAPAction:
INFO TRACE_LOGGER WSA-Action:
INFO TRACE_LOGGER End : Send mediator
INFO TRACE_LOGGER End : Sequence <anonymous>

error log of application server 应用程序服务器的错误日志

java.io.IOException: Async IO operation failed (3), reason: RC: 55 java.io.IOException:异步IO操作失败(3),原因:RC:55

Thanks for any idea. 感谢您的任何想法。

After added <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/> I get another error message 添加<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>我又收到一条错误消息

2014-03-26 22:17:23,354 [-] [http-nio-9443-exec-15] WARN AuthenticationHandler Illegal access attempt at [2014-03-26 22:17:23,0353] from IP address null while trying to authenticate access to service StatisticsAdmin 2014-03-26 22:17:23,354 [-] [http-nio-9443-exec-15] ERROR AUDIT_LOG Illegal access attempt at [2014-03-26 22:17:23,0353] from IP address null while trying to authenticate access to service StatisticsAdmin 2014-03-26 22:17:23,355 [-] [http-nio-9443-exec-15] ERROR StatisticsAdminClient Cannot get service stats for service SMSQProdProxy. 2014-03-26 22:17:23,354 [-] [http-nio-9443-exec-15] WARN AuthenticationHandler在尝试尝试从IP地址null进行[2014-03-26 22:17:23,0353]非法访问尝试验证对服务StatisticsAdmin的访问权限2014-03-26 22:17:23,354 [-] [http-nio-9443-exec-15]错误AUDIT_LOG在[2014-03-26 22:17:23,0353]的非法访问尝试尝试验证对服务StatisticsAdmin的访问时从IP地址为null的错误2014-03-26 22:17:23,355 [-] [http-nio-9443-exec-15]错误StatisticsAdminClient无法获取服务SMSQProdProxy的服务统计信息。 Backend server may be unavailable. 后端服务器可能不可用。 org.apache.axis2.AxisFault: The input stream for an incoming message is null. org.apache.axis2.AxisFault:传入消息的输入流为null。

There is a similar problem https://wso2.org/jira/browse/WSAS-1214 还有一个类似的问题https://wso2.org/jira/browse/WSAS-1214

You can add the following after the OUT_ONLY property to your in sequence to return back to the client. 您可以在OUT_ONLY属性之后依次添加以下内容,以返回到客户端。 This property will force the ESB to respond back to the client with HTTP 202. 此属性将强制ESB使用HTTP 202响应客户端。

<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>

Yohan, It seems the new error you are experiencing is not related to the MB integration flow. Yohan,看来您遇到的新错误与MB集成流程无关。 Have you accessed the management console after session timed out? 会话超时后您是否访问了管理控制台? Can you reproduce this problem continuously? 您可以连续重现此问题吗? OR is this just one time occurrence? 或者这只是一次发生?

When you set the OUT_ONLY property to true you are saying that, you are not waiting the response after the proxy end. 当您将OUT_ONLY属性设置为true时,您是在说,您不必等待代理结束后的响应。 So, in outSequence remove the send mediator. 因此,在outSequence删除send介体。

If you want to force the proxy to send the response to the client, remove the Out_Only property and, in inSequence section set this after endPoint mediator. 如果要强制代理将响应发送到客户端,请删除Out_Only属性,并在inSequence部分中将其设置为endPoint中介器之后。

property name="FORCE_SC_ACCEPTED"  value="true"  scope="axis2"  type="STRING"

In outSequence section keep the <send/> mediator ... outSequence部分中,保留<send/> mediator ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM