惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

博客园 - L.Zhang

.Net Remoting RMI框架 自己开发连接池 JDBC访问数据库 使用传统的XMLHttpRequest发出Ajax请求 XML CDATA XPath 数据库操作的sql脚本 直接选择排序 直接插入排序 气泡排序 Builder 生成器模式(创建型模式) Abstract Factory 抽象工厂模式(创建型模式) Factory Method 工厂方法模式(创建型模式) Singleton单件模式(创建型模式) 使用Profile Service 服务端如何使用Session 让服务端返回xml 用Get方式访问
MyEclipse下开发Web Service
L.Zhang · 2008-01-23 · via 博客园 - L.Zhang
 

一. 创建Web Service工程 
在MyEclipse6.0中引入了一个新的工程即Web Service工程。
在选择类库添加到工程的构建路径中时,XFire Core Library是需要的,如果要在工程中开发一个客户端应用, XFire HTTP Client Libraries也是需要的。

. 创建Web Service 
单击工具栏中的New Web Service 启动向导。 

三. 部署Web Service 工程
Web Service可以部署在任何MyEclipse支持的J2EE应用服务器上,部署的方法与部署Web工程的方法一致。

四. 测试Web Service 
MyEclipse提供了一个Web Service Explorer来测试Web Service. 单击工具栏中的Launch Web Service Explorer

六. 创建客户端调用程序

package client;import java.net.MalformedURLException;
import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;import service.IHelloWorldService;public class HelloWorldClient 
{
    
public static void main(String[] args) 
    {
        Service srvcModel 
= new ObjectServiceFactory().create(IHelloWorldService.class);
        XFireProxyFactory factory 
= new XFireProxyFactory(XFireFactory.newInstance().getXFire());
        String helloWorldURL 
= "http://localhost:8080/WebServiceTest/services/HelloWorldService";
        
try
        {
           IHelloWorldService srvc 
= (IHelloWorldService)factory.create(srvcModel, helloWorldURL);
           String result 
= srvc.example("hello world");
           System.out.print(result);
        } 
        
catch (MalformedURLException e)
        {
           e.printStackTrace();
        }
    }
}