Webservice Return Msg

In the CustomerService webservice class CustCustomerService the update service doesn't return a value. This means any programming consuming this service can not wait for a return to verify the call was successful. The create service does return a value, so you can piggy back off this same methodology. It is possible this is corrected in more recent roll ups, as I believe my system is still on RU1.

Original Code - As you see there is no return value, thus no way to make your service monitor for success.
public void update(AifEntityKeyList _entityKeyList, CustCustomer _custCustomer)
{
this.updateList(_entityKeyList, _custCustomer);
}

Modified Code - Below I have changed the structure slightly to follow the create structure. I added a local copy of the method UpdateList from class AifDocumentService to the CustCustomerService class and change it slightly to return the aifEntityKeyList.
public AifEntityKeyList update(AifEntityKeyList _entityKeyList, CustCustomer _custCustomer)
{
return this.updateListReturn(_entityKeyList, _custCustomer);
}
Local modified AifDocumentService UpdateList method
protected AifEntityKeyList updateListReturn(AifEntityKeyList entityKeyList, AifDocument document)
{
    AifResult aifResult;
    AxdBase axdBase;
    AifEndpointActionPolicyInfo endpointActionPolicyInfo;
    ;

    if (entityKeyList == null)
    {
        throw error(strfmt("@SYS91439", 'entityKeyList'));
    }

    if (document == null)
    {
        throw error(strfmt("@SYS91439", 'document'));
    }

    axdBase = document.getAxdInstance();
    endpointActionPolicyInfo = this.getEndpointActionPolicy(document);

    this.setAifFaultContext(#UpdateServiceOperationMethodName);

    constraintListCollection = new AifConstraintListCollection();

    aifResult = axdBase.updateList(entityKeyList, document.serialize(), endpointActionPolicyInfo, constraintListCollection);
    correlationEntityKeys = aifResult.parmEntityKeyList();

    return correlationEntityKeys;
}


About this Entry

This page contains a single entry by AsA published on September 18, 2010 12:23 AM.

Implementation - Complete was the previous entry in this blog.

Visitors is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 5.01