文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > axis webservice教程
侵权投诉

axis webservice教程

axis webservice教程

到%TOMCAT_HOME%\webapps\axis目录下,启动Tomcat之后访问 doc.guandang.net 如果能看到 Click to see the WSDL这个超链接就说明已经发布成功了,点击进去就可以看到这个Webservice的WSDL描述文件。server端的发布已经完成了,接下来就是编写Client端测试代码了。

java 代码

package com.chnic.test;

import java.net.URL;

import javax.xml.namespace.QName;

import org.apache.axis.client.Call;

import org.apache.axis.client.Service;

public class Test {

public static void main(String[] args) throws Exception{

String targetEendPoint = "doc.guandang.net;;

Service service = new Service();

Call call = (Call) service.createCall();

call.setOperationName(new QName(targetEendPoint, "Hello"));

call.setTargetEndpointAddress(new URL(targetEendPoint));

String result = (String) call.invoke(new Object[]{"Robert"});

System.out.println(result);

}

}

测试代码很简单,如果熟悉java反射机制的朋友不用两分钟就能看明白。运行后客户端控制台出现 AXIS say hello Robert。测试成功。果然很简单吧。不过在这简单背后却是以牺牲灵活性为代价的。假如你现在手里只有.class 或者一个jar包,jws就不再能满足你的需求了,最要命的就是即时发布不支持带包的类,这点AXIS的用户手册上写的也很明白。

Important: JWS web services are intended for simple web services. You cannot use packages in the pages, and as the code is compiled at run time you can not find out about errors until after deployment. Production quality web services should use Java classes with custom deployment.

2.定制发布 Custom Deployment - Introducing WSDD

比起即时发布定制发布更加烦琐也更复杂,但是换来的却是更大的灵活性,因此在实际项目中定制发布还是不二的选择。定制发布需要你自己编写一个WSDD(Web Service

上一页第2页

你可能喜欢

热门文档

相关文档

  • axis+webservice教程

    利用AXIS 开发 Webservice(一) —— 如何 发布自己的 webservice 先介绍下本人开发环境吧。 JDK 1.4.2 + Myeclipse 6.0 (实在经不起诱惑, 尝尝鲜) + Tomcat...

  • axis_webservice教程

    利用AXIS 开发 Webservice(一) —— 如何 一 发布自己的 webservice 先介绍下本人开发环境吧。 JDK 1.4.2 + Myeclipse 6.0 (实在经不起诱惑, 尝尝鲜) + ...

  • Axis2(WebService)经典教程

    Axis2(WebService)经典教程_IT/计算机_专业资料。重点讲解了Axis2的核心功能,并提供了三个项目以使理解并掌握如何将Axis2应用于不同的场景。...

  • AXIS框架搭建webservice简易教程

    AXIS 框架搭建 webservice 简易教程 1.1 Axis 介绍 Axis(Apache eXtendsible Interaction System 的缩写) 是一款开源的 WebService 运行引擎,它是 SOAP 协议的 一个...

  • axis+webservice教程

    axis+webservice教程_IT/计算机_专业资料。axis+webservice教程说明利用AXIS 开发 Webservice(一) —— 如何 发布自己的 webservice 先介绍下本人开发环境吧。 JDK ...

  • axis2之webservice新手超详细教程

    axis2之webservice新手超详细教程_IT/计算机_专业资料。实用myeclipse+axis2,发布webservice服务,使用mysql数据库,接口方法返回自定义对象集合...

  • axis+webservice教程

    axis+webservice教程_IT/计算机_专业资料。axis+webservice教程利用AXIS 开发 Webservice(一) —— 如何 一 发布自己的 webservice 先介绍下本人开发环境吧。 JDK ...

  • Axis2 webservice 发布教程 ,整合到自己的项目中

    Axis2 webservice 发布教程 ,整合到自己的项目中_计算机软件及应用_IT/计算机_专业资料。Axis2,webservice,发布 ,教程今日推荐 89份文档 ...

  • Axis2(WebService)经典教程

    WebService 大讲堂之 Axis2 系列教程 1. 用 POJO 实现 0 配置的 WebService 2. 4. 6. 复合类型数据的传递 二进制文件传输 跨服务会话(Session)管理 3. 使用...

  • Axis+webservice教程

    Axis+webservice教程_IT/计算机_专业资料。Axis+webservice教程利用AXIS 开发 Webservice(一) —— 如何 一 发布自己的 webservice 先介绍下本人开发环境吧。 JDK ...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email