The TokenWSTest has great examples of how you use the TokenService.
public void testAuthenticateRealUser() throws Exception... {
String token = _client.authenticateUser("exolab\\castor", "castor");
}
There is your token.
As a reference the WSDL for the TokenWS can be accessed at:
http://localhost:8080/axis2/services/TokenService?wsdl
And you can use any SOAP graphic client to test it.
Niko,
I'll dig into ADB sometimes this week.
Niko,
On 3/26/08, Pierpaolo <pier...@gmail.com> wrote:
>
Xml Returned:
<tms:getTaskListResponse xmlns:tms="http://www.intalio.com/BPMS/Workflow/TaskManagementServices-20051109/">
-<tms:task>
-<tms:taskId>5zrmdgo9hc6vdara47nohnj58zosd56d</tms:taskId>
-<tms:taskType>INIT</tms:taskType>
-<tms:description>Examples - Absence Request</tms:description>
-<tms:creationDate>2008-03-24T19:48:40.000+09:00</tms:creationDate>
-<tms:roleOwner>examples\employee</tms:roleOwner>
-<tms:formUrl>oxf:/AbsenceRequest/AbsenceRequest.xform</tms:formUrl>
-<tms:processEndpoint>http://localhost:8080/ode/processes/AbsenceRequest/Employee_To_AbsenceRequest</tms:processEndpoint>
-<tms:initMessageNamespaceURI>http://www.intalio.com/workflow/forms/AbsenceRequest/AbsenceRequest</tms:initMessageNamespaceURI>
-<tms:initOperationSOAPAction>http://www.example.com/AbsenceRequest/Employee_To_AbsenceRequest/Employee_To_AbsenceRequest_PortType/Receive_Absence_Request</tms:initOperationSOAPAction>
</tms:task>
...
</tms:getTaskListResponse>
WSDL:
<xsd:complexType name="taskMetadata">
<xsd:sequence>
<xsd:element name="taskId" type="xsd:string"/>
<xsd:element name="taskState" type="xsd:token" maxOccurs="1" minOccurs="0"/>
<xsd:element name="taskType" type="xsd:token"/>
<xsd:element name="description" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="processId" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="creationDate" type="xsd:dateTime" maxOccurs="1" minOccurs="0"/>
<xsd:element name="deadline" type="xsd:dateTime" maxOccurs="1" minOccurs="0" />
<xsd:element name="priority" type="xsd:int" nillable="true" maxOccurs="1" minOccurs="0" />
<xsd:element name="userOwner" type="xsd:string" maxOccurs="unbounded" minOccurs="0"/>
<xsd:element name="roleOwner" type="xsd:string" maxOccurs="unbounded" minOccurs="0"/>
<xsd:element name="formUrl" type="xsd:anyURI"/>
<xsd:element name="failureCode" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="failureReason" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="userProcessCompleteSOAPAction" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="processEndpoint" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
<xsd:element name="initMessageNamespaceURI" type="xsd:anyURI" maxOccurs="1" minOccurs="0"/>
<xsd:element name="initOperationSOAPAction" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="isChainedBefore" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="previousTaskId" type="xsd:string" maxOccurs="1" minOccurs="0"/>
<xsd:element name="claimAction" type="tns:accessControlType" maxOccurs="1" minOccurs="0"/>
<xsd:element name="revokeAction" type="tns:accessControlType" maxOccurs="1" minOccurs="0"/>
<xsd:element name="saveAction" type="tns:accessControlType" maxOccurs="1" minOccurs="0"/>
<xsd:element name="completeAction" type="tns:accessControlType" maxOccurs="1" minOccurs="0"/>
<xsd:element name="attachments">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="attachment" type="tns:attachment" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="task">
<xsd:sequence>
<xsd:element name="metadata" type="tns:taskMetadata"/>
<xsd:element name="input">
<xsd:complexType>
<xsd:sequence>
<xsd:any maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="output">
<xsd:complexType>
<xsd:sequence>
<xsd:any maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
It is according to the WSDL.
So...what is the solution? Have I to use RemoteTMSClient?
I've used the following options when generating the adb code:
./wsdl2java.sh -Eosv -or -sp -ss -g -uri
$TEMPO_HOME/tms-service/src/main/axis2/TaskManagementService.wsdl -o
ax2
and looks like it worked with:
TaskManagementServicesStub stub = new
TaskManagementServicesStub("http://localhost:8080/axis2/services/TaskManagementServices");
GetTaskListRequest r1 = new GetTaskListRequest();
r1.setParticipantToken(token);
GetTaskListResponse gtr = stub.getTaskList(r1);
TaskMetadata[] tm = gtr.getTask();
So suppressing namespaces and turning off strict validation.
This is not really good for production environment though.
Regards,
Niko,
I have a question: Where can I find the RemoteTMSClient class and how
can I use it to make calls in the TMS service?