MULE 3.4如何调用外部Web Service

MULE中调用CXF发布的外部Web Service,报错:org.mule.api.transport.NoReceiverForEndpointException: There is no receiver registered on connector "connector.VM.mule.default" for endpointUri vm://request-response

调用不到这个Web Service,不知道是哪里的问题,求大神解答!

 

下面是MULE配置文件:

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns="http://www.mulesoft.org/schema/mule/core" 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  

xmlns:spring="http://www.springframework.org/schema/beans"  

xmlns:vm="http://www.mulesoft.org/schema/mule/vm" 

xsi:schemaLocation="

http://www.springframework.org/schema/beans 

http://www.springframework.org/schema/beans/spring-beans-current.xsd 

http://www.mulesoft.org/schema/mule/core 

http://www.mulesoft.org/schema/mule/core/current/mule.xsd

http://www.mulesoft.org/schema/mule/vm 

http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd">  

  <model name="Gold">

    <service name="Lovol_InventoryQueryService">

      <description Reliability="0.96" ResponseTime="200" Cost="2" ServiceInstanceId="53d7638a3f0d7153013f0d7482890026"/>

      <inbound>

        <vm:inbound-endpoint path="53d7638a3f0d7153013f0d78cbdd002b" exchange-pattern="request-response"/>

      </inbound>

      <outbound>

        <pass-through-router>

          <outbound-endpoint address="wsdl-cxf:http://localhost:1111/QueryInventory?wsdl&amp;method=QueryInventory2"/>

        </pass-through-router>

      </outbound>

    </service>

  </model>

</mule>

 

下面是发布的CXF Web Service:

package org.mule.sdu.ws;

 

import org.apache.cxf.endpoint.Server;

import org.apache.cxf.jaxws.JaxWsServerFactoryBean;

//  SBM库存查询互操作接口

public class QueryInventoryMainServer {

 

public static void main(String[] args){

JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();

factory.setServiceClass(QueryInventory.class); 

factory.setAddress("http://localhost:1111/QueryInventory"); 

Server server = factory.create();

server.start();

}

}

 

1个回答

在Mule中未注入webService的bean,因此outbound时找不到service

reneyan
reneyan 请问如何注入啊,求详解!
7 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问