This function does a check to see if the item provided in itemId exists in ExtraView. It returns a simple Boolean result.

Input

Class

Name

Type

Required

Details

ItemExistsRequest

userId

String

Yes

The callers user name

ItemExistsRequest

password

String

Yes

The callers password

ItemExistsRequest

itemId

int

?

The int item id. This field is optional if itemIdStr is given, else it is required. It is recommended that you use itemIdStr

ItemExistsRequest

itemIdStr

String

?

The String item Id. This field is optional if itemId is used. It is recommended that you use itemIdStr

Output

Class

Name

Type

Required

Details

ItemExistsResponse

success

boolean

Yes

True is succeeded False if failed

ItemExistsResponse

returnCode

String

No

See Appendix for details

ItemExistsResponse

returnMessage

String

No

Human readable message

ItemExistsResponse

exists

boolean

Yes

The item in XML format

Example

public static void testItemExists(EVItemServiceStub stub) {
    try {
        ItemExistsDocument reqEnvelope = ItemExistsDocument.Factory.newInstance();
        ItemExistsRequest request = reqEnvelope.addNewItemExists().addNewParam0();
        request.setUserId(ServiceClientHelper.ADMIN_USER_ID);
        request.setPassword(ServiceClientHelper.ADMIN_PASSWORD);
        request.setItemId(CREATED_ISSUE_ID);
        ItemExistsResponseDocument resEnvelope = stub.itemExists(reqEnvelope);
        ItemExistsResponse response = resEnvelope.getItemExistsResponse().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");
    }
}