What should you do?

Posted by: Pdfprep Category: 70-480 Tags: , ,


You are developing a web application that retrieves data from a web service. The data being retrieved is a custom binary datatype named bint. The data can also be represented in XML.

Two existing methods named parseXml() and parseBint() are defined on the page.

The application must:

• Retrieve and parse data from the web service by using binary format if possible

• Retrieve and parse the data from the web service by using XML when binary format is not possible

You need to develop the application to meet the requirements.

What should you do? (To answer, drag the appropriate code segment to the correct location. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)



* accepts : ‘application/bint, text/xml’

accepts:’application/bin,text/xml’ to accept only XML and binary content in HTML responses.

* Use the following condition to check if the html response content is binary: If(request.getResponseHeader("Content-Type")=="application/bint"

* var request = $.ajax({


accepts: ‘application/bint, text/xml’,

datafilter: function(data,type){


return parseBint(data);


return parseXml();


success: function (data) {




Leave a Reply

Your email address will not be published.