繁体   English   中英

WSO2服务链接服务请求未发送到服务器,但以默认失败顺序结束,没有详细信息

[英]WSO2 Service Chaining Request to Service not send to server but ends in default fail sequence without details

我正在使用WSO2 ESB执行PoC。

我有3个服务存根,其中1个是向Personen提出的请求,它会将个人的CSV列表发送回他们的组织。

然后,对于每个在其addPersoon方法中接受此CSV字符串的组织(组织1和组织2)提供两项服务。

非常简单,迭代的东西。 但是,当我创建SOAP消息并将其发送到服务时,它不会被接收,而是以默认的“故障”序列结束,并且没有提示出什么错误了:

TID: [0] [ESB] [2015-03-12 09:25:38,295]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://127.0.0.1:8080/Organisatie2/Organisatie2, WSAction: addPersoon, SOAPAction: addPersoon, MessageID: urn:uuid:368f931c-2b26-48cc-a84c-1cd27175154e, Direction: response, MESSAGE = Executing default "fault" sequence, ERROR_CODE = null, ERROR_MESSAGE = null, ERROR_DETAIL = null, ERROR_EXCEPTION = null, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:addPersoon xmlns:ns2="http://services.esb.phonax.com/"><persoon>ORG2, Verbaan, Georgina</persoon></ns2:addPersoon></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
   <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
    <parameter name="cachableDuration">15000</parameter>
   </registry>
 <proxy name="Distributor"
        transports="http"
        startOnLoad="true"
        trace="enable"
        statistics="enable">
    <description/>
    <target>
       <inSequence>
          <send receive="PersonenLijst">
             <endpoint key="Personen"/>
          </send>
       </inSequence>
       <outSequence>
          <aggregate>
             <completeCondition>
                <messageCount/>
             </completeCondition>
             <onComplete xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
                         xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"
                         expression="/s11:Envelope/s11:Body/child::*[position()=1] | /s12:Envelope/s12:Body/child::*[position()=1]">
                <drop/>
             </onComplete>
          </aggregate>
          <send/>
       </outSequence>
    </target>
    <publishWSDL uri="http://192.168.178.23:8080/Personen/Personen?wsdl"/>
 </proxy>
 <endpoint name="Organisatie2">
    <wsdl service="Organisatie2"
          port="Organisatie2Port"
          uri="http://192.168.178.23:8080/Organisatie2/Organisatie2?wsdl"/>
 </endpoint>
 <endpoint name="Personen">
    <wsdl service="Personen"
          port="PersonenPort"
          uri="http://192.168.178.23:8080/Personen/Personen?wsdl"/>
 </endpoint>
 <endpoint name="Organisatie1">
    <wsdl service="Organisatie1"
          port="Organisatie1Port"
          uri="http://192.168.178.23:8080/Organisatie1/Organisatie1?wsdl"/>
 </endpoint>
 <sequence name="DistributePerson">
    <payloadFactory media-type="xml">
       <format>
          <ns2:addPersoon xmlns:ns2="http://services.esb.phonax.com/">
             <persoon xmlns="">$1</persoon>
          </ns2:addPersoon>
       </format>
       <args>
          <arg evaluator="xml" expression="//return[1]"/>
       </args>
    </payloadFactory>
    <header name="Action" value="addPersoon"/>
    <log level="full"/>
    <switch xmlns:m0="http://services.samples" source="//persoon[1]">
       <case regex="    ORG1.*">
          <header name="To" value="http://127.0.0.1:8080/Organisatie1/Organisatie1"/>
          <log level="full">
             <property name="MSG" value="ORG1 BABY!"/>
          </log>
          <send>
             <endpoint key="Organisation1"/>
          </send>
       </case>
       <case regex="    ORG2.*">
          <header name="To" value="http://127.0.0.1:8080/Organisatie2/Organisatie2"/>
          <log level="full">
             <property name="MSG" value="ORG2 BABY!"/>
          </log>
          <send>
             <endpoint key="Organisation2"/>
          </send>
       </case>
       <default>
          <log>
             <property name="symbol" expression="fn:concat('NO CASE FOR - ', //persoon[1])"/>
          </log>
          <drop/>
       </default>
    </switch>
    <send/>
 </sequence>
 <sequence name="PersonenLijst">
    <log level="full"/>
    <iterate xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
             xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"
             id="personID"
             expression="//return">
       <target sequence="DistributePerson"/>
    </iterate>
 </sequence>
 <sequence name="fault">
    <log level="full">
       <property name="MESSAGE" value="Executing default &#34;fault&#34; sequence"/>
       <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
       <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
       <property name="ERROR_DETAIL" expression="get-property('ERROR_DETAIL')"/>
       <property name="ERROR_EXCEPTION" expression="get-property('ERROR_EXCEPTION')"/>
    </log>
    <drop/>
 </sequence>
 <sequence name="main">
    <log/>
    <drop/>
 </sequence>

欢迎对此新手提出任何建议,谢谢!

当你说

“ ...并将其发送到未收到的服务,而是以默认的“故障”顺序结束”

您是说您已将邮件发送到代理服务还是单个服务? 如果是后者,则需要获取PROXY SERVICE的正确端点(通过在consoleUI-> services选项卡中单击该服务)。 代理将链接您的服务。

同样,如果消息流在任何地方命中<drop>介体,它将立即停止对消息的处理。

缺省故障序列是指esb的缺省故障序列还是您指定的故障序列?

并且可以粘贴一些日志和肥皂请求。

暂无
暂无

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

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