锘??xml version="1.0" encoding="utf-8" standalone="yes"?>av在线成人,国产精品一区久久久久,永久免费精品视频http://www.aygfsteel.com/javalinjx/category/51940.html鍏蟲敞鎶鏈紝鐑埍鐢熸椿zh-cnSun, 05 Aug 2012 07:45:31 GMTSun, 05 Aug 2012 07:45:31 GMT60鍩轟簬Axis銆乆Fire銆丆XF鐨剋ebservice 瀹㈡埛绔?/title><link>http://www.aygfsteel.com/javalinjx/archive/2012/06/11/380539.html</link><dc:creator>javalinjx</dc:creator><author>javalinjx</author><pubDate>Mon, 11 Jun 2012 14:32:00 GMT</pubDate><guid>http://www.aygfsteel.com/javalinjx/archive/2012/06/11/380539.html</guid><wfw:comment>http://www.aygfsteel.com/javalinjx/comments/380539.html</wfw:comment><comments>http://www.aygfsteel.com/javalinjx/archive/2012/06/11/380539.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javalinjx/comments/commentRss/380539.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javalinjx/services/trackbacks/380539.html</trackback:ping><description><![CDATA[<div><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">Axis瀹㈡埛绔皟鐢?webservice:</p><div class="wmqeeuq" id="" style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; background-color: #ffffff; width: 679px; margin-left: 9px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; word-break: break-all; word-wrap: break-word; line-height: 25px; text-align: left; "><ol start="1" style="font-size: 1em; line-height: 1.4em; margin-left: 0px; padding-top: 2px; padding-bottom: 2px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; color: #2b91af; "><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">URL endpointURL = <span style="color: #7f0055; ">new</span> URL("http://localhost:8080/webservice/HelloService");  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            String requestText = "javalinjx"  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            Service service = <span style="color: #7f0055; ">new</span> Service();  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            Call call = (Call) service.createCall();  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            call.setTargetEndpointAddress(endpointURL);  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            call.setOperationName("sayHello");  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            call.addParameter("xml", XMLType.XSD_STRING, ParameterMode.IN);  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            call.setReturnClass(String.<span style="color: #7f0055; ">class</span>);  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            call.setReturnType(XMLType.XSD_STRING);// 璁劇疆榪斿洖綾誨瀷  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            Object [] obj = <span style="color: #7f0055; ">new</span> Object[]{ requestText };  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">            String result = (String) call.invoke(obj);  </li></ol></div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">XFire瀹㈡埛绔皟鐢?錛?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "> </p><div class="wmqeeuq" id="" style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; background-color: #ffffff; width: 679px; margin-left: 9px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; word-break: break-all; word-wrap: break-word; line-height: 25px; text-align: left; "><ol start="1" style="font-size: 1em; line-height: 1.4em; margin-left: 0px; padding-top: 2px; padding-bottom: 2px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; color: #2b91af; "><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: #7f0055; ">public</span> <span style="color: #7f0055; ">void</span> call() <span style="color: #7f0055; ">throws</span> Exception {  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">        Service service = <span style="color: #7f0055; ">new</span> ObjectServiceFactory().create(HelloService.<span style="color: #7f0055; ">class</span>);  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">        XFireProxyFactory factory = <span style="color: #7f0055; ">new</span> XFireProxyFactory(XFireFactory.newInstance().getXFire());  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">        String url = "http://localhost:8080/webservice/HelloService";  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">        SmsService it = (SmsService)factory.create(service, url);  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">        <span style="color: #7f0055; ">int</span> b = it.sayHello("javalinjx");  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">    }  </li></ol></div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "> </p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">CXF瀹㈡埛绔皟鐢細</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">    </p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">    JaxWsProxyFactoryBean factory1 = new JaxWsProxyFactoryBean();</p><div class="wmqeeuq" id="" style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; background-color: #ffffff; width: 679px; margin-left: 9px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; word-break: break-all; word-wrap: break-word; line-height: 25px; text-align: left; "><ol start="1" style="font-size: 1em; line-height: 1.4em; margin-left: 0px; padding-top: 2px; padding-bottom: 2px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; color: #2b91af; "><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">factory1.setServiceClass(UaAuthInterfaces.<span style="color: #7f0055; ">class</span>);  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">factory1.setAddress("http://localhost:8080/webservices/HelloService");  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">UaAuthInterfaces u = (UaAuthInterfaces) factory1.create();  </li><li style="margin-left: 38px; padding-right: 0px; font-size: 1em; border-left-width: 1px; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; ">              u.sayHello("javalinjx");  </li></ol></div></div></div><img src ="http://www.aygfsteel.com/javalinjx/aggbug/380539.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javalinjx/" target="_blank">javalinjx</a> 2012-06-11 22:32 <a href="http://www.aygfsteel.com/javalinjx/archive/2012/06/11/380539.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>webservice鏋勫緩http://www.aygfsteel.com/javalinjx/archive/2012/06/11/380538.htmljavalinjxjavalinjxMon, 11 Jun 2012 14:28:00 GMThttp://www.aygfsteel.com/javalinjx/archive/2012/06/11/380538.htmlhttp://www.aygfsteel.com/javalinjx/comments/380538.htmlhttp://www.aygfsteel.com/javalinjx/archive/2012/06/11/380538.html#Feedback0http://www.aygfsteel.com/javalinjx/comments/commentRss/380538.htmlhttp://www.aygfsteel.com/javalinjx/services/trackbacks/380538.html


欏圭洰闇瑕佸埗浣滅煭淇℃帴鍙f湇鍔$,浜庢槸鍒╃敤xfire鍜宻pring 緇撳悎,杞繪澗鏋勫緩webservice鏈嶅姟. 鍩烘湰鎬濊礬濡備笅:

 

1. 鍔犲叆鎵闇瑕佺被鍖?

activation-1.1.jar 

commons-codec-1.3

commons-httpclient-3.0

jaxen-1.1-beta-9

jdom-1.0

mail

stax-api-1.0.1

wsdl4j-1.6.1

xbean-spring-2.8

xfire-all-1.2.6

xfire-jsr181-api-1.0-M1

xml-apis-1.3.04

XmlSchema-1.4.2

2. 鍦╳eb.xml涓坊鍔犵浉鍏崇殑閰嶇疆鏂囦歡:

 

   <servlet>

        <servlet-name>xfire</servlet-name>

        <servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class>

    </servlet>

 

    <servlet-mapping>

        <servlet-name>xfire</servlet-name>

        <url-pattern>/webservice/*</url-pattern>

    </servlet-mapping>

3. 緙栧啓鏈嶅姟鎺ュ彛,瀹炵幇綾?

 

 

public interface SmsService {

 

    public int insertMessage(String paramStr);

 

}

 

 

 

public class SmsServiceImpl implements SmsService{

 

   public String   insertMessage (String name) {

......

   }

 

 

}

 

 

4. 鏈嶅姟鎺ュ彛鐨勯厤緗俊鎭?鍦╝pplicationContext-ws.xml鏂囦歡涓?

 

<bean id="SmsService" class="org.codehaus.xfire.spring.remoting.XFireExporter">

<property name="serviceFactory" ref="xfire.serviceFactory" />

 

<property name="xfire" ref="xfire" />

<property name="serviceBean" ref="smsBean" />

<property name="serviceClass" value="com.ailk.webservice.service.SmsService" />

<property name="name" value="SmsService" />

</bean>

 

鑷蟲,瀹屾垚浜嗘湇鍔$鐨勬瀯寤?

 

5.緙栧啓瀹㈡埛绔祴璇曟湇鍔℃帴鍙?鍏蜂綋瀹炵幇鐣?



javalinjx 2012-06-11 22:28 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 安达市| 大渡口区| 织金县| 江源县| 金乡县| 客服| 赤峰市| 手机| 巫溪县| 上虞市| 类乌齐县| 吉林省| 华坪县| 贵溪市| 贞丰县| 乡宁县| 博罗县| 广德县| 霍邱县| 舒兰市| 松原市| 和硕县| 康马县| 高州市| 林口县| 长治市| 咸宁市| 墨江| 城固县| 金寨县| 泸州市| 高平市| 社旗县| 大姚县| 滦平县| 南平市| 绥德县| 大荔县| 吴忠市| 大方县| 甘谷县|