锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产亚洲Av综合人人澡精品,国产亚洲AV夜间福利香蕉149
,亚洲AV无码一区二区三区系列 http://www.tkk7.com/sxyx2008/category/45653.html娓╅Θ鎻愮ず錛氭偍鐨勬瘡涓嬈¤漿杞?浣撶幇浜嗘垜鍐欐鏂囩殑鎰忎箟!!!鐑﹁鎮ㄥ湪杞澆鏃舵敞鏄庡嚭澶刪ttp://www.tkk7.com/sxyx2008/璋㈣阿鍚堜綔!!!
zh-cn Tue, 02 Apr 2013 13:23:24 GMT Tue, 02 Apr 2013 13:23:24 GMT 60 鍩轟簬maven鐨勫妗嗘灦鍜屽瑙嗗浘铻嶅悎鎶鏈?Struts1銆丼truts2銆丼pring銆丼pringMVC銆丠ibernate銆両batis銆丮yBatis銆丼pring Data JPA銆丏WR) http://www.tkk7.com/sxyx2008/archive/2012/09/25/388490.html闆北椋為箘 闆北椋為箘 Tue, 25 Sep 2012 03:40:00 GMT http://www.tkk7.com/sxyx2008/archive/2012/09/25/388490.html http://www.tkk7.com/sxyx2008/comments/388490.html http://www.tkk7.com/sxyx2008/archive/2012/09/25/388490.html#Feedback 0 http://www.tkk7.com/sxyx2008/comments/commentRss/388490.html http://www.tkk7.com/sxyx2008/services/trackbacks/388490.html 璇ラ」鐩熀浜巑aven3.0鏋勫緩鐨勶紝欏圭洰涓瀺鍚堜簡Struts1銆丼truts2銆丼pring銆丼pringMVC銆丠ibernate銆両batis銆丮yBatis銆丼pring Data JPA銆丼pring JDBC銆丼pring DWR銆傞〉闈㈠睍鐜拌繖閲屼嬌鐢⊿truts1銆丼truts2銆丼pringMVC錛坖sp瑙嗗浘銆乿elocity瑙嗗浘銆乫reemarker瑙嗗浘銆乸df瑙嗗浘銆乪xcel瑙嗗浘銆亁ml瑙嗗浘銆乯son瑙嗗浘絳夛級銆傛槸涓涓患鍚堟ц鐨勯」鐩傝欏圭洰鍚庢湡浼氶檰緇泦鎴怱pring鐨勪竴浜涘ソ鐨勬鏋惰繘鏉ユ瘮濡傝Spring Web Flow銆丼pring Security 銆丣bpm銆乄ebService銆丆ompass銆丼olr銆乶utch絳夈傛諱箣鏄竴涓患鍚堟х殑欏圭洰銆傝欏圭洰涓嶅鐞嗕笟鍔★紝涓昏鏄妸鐩墠鑷繁宸ヤ綔涓敤鍒拌繃鐨勫悇縐嶆鏋剁硡鍚堝埌涓涓」鐩腑銆傜函綺規槸涓涓猨ee妗嗘灦鐨勭硡鍚堬紝涓昏鏄粙緇嶅悇縐嶆妧鏈?/p>
浠嬬粛涓嬬洰鍓嶄嬌鐢ㄧ殑鍚勪釜妗嗘灦鐨勭増鏈俊鎭?/p>
Struts1 1.3.10
Struts2 2.3.8
Spring 3.2.0.RELEASE
Hibernate 4.2.0.Final
Ibatis 2.3.4.726
MyBatis 3.1.1
Spring Data JPA 1.3.0.RELEASE
DWR 3.0.M1
欏圭洰涓殑鎸佷箙鍖栨鏋秙ql璇彞鐨勮窡韙噰鐢ㄤ簡log4jdbc4緇撳悎log4j錛屽湪鎺у埗鍙板彲浠ョ湅鍒板畬鏁寸殑sql璇彞銆?/p>
璇ラ」鐩腑浣跨敤鍒扮殑鎶鏈潎涓嶴pring宸查泦鎴愩傞櫎浜咲WR涓嶴pring闆嗘垚浣跨敤xml鏂囦歡涓厤緗産ean澶?鍏朵粬鐨刡ean鍧囦嬌鐢ㄦ敞瑙e畬鍠勩傛瘡涓涓笌鏁版嵁搴撴湁鍏崇殑閮芥湁浜嬪姟澶勭悊銆?/p>
欏圭洰緇撴瀯鍥?/p>
欏圭洰鎵樼SVN鍦板潃錛?/span>http://maven-framework-project.googlecode.com/svn/trunk/ (闄愪簬澶ч檰google code 涓嶇ǔ瀹?瀵艱嚧緇忓父鏃犳硶璁塊棶,璇ュ湴鍧宸蹭笉鍦ㄥ悓姝?寤鴻浣跨敤github鍦板潃)
欏圭洰鎵樼GitHub鍦板潃錛?/span>https://github.com/sxyx2008/maven-framework-project/ 錛堟帹鑽愪嬌鐢級
鏈鍚庡笇鏈涙湁鍏磋叮鐨勬湅鍙嬪彲浠ュ姞鍏ヨ繘鏉ワ紝澶у涓璧峰畬鍠勪粬銆傛妸鑷繁鐨勬妧鏈垎浜嚭鏉ャ傚鏈変換浣曢棶棰樺彲浠ヤ笌鎴戣仈緋?/p>
鑱旂郴鏂瑰紡
QQ錛?84675420
Email錛歴xyx2008@gmail.com
]]> xfire闆嗘垚spring鍙戝竷webservice http://www.tkk7.com/sxyx2008/archive/2011/06/15/352330.html闆北椋為箘 闆北椋為箘 Wed, 15 Jun 2011 02:03:00 GMT http://www.tkk7.com/sxyx2008/archive/2011/06/15/352330.html http://www.tkk7.com/sxyx2008/comments/352330.html http://www.tkk7.com/sxyx2008/archive/2011/06/15/352330.html#Feedback 0 http://www.tkk7.com/sxyx2008/comments/commentRss/352330.html http://www.tkk7.com/sxyx2008/services/trackbacks/352330.html < servlet > < servlet-name > xfire </ servlet-name > < servlet-class > org.springframework.web.servlet.DispatcherServlet </ servlet-class > </ servlet > < servlet-mapping > < servlet-name > xfire </ servlet-name > < url-pattern > *.ws </ url-pattern > </ servlet-mapping > 鍦╯pring閰嶇疆鏂囦歡涓姞鍏ヤ互涓?
< bean id ="xfire.annotationServiceFactory" class="org.codehaus.xfire.annotations.AnnotationServiceFactory" > < constructor-arg index ="0" > < ref bean ="xfire.commonsAnnotations" /> </ constructor-arg > < constructor-arg index ="1" > < ref bean ="xfire.transportManager" /> </ constructor-arg > < constructor-arg index ="2" > < ref bean ="xfire.aegisBindingProvider" /> </ constructor-arg > </ bean > < bean id ="xfire.commonsAnnotations" class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations" /> < bean class ="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping" > < property name ="urlMap" > < map > < entry key ="/SynchronizService.ws" > < ref bean ="synchronizservice" /> </ entry > </ map > </ property > </ bean > < bean name ="synchronizservice" class ="org.codehaus.xfire.spring.remoting.XFireExporter" > < property name ="serviceBean" ref ="synchronizserviceBean" /> < property name ="serviceClass" >< value > com.futuresoftware.webservices.SynchronizService </ value ></ property > < property name ="serviceFactory" ref ="xfire.annotationServiceFactory" /> </ bean > < bean id ="synchronizserviceBean" class ="com.futuresoftware.webservices.SynchronizServiceImpl" />
浠ヤ笂鏄熀浜庢敞瑙f柟寮忕殑閰嶇疆鍏蜂綋閰嶇疆鍙弬鑰?br />http://xfire.codehaus.org/Advanced+Configuration ]]>浣跨敤CXF鍙戝竷鍜岃皟鐢╳ebservice涔婬elloWorld鍏ラ棬 http://www.tkk7.com/sxyx2008/archive/2010/09/15/332058.html闆北椋為箘 闆北椋為箘 Wed, 15 Sep 2010 03:18:00 GMT http://www.tkk7.com/sxyx2008/archive/2010/09/15/332058.html http://www.tkk7.com/sxyx2008/comments/332058.html http://www.tkk7.com/sxyx2008/archive/2010/09/15/332058.html#Feedback 7 http://www.tkk7.com/sxyx2008/comments/commentRss/332058.html http://www.tkk7.com/sxyx2008/services/trackbacks/332058.html 渚濊禆鐨凧AR
cxf-2.2.10.jar
jetty-6.1.21.jar
jetty-util-6.1.21.jar
servlet-2_5-api.jar
wsdl4j-1.6.2.jar
XmlSchema-1.4.5.jar
鍒涘緩涓涓櫘閫氱殑Java宸ョ▼鍗沖彲
鍒涘緩webservice鎺ュ彛
package com.cxf.interfaces;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public interface HelloWorldServiceInf {
String sayHello(@WebParam(name = " username " ) String username);
}
鍙戝竷鍜岃皟鐢╳ebservice
鏂規硶涓
鍙戝竷webservice
package com.cxf.impl;
import javax.jws.WebService;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import com.cxf.interfaces.HelloWorldServiceInf;
@WebService(endpointInterface = " com.cxf.interfaces.HelloWorldServiceInf " ,serviceName = " helloWorldService " )
public class Server implements HelloWorldServiceInf {
public String sayHello(String username) {
return " Hello, " + username;
}
public static void main(String[] args) {
Server impl = new Server();
JaxWsServerFactoryBean factoryBean = new JaxWsServerFactoryBean();
factoryBean.setAddress( " http://localhost:9000/hello " );
factoryBean.setServiceClass(HelloWorldServiceInf. class );
factoryBean.setServiceBean(impl);
factoryBean.getInInterceptors().add( new LoggingInInterceptor());
factoryBean.getOutInterceptors().add( new LoggingOutInterceptor());
factoryBean.create();
}
}
wsdl鎻忚堪鏂囦歡
<? xml version="1.0" ?>
- < wsdl:definitions name ="HelloWorldServiceInfService" targetNamespace ="http://interfaces.cxf.com/" xmlns:ns1 ="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap ="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns ="http://interfaces.cxf.com/" xmlns:wsdl ="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" >
- < wsdl:types >
- < xsd:schema attributeFormDefault ="unqualified" elementFormDefault ="unqualified" targetNamespace ="http://interfaces.cxf.com/" xmlns:tns ="http://interfaces.cxf.com/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" >
< xsd:element name ="sayHello" type ="tns:sayHello" />
- < xsd:complexType name ="sayHello" >
- < xsd:sequence >
< xsd:element minOccurs ="0" name ="username" type ="xsd:string" />
</ xsd:sequence >
</ xsd:complexType >
< xsd:element name ="sayHelloResponse" type ="tns:sayHelloResponse" />
- < xsd:complexType name ="sayHelloResponse" >
- < xsd:sequence >
< xsd:element minOccurs ="0" name ="return" type ="xsd:string" />
</ xsd:sequence >
</ xsd:complexType >
</ xsd:schema >
</ wsdl:types >
- < wsdl:message name ="sayHelloResponse" >
< wsdl:part element ="tns:sayHelloResponse" name ="parameters" />
</ wsdl:message >
- < wsdl:message name ="sayHello" >
< wsdl:part element ="tns:sayHello" name ="parameters" />
</ wsdl:message >
- < wsdl:portType name ="HelloWorldServiceInf" >
- < wsdl:operation name ="sayHello" >
< wsdl:input message ="tns:sayHello" name ="sayHello" />
< wsdl:output message ="tns:sayHelloResponse" name ="sayHelloResponse" />
</ wsdl:operation >
</ wsdl:portType >
- < wsdl:binding name ="HelloWorldServiceInfServiceSoapBinding" type ="tns:HelloWorldServiceInf" >
< soap:binding style ="document" transport ="http://schemas.xmlsoap.org/soap/http" />
- < wsdl:operation name ="sayHello" >
< soap:operation soapAction ="" style ="document" />
- < wsdl:input name ="sayHello" >
< soap:body use ="literal" />
</ wsdl:input >
- < wsdl:output name ="sayHelloResponse" >
< soap:body use ="literal" />
</ wsdl:output >
</ wsdl:operation >
</ wsdl:binding >
- < wsdl:service name ="HelloWorldServiceInfService" >
- < wsdl:port binding ="tns:HelloWorldServiceInfServiceSoapBinding" name ="HelloWorldServiceInfPort" >
< soap:address location ="http://localhost:9000/hello" />
</ wsdl:port >
</ wsdl:service >
</ wsdl:definitions >
瀹㈡埛绔皟鐢?br />
package com.cxf.client;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import com.cxf.interfaces.HelloWorldServiceInf;
public class Client {
public static void main(String[] args) {
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
factoryBean.getInInterceptors().add( new LoggingInInterceptor());
factoryBean.getOutInterceptors().add( new LoggingOutInterceptor());
factoryBean.setServiceClass(HelloWorldServiceInf. class );
factoryBean.setAddress( " http://localhost:9000/hello " );
HelloWorldServiceInf impl = (HelloWorldServiceInf) factoryBean.create();
System.out.println(impl.sayHello( " 寮犱笁 " ));
}
}
鏂規硶浜?br />
鍙戝竷webservice
package com.cxf.impl;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
import com.cxf.interfaces.HelloWorldServiceInf;
@WebService(endpointInterface = " com.cxf.interfaces.HelloWorldServiceInf " ,serviceName = " helloWorldService " )
public class Server implements HelloWorldServiceInf {
public String sayHello(String username) {
return " Hello, " + username;
}
public static void main(String[] args) {
Server impl = new Server();
String address = " http://localhost:9000/hello " ;
Endpoint.publish(address, impl);
}
}
wsdl鏂囦歡
<? xml version="1.0" ?>
- < wsdl:definitions name ="helloWorldService" targetNamespace ="http://impl.cxf.com/" xmlns:ns1 ="http://interfaces.cxf.com/" xmlns:ns2 ="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap ="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns ="http://impl.cxf.com/" xmlns:wsdl ="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" >
< wsdl:import location ="http://localhost:9000/hello?wsdl=HelloWorldServiceInf.wsdl" namespace ="http://interfaces.cxf.com/" />
- < wsdl:binding name ="helloWorldServiceSoapBinding" type ="ns1:HelloWorldServiceInf" >
< soap:binding style ="document" transport ="http://schemas.xmlsoap.org/soap/http" />
- < wsdl:operation name ="sayHello" >
< soap:operation soapAction ="" style ="document" />
- < wsdl:input name ="sayHello" >
< soap:body use ="literal" />
</ wsdl:input >
- < wsdl:output name ="sayHelloResponse" >
< soap:body use ="literal" />
</ wsdl:output >
</ wsdl:operation >
</ wsdl:binding >
- < wsdl:service name ="helloWorldService" >
- < wsdl:port binding ="tns:helloWorldServiceSoapBinding" name ="ServerPort" >
< soap:address location ="http://localhost:9000/hello" />
</ wsdl:port >
</ wsdl:service >
</ wsdl:definitions >
瀹㈡埛绔皟鐢?br />
package com.cxf.client;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;
import com.cxf.interfaces.HelloWorldServiceInf;
public class Client {
// 娉ㄦ剰錛氭澶刪ttp: // interfaces.cxf.com/ 鏉ユ簮浜巜sdl鏂囦歡涓璶amespace <wsdl:import location=" http://localhost :9000/hello?wsdl=HelloWorldServiceInf.wsdl" namespace=" http://interfaces.cxf.com/ " />
private static final QName SERVICE_NAME = new QName( " http://interfaces.cxf.com/ " , " HelloWorldServiceInf " ); // HelloWorldServiceInf鎺ュ彛綾葷殑鍚嶇О
private static final QName PORT_NAME = new QName( " http://interfaces.cxf.com/ " , " HelloWorldServiceInfPort " ); // HelloWorldServiceInfPort 鎺ュ彛綾葷殑鍚嶇О+Port
public static void main(String[] args) {
String endPointAddress = " http://localhost:9000/hello " ;
Service service = Service.create(SERVICE_NAME);
service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endPointAddress);
HelloWorldServiceInf inf = service.getPort(HelloWorldServiceInf. class );
System.out.println(inf.sayHello( " 寮犱笁 " ));
}
}
CXF鏍規嵁wsdl鏂囦歡鍔ㄦ佽皟鐢╓ebService
package com.cxf.client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
public class ClientFromWsdl {
public static void main(String[] args) throws Exception{
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
org.apache.cxf.endpoint.Client client = dcf.createClient( " http://localhost:9000/hello?wsdl " );
// sayHello 涓烘帴鍙d腑瀹氫箟鐨勬柟娉曞悕縐?nbsp; 寮犱笁涓轟紶閫掔殑鍙傛暟 榪斿洖涓涓狾bject鏁扮粍
Object[] objects = client.invoke( " sayHello " , " 寮犱笁 " );
// 杈撳嚭璋冪敤緇撴灉
System.out.println(objects[ 0 ].toString());
}
}
涓嬭澆宸ョ▼浠g爜
]]>Apache涔婥XF HelloWorld鍏ラ棬 http://www.tkk7.com/sxyx2008/archive/2010/09/10/331613.html闆北椋為箘 闆北椋為箘 Fri, 10 Sep 2010 01:51:00 GMT http://www.tkk7.com/sxyx2008/archive/2010/09/10/331613.html http://www.tkk7.com/sxyx2008/comments/331613.html http://www.tkk7.com/sxyx2008/archive/2010/09/10/331613.html#Feedback 7 http://www.tkk7.com/sxyx2008/comments/commentRss/331613.html http://www.tkk7.com/sxyx2008/services/trackbacks/331613.html Felix銆?a title="Service Framework" >CXF絳夈?a title="OSGi Framework and components." >Felix鏄疉pache瀵筄SGI R4瑙勮寖鐨勪竴涓交閲忕駭瀹炵幇銆備綘浣跨敤eclipse鍒涘緩鐨刾lugin(鎻掍歡)宸ョ▼閮芥槸鍙互姝e父榪愯鍦?a title="OSGi Framework and components." >Felix涓殑銆傚墠鎻愭槸浣犲垱寤篵undle鐨勬椂鍊欓夋嫨鏍囧噯閫夐」榪欎竴鏍忋傚ソ浜嗘湰綃囨枃绔犱富瑕佹槸鐢ㄦ潵浠嬬粛CXF 鐨勶紝鍏充簬Felix 灝變笉鍐嶆繁鍏ヨ璁轟簡錛屾湁鍏磋叮鐨勫彲浠ヨ嚜琛屽幓鐮旂┒涓嬨?br />
鍏充簬CXF 錛屼笉鍋氳繃澶氱殑瑙i噴銆傚畼鏂圭殑瑙i噴宸茬粡澶熸竻妤氫簡銆傜浉淇″ぇ瀹朵箣鍓嶅湪Java鐜涓嬪垱寤簑ebservice紼嬪簭澶у鏁伴夋嫨鐨勬槸xfire榪欎釜妗嗘灦鍚с傚悗鏉ュソ澶氫笓瀹朵笉鍐嶆帹鑽愯繖涓笢涓溿傞兘寤鴻浣跨敤CXF 銆傚湪鏈帴瑙﹀埌CXF 涔嬪墠錛屾湰浜轟竴鍚戝枩嬈㈢敤xfire榪欎釜妗嗘灦鏉ュ垱寤鴻嚜宸辯殑webservice銆傝繕浜嗭紝搴熻瘽涓嶅璇達紝鍏堟潵鐪嬩釜HelloWorld鐨勭▼搴忥紝鏁欏ぇ瀹跺揩閫熶笂鎵嬨?br />
棣栧厛鍘籄pache緗戠珯涓嬭澆CXF 鎵闇瑕佺殑jar錛屾垜鏈漢涓嬭澆鏄?a class="external-link" rel="nofollow">apache-cxf-2.2.10.zip榪欎釜鍖呫傝繖閲屼負浜嗘柟渚挎湡闂村垱寤轟竴涓猨ava宸ョ▼銆傚晩錛焜ava宸ョ▼錛岃繖鏈夌偣涓嶅彲鎬濊浜嗭紝涓嶆槸瑕佸垱寤簑ebservice鍚楋紵鎬庝箞鏄痡ava宸ョ▼錛熷懙鍛碉紝榪欓噷灝辨槸CXF 鐨勭濂囦箣澶?
娣誨姞蹇呴』鐨刯ar鍒頒綘鐨刢lasspath璺緞涓嬨?br />
cxf-2.2.10.jar 鏍稿績jar
jetty-6.1.21.jar 鐢ㄦ潵鍚姩jetty鏈嶅姟鍣?br />
jetty-util-6.1.21.jar jetty杈呭姪宸ュ叿
wsdl4j-1.6.2.jar wsdl鏀寔宸ュ叿
XmlSchema-1.4.5.jar
榪欏氨鏄?a title="Service Framework" >CXF鐨勬渶灝忛厤緗紝浠ヤ笂jar鍖呯己涓涓嶅彲
鍒涘緩涓涓帴鍙?br />
package com.cxf.service;
public interface HelloWorldCxfService {
String sayHello(String username);
}
鍒涘緩璇ユ帴鍙g殑瀹炵幇綾?br />
package com.cxf.service;
public class HelloWorldCxfServiceImpl implements HelloWorldCxfService {
public String sayHello(String username) {
return " Hello, " + username;
}
}
鍙戝竷webservice
package com.cxf.server;
import org.apache.cxf.frontend.ServerFactoryBean;
import com.cxf.service.HelloWorldCxfService;
import com.cxf.service.HelloWorldCxfServiceImpl;
public class Server {
public static void main(String[] args){
HelloWorldCxfServiceImpl worldCxfServiceImpl = new HelloWorldCxfServiceImpl();
ServerFactoryBean factoryBean = new ServerFactoryBean();
factoryBean.setAddress( " http://localhost:8080/hello " );
factoryBean.setServiceClass(HelloWorldCxfService. class );
factoryBean.setServiceBean(worldCxfServiceImpl);
factoryBean.create();
}
}
榪愯Server錛屾敞鎰忎笉瑕佸叧闂紝鍦ㄦ帶鍒跺彴浼氭墦鍗板涓嬩俊鎭細
2010-9-10 9:44:16 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
淇℃伅: Creating Service {http://service.cxf.com/}HelloWorldCxfService from class com.cxf.service.HelloWorldCxfService
2010-9-10 9:44:16 org.apache.cxf.endpoint.ServerImpl initDestination
淇℃伅: Setting the server's publish address to be http://localhost:8080/hello
2010-09-10 09:44:16.296::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
2010-09-10 09:44:16.296::INFO: jetty-6.1.21
2010-09-10 09:44:16.390::INFO: Started SelectChannelConnector@localhost:8080
瀹㈡埛绔皟鐢?br />
package com.cxf.server;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import com.cxf.service.HelloWorldCxfService;
public class Client {
public static void main(String[] args) {
ClientProxyFactoryBean factoryBean = new ClientProxyFactoryBean();
factoryBean.setAddress( " http://localhost:8080/hello " );
factoryBean.setServiceClass(HelloWorldCxfService. class );
HelloWorldCxfService worldCxfService = (HelloWorldCxfService) factoryBean.create();
System.out.println(worldCxfService.sayHello( " 寮犱笁 " ));
}
}
榪愯Client浠g爜錛屾帶鍒跺彴鎵撳嵃濡備笅淇℃伅錛?br />
2010-9-10 9:46:58 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
淇℃伅: Creating Service {http://service.cxf.com/}HelloWorldCxfService from class com.cxf.service.HelloWorldCxfService
Hello,寮犱笁
鍒版錛屾垜浠殑webservice錛屽凡緇忔垚鍔熻皟鐢ㄤ簡銆傚ぇ瀹舵槸涓嶆槸榪笉鍙婂緟鐨勬兂鐪嬩笅wsdl鏂囦歡鏄暐鏍風殑鍛紵
鍦ㄦ祻瑙堝櫒涓緭鍏?a href="http://localhost:8080/hello?wsdl">http://localhost:8080/hello?wsdl錛屽嵆鍙湅鍒皐sdl鏂囦歡浜嗐傚叾涓?a href="http://localhost:8080/hello?wsdl">http://localhost:8080/hello閮ㄥ垎涓轟唬鐮侀噷鎸囧畾鐨凙ddress銆?br />
wsdl鏂囦歡淇℃伅錛?br />
<? xml version="1.0" ?>
- < wsdl:definitions name ="HelloWorldCxfService" targetNamespace ="http://service.cxf.com/" xmlns:ns1 ="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap ="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns ="http://service.cxf.com/" xmlns:wsdl ="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" >
- < wsdl:types >
- < xsd:schema attributeFormDefault ="unqualified" elementFormDefault ="qualified" targetNamespace ="http://service.cxf.com/" xmlns:tns ="http://service.cxf.com/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" >
< xsd:element name ="sayHello" type ="tns:sayHello" />
- < xsd:complexType name ="sayHello" >
- < xsd:sequence >
< xsd:element minOccurs ="0" name ="arg0" type ="xsd:string" />
</ xsd:sequence >
</ xsd:complexType >
< xsd:element name ="sayHelloResponse" type ="tns:sayHelloResponse" />
- < xsd:complexType name ="sayHelloResponse" >
- < xsd:sequence >
< xsd:element minOccurs ="0" name ="return" type ="xsd:string" />
</ xsd:sequence >
</ xsd:complexType >
</ xsd:schema >
</ wsdl:types >
- < wsdl:message name ="sayHelloResponse" >
< wsdl:part element ="tns:sayHelloResponse" name ="parameters" />
</ wsdl:message >
- < wsdl:message name ="sayHello" >
< wsdl:part element ="tns:sayHello" name ="parameters" />
</ wsdl:message >
- < wsdl:portType name ="HelloWorldCxfServicePortType" >
- < wsdl:operation name ="sayHello" >
< wsdl:input message ="tns:sayHello" name ="sayHello" />
< wsdl:output message ="tns:sayHelloResponse" name ="sayHelloResponse" />
</ wsdl:operation >
</ wsdl:portType >
- < wsdl:binding name ="HelloWorldCxfServiceSoapBinding" type ="tns:HelloWorldCxfServicePortType" >
< soap:binding style ="document" transport ="http://schemas.xmlsoap.org/soap/http" />
- < wsdl:operation name ="sayHello" >
< soap:operation soapAction ="" style ="document" />
- < wsdl:input name ="sayHello" >
< soap:body use ="literal" />
</ wsdl:input >
- < wsdl:output name ="sayHelloResponse" >
< soap:body use ="literal" />
</ wsdl:output >
</ wsdl:operation >
</ wsdl:binding >
- < wsdl:service name ="HelloWorldCxfService" >
- < wsdl:port binding ="tns:HelloWorldCxfServiceSoapBinding" name ="HelloWorldCxfServicePort" >
< soap:address location ="http://localhost:8080/hello" />
</ wsdl:port >
</ wsdl:service >
</ wsdl:definitions >
]]> Hessian涓涓交閲忕駭鐨剅emoting on http宸ュ叿 http://www.tkk7.com/sxyx2008/archive/2010/09/01/330493.html闆北椋為箘 闆北椋為箘 Wed, 01 Sep 2010 01:24:00 GMT http://www.tkk7.com/sxyx2008/archive/2010/09/01/330493.html http://www.tkk7.com/sxyx2008/comments/330493.html http://www.tkk7.com/sxyx2008/archive/2010/09/01/330493.html#Feedback 2 http://www.tkk7.com/sxyx2008/comments/commentRss/330493.html http://www.tkk7.com/sxyx2008/services/trackbacks/330493.html
Hessian鏄竴涓交閲忕駭鐨剅emoting on http宸ュ叿錛屼嬌鐢ㄧ畝鍗曠殑鏂規硶鎻愪緵浜哛MI鐨勫姛鑳? 鐩告瘮WebService錛孒essian鏇寸畝鍗曘佸揩鎹楓傞噰鐢ㄧ殑鏄簩榪涘埗RPC鍗忚錛屽洜涓洪噰鐢ㄧ殑鏄簩榪涘埗鍗忚錛屾墍浠ュ畠寰堥傚悎浜庡彂閫佷簩榪涘埗鏁版嵁.
寮鍏冪櫨縐戣繖鏍蜂粙緇嶅畠錛?br />
Hessian鏄疌aucho寮鍙戠殑涓縐嶄簩榪涘埗Web Service鍗忚銆傞噰鍙朅pache璁稿彲鍗忚.
The Hessian binary web service protocol makes web services usable without requiring a large framework, and without learning yet another alphabet soup of protocols. Because it is a binary protocol, it is well-suited to sending binary data without any need to extend the protocol with attachments.
Hessian鏄竴涓簿蹇冩墦閫犵殑Web Service瀹炵幇錛屽畠鏀寔Java銆丆#銆丷uby銆丳HP鍜孭ython錛屽張鏂板浜咥ctionScript銆備嬌鐢ˋdobe Flash鍜孎lex鐨凴IA寮鍙戣呬滑鍦ㄩ渶瑕侀泦鎴愪笟鍔℃湇鍔$殑鏃跺欙紝Hessian搴旇鏄竴涓笉閿欑殑閫夋嫨銆?br />
鏃㈢劧閮藉畠榪欎箞紲炲錛岄偅涔堟垜浠氨鍙堣鍘昏璇嗕笅榪欎綅鏂版湅鍙嬨?br />
欏圭洰涓婚〉錛?a >http://hessian.caucho.com/
寤鴻澶у浠旂粏璁ょ湡闃呰涓嬪畼鏂圭綉绔欍?br />
榪樻槸鍏堜粠helloworld鐫鎵嬨?br />
瀹冨彧闇瑕佷竴涓猨ar鍖呭嵆鍙?br />
鍘誨畼鏂逛笅杞介傜敤浜巎ava鐜涓嬬殑jar鍖呮敮鎸?br />
hessian-4.0.7.jar hessian-4.0.7-src.jar
鍒涘緩web宸ョ▼銆?br />
緙栧啓鎺ュ彛錛?br />
package com.hessian.demo.inf;
public interface HelloWorld {
public String sayHelloWorld(String name);
}
緙栧啓瀹炵幇綾伙細
package com.hessian.demo.impl;
import com.hessian.demo.inf.HelloWorld;
public class HelloWorldImpl implements HelloWorld {
public String sayHelloWorld(String name) {
return " Hello , " + name + " Welcome to use hessian ! " ;
}
}
閰嶇疆web.xml
<? xml version="1.0" encoding="UTF-8" ?>
< web-app version ="2.5"
xmlns ="http://java.sun.com/xml/ns/javaee"
xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation ="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" >
< servlet >
< servlet-name > helloworld </ servlet-name >
< servlet-class > com.caucho.hessian.server.HessianServlet </ servlet-class >
< init-param >
<!-- 姝ゅhom-api涓哄浐瀹氬啓娉?涓篐essianServlet涓畾涔夌殑鍙傛暟璇︾粏鍙弬鑰僅essianServlet -->
<!-- 鍏跺間負鎺ュ彛鐨勭被闀垮悕鍗?nbsp;鍖呭悕+綾誨悕 -->
< param-name > home-api </ param-name >
< param-value > com.hessian.demo.inf.HelloWorld </ param-value >
</ init-param >
< init-param >
<!-- 姝ゅhom-class涓哄浐瀹氬啓娉?涓篐essianServlet涓畾涔夌殑鍙傛暟璇︾粏鍙弬鑰僅essianServlet -->
<!-- 鍏跺間負瀹炵幇綾葷殑綾婚暱鍚嶅嵆 鍖呭悕+綾誨悕 -->
< param-name > home-class </ param-name >
< param-value > com.hessian.demo.impl.HelloWorldImpl </ param-value >
</ init-param >
</ servlet >
< servlet-mapping >
< servlet-name > helloworld </ servlet-name >
< url-pattern > /helloworld </ url-pattern >
</ servlet-mapping >
</ web-app >
姝ゅweb.xml涓厤緗殑鍒濆鍖栧弬鏁板叿浣撳彲鍙傝僅essianServlet鐨刬nit()鏂規硶
public void init(ServletConfig config)
throws ServletException
{
super .init(config);
try {
if (_homeImpl != null ) {
}
else if (getInitParameter( " home-class " ) != null ) {
String className = getInitParameter( " home-class " );
Class homeClass = loadClass(className);
_homeImpl = homeClass.newInstance();
init(_homeImpl);
}
else if (getInitParameter( " service-class " ) != null ) {
String className = getInitParameter( " service-class " );
Class homeClass = loadClass(className);
_homeImpl = homeClass.newInstance();
init(_homeImpl);
}
else {
if (getClass().equals(HessianServlet. class ))
throw new ServletException( " server must extend HessianServlet " );
_homeImpl = this ;
}
if (_homeAPI != null ) {
}
else if (getInitParameter( " home-api " ) != null ) {
String className = getInitParameter( " home-api " );
_homeAPI = loadClass(className);
}
else if (getInitParameter( " api-class " ) != null ) {
String className = getInitParameter( " api-class " );
_homeAPI = loadClass(className);
}
else if (_homeImpl != null ) {
_homeAPI = findRemoteAPI(_homeImpl.getClass());
if (_homeAPI == null )
_homeAPI = _homeImpl.getClass();
}
if (_objectImpl != null ) {
}
else if (getInitParameter( " object-class " ) != null ) {
String className = getInitParameter( " object-class " );
Class objectClass = loadClass(className);
_objectImpl = objectClass.newInstance();
init(_objectImpl);
}
if (_objectAPI != null ) {
}
else if (getInitParameter( " object-api " ) != null ) {
String className = getInitParameter( " object-api " );
_objectAPI = loadClass(className);
}
else if (_objectImpl != null )
_objectAPI = _objectImpl.getClass();
_homeSkeleton = new HessianSkeleton(_homeImpl, _homeAPI);
if (_objectAPI != null )
_homeSkeleton.setObjectClass(_objectAPI);
if (_objectImpl != null ) {
_objectSkeleton = new HessianSkeleton(_objectImpl, _objectAPI);
_objectSkeleton.setHomeClass(_homeAPI);
}
else
_objectSkeleton = _homeSkeleton;
if ( " true " .equals(getInitParameter( " debug " )))
_isDebug = true ;
if ( " false " .equals(getInitParameter( " send-collection-type " )))
setSendCollectionType( false );
} catch (ServletException e) {
throw e;
} catch (Exception e) {
throw new ServletException(e);
}
}
緙栧啓瀹㈡埛绔祴璇曚唬鐮侊細
package com.hessian.demo.client;
import com.caucho.hessian.client.HessianProxyFactory;
import com.hessian.demo.inf.HelloWorld;
public class HelloWorldClient {
public static void main(String[] args) throws Exception{
// servlet鐨勮闂礬寰?/span>
String url = " http://localhost:8080/hessian/helloworld " ;
// 鍒涘緩涓HessianProxyFactory瀵硅薄,鐢ㄦ硶涓巟fire寰堝儚
HessianProxyFactory proxyFactory = new HessianProxyFactory();
// 鑾峰緱HelloWorld鐨勫疄渚?浼犻掍袱涓弬鏁頒緷嬈′負:鎺ュ彛.class,璇ervlet鐨勮闂礬寰?/span>
HelloWorld helloWorld = (HelloWorld) proxyFactory.create(HelloWorld. class , url);
System.out.println(helloWorld.sayHelloWorld( " 寮犱笁 " ));
}
}
鏁堟灉鍥撅細
]]> 杞繪澗浣跨敤xfire緙栧啓榪斿洖鍊間負list鐨剋ebservice鏈嶅姟 http://www.tkk7.com/sxyx2008/archive/2010/07/14/326063.html闆北椋為箘 闆北椋為箘 Wed, 14 Jul 2010 03:05:00 GMT http://www.tkk7.com/sxyx2008/archive/2010/07/14/326063.html http://www.tkk7.com/sxyx2008/comments/326063.html http://www.tkk7.com/sxyx2008/archive/2010/07/14/326063.html#Feedback 2 http://www.tkk7.com/sxyx2008/comments/commentRss/326063.html http://www.tkk7.com/sxyx2008/services/trackbacks/326063.html 闃呰鍏ㄦ枃 ]]> 鍦╔Fire涓嬌鐢ㄥ弸濂界殑鎺ュ彛鍙傛暟鍚?/title> http://www.tkk7.com/sxyx2008/archive/2010/06/07/322945.html闆北椋為箘 闆北椋為箘 Mon, 07 Jun 2010 02:13:00 GMT http://www.tkk7.com/sxyx2008/archive/2010/06/07/322945.html http://www.tkk7.com/sxyx2008/comments/322945.html http://www.tkk7.com/sxyx2008/archive/2010/06/07/322945.html#Feedback 5 http://www.tkk7.com/sxyx2008/comments/commentRss/322945.html http://www.tkk7.com/sxyx2008/services/trackbacks/322945.html 榪戞湡鍦ㄥ仛澶氫釜鏁版嵁搴撳簲鐢ㄤ氦浜掔郴緇燂紝鍏朵腑鏁版嵁浜や簰閲囩敤浜唚ebservice鐨勬柟寮忥紝璇村埌webservice欏圭洰涓笉寰椾笉鐢ㄥ埌xfire榪欎釜妗嗘灦錛屾湁浜嗗畠鎴戜滑鍑犱箮涓嶇敤鍐欎唬鐮侊紝灝卞彲浠ュ緢蹇熺殑鍒涘緩鑷繁鐨剋ebservice
浣嗗湪浣跨敤鐨勮繃紼嬩腑閬囧埌涓浜涘皬緇嗚妭涓婄殑闂錛?br />
灝辨槸鍦ㄥ啓webservice鎺ュ彛鐨勬椂鍊欙紝閫氬父澶у閮戒細瀹氫箟涓浜涙柟娉曠殑鍙傛暟錛屼絾鏄牴鎹畑fire鐨剎sd鏂囦歡鎻忚堪鎯呭喌鏉ョ湅錛屽畠鐨勫弬鏁板懡鍚嶉氬父鏄痠n0,in1絳夌瓑錛屼竴嬈$被鎺紝寰堜笉鍙嬪ソ銆?br />
鎸夌収XFire-Spring鐢熸垚鐨刉SDL鏂囨。涓帴鍙e弬鏁板悕鏋佷笉鍙嬪ソ錛?
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string" />
<xsd:element maxOccurs="1" minOccurs="1" name="in1" nillable="true" type="xsd:string" />
<xsd:element maxOccurs="1" minOccurs="1" name="in2" nillable="true" type="xsd:string" />
<xsd:element maxOccurs="1" minOccurs="1" name="in3" nillable="true" type="xsd:string" />
澶у閮界煡閬擄紝浣滀負涓涓悎鏍肩殑紼嬪簭鍛橈紝鍦ㄥ啓浠g爜鐨勬椂鍊欐柟娉曞弬鏁板懡鍚嶄粈涔堢殑瑕佸敖閲忓仛鍒拌鍚嶇煡鎰忥紝鏄劇劧浠栬繖縐嶉鏍兼槸涓嶉傚悎鎴戜滑鐨勩傚洜姝ゆ垜浠鍒涙柊錛岃繖灝辨湁浜嗕笅鏂囥?br />
濡備綍鑷姩灝唅n0涓巌n1鏇挎崲鎴愬弸濂界殑鍙傛暟鍚嶇О鍛??
鏂規硶濡備笅錛?
1.鍦ㄤ笌鎺ュ彛綾誨悓涓鍖呬笅闈㈠緩涓涓帴鍙g被鍚嶇О.aegis.xml 鐨勬枃浠訛紝鍐呭濡備笅
<?xml version="1.0" encoding="UTF-8"?>
<mappings>
<mapping>
<method name="settleMessage">
<parameter index="0" mappedName="id" />
<parameter index="1" mappedName="username" />
<parameter index="2" mappedName="pass" />
</method>
</mapping>
</mappings>
娉ㄦ剰錛?br />
name涓烘帴鍙d腑鏂規硶鍚嶇О
index涓烘柟娉曚腑絎竴涓弬鏁?
mappedName涓烘浛鎹㈠悗鐨勫悕縐?
璇ML鏂囦歡鐨勪綅緗竴瀹氳涓庝綘瀹氫箟鐨剋ebservice鐨勬帴鍙d綅浜庡悓涓涓洰褰曪紙鍖呬笅錛夊惁鍒欎笉璧蜂綔鐢?/p>
]]>
主站蜘蛛池模板:
又黄又爽又成人免费视频 |
无码成A毛片免费 |
青柠影视在线观看免费 |
亚洲免费在线视频 |
国产va精品免费观看 |
热久久精品免费视频 |
中文字幕第一页亚洲 |
亚洲av日韩av高潮潮喷无码 |
亚洲日本香蕉视频 |
国产91成人精品亚洲精品 |
中国内地毛片免费高清 |
18禁成人网站免费观看 |
日韩免费无码一区二区视频 |
MM131亚洲国产美女久久 |
久久久亚洲欧洲日产国码二区 |
亚洲国产综合精品中文第一 |
一级毛片a免费播放王色电影 |
99热精品在线免费观看 |
女人18毛片特级一级免费视频 |
日韩亚洲变态另类中文 |
亚洲大香伊人蕉在人依线 |
美女被爆羞羞网站免费
|
亚洲国产成人精品久久 |
蜜芽亚洲av无码一区二区三区
|
欧洲乱码伦视频免费国产 |
久操视频在线免费观看 |
女人被男人躁的女爽免费视频 |
亚洲线精品一区二区三区 |
国产日本亚洲一区二区三区 |
一个人看的www免费高清 |
色片在线免费观看 |
国产亚洲精品自在线观看 |
色婷五月综激情亚洲综合 |
久久国产福利免费 |
成人激情免费视频 |
亚洲av伊人久久综合密臀性色
|
最近中文字幕免费mv视频7 |
久久亚洲国产精品五月天婷 |
67194在线午夜亚洲 |
国产免费一区二区视频 |
日韩免费视频网站 |