当前位置: 首页 > news >正文

做的漂亮的家居网站百度怎么搜索关键词

做的漂亮的家居网站,百度怎么搜索关键词,免费安全正能量网站大全,一级域名生成二级域名casldap异常分析 | xfirewebservice(服务器配置篇) 2008-12-31xfirewebservice(客户端调用篇) 服务接口#xff0c;就是用来调用的#xff0c;所以客户端显得尤为重要#xff0c;xfire客户端对返回list很挑剔#xff0c;所以需要使用泛型。 如何建立webservice client 步骤… casldap异常分析 | xfirewebservice(服务器配置篇) 2008-12-31 xfirewebservice(客户端调用篇)      服务接口就是用来调用的所以客户端显得尤为重要xfire客户端对返回list很挑剔所以需要使用泛型。      如何建立webservice client      步骤1建立webservice  project         下一步         下一步默认         选择xfire包         finish,  这样webservice项目就完成了     接下来是如何进行客户端开发.     在项目中右键new webservice client         接着选择你服务文件wsdl        完成。    这样在你的项目中会根据wsdl服务文件生成客户端所需要的内容。    自动生成文件下去就细细体会给出一个测试代码    Java代码 package com.seavision.huayi2.service;     import java.net.MalformedURLException;   import java.util.Collection;   import java.util.HashMap;   import java.util.List;     import javax.xml.bind.JAXBElement;   import javax.xml.namespace.QName;   import org.codehaus.xfire.XFireRuntimeException;   import org.codehaus.xfire.aegis.AegisBindingProvider;   import org.codehaus.xfire.annotations.AnnotationServiceFactory;   import org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations;   import org.codehaus.xfire.client.XFireProxyFactory;   import org.codehaus.xfire.jaxb2.JaxbTypeRegistry;   import org.codehaus.xfire.service.Endpoint;   import org.codehaus.xfire.service.Service;   import org.codehaus.xfire.soap.AbstractSoapBinding;   import org.codehaus.xfire.transport.TransportManager;     import com.seavision.huayi2.domain.ArrayOfTBusinsessLog;   import com.seavision.huayi2.domain.TBusinsessLog;   import com.seavision.huayi2.domain.TStationMonthReport;     public class IWebserviceClient {         private static XFireProxyFactory proxyFactory  new XFireProxyFactory();       private HashMap endpoints  new HashMap();       private Service service0;         public IWebserviceClient() {           create0();           Endpoint IWebservicePortTypeLocalEndpointEP  service0 .addEndpoint(new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalEndpoint), new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalBinding), xfire.local://IWebservice);           endpoints.put(new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalEndpoint), IWebservicePortTypeLocalEndpointEP);           Endpoint IWebserviceHttpPortEP  service0 .addEndpoint(new QName(http://service.huayi2.seavision.com, IWebserviceHttpPort), new QName(http://service.huayi2.seavision.com, IWebserviceHttpBinding), http://localhost:8080/seavision/services/IWebservice);           endpoints.put(new QName(http://service.huayi2.seavision.com, IWebserviceHttpPort), IWebserviceHttpPortEP);       }         public Object getEndpoint(Endpoint endpoint) {           try {               return proxyFactory.create((endpoint).getBinding(), (endpoint).getUrl());           } catch (MalformedURLException e) {               throw new XFireRuntimeException(Invalid URL, e);           }       }         public Object getEndpoint(QName name) {           Endpoint endpoint  ((Endpoint) endpoints.get((name)));           if ((endpoint)  null) {               throw new IllegalStateException(No such endpoint!);           }           return getEndpoint((endpoint));       }         public Collection getEndpoints() {           return endpoints.values();       }         private void create0() {           TransportManager tm  (org.codehaus.xfire.XFireFactory.newInstance().getXFire().getTransportManager());           HashMap props  new HashMap();           props.put(annotations.allow.interface, true);           AnnotationServiceFactory asf  new AnnotationServiceFactory(new Jsr181WebAnnotations(), tm, new AegisBindingProvider(new JaxbTypeRegistry()));           asf.setBindingCreationEnabled(false);           service0  asf.create((com.seavision.huayi2.service.IWebservicePortType.class), props);           {               AbstractSoapBinding soapBinding  asf.createSoap11Binding(service0, new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalBinding), urn:xfire:transport:local);           }           {               AbstractSoapBinding soapBinding  asf.createSoap11Binding(service0, new QName(http://service.huayi2.seavision.com, IWebserviceHttpBinding), http://schemas.xmlsoap.org/soap/http);           }       }         public IWebservicePortType getIWebservicePortTypeLocalEndpoint() {           return ((IWebservicePortType)(this).getEndpoint(new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalEndpoint)));       }         public IWebservicePortType getIWebservicePortTypeLocalEndpoint(String url) {           IWebservicePortType var  getIWebservicePortTypeLocalEndpoint();           org.codehaus.xfire.client.Client.getInstance(var).setUrl(url);           return var;       }         public IWebservicePortType getIWebserviceHttpPort() {           return ((IWebservicePortType)(this).getEndpoint(new QName(http://service.huayi2.seavision.com, IWebserviceHttpPort)));       }         public IWebservicePortType getIWebserviceHttpPort(String url) {           IWebservicePortType var  getIWebserviceHttpPort();           org.codehaus.xfire.client.Client.getInstance(var).setUrl(url);           return var;       }         public static void main(String[] args) {                        IWebserviceClient client  new IWebserviceClient();                      //create a default service endpoint           IWebservicePortType service  client.getIWebserviceHttpPort();                     /**           * 使用ObjectFactory插入           * */                   com.seavision.huayi2.domain.ObjectFactory cfactorynew com.seavision.huayi2.domain.ObjectFactory();               com.seavision.huayi2.domain.TStationMonthReport  newTStationMonthReport  cfactory.createTStationMonthReport();               newTStationMonthReport.setStationMonthReportId(cfactory.createTStationMonthReportStationMonthReportId(123465464864));   //                   /**       * 使用JAXBElement插入       * */                 //            JAXBElementString id  new JAXBElementString(new   //                    QName(http://domain.huayi2.seavision.com, stationMonthReportId),String.class,gefa);   //            newTStationMonthReport.setStationMonthReportId(id);                              service.insertYueJiHua(newTStationMonthReport);           /**           * 测试返回list结果           * */          ArrayOfTBusinsessLog aot  service.getYeWuList();           List list  aot.getTBusinsessLog();           System.out.println(list.size());           for(int i0;ilist.size();i){               TBusinsessLog tlog  (TBusinsessLog) list.get(i);               System.out.println(itlog.getLogContent().getValue());           }           //TODO: Add custom client code here                   //                   //service.yourServiceOperationHere();                      System.out.println(test client completed);                   System.exit(0);       }     }   package com.seavision.huayi2.service;import java.net.MalformedURLException; import java.util.Collection; import java.util.HashMap; import java.util.List;import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; import org.codehaus.xfire.XFireRuntimeException; import org.codehaus.xfire.aegis.AegisBindingProvider; import org.codehaus.xfire.annotations.AnnotationServiceFactory; import org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations; import org.codehaus.xfire.client.XFireProxyFactory; import org.codehaus.xfire.jaxb2.JaxbTypeRegistry; import org.codehaus.xfire.service.Endpoint; import org.codehaus.xfire.service.Service; import org.codehaus.xfire.soap.AbstractSoapBinding; import org.codehaus.xfire.transport.TransportManager;import com.seavision.huayi2.domain.ArrayOfTBusinsessLog; import com.seavision.huayi2.domain.TBusinsessLog; import com.seavision.huayi2.domain.TStationMonthReport;public class IWebserviceClient {private static XFireProxyFactory proxyFactory new XFireProxyFactory();private HashMap endpoints new HashMap();private Service service0;public IWebserviceClient() {create0();Endpoint IWebservicePortTypeLocalEndpointEP service0 .addEndpoint(new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalEndpoint), new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalBinding), xfire.local://IWebservice);endpoints.put(new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalEndpoint), IWebservicePortTypeLocalEndpointEP);Endpoint IWebserviceHttpPortEP service0 .addEndpoint(new QName(http://service.huayi2.seavision.com, IWebserviceHttpPort), new QName(http://service.huayi2.seavision.com, IWebserviceHttpBinding), http://localhost:8080/seavision/services/IWebservice);endpoints.put(new QName(http://service.huayi2.seavision.com, IWebserviceHttpPort), IWebserviceHttpPortEP);}public Object getEndpoint(Endpoint endpoint) {try {return proxyFactory.create((endpoint).getBinding(), (endpoint).getUrl());} catch (MalformedURLException e) {throw new XFireRuntimeException(Invalid URL, e);}}public Object getEndpoint(QName name) {Endpoint endpoint ((Endpoint) endpoints.get((name)));if ((endpoint) null) {throw new IllegalStateException(No such endpoint!);}return getEndpoint((endpoint));}public Collection getEndpoints() {return endpoints.values();}private void create0() {TransportManager tm (org.codehaus.xfire.XFireFactory.newInstance().getXFire().getTransportManager());HashMap props new HashMap();props.put(annotations.allow.interface, true);AnnotationServiceFactory asf new AnnotationServiceFactory(new Jsr181WebAnnotations(), tm, new AegisBindingProvider(new JaxbTypeRegistry()));asf.setBindingCreationEnabled(false);service0 asf.create((com.seavision.huayi2.service.IWebservicePortType.class), props);{AbstractSoapBinding soapBinding asf.createSoap11Binding(service0, new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalBinding), urn:xfire:transport:local);}{AbstractSoapBinding soapBinding asf.createSoap11Binding(service0, new QName(http://service.huayi2.seavision.com, IWebserviceHttpBinding), http://schemas.xmlsoap.org/soap/http);}}public IWebservicePortType getIWebservicePortTypeLocalEndpoint() {return ((IWebservicePortType)(this).getEndpoint(new QName(http://service.huayi2.seavision.com, IWebservicePortTypeLocalEndpoint)));}public IWebservicePortType getIWebservicePortTypeLocalEndpoint(String url) {IWebservicePortType var getIWebservicePortTypeLocalEndpoint();org.codehaus.xfire.client.Client.getInstance(var).setUrl(url);return var;}public IWebservicePortType getIWebserviceHttpPort() {return ((IWebservicePortType)(this).getEndpoint(new QName(http://service.huayi2.seavision.com, IWebserviceHttpPort)));}public IWebservicePortType getIWebserviceHttpPort(String url) {IWebservicePortType var getIWebserviceHttpPort();org.codehaus.xfire.client.Client.getInstance(var).setUrl(url);return var;}public static void main(String[] args) {IWebserviceClient client new IWebserviceClient();//create a default service endpointIWebservicePortType service client.getIWebserviceHttpPort();/*** 使用ObjectFactory插入* */ com.seavision.huayi2.domain.ObjectFactory cfactorynew com.seavision.huayi2.domain.ObjectFactory();com.seavision.huayi2.domain.TStationMonthReport newTStationMonthReport cfactory.createTStationMonthReport();newTStationMonthReport.setStationMonthReportId(cfactory.createTStationMonthReportStationMonthReportId(123465464864)); // /*** 使用JAXBElement插入* */// JAXBElementString id new JAXBElementString(new // QName(http://domain.huayi2.seavision.com, stationMonthReportId),String.class,gefa); // newTStationMonthReport.setStationMonthReportId(id);service.insertYueJiHua(newTStationMonthReport);/*** 测试返回list结果* */ArrayOfTBusinsessLog aot service.getYeWuList();List list aot.getTBusinsessLog();System.out.println(list.size());for(int i0;ilist.size();i){TBusinsessLog tlog (TBusinsessLog) list.get(i);System.out.println(itlog.getLogContent().getValue());}//TODO: Add custom client code here////service.yourServiceOperationHere();System.out.println(test client completed);System.exit(0);}}注意以下内容1返回list内容先存放入Arrayof**对象当中再进行list遍历。                          2: 对象属性取值getValue();                          3:对象属性封装通过JAXBElement进行封装后放入对象。 大小: 41.4 KB 大小: 46.1 KB 大小: 44.1 KB 大小: 47 KB 大小: 36.7 KB 大小: 48.6 KB 查看图片附件 16:25 浏览 (168) 论坛浏览 (373) 评论 (1) 收藏 相关推荐 转载于:https://www.cnblogs.com/cy163/archive/2009/03/21/1418153.html
http://www.yutouwan.com/news/490509/

相关文章:

  • 太原网站设计公司wordpress采集插件中文
  • 网站后台更新怎么做wordpress加速插件
  • 怎么建设境外网站宜昌哪里有做网站的
  • 凡科网站建设wordpress 插件 调用
  • 崇礼网站建设成品网站w灬源码伊甸
  • 河北省建设信息网站网站透明flash
  • 网站整体运营思路资讯类网站模板asp
  • 有自己域名如何做网站长春关键词优化平台
  • 网站建设合同违约责任建设工程信息网评价起评分
  • 河南网站建设报价wordpress网仿站
  • 短租房网站哪家做最好网站推广服务网站连锁
  • 做网站首页布局设计注意事项泰州专业做网站
  • 河北易县建设局官方网站做展馆好的设计网站
  • 网站排版淄博服装网站建设
  • 兖州网站制作t么做文献索引ot网站
  • 网站怎么伪静态网站电子商务网站建设课设网站模板
  • 有好看图片的软件网站模板软件技术学的是什么
  • 国外游戏网站设计北京模板网站建设
  • 新闻类网站开发多久怎样建设网站后台
  • 杭州企业建站程序个人导航网站怎么备案
  • 网站的中英文切换怎么做网站免费的不用下载
  • 网站微信认证费用多少钱国家专业分类目录
  • 网站怎么被黑wordpress 淘宝客 主题
  • 学校特色网站建设情况天津网站设计 河西
  • 自己动手建立个人网站wordpress 文章导航
  • 在电商网站上做推广的技巧龙山县建设局网站
  • wordpress模板 站长哈尔滨的网络科技开发公司
  • 杭州精品课程网站建设宠物网站首页模板
  • 万网域名备案网站网站备案 地址
  • 网站不想续费深圳app开发红孩儿