xfire+spring 开发webservice,在服务器怎么访问,就是在打开那个wsdl,假设发布在本机电脑上,客户端又怎么来调用这个webservice?
我的配置如下:
在webService.xml中配置
<bean id="testBean" class="test.HelloImpl"></bean>在application-xfire.xml中配置了如下的bean. 这些xml都在启动的时候加载到内存中.
<bean id="test" parent="webService" class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceBean">
<ref bean="testbean"/>
</property>
<property name="serviceClass">
<value>test.IHello</value>
</property>
</bean>
<bean id="webService" class="org.codehaus.xfire.spring.remoting.XFireExporter" abstract="true">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory" />
</property>
<property name="xfire">
<ref bean="xfire" />
</property>
</bean>IHello类简单写成如下,Hello实现了这个类.
public interface IHello
{
public String getData(String str);
}
这样配置就可以了吗?还需要其它配置吗?这样配置后的webservice的名字是什么啊? 客户端又怎么来调用getData的方法?
我的配置如下:
在webService.xml中配置
<bean id="testBean" class="test.HelloImpl"></bean>在application-xfire.xml中配置了如下的bean. 这些xml都在启动的时候加载到内存中.
<bean id="test" parent="webService" class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceBean">
<ref bean="testbean"/>
</property>
<property name="serviceClass">
<value>test.IHello</value>
</property>
</bean>
<bean id="webService" class="org.codehaus.xfire.spring.remoting.XFireExporter" abstract="true">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory" />
</property>
<property name="xfire">
<ref bean="xfire" />
</property>
</bean>IHello类简单写成如下,Hello实现了这个类.
public interface IHello
{
public String getData(String str);
}
这样配置就可以了吗?还需要其它配置吗?这样配置后的webservice的名字是什么啊? 客户端又怎么来调用getData的方法?
或者使用动态client