ssh项目用cxf发布webserver

sinat_31245087 2015-11-10 02:45:20
我目前手上有一个项目用ssh做的 只能用JSP访问 请问如何结合CXF来发布呢 求详细步奏 谢谢大神
...全文
172 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
sinat_31245087 2015-11-12
  • 打赏
  • 举报
回复
引用 5 楼 yanghaimingg 的回复:
方法的参数是实体对象和你发布方没有关系,主要是在客户端那边生成客户端代码时多生成一个实体类罢了
哦哦 那我就是写个接口 剩下的交给客户端取实现 谢谢了 帮了大忙 马上结贴
sinat_31245087 2015-11-12
  • 打赏
  • 举报
回复
引用 3 楼 yanghaimingg 的回复:
action是你本地的应用,也是调用自己的impl来实现具体功能,你要提供功能给外界用,要发布的当然是bizimpl。
就比如我要写个注册的接口 但是可能用户有的资料会填 有的资料不会填 那无法固定这个方法的参数个数啊好像 用Object... params吗?
mtian2020 2015-11-12
  • 打赏
  • 举报
回复
方法的参数是实体对象和你发布方没有关系,主要是在客户端那边生成客户端代码时多生成一个实体类罢了
sinat_31245087 2015-11-12
  • 打赏
  • 举报
回复
引用 1 楼 yanghaimingg 的回复:
1,先下载cxf依赖包,引入到项目中 2,在web.xml中添加cxf配置: <servlet> <servlet-name>CXFService</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>CXFService</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> 3,在项目中完成你要发布的service,包括接口和实现类 4,在src目录下建立applicationContext-cxf.xml,并放入以下内容: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> <jaxws:endpoint id="userWebService" bindingUri="http://schemas.xmlsoap.org/soap/" address="/webervice/userwebservice" implementor="com.ruijie.smp.thirdpartyadapter.webservice.impl.UserWebServiceImpl"> </jaxws:endpoint>
请问要把接口发布出去是发布的bizimpl还是action呢? action在这里面功能是什么呢?好像例子都是发布的bizimpl
引用 3 楼 yanghaimingg 的回复:
action是你本地的应用,也是调用自己的impl来实现具体功能,你要提供功能给外界用,要发布的当然是bizimpl。
原来是这样 那么再问一下 如果bizimpl方法里的参数是一个entity是实体类对象 那该怎么办啊?
mtian2020 2015-11-12
  • 打赏
  • 举报
回复
action是你本地的应用,也是调用自己的impl来实现具体功能,你要提供功能给外界用,要发布的当然是bizimpl。
sinat_31245087 2015-11-12
  • 打赏
  • 举报
回复
引用 1 楼 yanghaimingg 的回复:
1,先下载cxf依赖包,引入到项目中 2,在web.xml中添加cxf配置: <servlet> <servlet-name>CXFService</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>CXFService</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> 3,在项目中完成你要发布的service,包括接口和实现类 4,在src目录下建立applicationContext-cxf.xml,并放入以下内容: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> <jaxws:endpoint id="userWebService" bindingUri="http://schemas.xmlsoap.org/soap/" address="/webervice/userwebservice" implementor="com.ruijie.smp.thirdpartyadapter.webservice.impl.UserWebServiceImpl"> </jaxws:endpoint>
请问要把接口发布出去是发布的bizimpl还是action呢? action在这里面功能是什么呢?好像例子都是发布的bizimpl
mtian2020 2015-11-10
  • 打赏
  • 举报
回复
1,先下载cxf依赖包,引入到项目中 2,在web.xml中添加cxf配置: <servlet> <servlet-name>CXFService</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>CXFService</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> 3,在项目中完成你要发布的service,包括接口和实现类 4,在src目录下建立applicationContext-cxf.xml,并放入以下内容: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> <jaxws:endpoint id="userWebService" bindingUri="http://schemas.xmlsoap.org/soap/" address="/webervice/userwebservice" implementor="com.ruijie.smp.thirdpartyadapter.webservice.impl.UserWebServiceImpl"> </jaxws:endpoint>

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧