getItem

Retrieves an item from the ExtraView database based upon the itemId you provide in the function call.

Input

Class

Name

Type

Required

Details

GetItemRequest

userId

String

Yes

The callers user name

GetItemRequest

password

String

Yes

The callers password

GetItemRequest

itemId

Integer

No

The Id of the item being fetched

GetItemRequest

itemId

int

?

The int item id (this is optional if itemIdStr is given, else it is required)

GetItemRequest

returnRawXML

Boolean

No

If you want the raw XML returned with the parse fields. This should be set to false for performance.

Output

Class

Name

Type

Required

Details

GetItemResponse

success

boolean

Yes

True is succeeded False if failed

GetItemResponse

returnCode

String

No

See Appendix for details

GetItemResponse

returnMessage

String

No

Human readable message

GetItemResponse

xml

String

No

The item in XML format

ExecuteItemSearchResponse

itemRecords

Array[]

Yes

An array of ItemRecord objects

ItemRecord

numberOfItemRecordFields

int

Yes

The number of field records in the child array

ItemRecord

itemRecordFields

Array[]

Yes

An array of ItemRecordField objects

ItemRecordField

fieldId

String

Yes

The id of the field

ItemRecordField

fieldTitle

String

Yes

The title of the field

ItemRecordField

fieldValue

String

Yes

The value of the field

ItemRecordField

row

int

Yes

The repeating row value

Example

public static void testGetItem(EVItemServiceStub stub) {
    try {
        GetItemDocument reqEnvelope = GetItemDocument.Factory.newInstance();
        GetItemRequest request = reqEnvelope.addNewGetItem().addNewParam0();
        request.setUserId(ServiceClientHelper.ADMIN_USER_ID);
        request.setPassword(ServiceClientHelper.ADMIN_PASSWORD);
        request.setItemId(CREATED_ISSUE_ID);
        request.setReturnRawXML(true);
        GetItemResponseDocument resEnvelope = stub.getItem(reqEnvelope);
        GetItemResponse response = resEnvelope.getGetItemResponse().getReturn();
        if (response.getSuccess()) {
            System.out.println("success: [" + response.getReturnCode() + "] : " +
                                              response.getReturnMessage());
        } else {
            System.out.println("failure: [" + response.getReturnCode() + "] : " +
                                              response.getReturnMessage());
        }
    } catch (Exception e) {
        e.printStackTrace();
        System.err.println("nnn");
    }
}