一个调用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