You are here: Entitlement Management > Entitlement Service Agreement Attributes > updateServiceAgreementAttributes

Update Service Agreement Attributes for a Line Item

Description

Updates service agreement attributes for a line item for which the corresponding entitlement is in Draft stage. The input of this Web service is the output of getServiceAgreementAttributes.xml.

In the input XML, only the attributes with "overridable" property set to "true" can be modified, and the remaining information is treated as read-only.

Only the overridable attributes are modified.

Default Protocol Method Type URI
HTTPS POST updateServiceAgreementAttributes.xml

POST Parameters

Parameter Description Valid Values Optional
entServiceAgreementAttributesXml XML string containing attributes to be updated. String No

Sample Code

import java.io.IOException;
//..............................
//..............................
//..............................
import org.apache.http.params.HttpParams;
public class EMSSample {
        private static DefaultHttpClient httpclient = new DefaultHttpClient();
        private static Principal principal = null;
        //..............................
        //..............................
        //..............................
        public static String updateServiceAgreementAttributes.xml()throws Exception {
                if(!verifyLogin()){
                        return "login failed";
                }
                HttpContext context = new BasicHttpContext();
                context.setAttribute(ClientContext.USER_TOKEN, principal);
                HttpPost post = new HttpPost("https://localhost:8080/ems/3.6/updateServiceAgreementAttributes.xml");
                List<NameValuePair> nvps = new ArrayList<NameValuePair>();
                nvps.add(new BasicNameValuePair("entServiceAgreementAttributesXml", ""));
                post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
                HttpResponse response = httpclient.execute(post, context);
                HttpEntity entity = response.getEntity();
                byte[] b = null;
                if (entity != null) {
                        long l = entity.getContentLength();
                        b = new byte[(int) l];
                        entity.getContent().read(b);
                        entity.consumeContent();
                }
                return new String(b);
        }
}

Sample Response

<?xml version="1.0" encoding="UTF-8"?> 
<emsResponse> 
   <stat>ok</stat> 
</emsResponse>
See Also:

Output Format for Failure

Error Codes

Error Code Description
101 You are not authorized to use this service.
112 The input string is not valid.
128 You should log on first.
132 The URL address does not exist.
618 Could not find the entitlement line item.
692 Entitlement already in Complete state and cannot be Updated/Deleted.
1030 Service agreement attribute value can be updated only for 'Draft' entitlement.
1042 EntitlementServiceAgreement not found for passed ID={0}
1043 XML schema Validation Failed.
1081 Invalid Web service version provided
1084 No Web service version provided
1088 The EMS system is running on HTTPS. Please provide the correct Web service URL.