02-25-2015 08:40 AM
<wsdl:definitions name="HelloWorldImplService"
targetNamespace="http://webservicecxf.cdae.uci.cu/">
<wsdl:types>
<xs:schema elementFormDefault="unqualified"
targetNamespace="http://webservicecxf.cdae.uci.cu/" version="1.0">
<xs:element name="sayHi" type="tns:sayHi" />
<xs:element name="sayHiResponse" type="tns:sayHiResponse" />
<xs:complexType name="sayHi">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sayHiResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="sayHiResponse">
<wsdl:part element="tns:sayHiResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="sayHi">
<wsdl:part element="tns:sayHi" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHi" name="sayHi">
</wsdl:input>
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldImplServiceSoapBinding"
type="tns:HelloWorld">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document" />
<wsdl:input name="sayHi">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="sayHiResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldImplService">
<wsdl:port binding="tns:HelloWorldImplServiceSoapBinding"
name="HelloWorldImplPort">
<soap:address location="http://localhost:8080/webservicecxf/HelloWorld" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
targetNamespace="http://www.bpmnwithactiviti.org"
xmlns:tns="http://www.bpmnwithactiviti.org"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:myservice="http://webservicecxf.cdae.uci.cu/">
<import importType="http://schemas.xmlsoap.org/wsdl/"
location="http://localhost:8080/webservicecxf/HelloWorld?wsdl"
namespace="http://webservicecxf.cdae.uci.cu/" />
<message id="sayHiRequestMessage"
itemRef="tns:sayHiRequestItem" />
<message id="sayHiResponseMessage"
itemRef="tns:sayHiResponseItem" />
<itemDefinition id="sayHiRequestItem"
structureRef="myservice:sayHi" />
<itemDefinition id="sayHiResponseItem"
structureRef="myservice:sayHiResponse" />
<interface name="Say Hi"
implementationRef="myservice:HelloWorld">
<operation id="sayHiOperation"
name="Say Hi operation"
implementationRef="myservice:sayHi">
<inMessageRef>
tns:sayHiRequestMessage
</inMessageRef>
<outMessageRef>
tns:sayHiResponseMessage
</outMessageRef>
</operation>
</interface>
<itemDefinition id="arg0"
structureRef="string" />
<itemDefinition id="return"
structureRef="string" />
<itemDefinition id="name"
structureRef="string" />
<itemDefinition id="greet"
structureRef="string" />
<process id="webServiceProcess">
<startEvent id="startevent" name="Start"/>
<sequenceFlow sourceRef="startevent" targetRef="webService"/>
<serviceTask id="webService"
name="Say hi web service"
implementation="##WebService"
operationRef="tns:sayHiOperation">
<ioSpecification>
<dataInput itemSubjectRef="tns:sayHiRequestItem" id="dataInput" />
<dataOutput itemSubjectRef="tns:sayHiResponseItem" id="dataOutput" />
<inputSet>
<dataInputRefs>dataInput</dataInputRefs>
</inputSet>
<outputSet>
<dataOutputRefs>dataOutput</dataOutputRefs>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<sourceRef>name</sourceRef>
<targetRef>arg0</targetRef>
</dataInputAssociation>
<dataOutputAssociation>
<sourceRef>return</sourceRef>
<targetRef>greet</targetRef>
</dataOutputAssociation>
</serviceTask>
<sequenceFlow sourceRef="webService" targetRef="scriptTask1"/>
<scriptTask id="scriptTask1" scriptFormat="groovy">
<script>
out:println greet;
</script>
</scriptTask>
<sequenceFlow sourceRef="scriptTask2" targetRef="endevent"/>
<endEvent id="endevent" name="End"/>
</process>
</definitions>
public class WebServiceTest {
@Rule
public ActivitiRule activitiRule = new ActivitiRule("activiti.cfg-mem.xml");
@Test
@Deployment(resources = { "process.bpmn20.xml" })
public void queryTask() {
Map<String, Object> variableMap = new HashMap<String, Object>();
variableMap.put("name", "Carlos");
ProcessInstance processInstance = activitiRule.getRuntimeService()
.startProcessInstanceByKey("webServiceProcess", variableMap);
Object responseValue = activitiRule.getRuntimeService().getVariable(
processInstance.getProcessInstanceId(), "greet");
Assert.assertEquals("Hello Carlos", responseValue);
}
}
03-21-2015 07:22 PM
03-23-2015 08:46 AM
03-23-2015 11:02 AM
03-23-2015 11:22 AM
03-23-2015 11:33 AM
03-23-2015 05:55 PM
03-24-2015 09:14 AM
03-26-2015 03:57 AM
03-26-2015 02:58 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.