Description:
This documment outlines the procedure to run the sample java web services code in Service Desk Manager 12.x which is available in the $NX_ROOT\\samples\sdk\websvc\java\test2_basic directory. Sample JWS.java demonstrates the login(), getHandleForUserid(), createRequest(), createChangeOrder(), createTicket() and logout() methods.
Solution:
To run the sample code, perform the following steps:
Below is the expected output:
C:\PROGRA~1\CA\SERVIC~2\samples\sdk\websvc\java\test2_basic>run_java_test.bat
Compiling JWS.java
Running JWS
27/08/2013 2:41:02 PM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax
.mail.internet.MimeMultipart). Attachment support is disabled.
login succeeded!
Contact information for ServiceDesk:
<?xml version="1.0" encoding="UTF-8"?>
<UDSObject>
<Handle>cnt:F6FADE63C7B40E4285313616B8842938</Handle>
<Attributes>
<Attribute DataType="2002">
<AttrName>first_name</AttrName>
<AttrValue/>
</Attribute>
<Attribute DataType="2002">
<AttrName>last_name</AttrName>
<AttrValue>ServiceDesk</AttrValue>
</Attribute>
<Attribute DataType="2002">
<AttrName>access_type.sym</AttrName>
<AttrValue>Administration</AttrValue>
</Attribute>
<Attribute DataType="2005">
<AttrName>organization</AttrName>
<AttrValue/>
</Attribute>
<Attribute DataType="2002">
<AttrName>organization.name</AttrName>
<AttrValue/>
</Attribute>
<Attribute DataType="2002">
<AttrName>admin_org.name</AttrName>
<AttrValue/>
</Attribute>
<Attribute DataType="2001">
<AttrName>group_list.length</AttrName>
<AttrValue>0</AttrValue>
</Attribute>
</Attributes>
</UDSObject>
Creating a Request...
New Request created:
requestHandle = cr:400002
requestNumber = 27
The Request can be displayed using the web_url:
'http://servicedesk:8080/CAisd/pdmweb.exe?OP=SEARCH+FACTORY=cr+SKIPLIST=1
+QBE.EQ.id=400002'
Creating a Change Order...
New Change Order created:
changeHandle = chg:400002
changeNumber = 22
The Change Order can be displayed using the web_url:
'http://servicedesk:8080/CAisd/pdmweb.exe?OP=SEARCH+FACTORY=chg+SKIPLIST=
1+QBE.EQ.id=400002'
Creating a Ticket...
New Ticket created:
ticketHandle = cr:400003
ticketNumber = 28