spring+springxfire_client.xml
<bean id ="testWebService" class ="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name ="serviceClass">
<value>com.xx.fw.webservice.service.HelloWS</value>
</property>
<property name ="wsdlDocumentUrl" >
<value>http://localhost:8080/mywebservice/services/HelloService?wsdl</value>
</property >
<property name="lookupServiceOnStartup">
<value>false</value>
</property>
</bean > public void testClient() {
ApplicationContext ctx = new ClassPathXmlApplicationContext("xfire_client.xml");
service = (HelloWS) ctx.getBean( "testWebService");
System.out.println(service.sayHello("xxx"));
} Exception in thread "main" java.lang.IllegalStateException: A WSDL URL or service URL must be supplied.
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.makeClient(XFireClientFactoryBean.java:530)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.createClient(XFireClientFactoryBean.java:412)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.access$100(XFireClientFactoryBean.java:54)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean$ProxyInterceptor.getClient(XFireClientFactoryBean.java:640)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean$ProxyInterceptor.invoke(XFireClientFactoryBean.java:601)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
http://localhost:8080/mywebservice/services/HelloService?wsdl 是可以访问的,为什么会包找不到的异常呢?
<bean id ="testWebService" class ="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name ="serviceClass">
<value>com.xx.fw.webservice.service.HelloWS</value>
</property>
<property name ="wsdlDocumentUrl" >
<value>http://localhost:8080/mywebservice/services/HelloService?wsdl</value>
</property >
<property name="lookupServiceOnStartup">
<value>false</value>
</property>
</bean > public void testClient() {
ApplicationContext ctx = new ClassPathXmlApplicationContext("xfire_client.xml");
service = (HelloWS) ctx.getBean( "testWebService");
System.out.println(service.sayHello("xxx"));
} Exception in thread "main" java.lang.IllegalStateException: A WSDL URL or service URL must be supplied.
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.makeClient(XFireClientFactoryBean.java:530)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.createClient(XFireClientFactoryBean.java:412)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.access$100(XFireClientFactoryBean.java:54)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean$ProxyInterceptor.getClient(XFireClientFactoryBean.java:640)
at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean$ProxyInterceptor.invoke(XFireClientFactoryBean.java:601)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
http://localhost:8080/mywebservice/services/HelloService?wsdl 是可以访问的,为什么会包找不到的异常呢?
解决方案 »
- 求救:com.microsoft.sqlserver.jdbc.SQLServerException: 该语句没有返回结果集。J2EE
- 是否能够在IIS上运行JSP网站呢?
- 请问JavaScript树形菜单实现的原理是什么?
- SOS! tomcat-5.0.25使用问题?
- Servlet+基于Socket简单聊天室的问题:
- 请问:能否用Servlet实现多线程?
- 在eclipse下写jsp怎么不出现动态提醒?
- 各位大侠帮忙看看这个错误
- 连接ORACLE数据库,数据库里的STRING类型,在页面上显示为16进制的数,这是怎么回事呢?
- jsp能否用象asp那样用if..else..有选择地输出html内容?
- JAVA 怎么删除上传到硬盘的附件啊
- jsp循环表格成列显示数据,在线急求
<property name ="wsdlDocumentUrl" >
<value>http://localhost:8080/mywebservice/services/HelloService?wsdl</value>
</property >
改成
<property name ="url" >
<value>http://localhost:8080/mywebservice/services/HelloService?wsdl</value>
</property > 就可以了,这是咋回事啊