Home | SOA platform basics

Chapter: Service Oriented Architecture

SOA platform basics

1. SOA platform basics 2. SOA support in J2EE – Java API for XML 3. -based web services (JAX-WS) - Java architecture for XML binding (JAXB) – Java API for XML Registries (JAXR) - Java API for XML based RPC (JAX-RPC) 4. Web Services Interoperability Technologies (WSIT) 5. SOA support in .NET 6. Common Language Runtime 7. ASP.NET web forms 8. ASP.NET web services 9. Web Services Enhancements (WSE)

SOA platform basics

 

PRE-REQUISITE DISCUSSION:

 

Development environment

Runtime

APIs

 

Operating system

 

The WS-Coordination framework exposes an Activation Service which supports the creation of coordinators for specific protocols and their associated contexts. The process of invoking

 

Message Processing Logic The part of a Web service and its surrounding environment that executes a variety of SOAP message processing tasks. Message processing logic is performed by a combination of runtime services, service agents , as well as service logic related to the processing of the WSDL definition.

 

Business Logic The back-end part of a Web service that performs tasks in response to the receipt of SOAP message contents. Business logic is application-specific and can range dramatically in scope, depending on the functionality exposed by the WSDL definition. For example, business logic can consist of a single component providing service-specific functions, or it can be represented by a legacy application that offers only some of its functions via the Web service.

 

SOA support in J2EE:

 

It is important for application development to allow Internet communication between programs.

 

Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic.

 

A better way to communicate between application-specific

 

A better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this. SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.

SOAP Building Blocks

 

A SOAP message is an ordinary XML document containing the following elements:

 

 

 

 

 

An Envelope element that identifies the XML document as a SOAP message A Header element that contains header information

 

A Body element that contains call and response information

 

A Fault element containing errors and status information

 

Syntax Rules

Here are some important syntax rules:

 

A SOAP message MUST be encoded using XML

 

A SOAP message MUST use the SOAP Envelope namespace A SOAP message MUST use the SOAP Encoding namespace A SOAP message must NOT contain a DTD reference

 

A SOAP message must NOT contain XML Processing Instructions <?xml version="1.0"?>

 

<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header>

 

...

</soap:Header>

<soap:Body>

...

<soap:Fault>

...

</soap:Fault>

</soap:Body>

</soap:Envelope>

 

The SOAP Envelope element is the root element of a SOAP message. The SOAP Envelope Element

 

The required SOAP Envelope element is the root element of a SOAP message. This element defines the XML document as a SOAP message.

 

Example

<?xml version="1.0"? > <soap:Envelope

 

xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding" >

 

...

Message information goes here

...

</soap:Envelope >

The xmlns:soap Namespace

 

Notice the xmlns:soap namespace in the example above. It should always have the value of: "http://www.w3.org/2001/12/soap-envelope".

 

The namespace defines the Envelope as a SOAP Envelope.

 

If a different namespace is used, the application generates an error and discards the message. The encodingStyle Attribute

 

The encodingStyle attribute is used to define the data types used in the document. This attribute may appear on any SOAP element, and applies to the element's contents and all child elements.

 

A SOAP message has no default encoding.

 

Java API for XML-based web services (JAX-WS):

 

Any application can have a Web Service component.

Web Services can be created regardless of programming language.

 

ASP.NET is a development framework for building web pages and web sites with HTML, CSS, JavaScript and server scripting.

 

ASP.NET supports three different development methods: Web Pages, MVC (Model View Controller), and Web Forms.

 

A Web Service Example

 

In the following example we will use ASP.NET to create a simple Web Service that converts the temperature from Fahrenheit to Celsius, and vice versa:

 

<%@ WebService Language="VBScript" Class="TempConvert" %> Imports System

 

Imports System.Web.Services

 

Public Class TempConvert :Inherits WebService <WebMethod()> Public Function FahrenheitToCelsius (ByVal Fahrenheit As String) As String

 

dim fahr fahr=trim(replace(Fahrenheit,",","."))

 

if fahr="" or IsNumeric(fahr)=false then return "Error" return ((((fahr) - 32) / 9) * 5)

 

end function

<WebMethod()> Public Function CelsiusToFahrenheit (ByVal Celsius As String) As String

 

dim cel cel=trim(replace(Celsius,",","."))

 

if cel="" or IsNumeric(cel)=false then return "Error" return ((((cel) * 9) / 5) + 32)

 

end function end class

 

The first line in the example states that this is a Web Service, written in VBScript, and has the class name "TempConvert":

 

<%@ WebService Language="VBScript" Class="TempConvert" %>

 

The next lines import the namespace "System.Web.Services" from the .NET framework: Imports System

 

Imports System.Web.Services

 

The next line defines that the "TempConvert" class is a WebService class type: Public Class TempConvert :Inherits WebService

 

The next steps are basic VB programming. This application has two functions. One to convert from Fahrenheit to Celsius, and one to convert from Celsius to Fahrenheit

 

The only difference from a normal application is that this function is defined as a "WebMethod()".

 

Use "WebMethod()" to convert the functions in your application into web services: <WebMethod()> Public Function FahrenheitToCelsius

 

(ByVal Fahrenheit As String) As String dim fahr fahr=trim(replace(Fahrenheit,",","."))

 

if fahr="" or IsNumeric(fahr)=false then return "Error" return ((((fahr) - 32) / 9) * 5)

 

end function

 

<WebMethod()> Public Function CelsiusToFahrenheit (ByVal Celsius As String) As String

 

dim cel cel=trim(replace(Celsius,",","."))

 

if cel="" or IsNumeric(cel)=false then return "Error" return ((((cel) * 9) / 5) + 32)

 

end function

Then, end the class:

 

Java architecture for XML binding (JAXB) &Java API for XML Registries (JAXR) - Java API for XML based RPC (JAX-RPC):

 

ASP.NET Web Forms is a part of the ASP.NET web application framework and is included with Visual Studio.

 

It is one of the four programming models you can use to create ASP.NET web applications, the others are ASP.NET MVC, ASP.NET Web Pages, and ASP.NET Single Page Applications.

 

Web Forms are pages that your users request using their browser.

 

These pages can be written using a combination of HTML, client-script, server controls, and server code.

 

When users request a page, it is compiled and executed on the server by the framework, and then the framework generates the HTML markup that the browser can render.

 

An ASP.NET Web Forms page presents information to the user in any browser or client

 

device.

Using Visual Studio, you can create ASP.NET Web Forms.

 

The Visual Studio Integrated Development Environment (IDE) lets you drag and drop server controls to lay out your Web Forms page.

 

These properties, methods, and events are used to define the web page's behavior, look and feel, and so on.

 

To write server code to handle the logic for the page, you can use a .NET language like Visual Basic or C#.

 

ASP.NET and Visual Studio documentation spans several versions. Topics that highlight features from previous versions may be useful for your current tasks and scenarios using the latest versions.

 

Web Services Interoperability Technologies (WSIT):

 

Web Services Interoperability Technology (WSIT) is an open-source project started by Sun Microsystems to develop the next-generation of Web service technologies. It provides interoperability between Java Web Services and Microsoft's Windows Communication Foundation (WCF).[1]

 

It consists of Java programming language APIs that enable advanced WS-* features to be used in a way that is compatible with Microsoft's Windows Communication Foundation as used by .NET. The interoperability between different products is accomplished by implementing a number of Web Services specifications, like JAX-WS that provides interoperability between Java Web Services and Microsoft Windows Communication Foundation.[2]

 

WSIT is distributed under the terms of the CDDL open-source license, and is currently under development as part of project Metro.

 

WSIT is a series of extensions to the basic SOAP protocol, and so uses JAX-WS and JAXB. It is not a new protocol such as the binary DCOM.

 

WSIT implements the WS-I specifications, including:

 

Metadata

WS-MetadataExchange

WS-Transfer

WS-Policy

Security

WS-Security

WS-SecureConversation

WS-Trust

WS-SecurityPolicy

Messaging

 

WS-ReliableMessaging

WS-RMPolicy

Transactions

WS-Coordination

WS-AtomicTransaction

 

SOA support in .NET:

 

Based on Microsoft ASP.NET technology, in which code that runs on the server dynamically generates Web page output to the browser or client device.Compatible with any browser or mobile device. An ASP.NET Web page automatically renders the correct browser-compliant HTML for features such as styles, layout, and so on.

 

Compatible with any language supported by the .NET common language runtime, such as Microsoft Visual Basic and Microsoft Visual C#. Built on the Microsoft .NET Framework. This provides all the benefits of the framework, including a managed environment, type safety, and inheritance.

 

Flexible because you can add user-created and third party controls to them.Separation of HTML and other UI code from application logic. A rich suite of server controls for common tasks, including data access.

 

Powerful data binding, with great tool support.

Support for client-side scripting that executes in the browser.

 

Support for a variety of other capabilities, including routing,security, performance, internationalization, testing, debugging, error handling and state management.

 

Web application programming presents challenges that do not typically arise whenprogramming traditional client-based applications. Among the challenges are:

 

Implementing a rich Web user interface - It can be difficult and tedious to design and implement a user interface using basic HTML facilities, especially if the page has a complex layout, a large amount of dynamic content, and full-featured user-interactive objects.

 

Separation of client and server - In a Web application, the client (browser) and server are different programs often running on different computers (and even on different operating systems). Consequently, the two halves of the application share very little information; they can communicate, but typically exchange only small chunks of simple information.

 

Stateless execution - When a Web server receives a request for a page, it finds the page, processes it, sends it to the browser, and then discards all page information. If the user requests the same page again, the server repeats the entire sequence, reprocessing the page from scratch.

 

Put another way, a server has no memory of pages that it has processed—page are stateless. Therefore, if an application needs to maintain information about a page, its stateless nature can become a problem. Unknown client capabilities - In many cases, Web applications are accessible to many users using different browsers. Browsers have different capabilities, making it difficult to create an application that will run equally well on all of them.

 

Complications with data access - Reading from and writing to a data source in traditional Web applications can be complicated and resource-intensive.

 

Complications with scalability - In many cases Web applications designed with existing methods fail to meet scalability goals due to the lack of compatibility between the various components of the application. This is often a common failure point for applications

 

under a heavy growth cycle.

 

Meeting these challenges for Web applications can require substantial time and effort. ASP.NET Web Forms and the ASP.NET framework address these challenges in the following ways:

 

Intuitive, consistent object model - The ASP.NET page framework presents an object model that enables you to think of your forms as a unit, not as separate client and server pieces.

 

In this model, you can program the page in a more intuitive way than in traditional Web applications, including the ability to set properties for page elements and respond to events.

 

In addition, ASP.NET server controls are an abstraction from the physical contents of an HTML page and from the direct interaction between browser and server. In general, you can use server controls the way you might work with controls in a client application and not have to think about how to create the HTML to present and process the controls and their contents.

 

Common Language Runtime:

The Common Language Runtime (CLR), the virtual machine component of Microsoft's

 

.NET framework, manages the execution of .NET programs. A process known as just-in-time compilation converts compiled code into machine instructions which the computer's CPU then executes.[1] The CLR provides additional services including memory management, type safety, exception handling, garbage collection, security and thread management. All programs written for the .NET framework, regardless of programming language, are executed by the CLR. All versions of the .NET framework include CLR.

 

CLR implements the Virtual Execution System (VES) as defined in the Common Language Infrastructure (CLI) standard, initially developed by Microsoft itself. A public standard defines the Common Language Infrastructure specification.

 

ASP.NET web forms:

 

ASP.NET Web Forms are:

 

Based on Microsoft ASP.NET technology, in which code that runs on the server dynamically generates Web page output to the browser or client device.

 

Compatible with any browser or mobile device. An ASP.NET Web page automatically renders the correct browser-compliant HTML for features such as styles, layout, and so on.

 

Compatible with any language supported by the .NET common language runtime, such as Microsoft Visual Basic and Microsoft Visual C#. Built on the Microsoft .NET Framework. This provides all the benefits of the framework, including a managed environment, type safety, and inheritance.

 

Flexible because you can add user-created and third party controls to them. ASP.NET Web Forms offer:

 

Separation of HTML and other UI code from application logic.

 

A rich suite of server controls for common tasks, including data access. Powerful data binding, with great tool support.

 

Support for client-side scripting that executes in the browser.

 

Support for a variety of other capabilities, including routing, security, performance, internationalization, testing, debugging, error handling and state management.

 

ASP.NET Web Forms Helps You Overcome Challenges

 

Web application programming presents challenges that do not typically arise when programming traditional client-based applications. Among the challenges are: Implementing a rich Web user interface - It can be difficult and tedious to design and implement a user interface using basic HTML facilities, especially if the page has a complex layout, a large amount of dynamic content, and full-featured user-interactive objects.

 

Separation of client and server - In a Web application, the client (browser) and server are different programs often running on different computers (and even on different operating systems). Consequently, the two halves of the application share very little information; they can communicate, but typically exchange only small chunks of simple information.

 

Stateless execution - When a Web server receives a request for a page, it finds the page, processes it, sends it to the browser, and then discards all page information. If the user requests the same page again, the server repeats the entire sequence, reprocessing the page from scratch. Put another way, a server has no memory of pages that it has processed—page are stateless.

 

Therefore, if an application needs to maintain information about a page, its stateless nature can become a problem.

 

Unknown client capabilities - In many cases, Web applications are accessible to many users using different browsers. Browsers have different capabilities, making it difficult to

 

create an application that will run equally well on all of them. Complications with data access - Reading from and writing to a data source in traditional Web applications can be complicated and resource-intensive. Complications with scalability - In many cases Web applications designed with existing methods fail to meet scalability goals due to the lack of compatibility between the various components of the application. This is often a common failure point for applications under a heavy growth cycle.

 

Meeting these challenges for Web applications can require substantial time and effort.

 

ASP.NET web service:

 

ASP.NET Web Forms and the ASP.NET framework address these challenges in the following ways:

 

Intuitive, consistent object model - The ASP.NET page framework presents an object model that enables you to think of your forms as a unit, not as separate client and server pieces.

 

In this model, you can program the page in a more intuitive way than in traditional Web applications, including the ability to set properties for page elements and respond to events.

 

In addition, ASP.NET server controls are an abstraction from the physical contents of an HTML page and from the direct interaction between browser and server. In general, you can use server controls the way you might work with controls in a client application and not have to think about how to create the HTML to present and process the controls and their contents.

 

Web Services Enhancements (WSE):

 

ASP.NET Web Forms bring to Web applications the familiar model of writing event handlers for events that occur on either the client or server.

 

The ASP.NET page framework abstracts this model in such a way that the underlying mechanism of capturing an event on the client, transmitting it to the server, and calling the appropriate method is all automatic and invisible to you.

 

The result is a clear, easily written code structure that supports event-driven development. Intuitive state management - The ASP.NET page framework automatically handles the task of maintaining the state of your page and its controls, and it provides you with explicit ways to maintain the state of application-specific information.

 

This is accomplished without heavy use of server resources and can be implemented with or without sending cookies to the browser.

 

Browser-independent applications - The ASP.NET page framework enables you to create all application logic on the server, eliminating the need to explicitly code for differences in browsers.

 

However, it still enables you to take advantage of browser-specific features by writing client-side code to provide improved performance and a richer client experience. .NET Framework common language runtime support - The ASP.NET page framework is built on the

 

.NET Framework, so the entire framework is available to any

 

ASP.NET application.

 

Your applications can be written in any language that is compatible that is with the runtime.

 

In addition, data access is simplified using the data access infrastructure provided by the

.NET Framework, including ADO.NET.

 

.NET Framework scalable server performance - The ASP.NET page framework enables you to scale your Web application from one computer with a single processor to a multi-computer Web farm cleanly and without complicated changes to the application's logic.

 

Features of ASP.NET Web Forms

 

Server Controls - ASP.NET Web server controls are objects on ASP.NET Web pages that run when the page is requested and that render markup to the browser. Many Web server controls are similar to familiar HTML elements, such as buttons and text boxes. Other controls encompass complex behavior, such as a calendar controls, and controls that you can use to connect to data sources and display data.

 

Master Pages - ASP.NET master pages allow you to create a consistent layout for the pages in your application.

 

Deployment and Hosting - Visual Studio, ASP.NET, Azure, and IIS provide tools that help you with the process of deploying and hosting your Web Forms application

 

SIGNIFICANCE:

 

The runtime provides the following benefits:

 

Performance improvements.

 

The ability to easily use components developed in other languages. Extensible types provided by a class library.

 

Language features such as inheritance, interfaces, and overloading for object-oriented programming.

 

Support for explicit free threading that allows creation of multithreaded, scalable applications. Support for structured exception handling.

 

Support for custom attributes. Garbage collection.

 

Use of delegates instead of function pointers for increased type safety and security. For more information about delegates, see Common Type System.

 

APPLICATION AREA:

 

the .net forms are used in all the online applications

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Service Oriented Architecture : SOA platform basics |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.