- 浏览: 59528 次
- 性别:
- 来自: 重庆
最新评论
-
network-eagle:
liukai 写道3.04后的版本用
<!-- Hand ...
spring3 mvc -
sadlonewolf:
LZ:我的xml文档怎么跑不通啊,一直报错unknown so ...
mule2.1.2 初步认识 发布cxf 和axis服务 -
liukai:
3.04后的版本用
<!-- Handles HTTP ...
spring3 mvc -
imi00:
overflowToDisk:
Sets whether el ...
hibernate 二级缓存 个人总结 -
SINCE1978:
慢慢来吧、相信付出终会得到回报、何况很多事情需要积累。博主还做 ...
有点迷茫,有点不如意!
最近公司需要写这样一个功能。也就是需要一个esb消息总线。初步的功能是提供webservice的消息管理以后还会增加很多的功能。。以前本来在soa esb上面的东西就是个空白。在Google上找了一天最后由我自己觉得用mule2.1.2。让后就疯狂的找些好的帖子。希望能够很快的入门。但发现不是那么一回事。找到的很多都是1.X的版本。2.1.2 的少得很。经过近半周的研究。。终于自己写了一个小的test。贴上来给新入门的朋友希望有帮助。深入的研究以后还会继续。
配置文件:mule_config.xml
一个简单的 接口 为了先跑同就这样把。
MuleService.java
MuleServiceImp.java
启动服务:
测试
这是怎么回事啊
我上面的结构就是原代码。没保留什么,还有 我是能跑通的。
@WebService
(@WebParam(name="str")
@WebParam和name都报错 怎么回事?要加什么包吗?
lz,你是要研究jms这块吗?我已经搞出来了 你可以问我,你可以把你的msn,qq号码发到javaeye的信箱里,我加你一下,告诉你怎么弄
配置文件:mule_config.xml
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesource.org/schema/mule/core/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.1" xmlns:cxf="http://www.mulesource.org/schema/mule/cxf/2.1" xmlns:axis="http://www.mulesource.org/schema/mule/axis/2.1" xmlns:smtps="http://www.mulesource.org/schema/mule/smtps/2.1" xmlns:http="http://www.mulesource.org/schema/mule/http/2.1" xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.1" xmlns:soap="http://www.mulesource.org/schema/mule/soap/2.1" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.mulesource.org/schema/mule/core/2.1 http://www.mulesource.org/schema/mule/core/2.1/mule.xsd http://www.mulesource.org/schema/mule/stdio/2.1 http://www.mulesource.org/schema/mule/stdio/2.1/mule-stdio.xsd http://www.mulesource.org/schema/mule/vm/2.1 http://www.mulesource.org/schema/mule/vm/2.1/mule-vm.xsd http://www.mulesource.org/schema/mule/cxf/2.1 http://www.mulesource.org/schema/mule/cxf/2.1/mule-cxf.xsd http://www.mulesource.org/schema/mule/axis/2.1 http://www.mulesource.org/schema/mule/axis/2.1/mule-axis.xsd http://www.mulesource.org/schema/mule/smtps/2.1 http://www.mulesource.org/schema/mule/smtps/2.1/mule-smtps.xsd http://www.mulesource.org/schema/mule/soap/2.1 http://www.mulesource.org/schema/mule/soap/2.1/mule-soap.xsd http://www.mulesource.org/schema/mule/http/2.1 http://www.mulesource.org/schema/mule/http/2.1/mule-http.xsd "> <description> eagleMule demo which shows how to publish web services over CXF. </description> <model name="eagleMule"> <service name="testMuleService"> <inbound> <axis:inbound-endpoint address="http://localhost:8899/services/testMuleService"> <soap:http-to-soap-request-transformer /> </axis:inbound-endpoint> <cxf:inbound-endpoint address="http://localhost:8898/services/testMuleService"> <soap:http-to-soap-request-transformer /> </cxf:inbound-endpoint> </inbound> <component class="com.eagle.mule.test.imp.MuleServiceImp"> </component> </service> </model> </mule>
一个简单的 接口 为了先跑同就这样把。
MuleService.java
@WebService public interface MuleService { public String testMule(@WebParam(name="str")String str); }
MuleServiceImp.java
@WebService(serviceName="eagleMuleService", endpointInterface="com.eagle.mule.test.MuleService") public class MuleServiceImp implements MuleService { public String testMule(String str) { System.out.println("----service---"); return "hello--"+str; } }
启动服务:
public class EagleMuleMain { public static void main(String[] args) throws ConfigurationException, InitialisationException { try { String configFile = "com/eagle/mule/test/mule_config.xml"; String[] configFileArr = new String[] { configFile }; MuleContextFactory muleContextFactory = new DefaultMuleContextFactory(); MuleContext context = muleContextFactory .createMuleContext(new SpringXmlConfigurationBuilder( configFileArr)); context.start(); } catch (MuleException t) { t.printStackTrace(); } } }
测试
package com.eagle.mule.test.clint; import java.io.IOException; import java.io.InputStream; import org.apache.commons.io.IOUtils; import org.mule.api.MuleException; import org.mule.api.MuleMessage; import org.mule.module.client.MuleClient; public class Client { public static void main(String[] args){ MuleClient client = null; try { client = new MuleClient(); String url = "axis:http://localhost:8899/services/testMuleService?wsdl&method=testMule"; MuleMessage message = client.send(url, "eagle", null); Object obj = message.getPayload(); System.out.println("--------------obj---------"+obj.getClass().getName()); if(obj instanceof String){ System.out.println("---------str--------------"+obj); } } catch (MuleException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ client.dispose(); } } } 注意 这里需要把mule 下lib中 endorsed mule opt 文件夹中的jar都加进去。如果不发布cxf的服务 可以不用添加endorsed文件夹中的jar。
评论
43 楼
sadlonewolf
2011-11-15
LZ:我的xml文档怎么跑不通啊,一直报错unknown source和Cannot find the declaration of element 'mule',帮我看一下吧。
42 楼
deadcow
2009-07-01
另外,写mule的test case。可以用上mule 的test package,里面有一个类似funtionalTest的class
41 楼
deadcow
2009-07-01
好像没有体现ESB,你的src code 不应该加上任何类似WS的tag,怎样把WS expose出来,是通过MULE的inbound
40 楼
caiway
2009-07-01
大家有把mule2集成到应用程序里去吗?照着官网把下面这段加入web.xml报错,应用在tomcat里面不能启动。
<context-param>
<param-name>org.mule.config</param-name>
<param-value>mule-config-main.xml,mule-components.xml</param-value>
</context-param>
<listener>
<listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
</listener>
<context-param>
<param-name>org.mule.config</param-name>
<param-value>mule-config-main.xml,mule-components.xml</param-value>
</context-param>
<listener>
<listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
</listener>
39 楼
rrsy23
2009-06-18
mule的例子可以看哈
你这个和mule的最简单的echo例子基本一样
你这个和mule的最简单的echo例子基本一样
38 楼
portrait
2009-05-30
burke 写道
String url = "cxf:http://localhost:8898/services/testMuleService?method=testMule";
这个报错
Could not create client! No Server was found directly on the endpoint: http://localhost:8898/services/testMuleService
这个报错
Could not create client! No Server was found directly on the endpoint: http://localhost:8898/services/testMuleService
这是怎么回事啊
37 楼
qhhhn
2009-05-14
刚好在学习ING...国内这一块的资料太少了...
36 楼
burke
2009-05-08
String url = "cxf:http://localhost:8898/services/testMuleService?method=testMule";
这个报错
Could not create client! No Server was found directly on the endpoint: http://localhost:8898/services/testMuleService
这个报错
Could not create client! No Server was found directly on the endpoint: http://localhost:8898/services/testMuleService
35 楼
hf3862
2009-04-30
我在运行您的例子时碰到这个错误:
Exception in thread "main" java.lang.IllegalStateException: Level number 10 is not recognized.
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:106)
at org.mule.util.IOUtils.getResourceAsUrl(IOUtils.java:154)
at org.mule.config.ConfigResource.<init>(ConfigResource.java:32)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.loadConfigResources(AbstractResourceConfigurationBuilder.java:90)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.<init>(AbstractResourceConfigurationBuilder.java:56)
at org.mule.config.spring.SpringXmlConfigurationBuilder.<init>(SpringXmlConfigurationBuilder.java:43)
at test.EagleMuleMain.main(EagleMuleMain.java:20)
也没有google到解决办法,请问是哪儿的问题?
xp/jdk1.5.0_18/eclipse3.4.2/mule2.1.2
Exception in thread "main" java.lang.IllegalStateException: Level number 10 is not recognized.
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:529)
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:106)
at org.mule.util.IOUtils.getResourceAsUrl(IOUtils.java:154)
at org.mule.config.ConfigResource.<init>(ConfigResource.java:32)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.loadConfigResources(AbstractResourceConfigurationBuilder.java:90)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.<init>(AbstractResourceConfigurationBuilder.java:56)
at org.mule.config.spring.SpringXmlConfigurationBuilder.<init>(SpringXmlConfigurationBuilder.java:43)
at test.EagleMuleMain.main(EagleMuleMain.java:20)
也没有google到解决办法,请问是哪儿的问题?
xp/jdk1.5.0_18/eclipse3.4.2/mule2.1.2
34 楼
network-eagle
2009-04-22
zhunzhunzhun-sky 写道
能把源码分享下吗?
我上面的结构就是原代码。没保留什么,还有 我是能跑通的。
33 楼
zhunzhunzhun-sky
2009-03-31
能把源码分享下吗?
32 楼
network-eagle
2009-03-30
不好意思 各位朋友。由于很久没上,让大家久等了。不过我的程序是调试通过的。如果大家有问题。请检查自己的配置。也请提供出错的信息!谢谢!
31 楼
zhunzhunzhun-sky
2009-03-30
http://localhost:8899/services/testMuleService
这个服务没有
http://localhost:8898/services/testMuleService
这个服务无法创建客户端
这是怎么回事楼主?
这个服务没有
http://localhost:8898/services/testMuleService
这个服务无法创建客户端
这是怎么回事楼主?
30 楼
portrait
2009-03-18
<soap:http-to-soap-request-transformer />
这个标签撒意思?传soap消息 就要用这个标签吗?
这个标签撒意思?传soap消息 就要用这个标签吗?
29 楼
portrait
2009-03-04
楼上的用mule调web service调通了吗?
28 楼
gp_len
2009-03-02
我的问题已经解决,呵呵……
楼上的:
检查一下你的mule版本
mule-conifg.xml文件
还有那些所需的jar
楼上的:
检查一下你的mule版本
mule-conifg.xml文件
还有那些所需的jar
27 楼
zsb77585210
2009-03-02
[03-02 10:41:20] ERROR SpringXmlConfigurationBuilder [main]: Configuration with "org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:96)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:54)
at EagleMuleMain.main(EagleMuleMain.java:16)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:72)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:78)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:104)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:87)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:68)
... 7 more
org.mule.api.config.ConfigurationException: Initialisation Failure: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml] (org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:96)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:54)
at EagleMuleMain.main(EagleMuleMain.java:16)
Caused by: org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
... 4 more
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:72)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:78)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:104)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:87)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:68)
... 7 more
运行失败 请各位看看问题所在
org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:96)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:54)
at EagleMuleMain.main(EagleMuleMain.java:16)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:72)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:78)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:104)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:87)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:68)
... 7 more
org.mule.api.config.ConfigurationException: Initialisation Failure: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml] (org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:96)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:54)
at EagleMuleMain.main(EagleMuleMain.java:16)
Caused by: org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
... 4 more
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/core/2.1]
Offending resource: URL [file:/D:/EclipseItem/MuleAppTest/bin/mule-config.xml]
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:72)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:78)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:104)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:87)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:68)
... 7 more
运行失败 请各位看看问题所在
26 楼
portrait
2009-02-24
问题已经解决
25 楼
portrait
2009-02-24
network-eagle 写道
最近公司需要写这样一个功能。也就是需要一个esb消息总线。初步的功能是提供webservice的消息管理以后还会增加很多的功能。。以前本来在soa esb上面的东西就是个空白。在Google上找了一天最后由我自己觉得用mule2.1.2。让后就疯狂的找些好的帖子。希望能够很快的入门。但发现不是那么一回事。找到的很多都是1.X的版本。2.1.2 的少得很。经过近半周的研究。。终于自己写了一个小的test。贴上来给新入门的朋友希望有帮助。深入的研究以后还会继续。
配置文件:mule_config.xml
一个简单的 接口 为了先跑同就这样把。
MuleService.java
MuleServiceImp.java
启动服务:
测试
配置文件:mule_config.xml
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesource.org/schema/mule/core/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.1" xmlns:cxf="http://www.mulesource.org/schema/mule/cxf/2.1" xmlns:axis="http://www.mulesource.org/schema/mule/axis/2.1" xmlns:smtps="http://www.mulesource.org/schema/mule/smtps/2.1" xmlns:http="http://www.mulesource.org/schema/mule/http/2.1" xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.1" xmlns:soap="http://www.mulesource.org/schema/mule/soap/2.1" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.mulesource.org/schema/mule/core/2.1 http://www.mulesource.org/schema/mule/core/2.1/mule.xsd http://www.mulesource.org/schema/mule/stdio/2.1 http://www.mulesource.org/schema/mule/stdio/2.1/mule-stdio.xsd http://www.mulesource.org/schema/mule/vm/2.1 http://www.mulesource.org/schema/mule/vm/2.1/mule-vm.xsd http://www.mulesource.org/schema/mule/cxf/2.1 http://www.mulesource.org/schema/mule/cxf/2.1/mule-cxf.xsd http://www.mulesource.org/schema/mule/axis/2.1 http://www.mulesource.org/schema/mule/axis/2.1/mule-axis.xsd http://www.mulesource.org/schema/mule/smtps/2.1 http://www.mulesource.org/schema/mule/smtps/2.1/mule-smtps.xsd http://www.mulesource.org/schema/mule/soap/2.1 http://www.mulesource.org/schema/mule/soap/2.1/mule-soap.xsd http://www.mulesource.org/schema/mule/http/2.1 http://www.mulesource.org/schema/mule/http/2.1/mule-http.xsd "> <description> eagleMule demo which shows how to publish web services over CXF. </description> <model name="eagleMule"> <service name="testMuleService"> <inbound> <axis:inbound-endpoint address="http://localhost:8899/services/testMuleService"> <soap:http-to-soap-request-transformer /> </axis:inbound-endpoint> <cxf:inbound-endpoint address="http://localhost:8898/services/testMuleService"> <soap:http-to-soap-request-transformer /> </cxf:inbound-endpoint> </inbound> <component class="com.eagle.mule.test.imp.MuleServiceImp"> </component> </service> </model> </mule>
一个简单的 接口 为了先跑同就这样把。
MuleService.java
@WebService public interface MuleService { public String testMule(@WebParam(name="str")String str); }
MuleServiceImp.java
@WebService(serviceName="eagleMuleService", endpointInterface="com.eagle.mule.test.MuleService") public class MuleServiceImp implements MuleService { public String testMule(String str) { System.out.println("----service---"); return "hello--"+str; } }
启动服务:
public class EagleMuleMain { public static void main(String[] args) throws ConfigurationException, InitialisationException { try { String configFile = "com/eagle/mule/test/mule_config.xml"; String[] configFileArr = new String[] { configFile }; MuleContextFactory muleContextFactory = new DefaultMuleContextFactory(); MuleContext context = muleContextFactory .createMuleContext(new SpringXmlConfigurationBuilder( configFileArr)); context.start(); } catch (MuleException t) { t.printStackTrace(); } } }
测试
package com.eagle.mule.test.clint; import java.io.IOException; import java.io.InputStream; import org.apache.commons.io.IOUtils; import org.mule.api.MuleException; import org.mule.api.MuleMessage; import org.mule.module.client.MuleClient; public class Client { public static void main(String[] args){ MuleClient client = null; try { client = new MuleClient(); String url = "axis:http://localhost:8899/services/testMuleService?wsdl&method=testMule"; MuleMessage message = client.send(url, "eagle", null); Object obj = message.getPayload(); System.out.println("--------------obj---------"+obj.getClass().getName()); if(obj instanceof String){ System.out.println("---------str--------------"+obj); } } catch (MuleException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ client.dispose(); } } } 注意 这里需要把mule 下lib中 endorsed mule opt 文件夹中的jar都加进去。如果不发布cxf的服务 可以不用添加endorsed文件夹中的jar。
@WebService
(@WebParam(name="str")
@WebParam和name都报错 怎么回事?要加什么包吗?
24 楼
portrait
2009-02-24
network-eagle 写道
希望对你有帮助就行。现在就是在基于消息这块还在继续研究中。也希望大家一起交流
lz,你是要研究jms这块吗?我已经搞出来了 你可以问我,你可以把你的msn,qq号码发到javaeye的信箱里,我加你一下,告诉你怎么弄
发表评论
-
hibernate 二级缓存 个人总结
2010-03-30 14:36 1221今天特地的回顾了一下hibernate 的二级缓存, 我平常用 ... -
用jacob实现定制模板的word 包括动态的table image 等
2009-07-08 10:58 2067首先说下我的环境 :jacob 1.14 , jdk ... -
cxf jaxws 用spring的bean
2009-06-02 11:36 2521cxf 发布一个server很简单 <jaxw ... -
Cxf 2.1 Spring 2.X 开发webservice
2008-06-05 15:06 1700相信大家用xfire开发webservice 很爽吧。最近看到 ...
相关推荐
Umi-OCR-main.zip
基于springboot+Web的毕业设计选题系统源码数据库文档.zip
基于springboot校外兼职教师考勤管理系统源码数据库文档.zip
58商铺全新UI试客试用平台网站源码
基于springboot大学生就业信息管理系统源码数据库文档.zip
基于SpringBoot的口腔诊所系统源码数据库文档.zip
数据存放网盘,txt文件内包含下载链接及提取码,永久有效。失效会第一时间进行补充。样例数据及详细介绍参见文章:https://blog.csdn.net/T0620514/article/details/143956923
3-240P2162218.zip
网络安全 基于Qt创建的Linux系统下的浏览器.zip
C++ 类和对象:多态-练习题目2(制作咖啡和茶叶)
基于springboot+J2EE在线项目管理与任务分配中的应用源码数据库文档.zip
简介本项目提供了一个在51单片机上运行的简单操作系统,旨在帮助学习者深入理解操作系统的基本原理和任务调度机制。该操作系统通过汇编和C语言编写,实现了任务调度、中断处理等核心功能,并提供了详细的源代码和注释,方便学习和实践。
本文将深度卷积神经网络(CNN)设计实现一个复杂结构的生成模型,旨在通过多阶段的编码器-解码器结构,能够有效地将灰度图像转换为彩色图像。最后,本文将实现一个简单的Web应用,用户可以通过上传灰度图像,应用会使用预训练的Caffe模型对其进行颜色化,并将结果返回给用户。 1.模型设计:模型由多个卷积层、ReLU激活函数和批归一化层组成,通过前向传播函数将输入的灰度图像(L通道)转换为彩色图像(ab通道)。如果指定了 pretrained=True,则会自动下载并加载预训练的模型权重。 2. 系统通过Flask框架提供了一个Web应用,用户可以上传灰度图像,系统会自动将其转换为彩色图像,并在网页上显示结果。整个过程包括文件验证、图像处理、颜色化预测和结果展示,具有较高的实用性和用户体验。
一个JAVA图形化的、联网的五子棋游戏.zip javaweb
KWDB 是一款面向 【AIoT 场景】的【分布式多模数据库】,支持在同一实例同时建立时序库和关系库并融合处理多模数据,具备千万级设备接入、百万级数据秒级写入、亿级数据秒级读取等时序数据高效处理能力,具有稳定安全、高可用、易运维等特点。
页面数量:7页 网页主题:网站模板、酒店网站模板、官方网站模板 网页页面:首页、关于我们、相关服务、服务详情、在线博客、博客详情、在线留言 页面实现元素:加载动画、滚动加载、主题切换、导航栏 、轮播图、图文列表、图片切换、 文字列表、 按钮悬停、图片悬停、表单 实现技术:HTML、CSS 、JQuery 源码样式及js文件均分开存放,所有内容仅供初学者学习参考
内容概要:本文档提供了详细的 Neo4j 安装与配置指南,涵盖 Windows、Linux 和 Mac 系统的安装步骤。具体包括下载、安装、启动服务、修改配置文件(如端口配置、远程访问和内存限制)、设置管理员密码以及基本的 Cypher 查询语言使用方法。同时,还提供了一些常见问题及其解决方案。 适合人群:数据库管理员、软件开发人员、系统管理员。 使用场景及目标:①帮助初学者快速掌握 Neo4j 的安装与配置;②适用于需要搭建和使用图数据库的项目;③为已有用户解决常见问题。 其他说明:本文档不仅包含了基础的安装和配置流程,还提供了实际操作中可能遇到的问题及其解决方法,有助于提高使用者的实际操作能力。
基于SpringBoot+Vue的软件产品展示销售系统源码数据库文档.zip
《书戴嵩画牛》教学课件.pptx
20届智能车 【项目资源】:包含前端、后端、移动开发、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源,毕业设计等各种技术项目的源码。包括C++、Java、python、web、C#、EDA等项目的源码。 【适用人群】:适用于希望学习不同技术领域的初学者或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。