Command line arguments for the Axis2 sample application

The Axis2 sample application runs from the command prompt using Java. After you have compiled the Axis2 sample into an executable class files, you can perform configuration and incident management tasks with the following arguments.

Note To see the usage information for the Axis2 sample application, type ClassName where ClassName is the name of a sample application class.

Configuration Management

The following commands invoke Configuration Management functionality. These examples assume you are using the batch files provided with the Axis2 sample application to automatically set the class path and call the proper executable class.

Operation Command-line example
Create contact

CreateContactSample -name "FALCON, MERLINE2" -fullname "MERLINE2 FALCON"

Delete contact DeleteContactSample DeleteContactSample -name "FALCON, MERLINE2"
Retrieve contact

RetrieveContactSample RetrieveContactSample -name "FALCON, MERLINE2"

Update Contact UpdateContactSample UpdateContactSample -name "FALCON, MERLINE2" -email "fmerline2@HPE.com"

 

Incident Management

The following commands invoke Incident Management functionality. These examples assume you are using the batch files provided with the Axis2 sample application to automatically set the class path and call the proper executable class.

Operation Command-line example
Close incident

CloseIncidentSample -incidentId IM10001 -closeCode "User Closer" -resolution "Problem disappeared"

Create incident CreateIncidentSample -briefDescription "Java sample brief description" -category incident -incidentDescription "This is a description" -severity 1 -subCategory hardware -productType "missing or stolen" -initialImpact 1 -service Applications -primaryAssignmentGroup Networks
Create incident with attachment(s) CreateIncidentSample -briefDescription "Java sample brief description" -category incident -incidentDescription "This is a description" -severity 1 -subCategory hardware -productType "missing or stolen" -initialImpact 1 -service Applications -primaryAssignmentGroup Network -attachment 101.jpg:README.txt
Resolve incident

ResolveIncidentSample -incidentId IM10006 -resolution "Problem disappeared"

Retrieve incident list RetrieveIncidentListSample -incidentId IM10001:IM10002
Retrieve incident RetrieveIncidentSample -incidentId IM1001
Update incident UpdateIncidentSample -incidentId IM10006 -journalUpdates "User provided more information"

The CreateIncicentSample and UpdateIncidentSample classes can send MTOM attachments to Service Manager server. The command line argument is -attachment file_01:file_02. You can send more than one attachment to Service Manager server. Be sure to place the attachments in the <SM_installation_directory>\webservices\sample\sm7webservices\Axis2Sample\bin\resources directory.