您现在的位置是:主页 > news > 大同网站建设制作/seo薪资
大同网站建设制作/seo薪资
admin2025/5/5 2:03:55【news】
简介大同网站建设制作,seo薪资,wordpress源码书籍,wordpress禁止谷歌1.整体结构 2.一个Web Service客户端,顾名思义是和一个Web Service服务器进行交互。 下面是一个Web Service客户端调用Web Service的基本过程。 --> 构造SOAP请求消息(将本地数据对象转换为SOAP消息) --> 发送SOAP消息到Web Service服务…
1.整体结构
2.一个Web Service客户端,顾名思义是和一个Web Service服务器进行交互。
下面是一个Web Service客户端调用Web Service的基本过程。
--> 构造SOAP请求消息(将本地数据对象转换为SOAP消息)
--> 发送SOAP消息到Web Service服务器的指定端口
--> 接收SOAP响应消息
--> 将SOAP响应消息转换为本地数据对象
3.webService与SOA的关系
webService是SOA的一个具体实现
SOA是思想
就像面向对象和J2ee的关系
4.SOAP基于HTTP的,在http协议下传输xml文件
5.UDDI:发现和整合服务,很少用
6.开发方法:只要获得wsdl方式即可
7.webService效率较慢
传输的是文本
EJB和CORBA传输的是二进制,效率较好
8.拦截soap请求和响应信息
Java代码


- JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean(); factory.setServiceClass(HelloImpl.class); factory.setAddress("http://localhost:8080/helloword"); factory.getInInterceptors().add(new LoggingInInterceptor()); factory.getOutInterceptors().add(new LoggingOutInterceptor()); Server server = factory.create(); server.start();
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();factory.setServiceClass(HelloImpl.class);factory.setAddress("http://localhost:8080/helloword");factory.getInInterceptors().add(new LoggingInInterceptor());factory.getOutInterceptors().add(new LoggingOutInterceptor());Server server = factory.create();server.start();
添加拦截器
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
soap消息结构: