service component architecture) it is committed to providing a programming model for constructing service components for a wide range of programming languages , it also provides a model for assembling these service components into a business solution. This Assembly activity uses a service-oriented architecture (Service-Oriented Architecture) to build the core of the application system. SCA is a brand new language-independent programming model. This service component-oriented programming model can greatly simplify Customer Programming and improve application flexibility, this will have a disruptive impact on existing software development methods.
service data objects is designed to provide a unified way for data processing in the application system, regardless of the data source and format. SDO provides a unified data processing method for databases and services. It also provides a mechanism for processing data that is separated from its source.
both SCA and SDO can be used independently. It is not specified that two technologies must be used in the Program of the same application. However, SCA and SDO can be combined to provide a powerful and flexible way to build an application system using a service-oriented architecture.
SCA is a development and deployment specification developed for a system based on the SOA concept. It must first have a series of advantages of SOA, such as cross-language, distributed, and service-oriented systems. SCA provides support for asynchronous calls to services in components. SCA also provides comprehensive support for asynchronous calls.
one of the main advantages of using SOA to build business solutions is that it can quickly assemble new solutions based on changes and innovations in business needs. The key to solution assembly is to include existing applications and functions, rather than starting from scratch. Indeed, only by reusing existing functions as much as possible can we achieve the goal of rapid development.
SCA is a programming model for business solutions using SOA. SCA provides such a feature that makes it as easy as possible to assemble existing functions into a new solution. This document tests some of these features.
SCA provides a programming model for implementing a Service-Oriented Architecture (SOA.
service components are the basic components and basic building units in SCA, and are also the places for us to implement business logic. We can regard it as the building block for building our applications.
========================================================== ========================================================== =
I use cxf. Let me tell you how to call cxf.
1:Http://cxf.apache.org/download.htmlDownload the latest Apache cxf package and unzip it to a directory, such as: D:/Apache/cxf-2.1.4;
2: Enter the D:/Apache/cxf-2.1.4/bin directory in the console and execute this command:
Wsdl2java-P com. Bao. WS-d:/WS-verbose http://www.ayandy.com/Service.asmx? WSDL
The wsdl2java command generates encapsulated classes and soap interfaces.
The-p parameter is a package name, indicating the generated class and interface under which package
-D is a directory name. Under which directory is the generated package?
-Verbose is generatedCodeGenerate some log output
The last one is the WSDL address.
3: copy these files to the same package of a project in eclipse.
4: load these files to the lib directory of cxf to the classpath of Eclipse:
Cxf-2.2.3.jar
Geronimo-activation_1.1_spec-1.0.2.jar
Geronimo-annotation_1.0_spec-1.1.1.jar
Geronimo-jaxws_2.1_spec-1.0.jar
Geronimo-stax-api_1.0_spec-1.0.1.jar
Geronimo-ws-metadata_2.0_spec-1.1.2.jar
Jaxb-api-2.1.jar
Jaxb-impl-2.1.12.jar
Saaj-api-1.3.jar
Wsdl4j-1.6.2.jar
Wstx-asl-3.2.8.jar
XmlSchema-1.4.5.jar
4: Write a test class to test it:
-
-
Java code
-
Import Javax. xml. namespace. QNAME; Import Javax. xml. ws. Service; Import Javax. xml. ws. Soap. soapbinding; Public Class Webservicetest { Private Static Final QNAME SERVICE_NAME = New QNAME ( " Http://tempuri.org/ " , " Servicesoap " ); Private Static Final QNAME port_name = New QNAME ( " Http://tempuri.org/ " , " Servicesoapport " ); Public Static Void Main (string [] ARGs) {Service = Service. Create (SERVICE_NAME); string endpointaddress = " Http://www.ayandy.com/Service.asmx " ; Service. addport (port_name, soapbinding. soap11http_binding, endpointaddress); servicesoap HW = Service. getport (servicesoap. Class ); Arrayofstring = HW. getweatherbycityname ( " Shanghai " , Thedayflagenum. Today ); For (String STR: As. getstring () {system. Out. println (STR );}}}
Note that the service class generated in cxf 2.1.3 has a bug. You only need to import this line in this class: Import javax. XML. WS. service; remove it.