??xml version="1.0" encoding="utf-8" standalone="yes"?>你懂的视频在线,91国拍精品国产粉嫩亚洲一区,国产精品videossex久久发布 http://www.aygfsteel.com/icewee/category/49042.htmlThere is nothing too difficult if you put your heart into it.zh-cnMon, 18 Jan 2016 06:43:27 GMTMon, 18 Jan 2016 06:43:27 GMT60tomcat安装为服务service.bat讄Q启动服务时出错Q提C?..特定代码0?http://www.aygfsteel.com/icewee/archive/2016/01/18/429098.htmlIceWeeIceWeeMon, 18 Jan 2016 05:43:00 GMThttp://www.aygfsteel.com/icewee/archive/2016/01/18/429098.htmlhttp://www.aygfsteel.com/icewee/comments/429098.htmlhttp://www.aygfsteel.com/icewee/archive/2016/01/18/429098.html#Feedback0http://www.aygfsteel.com/icewee/comments/commentRss/429098.htmlhttp://www.aygfsteel.com/icewee/services/trackbacks/429098.html

IceWee 2016-01-18 13:43 发表评论
]]>
Exception loading sessions from persistent storagehttp://www.aygfsteel.com/icewee/archive/2012/07/12/382853.htmlIceWeeIceWeeThu, 12 Jul 2012 02:15:00 GMThttp://www.aygfsteel.com/icewee/archive/2012/07/12/382853.htmlhttp://www.aygfsteel.com/icewee/comments/382853.htmlhttp://www.aygfsteel.com/icewee/archive/2012/07/12/382853.html#Feedback0http://www.aygfsteel.com/icewee/comments/commentRss/382853.htmlhttp://www.aygfsteel.com/icewee/services/trackbacks/382853.html出现以下异常信息Q一般删除下Tomcat的work目录卛_
严重: IOException while loading persisted sessions: java.io.EOFException
java
.io.EOFException
    at java
.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
    at java
.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
    at java
.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
    at java
.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
    at org
.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)
    at org
.apache.catalina.session.StandardManager.doLoad(StandardManager.java:246)
    at org
.apache.catalina.session.StandardManager.load(StandardManager.java:204)
    at org
.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)
    at org
.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org
.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5282)
    at org
.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org
.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org
.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org
.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org
.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
    at org
.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
    at java
.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java
.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java
.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java
.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java
.lang.Thread.run(Thread.java:662)
2012-7-12 10:08:04 org.apache.catalina.session.StandardManager startInternal
严重
: Exception loading sessions from persistent storage
java
.io.EOFException
    at java
.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
    at java
.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
    at java
.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
    at java
.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
    at org
.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)
    at org
.apache.catalina.session.StandardManager.doLoad(StandardManager.java:246)
    at org
.apache.catalina.session.StandardManager.load(StandardManager.java:204)
    at org
.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)
    at org
.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org
.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5282)
    at org
.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org
.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org
.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org
.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org
.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
    at org
.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
    at java
.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java
.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java
.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java
.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java
.lang.Thread.run(Thread.java:662)



IceWee 2012-07-12 10:15 发表评论
]]>
CXF+Spring+Tomcat明示?/title><link>http://www.aygfsteel.com/icewee/archive/2012/07/06/382399.html</link><dc:creator>IceWee</dc:creator><author>IceWee</author><pubDate>Fri, 06 Jul 2012 09:29:00 GMT</pubDate><guid>http://www.aygfsteel.com/icewee/archive/2012/07/06/382399.html</guid><wfw:comment>http://www.aygfsteel.com/icewee/comments/382399.html</wfw:comment><comments>http://www.aygfsteel.com/icewee/archive/2012/07/06/382399.html#Feedback</comments><slash:comments>25</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icewee/comments/commentRss/382399.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icewee/services/trackbacks/382399.html</trackback:ping><description><![CDATA[ 多系l(异构pȝQ进行交互时Q一U良好的方式便是调用Web ServiceQ本CZZApachel织的CXFQؓ了方便v见特服务端和客L写在同一个工E下Q实际项目中是不可能的,但是客户端却依赖于服务端的Web Service接口Q那么可以通过导出jar的方式?br /><br />环境Q?br />MyEclipse10<br />JDK6<br />Tomcat7<br />CXF2.5<br />Spring3<br /><br />CZ目l构图:<br /><img border="0" alt="" src="http://www.aygfsteel.com/images/blogjava_net/icewee/cxf/2012-07-06_164811.png" width="340" height="602" /><br /><br />如上图所C,全部依赖的第三方库都在lib中,下面贴出全部代码?br />IHelloService.java<br /><div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);"> bing.server;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> javax.jws.WebService;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img id="Codehighlighter1_52_145_Open_Image" onclick="this.style.display='none'; Codehighlighter1_52_145_Open_Text.style.display='none'; Codehighlighter1_52_145_Closed_Image.style.display='inline'; Codehighlighter1_52_145_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_52_145_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_52_145_Closed_Text.style.display='none'; Codehighlighter1_52_145_Open_Image.style.display='inline'; Codehighlighter1_52_145_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_52_145_Closed_Text">/** */</span><span id="Codehighlighter1_52_145_Open_Text"><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * <p><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * WebService接口<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </p><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </span><span style="color: rgb(128, 128, 128);">@author</span><span style="color: rgb(0, 128, 0);"> IceWee<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * @date 2012-7-6<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </span><span style="color: rgb(128, 128, 128);">@version</span><span style="color: rgb(0, 128, 0);"> 1.0<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" /> </span><span style="color: rgb(0, 128, 0);">*/</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />@WebService<br /><img id="Codehighlighter1_190_237_Open_Image" onclick="this.style.display='none'; Codehighlighter1_190_237_Open_Text.style.display='none'; Codehighlighter1_190_237_Closed_Image.style.display='inline'; Codehighlighter1_190_237_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_190_237_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_190_237_Closed_Text.style.display='none'; Codehighlighter1_190_237_Open_Image.style.display='inline'; Codehighlighter1_190_237_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">interface</span><span style="color: rgb(0, 0, 0);"> IHelloService </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_190_237_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_190_237_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String sayHello(String username);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span></div><br />HelloServiceImpl.java<br /><div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);"> bing.server;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> javax.jws.WebService;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img id="Codehighlighter1_52_146_Open_Image" onclick="this.style.display='none'; Codehighlighter1_52_146_Open_Text.style.display='none'; Codehighlighter1_52_146_Closed_Image.style.display='inline'; Codehighlighter1_52_146_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_52_146_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_52_146_Closed_Text.style.display='none'; Codehighlighter1_52_146_Open_Image.style.display='inline'; Codehighlighter1_52_146_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_52_146_Closed_Text">/** */</span><span id="Codehighlighter1_52_146_Open_Text"><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * <p><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * WebService实现c?br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </p><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </span><span style="color: rgb(128, 128, 128);">@author</span><span style="color: rgb(0, 128, 0);"> IceWee<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * @date 2012-7-6<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </span><span style="color: rgb(128, 128, 128);">@version</span><span style="color: rgb(0, 128, 0);"> 1.0<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" /> </span><span style="color: rgb(0, 128, 0);">*/</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />@WebService(endpointInterface </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">bing.server.IHelloService</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">, serviceName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HelloService</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)<br /><img id="Codehighlighter1_294_386_Open_Image" onclick="this.style.display='none'; Codehighlighter1_294_386_Open_Text.style.display='none'; Codehighlighter1_294_386_Closed_Image.style.display='inline'; Codehighlighter1_294_386_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_294_386_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_294_386_Closed_Text.style.display='none'; Codehighlighter1_294_386_Open_Image.style.display='inline'; Codehighlighter1_294_386_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> HelloServiceImpl </span><span style="color: rgb(0, 0, 255);">implements</span><span style="color: rgb(0, 0, 0);"> IHelloService </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_294_386_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_294_386_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    @Override<br /><img id="Codehighlighter1_349_383_Open_Image" onclick="this.style.display='none'; Codehighlighter1_349_383_Open_Text.style.display='none'; Codehighlighter1_349_383_Closed_Image.style.display='inline'; Codehighlighter1_349_383_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_349_383_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_349_383_Closed_Text.style.display='none'; Codehighlighter1_349_383_Open_Image.style.display='inline'; Codehighlighter1_349_383_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String sayHello(String username) </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_349_383_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_349_383_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">hello, </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> username;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span></div><br />HelloServiceClient.java<br /><span id="Codehighlighter1_294_386_Open_Text"><span style="color: rgb(0, 0, 0);"><div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);"> bing.client;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.springframework.context.ApplicationContext;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.springframework.context.support.ClassPathXmlApplicationContext;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> bing.server.IHelloService;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img id="Codehighlighter1_188_286_Open_Image" onclick="this.style.display='none'; Codehighlighter1_188_286_Open_Text.style.display='none'; Codehighlighter1_188_286_Closed_Image.style.display='inline'; Codehighlighter1_188_286_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_188_286_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_188_286_Closed_Text.style.display='none'; Codehighlighter1_188_286_Open_Image.style.display='inline'; Codehighlighter1_188_286_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_188_286_Closed_Text">/** */</span><span id="Codehighlighter1_188_286_Open_Text"><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * <p><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * WebService调用?客户?br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </p><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </span><span style="color: rgb(128, 128, 128);">@author</span><span style="color: rgb(0, 128, 0);"> IceWee<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * @date 2012-7-6<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /> * </span><span style="color: rgb(128, 128, 128);">@version</span><span style="color: rgb(0, 128, 0);"> 1.0<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" /> </span><span style="color: rgb(0, 128, 0);">*/</span></span><span style="color: rgb(0, 0, 0);"><br /><img id="Codehighlighter1_320_627_Open_Image" onclick="this.style.display='none'; Codehighlighter1_320_627_Open_Text.style.display='none'; Codehighlighter1_320_627_Closed_Image.style.display='inline'; Codehighlighter1_320_627_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_320_627_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_320_627_Closed_Text.style.display='none'; Codehighlighter1_320_627_Open_Image.style.display='inline'; Codehighlighter1_320_627_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> HelloServiceClient </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_320_627_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_320_627_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /><br /><img id="Codehighlighter1_363_624_Open_Image" onclick="this.style.display='none'; Codehighlighter1_363_624_Open_Text.style.display='none'; Codehighlighter1_363_624_Closed_Image.style.display='inline'; Codehighlighter1_363_624_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_363_624_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_363_624_Closed_Text.style.display='none'; Codehighlighter1_363_624_Open_Image.style.display='inline'; Codehighlighter1_363_624_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> main(String[] args) </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_363_624_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_363_624_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />        ApplicationContext context </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> ClassPathXmlApplicationContext(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">applicationContext-client.xml</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />        IHelloService helloService </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> (IHelloService) context.getBean(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">client</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />        String response </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> helloService.sayHello(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Peter</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />        System.out.println(response);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span></div></span></span><br />applicationContext-server.xml<br /><div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><span style="color: rgb(0, 0, 255);"><?</span><span style="color: rgb(255, 0, 255);">xml version="1.0" encoding="UTF-8"</span><span style="color: rgb(0, 0, 255);">?></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">beans </span><span style="color: rgb(255, 0, 0);">xmlns</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans"</span><span style="color: rgb(255, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xmlns:xsi</span><span style="color: rgb(0, 0, 255);">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color: rgb(255, 0, 0);"> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xmlns:jaxws</span><span style="color: rgb(0, 0, 255);">="http://cxf.apache.org/jaxws"</span><span style="color: rgb(255, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xsi:schemaLocation</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />                       http://www.springframework.org/schema/beans/spring-beans.xsd<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />                       http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 128, 0);"><!--</span><span style="color: rgb(0, 128, 0);"> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        ***注意*** <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        手动d的内容:<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        xmlns:jaxws="http://cxf.apache.org/jaxws"<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />     </span><span style="color: rgb(0, 128, 0);">--></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">import </span><span style="color: rgb(255, 0, 0);">resource</span><span style="color: rgb(0, 0, 255);">="classpath:META-INF/cxf/cxf.xml"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">import </span><span style="color: rgb(255, 0, 0);">resource</span><span style="color: rgb(0, 0, 255);">="classpath:META-INF/cxf/cxf-extension-soap.xml"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">import </span><span style="color: rgb(255, 0, 0);">resource</span><span style="color: rgb(0, 0, 255);">="classpath:META-INF/cxf/cxf-servlet.xml"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">jaxws:endpoint </span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="helloService"</span><span style="color: rgb(255, 0, 0);"> implementor</span><span style="color: rgb(0, 0, 255);">="bing.server.HelloServiceImpl"</span><span style="color: rgb(255, 0, 0);"> address</span><span style="color: rgb(0, 0, 255);">="/helloService"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">beans</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span></div><br />applicationContext-client.xml<br /><div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><span style="color: rgb(0, 0, 255);"><?</span><span style="color: rgb(255, 0, 255);">xml version="1.0" encoding="UTF-8"</span><span style="color: rgb(0, 0, 255);">?></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">beans </span><span style="color: rgb(255, 0, 0);">xmlns</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans"</span><span style="color: rgb(255, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xmlns:xsi</span><span style="color: rgb(0, 0, 255);">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color: rgb(255, 0, 0);"> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xmlns:jaxws</span><span style="color: rgb(0, 0, 255);">="http://cxf.apache.org/jaxws"</span><span style="color: rgb(255, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xsi:schemaLocation</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />                       http://www.springframework.org/schema/beans/spring-beans.xsd<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />                       http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 128, 0);"><!--</span><span style="color: rgb(0, 128, 0);"> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        ***注意*** <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        手动d的内容:<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        xmlns:jaxws="http://cxf.apache.org/jaxws"<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />     </span><span style="color: rgb(0, 128, 0);">--></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">import </span><span style="color: rgb(255, 0, 0);">resource</span><span style="color: rgb(0, 0, 255);">="classpath:META-INF/cxf/cxf.xml"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">import </span><span style="color: rgb(255, 0, 0);">resource</span><span style="color: rgb(0, 0, 255);">="classpath:META-INF/cxf/cxf-extension-soap.xml"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">import </span><span style="color: rgb(255, 0, 0);">resource</span><span style="color: rgb(0, 0, 255);">="classpath:META-INF/cxf/cxf-servlet.xml"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">bean </span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="client"</span><span style="color: rgb(255, 0, 0);"> class</span><span style="color: rgb(0, 0, 255);">="bing.server.IHelloService"</span><span style="color: rgb(255, 0, 0);"> factory-bean</span><span style="color: rgb(0, 0, 255);">="clientFactory"</span><span style="color: rgb(255, 0, 0);"> factory-method</span><span style="color: rgb(0, 0, 255);">="create"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">bean </span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="clientFactory"</span><span style="color: rgb(255, 0, 0);"> class</span><span style="color: rgb(0, 0, 255);">="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">property </span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="serviceClass"</span><span style="color: rgb(255, 0, 0);"> value</span><span style="color: rgb(0, 0, 255);">="bing.server.IHelloService"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">property </span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="address"</span><span style="color: rgb(255, 0, 0);"> value</span><span style="color: rgb(0, 0, 255);">="http://localhost:8080/CXFDemo/ws/helloService"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">beans</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span></div><br />web.xml<br /><div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><span style="color: rgb(0, 0, 255);"><?</span><span style="color: rgb(255, 0, 255);">xml version="1.0" encoding="UTF-8"</span><span style="color: rgb(0, 0, 255);">?></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">web-app </span><span style="color: rgb(255, 0, 0);">version</span><span style="color: rgb(0, 0, 255);">="3.0"</span><span style="color: rgb(255, 0, 0);"> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xmlns</span><span style="color: rgb(0, 0, 255);">="http://java.sun.com/xml/ns/javaee"</span><span style="color: rgb(255, 0, 0);"> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xmlns:xsi</span><span style="color: rgb(0, 0, 255);">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color: rgb(255, 0, 0);"> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    xsi:schemaLocation</span><span style="color: rgb(0, 0, 255);">="http://java.sun.com/xml/ns/javaee <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">display-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">CXFDemo</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">display-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">context-param</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />      </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">contextConfigLocation</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />      </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">classpath:applicationContext-server.xml</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">context-param</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /> <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">listener</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">listener-class</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">org.springframework.web.context.ContextLoaderListener</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">listener-class</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">listener</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">servlet</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">CXFServlet</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">display-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">CXFServlet</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">display-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">servlet-class</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">org.apache.cxf.transport.servlet.CXFServlet</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">servlet-class</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">load-on-startup</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">load-on-startup</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">servlet</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">servlet-mapping</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">CXFServlet</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">/ws/*</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">servlet-mapping</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">welcome-file-list</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">welcome-file</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">index.jsp</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">welcome-file</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" />  </span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">welcome-file-list</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">web-app</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span></div><br />所有项目都已配|完成,可以发布到Tomcat了,在浏览器中输入:<a href="http://localhost:8080/CXFDemo/ws">http://localhost:8080/CXFDemo/ws</a>Q返回如图:<br /><img border="0" alt="" src="http://www.aygfsteel.com/images/blogjava_net/icewee/cxf/2012-07-06_170337.png" width="735" height="427" /><br /><br />从上图中可以看到我们对外发布的WebService接口Q点击蓝色超链接Q返回如图:<br /><img border="0" alt="" src="http://www.aygfsteel.com/images/blogjava_net/icewee/cxf/2012-07-06_170411.png" /><br />到此Q证明我们的Web Service已经发布成功Q可以进行调用测试了。运行HelloServiceClientQ返回如图:<br /><img border="0" alt="" src="http://www.aygfsteel.com/images/blogjava_net/icewee/cxf/2012-07-06_170754.png" /><br /><br />全文完!<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><img src ="http://www.aygfsteel.com/icewee/aggbug/382399.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icewee/" target="_blank">IceWee</a> 2012-07-06 17:29 <a href="http://www.aygfsteel.com/icewee/archive/2012/07/06/382399.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java Tomcat SSL 服务?客户端双向认证のApache HttpClientQ二Q?/title><link>http://www.aygfsteel.com/icewee/archive/2012/06/05/379983.html</link><dc:creator>IceWee</dc:creator><author>IceWee</author><pubDate>Tue, 05 Jun 2012 01:32:00 GMT</pubDate><guid>http://www.aygfsteel.com/icewee/archive/2012/06/05/379983.html</guid><wfw:comment>http://www.aygfsteel.com/icewee/comments/379983.html</wfw:comment><comments>http://www.aygfsteel.com/icewee/archive/2012/06/05/379983.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icewee/comments/commentRss/379983.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icewee/services/trackbacks/379983.html</trackback:ping><description><![CDATA[ 本演CZE是l?a id="viewpost1_TitleUrl" class="singleposttitle" href="http://www.aygfsteel.com/icewee/archive/2012/06/04/379947.html"><font color="#223355">Java Tomcat SSL 服务?客户端双向认证(一Q?/font></a>Q密钥库可证书的生成脚本不再重复黏脓Q仅仅是用程序来代替览器访问服务端?br />例程中用到了Apache HttpClient库,版本?.1.3<br />全部依赖库:<br />commons-logging-1.1.1.jar<br />httpclient-4.1.3.jar<br />httpcore-4.1.4.jar<br />httpmime-4.1.3.jar(上传文g使用)<br /><br />在(一Q中的程序包中创Z个客Lc:HttpsClient<br />HttpsClient.java<br /><div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);"> com.icesoft.client;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.io.BufferedReader;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.io.File;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.io.FileInputStream;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.io.InputStream;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.io.InputStreamReader;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.security.KeyStore;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.HttpEntity;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.HttpResponse;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.client.HttpClient;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.client.methods.HttpGet;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.conn.scheme.Scheme;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.conn.ssl.SSLSocketFactory;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.impl.client.DefaultHttpClient;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.http.util.EntityUtils;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /><br /><img id="Codehighlighter1_582_3211_Open_Image" onclick="this.style.display='none'; Codehighlighter1_582_3211_Open_Text.style.display='none'; Codehighlighter1_582_3211_Closed_Image.style.display='inline'; Codehighlighter1_582_3211_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_582_3211_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_582_3211_Closed_Text.style.display='none'; Codehighlighter1_582_3211_Open_Image.style.display='inline'; Codehighlighter1_582_3211_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> HttpsClient </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_582_3211_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_582_3211_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    <br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String KEY_STORE_TYPE_JKS </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">jks</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String KEY_STORE_TYPE_P12 </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">PKCS12</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String SCHEME_HTTPS </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">https</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> HTTPS_PORT </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">8443</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String HTTPS_URL </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">https://127.0.0.1:8443/HttpClientSSL/sslServlet</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String KEY_STORE_CLIENT_PATH </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">E:/ssl/client.p12</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String KEY_STORE_TRUST_PATH </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">E:/ssl/client.truststore</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String KEY_STORE_PASSWORD </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">123456</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> String KEY_STORE_TRUST_PASSWORD </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">123456</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /><br /><img id="Codehighlighter1_1231_1243_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1231_1243_Open_Text.style.display='none'; Codehighlighter1_1231_1243_Closed_Image.style.display='inline'; Codehighlighter1_1231_1243_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1231_1243_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1231_1243_Closed_Text.style.display='none'; Codehighlighter1_1231_1243_Open_Image.style.display='inline'; Codehighlighter1_1231_1243_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> main(String[] args) </span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);"> Exception </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1231_1243_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1231_1243_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />        ssl();<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />    <br /><img id="Codehighlighter1_1291_3208_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1291_3208_Open_Text.style.display='none'; Codehighlighter1_1291_3208_Closed_Image.style.display='inline'; Codehighlighter1_1291_3208_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1291_3208_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1291_3208_Closed_Text.style.display='none'; Codehighlighter1_1291_3208_Open_Image.style.display='inline'; Codehighlighter1_1291_3208_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> ssl() </span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);"> Exception </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1291_3208_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1291_3208_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />        HttpClient httpClient </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> DefaultHttpClient();<br /><img id="Codehighlighter1_1356_3130_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1356_3130_Open_Text.style.display='none'; Codehighlighter1_1356_3130_Closed_Image.style.display='inline'; Codehighlighter1_1356_3130_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1356_3130_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1356_3130_Closed_Text.style.display='none'; Codehighlighter1_1356_3130_Open_Image.style.display='inline'; Codehighlighter1_1356_3130_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">        </span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);"> </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1356_3130_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1356_3130_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            KeyStore keyStore  </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> KeyStore.getInstance(KEY_STORE_TYPE_P12);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            KeyStore trustStore  </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> KeyStore.getInstance(KEY_STORE_TYPE_JKS);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            InputStream ksIn </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> FileInputStream(KEY_STORE_CLIENT_PATH);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            InputStream tsIn </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> FileInputStream(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> File(KEY_STORE_TRUST_PATH));<br /><img id="Codehighlighter1_1682_1843_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1682_1843_Open_Text.style.display='none'; Codehighlighter1_1682_1843_Closed_Image.style.display='inline'; Codehighlighter1_1682_1843_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1682_1843_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1682_1843_Closed_Text.style.display='none'; Codehighlighter1_1682_1843_Open_Image.style.display='inline'; Codehighlighter1_1682_1843_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">            </span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);"> </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1682_1843_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1682_1843_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />                keyStore.load(ksIn, KEY_STORE_PASSWORD.toCharArray());<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />                trustStore.load(tsIn, KEY_STORE_TRUST_PASSWORD.toCharArray());<br /><img id="Codehighlighter1_1853_1996_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1853_1996_Open_Text.style.display='none'; Codehighlighter1_1853_1996_Closed_Image.style.display='inline'; Codehighlighter1_1853_1996_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1853_1996_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1853_1996_Closed_Text.style.display='none'; Codehighlighter1_1853_1996_Open_Image.style.display='inline'; Codehighlighter1_1853_1996_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">            }</span></span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">finally</span><span style="color: rgb(0, 0, 0);"> </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1853_1996_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1853_1996_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img id="Codehighlighter1_1872_1888_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1872_1888_Open_Text.style.display='none'; Codehighlighter1_1872_1888_Closed_Image.style.display='inline'; Codehighlighter1_1872_1888_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1872_1888_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1872_1888_Closed_Text.style.display='none'; Codehighlighter1_1872_1888_Open_Image.style.display='inline'; Codehighlighter1_1872_1888_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">                </span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);"> </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1872_1888_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1872_1888_Open_Text"><span style="color: rgb(0, 0, 0);">{ ksIn.close(); }</span></span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);"> (Exception ignore) </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1915_1916_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1915_1916_Open_Text"><span style="color: rgb(0, 0, 0);">{}</span></span><span style="color: rgb(0, 0, 0);"><br /><img id="Codehighlighter1_1938_1954_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1938_1954_Open_Text.style.display='none'; Codehighlighter1_1938_1954_Closed_Image.style.display='inline'; Codehighlighter1_1938_1954_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1938_1954_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1938_1954_Closed_Text.style.display='none'; Codehighlighter1_1938_1954_Open_Image.style.display='inline'; Codehighlighter1_1938_1954_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">                </span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);"> </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1938_1954_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1938_1954_Open_Text"><span style="color: rgb(0, 0, 0);">{ tsIn.close(); }</span></span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);"> (Exception ignore) </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1981_1982_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1981_1982_Open_Text"><span style="color: rgb(0, 0, 0);">{}</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />            }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            SSLSocketFactory socketFactory </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> SSLSocketFactory(keyStore, KEY_STORE_PASSWORD, trustStore);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            Scheme sch </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Scheme(SCHEME_HTTPS, HTTPS_PORT, socketFactory);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            httpClient.getConnectionManager().getSchemeRegistry().register(sch);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            HttpGet httpget </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> HttpGet(HTTPS_URL);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">executing request</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> httpget.getRequestLine());<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            HttpResponse response </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> httpClient.execute(httpget);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            HttpEntity entity </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> response.getEntity();<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">----------------------------------------</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            System.out.println(response.getStatusLine());<br /><img id="Codehighlighter1_2685_3079_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2685_3079_Open_Text.style.display='none'; Codehighlighter1_2685_3079_Closed_Image.style.display='inline'; Codehighlighter1_2685_3079_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_2685_3079_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2685_3079_Closed_Text.style.display='none'; Codehighlighter1_2685_3079_Open_Image.style.display='inline'; Codehighlighter1_2685_3079_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (entity </span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">) </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2685_3079_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2685_3079_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />                System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Response content length: </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> entity.getContentLength());<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />                BufferedReader bufferedReader </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> BufferedReader(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> InputStreamReader(entity.getContent()));<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />                String text;<br /><img id="Codehighlighter1_2988_3025_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2988_3025_Open_Text.style.display='none'; Codehighlighter1_2988_3025_Closed_Image.style.display='inline'; Codehighlighter1_2988_3025_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_2988_3025_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2988_3025_Closed_Text.style.display='none'; Codehighlighter1_2988_3025_Open_Image.style.display='inline'; Codehighlighter1_2988_3025_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">                </span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);"> ((text </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> bufferedReader.readLine()) </span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">) </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2988_3025_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2988_3025_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />                    System.out.println(text);<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />                }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />                bufferedReader.close();<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />            }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            EntityUtils.consume(entity);<br /><img id="Codehighlighter1_3140_3205_Open_Image" onclick="this.style.display='none'; Codehighlighter1_3140_3205_Open_Text.style.display='none'; Codehighlighter1_3140_3205_Closed_Image.style.display='inline'; Codehighlighter1_3140_3205_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_3140_3205_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_3140_3205_Closed_Text.style.display='none'; Codehighlighter1_3140_3205_Open_Image.style.display='inline'; Codehighlighter1_3140_3205_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ContractedSubBlock.gif">        }</span></span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">finally</span><span style="color: rgb(0, 0, 0);"> </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3140_3205_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_3140_3205_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" />            httpClient.getConnectionManager().shutdown();<br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />        }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/InBlock.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: rgb(0, 0, 0);"><br /><img align="top" src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" alt="" /></span></div><br /><br />启动TomcatQ运行HttpsClientQ控制台q回Q?br /><img border="0" alt="" src="http://www.aygfsteel.com/images/blogjava_net/icewee/ssl/30.png" width="750" height="650" /><br /><br />OKQ和使用览器访问得到的l果一模一P<br /><br />全文完!<br /> <img src ="http://www.aygfsteel.com/icewee/aggbug/379983.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icewee/" target="_blank">IceWee</a> 2012-06-05 09:32 <a href="http://www.aygfsteel.com/icewee/archive/2012/06/05/379983.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java Tomcat SSL 服务?客户端双向认证(一Q?/title><link>http://www.aygfsteel.com/icewee/archive/2012/06/04/379947.html</link><dc:creator>IceWee</dc:creator><author>IceWee</author><pubDate>Mon, 04 Jun 2012 09:36:00 GMT</pubDate><guid>http://www.aygfsteel.com/icewee/archive/2012/06/04/379947.html</guid><wfw:comment>http://www.aygfsteel.com/icewee/comments/379947.html</wfw:comment><comments>http://www.aygfsteel.com/icewee/archive/2012/06/04/379947.html#Feedback</comments><slash:comments>20</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icewee/comments/commentRss/379947.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icewee/services/trackbacks/379947.html</trackback:ping><description><![CDATA[     摘要: SSL——Secure Sockets Layer双向认证(个h理解)Q客L认证Q客L通过览器访问某一|站Ӟ如果该网站ؓHTTPS|站Q浏览器会自动检系l中是否存在该网站的信Q证书Q如果没有信任证书,览器一般会拒绝讉KQIE会有一个l访问的链接Q但地址栏是U色Q给予用戯CZ用,卛_L验证服务端ƈ不是强制性的Q可以没有服务端的信任证书,当然是否l箋讉K完全?..  <a href='http://www.aygfsteel.com/icewee/archive/2012/06/04/379947.html'>阅读全文</a><img src ="http://www.aygfsteel.com/icewee/aggbug/379947.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icewee/" target="_blank">IceWee</a> 2012-06-04 17:36 <a href="http://www.aygfsteel.com/icewee/archive/2012/06/04/379947.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tomcat5.5配置-多域名绑定和虚拟目录http://www.aygfsteel.com/icewee/archive/2011/04/16/353230.htmlIceWeeIceWeeSat, 16 Apr 2011 05:12:00 GMThttp://www.aygfsteel.com/icewee/archive/2011/04/16/353230.htmlhttp://www.aygfsteel.com/icewee/comments/353230.htmlhttp://www.aygfsteel.com/icewee/archive/2011/04/16/353230.html#Feedback0http://www.aygfsteel.com/icewee/comments/commentRss/353230.htmlhttp://www.aygfsteel.com/icewee/services/trackbacks/353230.htmltomcat采用默认安装,要想tamcat直接l定多个域名,q里我们需要修攚w|文?C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml

server.xml 的修Ҏ式如?

Q一Q多域名l定

1.如果你要l定|站,首先是要把tomcat的默认访问端?080,修改?0

原始:

<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150"
    minSpareThreads
="25" maxSpareThreads="75" enableLookups="false"
    redirectPort
="8443" acceptCount="100" connectionTimeout="20000"
    disableUploadTimeout
="true" />

 

修改?

<Connector port="80" maxHttpHeaderSize="8192" maxThreads="150"
    minSpareThreads
="25" maxSpareThreads="75" enableLookups="false"
    redirectPort
="8443" acceptCount="100" connectionTimeout="20000"
    disableUploadTimeout
="true" />
 

其实q里是把port:8080,修改成port:80可以了,其他的参C?/span>


2.接下来就是重点了哈哈...
?/span>?

<Engine name="Catalina" defaultHost="localhost">
    
<Host name="localhost" appBase="webapps" unpackWARs="true"
        autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false" />
</Engine>


当然q里我把注释代码l统删除掉了,省的眼

修改?

<Engine name="Catalina" defaultHost=www.abc.com>
    
<Host name="www.abc.com" appBase== " abcapps " unpackWARs="true"
        autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false"    
        <Host name
=www.cba.com appBase== " D: \ cba " unpackWARs="true"
            autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false" />
        
<Host name="localhost" appBase="webapps" unpackWARs="true"
            autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false" />
</Engine>
 

q里解释一下上面的配置
Engine ?dafaultHost :表示讉K该tomcat默认q入的主?注意一定不能是localhost,不然别h通过你的ip讉K,׃默认q入tomcat的管理界?

Host ?name:表示该主机绑定的域名,如果l定localhost则可以通过在浏览器中输入localhost讉K该Host.

Host?appBase:表示该主机绑定的文g存放路径,可以使用相对路径或绝对\?

按照上面的配|?
1.如果我在览器中输入http://localhost 则访?C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT 下的|站
2.如果输入http://www.abc.com 则访?C:\Program Files\Apache Software Foundation\Tomcat 5.5\abcapps\ROOT 下的|站
3.如果输入http://www.cba.com 则访?D:\cba\ROOT 下的|站.

注意q里有一个ROOT目录需要创?我们只要把网站放到相应的ROOT目录向下?卛_通过相应域名讉K?

q里面的参数q有很多,我也不是很清?不过q样做确实可以实现多域名l定哈哈.而且|站面修改了只要直接覆盖就可以?tomcat可以自动更新cd面,当然如果修改了web.xml或lib,则需要重启tomcat才可?


Q二Q?/span>虚拟目录


<Host name="localhost" appBase="webapps" unpackWARs="true"
    autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false">
    
<Context path="/cqq" docBase="f:\java\cqqapp" debug="0"
        reloadable
="true" crossContext="true">
</Host>


其中QHost标记是用来配|虚拟主机的Q就是可以多个域名指向一个tomcatQ格式只要参考默认的?可以了?

<context>是Host标记的子元素吧,表示一个虚拟目录,它主要有两个属性,pathq当于虚拟目录名字Q??docbase则是具体的文件位|。在q里我的虚拟路径名称为cqqQ实际上我的E序也就是html、jsp?
q样我就可以通过 http://127.0.0.1/cqq/ 讉K我的q个虚拟目录了?/span>

servlet?攑֜了f:\java\cqqappq个目录下了?

另外一U方法是Q?/span>
配置两个站点

<Host name="www.xyz.com" debug="0" appBase="D:\Tomcat5.5\portal"
    unpackWARs
="true" autoDeploy="true">
    
<Context path="" docBase="D:/Tomcat5.5/portal" debug="0"
        reloadable
="true" />
</Host>
<Host name="www.abc.com" appBase="D:\Tomcat5.5\hxw" unpackWARs="true"
    autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false">
    
<Context path="" docBase="D:\Tomcat5.5\abc" debug="0"
        reloadable
="true" />
</Host>

q样讄以后Q输入域名可以分别到两个站点Q?/span>但由于没有指定默认站点,所以直接输入IP的时候,无法讉K?/span>于是增加 D:\Tomcat5.5\conf\Catalina\localhost\ROOT.xml内容?span style="font-family: tahoma,arial,helvetica,sans-serif; color: #000000; font-size: 14px" color="#000000">

<Context path="/" docBase="${catalina.home}/portal" debug="5"
    reloadable
="true" crossContext="true"></Context>


q样可以实现输入域名分别C站点Q输入IP默认到D:/Tomcat5.5/portalq个站点Q?/span>可是Q可是,问题出现了,q两个站点启动相当消耗内存,TOMCAT内存讄我已l设?400M了(再高TOMCAT5无法启动Q,所以不能同时启动三个应用?/span>


大家有没有实现过Q启一个应用而绑定多个域名的Ҏ?br />如下Q这样写TOMCAT肯定是启动不了的Q只是用来表达我的意思)

<Host name="www.abc.com,192.168.0.1" appBase="D:\Tomcat5.5\hxw"
    unpackWARs
="true" autoDeploy="true" xmlValidation="false"
    xmlNamespaceAware
="false">
    
<Context path="" docBase="D:\Tomcat5.5\abc" debug="0"
        reloadable
="true" />
</Host>


因ؓ我是整合的,所以就不用?080端口了哦~~~~~



IceWee 2011-04-16 13:12 发表评论
]]>
修改TomcatƢ迎界面己项目界?/title><link>http://www.aygfsteel.com/icewee/archive/2011/04/16/353231.html</link><dc:creator>IceWee</dc:creator><author>IceWee</author><pubDate>Sat, 16 Apr 2011 05:10:00 GMT</pubDate><guid>http://www.aygfsteel.com/icewee/archive/2011/04/16/353231.html</guid><wfw:comment>http://www.aygfsteel.com/icewee/comments/353231.html</wfw:comment><comments>http://www.aygfsteel.com/icewee/archive/2011/04/16/353231.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icewee/comments/commentRss/353231.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icewee/services/trackbacks/353231.html</trackback:ping><description><![CDATA[<span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">׃目要发布到互联|,所以必d掉测试时候的端口和项目名Uͼ而ؓ其指定域名访问地址?/span> <div class="wmqeeuq" id="blog_text" class="cnt"> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt"><strong>W一步,L端口</strong></span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">扑ֈserver.xmlQ将默认端口8080改ؓ80Q而且发布C联网必须?0端口Q因此端口防火墙不会拦截?br /><br /></span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt"><strong>W二步,L目名称</strong></span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">qx我们开发时可能会经常用<a href="http://localhost:8080/xxx"><span style="font-size: 12pt">http://localhost:8080/xxx</span></a></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">?a ><span style="font-size: 12pt">http://127.0.0.1:8080/xxx</span></a></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">来访问我们的目Q通过W一步的修改现在我们要用<a href="http://localhost/xxx"><span style="font-size: 12pt">http://localhost/xxx</span></a></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">?a ><span style="font-size: 12pt">http://127.0.0.1/xxx</span></a></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">来访问项目,也可以用L名替?#8220;localhost”?#8220;127.0.0.1”。如果现在我们实?a href="http://localhost/"><span style="font-size: 12pt">http://localhost/</span></a></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">?a ><span style="font-size: 12pt">http://127.0.0.1/</span></a></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">讉KQ看到的会是Tomcat的欢q界面,|上众说ULQ不q测试后都不用Q其中有一U说法测试成功,那就是:</span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">q是修改server.xmlQ在Host标签中配|项目虚拟\径。以前测试都是将xxx.xml攑֜Tomcat的conf/localhost中,文g内容大概为:</span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt"></p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #0000ff"><</span><span style="color: #800000">Context </span><span style="color: #ff0000">path</span><span style="color: #0000ff">="/xxx"</span><span style="color: #ff0000"> docBase</span><span style="color: #0000ff">="D:\xxx\xxx"</span><span style="color: #ff0000"> debug</span><span style="color: #0000ff">="0"</span><span style="color: #ff0000"> reloadable</span><span style="color: #0000ff">="true"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span></div> <p><br />现在我将path的值改?"Q启动TomcatQ发C旧是TomcatƢ迎面?/span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">于是此配置复制到Host标签中,注意要把xxx.xmlUd出去Q否则就配置了两ơ,l果成功Q?/span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">现在可以用<a href="http://localhost/"><span style="font-size: 12pt">http://localhost</span></a></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">来访问你发布的项目了Q?/span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">备注Q?/span></p> <p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 12pt">l过此配|可能导致的问题是部分功能出现错误,也就是页面无法显C,功能不可用。原因可能之一为:目的jsp中应用了目路径如:iframe?src{于 xxxx/xxxx.doQ在此请勿实用写ȝ目名做为根Q要用动态项目跟路径Q如Q?{pageContext.request.contextPath}Q当前我们访问的目根\径已l变?"(IZ)Q你在用xxxd用自然找不到路径而报错。这是用动态项目根路径的好处?/span></p></div><img src ="http://www.aygfsteel.com/icewee/aggbug/353231.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icewee/" target="_blank">IceWee</a> 2011-04-16 13:10 <a href="http://www.aygfsteel.com/icewee/archive/2011/04/16/353231.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">¤</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ϫ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">֣</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ϫ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ǭ</a>| <a href="http://" target="_blank">ͼ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ũ</a>| <a href="http://" target="_blank">ȷ</a>| <a href="http://" target="_blank">̫</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">佭</a>| <a href="http://" target="_blank">˳ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ľ</a>| <a href="http://" target="_blank">÷ӿ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">կ</a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>