随笔分类 - WebService
摘要:一、基于EJB容器管理webservice: 1.首先建立一个Web services EndPoint:package cn.test.service.impl;import java.util.ArrayList;import java.util.List;import javax.jws.WebMethod;import javax.jws.WebService;import cn.test.Person;import cn.test.service.HelloWorld;@WebServicepublic class HelloWorldImpl implements HelloWor
阅读全文
摘要:通过WebService调用一对多关联关系时引起的问题:A cycle is detected in the object graph具体异常信息:org.apache.cxf.interceptor.Fault: Marshalling Error: A cycle is detected in the object graph. This will cause infinitely deep XML:cn.jssms.platform.model.system.AppUser@75fce7->cn.jssms.platform.model.system.AppRole@195266b
阅读全文
摘要:http://www.360doc.com/content/11/0805/03/1542811_138157207.shtml
阅读全文
摘要:@WebService 1、serviceName: 对外发布的服务名,指定 Web Service 的服务名称:wsdl:service。缺省值为 Java 类的简单名称 + Service。(字符串) 2、endpointInterface: 服务接口全路径, 指定做SEI(Service EndPoint Interface)服务端点接口 3、name:此属性的值包含XML Web Service的名称。在默认情况下,该值是实现XML Web Service的类的名称,wsdl:portType 的名称。缺省值为 Java 类或接口的非限定名称。(字符串 4、portName: wsdl
阅读全文
摘要:在action中加入webservice
阅读全文
摘要:1、在web.xml中加入CXFServlet: cxf org.apache.cxf.transport.servlet.CXFServlet cxf /services/*2、在spring的配置文件中导入cxf的配置: --> 3、调用spring的webservice: 将webservice生成java文件: 测试代码: public class ClientMain {/** * @param args */public static void main(String[] args) { HelloWorldImplS...
阅读全文
摘要:一、服务器端: 1、权限判断:package cn.tdtk.ws.interceptor;import java.util.List;import org.apache.cxf.binding.soap.SoapMessage;import org.apache.cxf.headers.Header;import org.apache.cxf.interceptor.Fault;import org.apache.cxf.phase.AbstractPhaseInterceptor;import org.apache.cxf.phase.Phase;import org.w3c.dom.E.
阅读全文
摘要:一、服务端: 1、创建接口:package cn.tdtk.ws.dao;import java.util.List;import java.util.Map;import javax.jws.WebService;import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;import cn.tdtk.ws.domain.Cat;import cn.tdtk.ws.domain.Horse;import cn.tdtk.ws.domain.User;import cn.tdtk.ws.util.FkXmlAdapter;/** .
阅读全文
摘要:http://www.cnblogs.com/growup/archive/2011/03/06/1972464.htmlhttp://ws.apache.org/axis/http://axis.apache.org/axis2/java/core/http://xfire.codehaus.org/http://cxf.apache.org/axis最新的版本为April 22, 2006axis2最新的版本为19 - Dec - 2010 1.5.4xfire最新的版本为1.2.6 - May 3, 2007 网站已经说了“XFire is now CXF” --|||cxf最新的版本为
阅读全文
摘要:http://www.blogjava.net/nokiaguy/category/37087.html
阅读全文
摘要:1、服务端实现: 1.1 定义接口,用@WebService修饰: /** @WebService 所修饰的接口,那么接口里面的方法全部都属于web的服务 */ @WebService public interface HelloWorld { //基本数据类型都可以CXF进行实习 String sayHello(String name); } 1.2 实现接口: public class HelloWorldImpl implements HelloWorld { @Override public String sayHello(...
阅读全文
摘要:http://wenku.baidu.com/view/7979370116fc700abb68fc42.html实例中包括三个情况,我想基本上可以概括所有的需求,或者自己稍加扩展即可。先来看看我们的Interface。 package test; importjava.util.List;public interface IHelloService{public String sayHello(String ttt);public Course choose(User u);public List test(List t);}这其中包含了简单对象的传递,对象的传递,List的传递。具体的开发
阅读全文
摘要:创建一个web service工程web.xml文件会有以下内容 <servlet> <servlet-name>XFireServlet</servlet-name> <servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <s
阅读全文

浙公网安备 33010602011771号