activiti designer源码的研究(四) 之servicetask调用webservice(example)

一个调用webservice的例子,webservice发布在不同的包中

CounterThree.java

<span style="font-size:14px;">package org.chen.webservice;

import javax.jws.WebService;

@WebService
public interface CounterThree {
   String prettyPrintCount(String prefix, String suffix);
  
}</span>

CounterThreeImpl.java

<span style="font-size:14px;">package org.chen.webservice;

public class CounterThreeImpl implements CounterThree {
	@Override
	public String prettyPrintCount(String prefix, String suffix) {
		// TODO Auto-generated method stub
		return prefix + " " + suffix;
	}
}</span>
Server.java

<span style="font-size:14px;">package org.chen.webservice;

import javax.xml.ws.Endpoint;

public class Server {
   public static void main(String[]args){
	   Endpoint.publish("http://localhost:63083/CounterThree", new CounterThreeImpl());
   }
}</span>
CounterTwo.java

<span style="font-size:14px;">package org.fan.webservice;

import javax.jws.WebService;

@WebService
public interface CounterTwo {
  String prettyPrintCountTwo(String suffixTwo, String prefixTwo);
  
  void inc();
}</span>
CounterTwoImpl.java
<span style="font-size:14px;">package org.fan.webservice;

public class CounterTwoImpl implements CounterTwo{

	@Override
	public String prettyPrintCountTwo(String suffixTwo, String prefixTwo) {
		// TODO Auto-generated method stub
		return suffixTwo + " "+ prefixTwo;
	}

	@Override
	public void inc() {
		// TODO Auto-generated method stub
		
	</span>}
}
Server.java

<span style="font-size:14px;">package org.fan.webservice;

import javax.xml.ws.Endpoint;

public class Server {
   public static void main(String[]args){
	   Endpoint.publish("http://localhost:63082/CounterTwo", new CounterTwoImpl());
   }</span>
}
WebServiceSimplisticThreeTest.testWebServiceInvocationWithSimplisticDataFlow.bpmn20.xml

<span style="font-size:14px;"><?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
             xmlns:activiti="http://activiti.org/bpmn" 
             xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" 
             xmlns:omgdc="http://www.omg.org/spec/DD/201005
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值