XML
UNIT 9
                            Development of Interface-based Programming
9.1 Development of Interface-based Programming :
WSDL Bindings:
WSDL binding describes how the service is bound to a messaging protocol especially SOAP messaging
protocol.
The binding element has two attributes:
     Name attribute – defines the name of the binding.
     Type attribute – points to the port for binding.
Binding to SOAP
Example :A request-response operation
<message name="getTermRequest">
    <part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
 <part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
 <operation name="getTerm">
   <input message="getTermRequest"/>
   <output message="getTermResponse"/>
 </operation>
</portType>
<binding type="glossaryTerms" name="b1">
<soap:binding style="document"
Transport="http://schemas.xmlsoap.org/soap/http" />
 <operation>
  <soap:operation
  SoapAction="http://example.com/getTerm"/>
  <input>
   <soap:body use="literal"/>
  </input>
  <output>
   <soap:body use="literal"/>
  </output>
 </operation>
</binding>
9.2 Reusable Web Services Infrastructure.
       Reusable interfaces by design need to be flexible.
For example, filter string parameters should enable a developer to dynamically query any SQL
database or NoSQL document store. In the same transaction the service should support arrays of
objects and related objects in return. This supports a huge number of access patterns “out of the box”
without the need for further customization.
       A server-side scripting and customization engine should modify requests and responses to
          handle formula fields, workflow triggers, special access controls, field validation, and custom
          usage limitations.
       The scripting engine can be used to implement custom services when necessary. Access to
          external web services is another way to extend the functionality of a reusable REST API
          services platform.
Making Comprehensive and Reusable APIs Work for You
       When a company adopts a strategy based on comprehensive and reusable interfaces.
       System administrators set up the back-end infrastructure and specify user access rights, and
          then application designers can safely build anything they want on top of that platform.
       This “decouples” client-side application development from server-side security, user
          management, and administration.
 Client-side developers can use the same REST API for each new project.
 They can now tap into a universal data access layer to power their applications — the back-end
   work is already taken care of for them.
 They might use different parameters or data objects, but the programming style is the same.
 A well-designed API can also minimize the differences between SQL, NoSQL, and file storage.
   Add filter string to file storage and you get NoSQL.
 Add object enforcement and metadata to NoSQL and you get SQL. Consistent and well-
   designed services provide a much easier way to learn the API and write applications.
 The applications written on a service platform also benefit from the virtualization provided by
   the service layer.