services-cxf 服务端

需要的配置jar需要的请在apache下载   地址为 http://apache.fayea.com/cxf/

FastInfoset-1.2.13.jar
activemq-broker-5.9.1.jar
activemq-client-5.9.1.jar
activemq-openwire-legacy-5.9.1.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.3.1.jar
commons-codec-1.10.jar
commons-collections-3.2.2.jar
commons-lang-2.6.jar
cxf-core-3.0.9.jar
jaxb-impl-2.2.11.jar
jaxb-core-2.2.11.jar
jaxb-xjc-2.2.11.jar
cxf-tools-common-3.0.9.jar
velocity-1.7.jar
wsdl4j-1.6.3.jar
cxf-tools-validator-3.0.9.jar
xmlschema-core-2.2.1.jar
cxf-tools-wsdlto-core-3.0.9.jar
cxf-rt-wsdl-3.0.9.jar
cxf-tools-misctools-3.0.9.jar
cxf-tools-wsdlto-databinding-jaxb-3.0.9.jar
cxf-tools-corba-3.0.9.jar
cxf-tools-wsdlto-frontend-jaxws-3.0.9.jar
xml-resolver-1.2.jar
cxf-tools-wsdlto-frontend-javascript-3.0.9.jar
cxf-tools-wadlto-jaxrs-3.0.9.jar
cxf-rt-rs-service-description-3.0.9.jar
geronimo-jaxws_2.2_spec-1.2.jar
cxf-tools-java2ws-3.0.9.jar
cxf-xjc-dv-3.0.5.jar
cxf-xjc-ts-3.0.5.jar
cxf-xjc-bug671-3.0.5.jar
cxf-xjc-boolean-3.0.5.jar
cxf-xjc-javadoc-3.0.5.jar
cxf-xjc-runtime-3.0.5.jar
jaxb-api-2.2.11.jar
woodstox-core-asl-4.4.1.jar
stax2-api-3.1.4.jar
cxf-rt-features-clustering-3.0.9.jar
cxf-rt-management-3.0.9.jar
cxf-rt-transports-local-3.0.9.jar
cxf-rt-transports-http-3.0.9.jar
cxf-rt-transports-http-jetty-3.0.9.jar
jetty-server-8.1.19.v20160209.jar
jetty-continuation-8.1.19.v20160209.jar
jetty-http-8.1.19.v20160209.jar
jetty-io-8.1.19.v20160209.jar
jetty-util-8.1.19.v20160209.jar
jetty-security-8.1.19.v20160209.jar
slf4j-api-1.7.14.jar
geronimo-servlet_3.0_spec-1.0.jar
cxf-rt-transports-http-hc-3.0.9.jar
httpcore-nio-4.3.3.jar
httpcore-4.3.3.jar
httpasyncclient-4.0.2.jar
httpclient-4.3.6.jar
cxf-rt-transports-http-netty-server-3.0.9.jar
cxf-rt-transports-http-netty-client-3.0.9.jar
cxf-rt-transports-udp-3.0.9.jar
mina-core-2.0.9.jar
slf4j-jdk14-1.7.14.jar
jcl-over-slf4j-1.7.14.jar
cxf-rt-transports-jms-3.0.9.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
cxf-rt-bindings-soap-3.0.9.jar
cxf-rt-databinding-jaxb-3.0.9.jar
cxf-rt-bindings-xml-3.0.9.jar
cxf-rt-bindings-object-3.0.9.jar
cxf-rt-bindings-corba-3.0.9.jar
cxf-rt-bindings-coloc-3.0.9.jar
cxf-rt-databinding-aegis-3.0.9.jar
cxf-rt-databinding-xmlbeans-3.0.9.jar
xmlbeans-2.6.0.jar
cxf-rt-databinding-jibx-3.0.9.jar
joda-time-2.2.jar
cxf-rt-databinding-sdo-3.0.9.jar
cxf-rt-rs-extension-providers-3.0.9.jar
cxf-rt-rs-extension-search-3.0.9.jar
cxf-rt-rs-security-cors-3.0.9.jar
cxf-rt-rs-security-oauth-3.0.9.jar
cxf-rt-rs-client-3.0.9.jar
oauth-provider-20100527.jar
oauth-20100527.jar
cxf-rt-rs-security-oauth2-3.0.9.jar
cxf-rt-rs-security-jose-jaxrs-3.0.9.jar
cxf-rt-rs-security-jose-3.0.9.jar
cxf-rt-rs-json-basic-3.0.9.jar
cxf-rt-rs-security-xml-3.0.9.jar
cxf-rt-ws-addr-3.0.9.jar
cxf-rt-ws-rm-3.0.9.jar
wss4j-policy-2.0.7.jar
cxf-rt-ws-policy-3.0.9.jar
neethi-3.0.3.jar
cxf-rt-ws-mex-3.0.9.jar
cxf-rt-ws-security-3.0.9.jar
cxf-rt-security-3.0.9.jar
wss4j-ws-security-common-2.0.7.jar
xmlsec-2.0.6.jar
opensaml-2.6.1.jar
openws-1.5.1.jar
xmltooling-1.4.1.jar
jasypt-1.9.2.jar
ehcache-2.8.5.jar
wss4j-ws-security-dom-2.0.7.jar
wss4j-ws-security-stax-2.0.7.jar
wss4j-bindings-2.0.7.jar
wss4j-ws-security-policy-stax-2.0.7.jar
cxf-rt-frontend-jaxws-3.0.9.jar
cxf-rt-frontend-js-3.0.9.jar
js-1.7R2.jar
cxf-rt-frontend-simple-3.0.9.jar
cxf-rt-frontend-jaxrs-3.0.9.jar
javax.ws.rs-api-2.0.1.jar
javax.annotation-api-1.2.jar
cxf-rt-javascript-3.0.9.jar
cxf-services-sts-core-3.0.9.jar
spring-context-3.2.14.RELEASE.jar
spring-aop-3.2.14.RELEASE.jar
spring-beans-3.2.14.RELEASE.jar
spring-core-3.2.14.RELEASE.jar
spring-expression-3.2.14.RELEASE.jar
cxf-services-wsn-api-3.0.9.jar
cxf-services-wsn-core-3.0.9.jar
hawtbuf-1.9.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
cxf-services-ws-discovery-api-3.0.9.jar
cxf-services-ws-discovery-service-3.0.9.jar
jettison-1.3.7.jar
geronimo-javamail_1.4_spec-1.7.1.jar
cxf-manifest.jar
cxf-rt-rs-security-sso-saml-3.0.9.jar
spring-web-3.2.14.RELEASE.jar
jackson-annotations-2.3.0.jar
jackson-core-2.3.0.jar
jackson-databind-2.3.0.jar
c3p0-0.9.1.2.jar
spring-instrument-3.2.14.RELEASE.jar

package com.julongtech.webservices.impl;

import javax.jws.WebService;

import com.julongtech.webservices.CurrentService;
@WebService
public class CurrentServiceImpl implements CurrentService {

public String sayHello(String param) {
// TODO Auto-generated method stub
return "服务器说:"+param;
}

}
 
package com.julongtech.webservices;

import javax.jws.WebService;

@WebService
public interface CurrentService {
public abstract String sayHello(String param);
}

在WEBINF下配置cxf-servlet.xml

















index.jsp



contextConfigLocation
classpath:com/julongtech/config/spring/applicationContext.xml




org.springframework.web.context.ContextLoaderListener




Apache CXF Endpoint
cxf
cxf
org.apache.cxf.transport.servlet.CXFServlet
1


cxf
/services/*


60



 
http://localhost:8080/CxfService/services

Available SOAP services:
CurrentService

    sayHello

	Endpoint address: http://localhost:8080/CxfService/services/SurveyService
WSDL : {http://webservices.julongtech.com/}CurrentServiceService
Target namespace: http://webservices.julongtech.com/


Available RESTful services:



Available SOAP services:
CurrentService

    sayHello

	Endpoint address: http://localhost:8080/CxfService/services/SurveyService
WSDL : {http://webservices.julongtech.com/}CurrentServiceService
Target namespace: http://webservices.julongtech.com/


Available RESTful services:

 

你可能感兴趣的:(webservice,java)