Parsing: Solving SOA integration problems with Saaj

Source: Internet
Author: User
Tags soap

Service-oriented architectures (SOA) and service-oriented integration (SOI) are widely used, and there is a need to become increasingly visible: business needs to integrate systems and allow consumers to access services using standards-based methods. SOA is an architectural paradigm. In this architecture, reusable business logic manifests itself as a set of services that contain standards-based, well-defined interfaces, and can be accessed in a loosely coupled manner. Because of the support of Web service standards vendors and the relatively easy integration of different systems with software based on this standard, SOA has been universally recognized as a solution to enterprise integration issues.

Java-based middleware and enterprise application integration (EAI) products have been in use for some time now, and many companies are using the technology in different ways. While some services are developed and provided on the Java platform, there are other flexible requirements for service consumption from Java based applications. SOAP with Attachments APIs for Java (SAAJ) helps the consumption of these services by providing a standard API for accessing services.

There are several java-based APIs that can be used to access services. These services include Saaj, Java API for XML RPC (JAX-RPC), and Web service invocation framework (WSIF). Saaj provides an API for building service consumers and providers. Let's take a look at how to leverage Saaj to develop Web service consumers in SOA. We will illustrate the combined process of WebLogic integration, which organically combines services for obtaining city postal codes, obtaining the temperature of the postal partitions, and an example Saaj client that consumes the service.

What is Saaj?

Saaj is an API specification based on XML message delivery implemented by SOAP protocol in loosely coupled software systems. As the name suggests, Saaj supports SOAP messages with attachments.

You already know a lot about the Java API for XML messaging (JAXM), and may be wondering what happened to JAXM. The idea of the JAXM 1.0 is to allow developers to write a business application that supports messaging standards based on SOAP by providing messaging and SOAP APIs. With the launch of the JAXM version 1.1, the SOAP API (JAVAX.XML.SOAP) is split into SAAJ1.1 specifications and jaxm1.1,jaxm1.1 contains only messaging based APIs (javax.xml.messaging). Currently, the Saaj version being used is 1.2. The WebLogic Server 8.1 SP2 supports the Saaj 1.1 specification.

The SAAJ 1.2 API consists primarily of JAVAX.XML.SOAP packages, which provide abstractions for SOAP messages with multipurpose Interconnection Mail Extension Protocol (MIME) attachments. The API provides methods for creating point-to-point connections to endpoints, methods for creating and processing SOAP messages and attachments, and methods for receiving and handling soap errors.

Although there are several technologies available for you to choose from when developing an enterprise application, some techniques may be more appropriate for different issues. It is important to choose the right tool.

What is the reason for choosing Saaj? Saaj is certainly ideal for document-based synchronous or asynchronous Web Service. Saaj is easy to use and helps you integrate a variety of Web service in a Java environment, extending the natural support for document-style Web service communications (natural support). Saaj also supports XML messaging based on standard interfaces, and this has been widely supported by vendors.

Writing a client

Listing 1 shows a simple consumer written in Saaj that accesses a synchronized WebLogic integration process to get the temperature of a given city. Complete items can be downloaded from the www.WebLogicPro.com. The steps necessary to complete the project are discussed below.

Service-oriented architectures (SOA) and service-oriented integration (SOI) are widely used, and there is a need to become increasingly visible: business needs to integrate systems and allow consumers to access services using standards-based methods. SOA is an architectural paradigm. In this architecture, reusable business logic manifests itself as a set of services that contain standards-based, well-defined interfaces, and can be accessed in a loosely coupled manner. Because of the support of Web service standards vendors and the relatively easy integration of different systems with software based on this standard, SOA has been universally recognized as a solution to enterprise integration issues.

Java-based middleware and enterprise application integration (EAI) products have been in use for some time now, and many companies are using the technology in different ways. While some services are developed and provided on the Java platform, there are other flexible requirements for service consumption from Java based applications. SOAP with Attachments APIs for Java (SAAJ) helps the consumption of these services by providing a standard API for accessing services.

There are several java-based APIs that can be used to access services. These services include Saaj, Java API for XML RPC (JAX-RPC), and Web service invocation framework (WSIF). Saaj provides an API for building service consumers and providers. Let's take a look at how to leverage Saaj to develop Web service consumers in SOA. We will illustrate the combined process of WebLogic integration, which organically combines services for obtaining city postal codes, obtaining the temperature of the postal partitions, and an example Saaj client that consumes the service.

What is Saaj?

Saaj is an API specification based on XML message delivery implemented by SOAP protocol in loosely coupled software systems. As the name suggests, Saaj supports SOAP messages with attachments.

You already know a lot about the Java API for XML messaging (JAXM), and may be wondering what happened to JAXM. The idea of the JAXM 1.0 is to allow developers to write a business application that supports messaging standards based on SOAP by providing messaging and SOAP APIs. With the launch of the JAXM version 1.1, the SOAP API (JAVAX.XML.SOAP) is split into SAAJ1.1 specifications and jaxm1.1,jaxm1.1 contains only messaging based APIs (javax.xml.messaging). Currently, the Saaj version being used is 1.2. The WebLogic Server 8.1 SP2 supports the Saaj 1.1 specification.

The SAAJ 1.2 API consists primarily of JAVAX.XML.SOAP packages, which provide abstractions for SOAP messages with multipurpose Interconnection Mail Extension Protocol (MIME) attachments. The API provides methods for creating point-to-point connections to endpoints, methods for creating and processing SOAP messages and attachments, and methods for receiving and handling soap errors.

Although there are several technologies available for you to choose from when developing an enterprise application, some techniques may be more appropriate for different issues. It is important to choose the right tool.

What is the reason for choosing Saaj? Saaj is certainly ideal for document-based synchronous or asynchronous Web Service. Saaj is easy to use and helps you integrate a variety of Web service in a Java environment, extending the natural support for document-style Web service communications (natural support). Saaj also supports XML messaging based on standard interfaces, and this has been widely supported by vendors.

Writing a client

Listing 1 shows a simple consumer written in Saaj that accesses a synchronized WebLogic integration process to get the temperature of a given city. Complete items can be downloaded from the www.WebLogicPro.com. The steps necessary to complete the project are discussed below.

Service-oriented architectures (SOA) and service-oriented integration (SOI) are widely used, and there is a need to become increasingly visible: business needs to integrate systems and allow consumers to access services using standards-based methods. SOA is an architectural paradigm. In this architecture, reusable business logic manifests itself as a set of services that contain standards-based, well-defined interfaces, and can be accessed in a loosely coupled manner. Because of the support of Web service standards vendors and the relatively easy integration of different systems with software based on this standard, SOA has been universally recognized as a solution to enterprise integration issues.

Java-based middleware and enterprise application integration (EAI) products have been in use for some time now, and many companies are using the technology in different ways. While some services are developed and provided on the Java platform, there are other flexible requirements for service consumption from Java based applications. SOAP with Attachments APIs for Java (SAAJ) helps the consumption of these services by providing a standard API for accessing services.

There are several java-based APIs that can be used to access services. These services include Saaj, Java API for XML RPC (JAX-RPC), and Web service invocation framework (WSIF). Saaj provides an API for building service consumers and providers. Let's take a look at how to leverage Saaj to develop Web service consumers in SOA. We will illustrate the combined process of WebLogic integration, which organically combines services for obtaining city postal codes, obtaining the temperature of the postal partitions, and an example Saaj client that consumes the service.

What is Saaj?

Saaj is an API specification based on XML message delivery implemented by SOAP protocol in loosely coupled software systems. As the name suggests, Saaj supports SOAP messages with attachments.

You already know a lot about the Java API for XML messaging (JAXM), and may be wondering what happened to JAXM. The idea of the JAXM 1.0 is to allow developers to write a business application that supports messaging standards based on SOAP by providing messaging and SOAP APIs. With the launch of the JAXM version 1.1, the SOAP API (JAVAX.XML.SOAP) is split into SAAJ1.1 specifications and jaxm1.1,jaxm1.1 contains only messaging based APIs (javax.xml.messaging). Currently, the Saaj version being used is 1.2. The WebLogic Server 8.1 SP2 supports the Saaj 1.1 specification.

The SAAJ 1.2 API consists primarily of JAVAX.XML.SOAP packages, which provide abstractions for SOAP messages with multipurpose Interconnection Mail Extension Protocol (MIME) attachments. The API provides methods for creating point-to-point connections to endpoints, methods for creating and processing SOAP messages and attachments, and methods for receiving and handling soap errors.

Although there are several technologies available for you to choose from when developing an enterprise application, some techniques may be more appropriate for different issues. It is important to choose the right tool.

What is the reason for choosing Saaj? Saaj is certainly ideal for document-based synchronous or asynchronous Web Service. Saaj is easy to use and helps you integrate a variety of Web service in a Java environment, extending the natural support for document-style Web service communications (natural support). Saaj also supports XML messaging based on standard interfaces, and this has been widely supported by vendors.

Writing a client

Listing 1 shows a simple consumer written in Saaj that accesses a synchronized WebLogic integration process to get the temperature of a given city. Complete items can be downloaded from the www.WebLogicPro.com. The steps necessary to complete the project are discussed below.

Service-oriented architectures (SOA) and service-oriented integration (SOI) are widely used, and there is a need to become increasingly visible: business needs to integrate systems and allow consumers to access services using standards-based methods. SOA is an architectural paradigm. In this architecture, reusable business logic manifests itself as a set of services that contain standards-based, well-defined interfaces, and can be accessed in a loosely coupled manner. Because of the support of Web service standards vendors and the relatively easy integration of different systems with software based on this standard, SOA has been universally recognized as a solution to enterprise integration issues.

Java-based middleware and enterprise application integration (EAI) products have been in use for some time now, and many companies are using the technology in different ways. While some services are developed and provided on the Java platform, there are other flexible requirements for service consumption from Java based applications. SOAP with Attachments APIs for Java (SAAJ) helps the consumption of these services by providing a standard API for accessing services.

There are several java-based APIs that can be used to access services. These services include Saaj, Java API for XML RPC (JAX-RPC), and Web service invocation framework (WSIF). Saaj provides an API for building service consumers and providers. Let's take a look at how to leverage Saaj to develop Web service consumers in SOA. We will illustrate the combined process of WebLogic integration, which organically combines services for obtaining city postal codes, obtaining the temperature of the postal partitions, and an example Saaj client that consumes the service.

What is Saaj?

Saaj is an API specification based on XML message delivery implemented by SOAP protocol in loosely coupled software systems. As the name suggests, Saaj supports SOAP messages with attachments.

You already know a lot about the Java API for XML messaging (JAXM), and may be wondering what happened to JAXM. The idea of the JAXM 1.0 is to allow developers to write a business application that supports messaging standards based on SOAP by providing messaging and SOAP APIs. With the launch of the JAXM version 1.1, the SOAP API (JAVAX.XML.SOAP) is split into SAAJ1.1 specifications and jaxm1.1,jaxm1.1 contains only messaging based APIs (javax.xml.messaging). Currently, the Saaj version being used is 1.2. The WebLogic Server 8.1 SP2 supports the Saaj 1.1 specification.

The SAAJ 1.2 API consists primarily of JAVAX.XML.SOAP packages, which provide abstractions for SOAP messages with multipurpose Interconnection Mail Extension Protocol (MIME) attachments. The API provides methods for creating point-to-point connections to endpoints, methods for creating and processing SOAP messages and attachments, and methods for receiving and handling soap errors.

Although there are several technologies available for you to choose from when developing an enterprise application, some techniques may be more appropriate for different issues. It is important to choose the right tool.

What is the reason for choosing Saaj? Saaj is certainly ideal for document-based synchronous or asynchronous Web Service. Saaj is easy to use and helps you integrate a variety of Web service in a Java environment, extending the natural support for document-style Web service communications (natural support). Saaj also supports XML messaging based on standard interfaces, and this has been widely supported by vendors.

Writing a client

Listing 1 shows a simple consumer written in Saaj that accesses a synchronized WebLogic integration process to get the temperature of a given city. Complete items can be downloaded from the www.WebLogicPro.com. The steps necessary to complete the project are discussed below.

Listing 2 shows how to invoke the service using the method given in Listing 1. The endpoint URL of this procedure is passed to the Invokeservice () method along with the input XML document string.

Listing 2. Here is an example of using Saaj to invoke the WebLogic integration process.

String Inputxml = "
/"http://schemas.xmlsoap.org/soap/envelope//" "+

"xmlns:soapenc=/" http://schemas.xmlsoap.org/soapencoding//"

xmlns:xsd=/"http://www.w3.org/001/XMLSchema/" +

"xmlns:xsi=/" http://www.w3.org/2001/XMLSchema-instance/">

  

" + "" + "

Barrington

IL

  

" + "

";

Invokeservice ("HTTP://LOCALHOST:7001/SAAJSERVICE/PROCESSES/TEMPSERVICE.JPD", inputxml);

Saaj may be a very useful API in the SOA and integration domains. Some of the Saaj applications contain libraries of service and service invocations of the test framework. We've shown how to use Saaj to write consumers and create a sample client that accesses the WebLogic integration get temperature combination process. Apply the example to your own project and let Saaj work for you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.