Q: What is XML?
A: XML, the scalable markup language is a universal syntax for describing and constructing the application logic. XML can define unlimited languages for specific industries and applications.
Q: Who is XML?
A: XML is initiated by the World Wild Web Consortium, W3C). XML development work began in 1996.
A group of experts from the university to the college, developed a simplified version of SGML for Web (Standard General Generalized Markup Language). In February 1998, XML 1.0 specification became the recommendation standard for W3C.
Q. What is the biggest advantage of XML?
A. XML can simplify and reduce the cost required to exchange and release the cost in a web environment. XML is a text-based syntax that can be read for computers and people. XML can provide data portability and reusability across unparalleled platforms and devices. It also has flexibility and scalability, allowing new tags to be added without destroying existing document structures. Based on Unicode, XML provides global language support.
Q. What is the application of XML?
A. XML plays an important role in the data exchange format of the B2B network application, such as e-commerce, supply chain management, workflow, and application integration. Another application of XML is structured information management, including information in the database. XML also provides publishing of media, allowing a writing document to be published in a variety of media formats and devices. At the client, XML is also used to create custom views with data.
Q. What is the relationship between XML and Java technology?
A. XML and Java technology are complementary. Java technology provides portable, maintainable code to handle those portable and reusable data. In addition, XML and Java technology have a lot of common features such that they can be perfectly combined in Web computing, including forming industry standards, standing independence, scalable, reusable, web-centered, and internationalization.
Q. What is the advantage of using XML in Java technology?
A. The Java technology enhances the productivity of software developers compared to other programming languages such as C or C . In addition, developers use Java platforms to create reusable and maintain complicated applications, which are unable to do scripting languages. To use XML and Java, developers can quickly build complex and interoperable web applications with very low cost.
Q. Sun is involved in which XML-related activities?
A. Sun actively participates in the W3C Working Group to participate in the development of XML style sheet / conversion language (Stylesheet / Transformation, XSL / T), XML Schema, XLink, and XML Query. Sun also participated in many other industry communities, including Oasis, Xml.org, and Apache.
Q. Where can I find more documents?
A. Java technology and the XML document page contain all of the full list of Java technology and XML documents provided on this website.
Q. Where can I send comments and suggestions?
A. For feedback from this project, please email to XML-FEEDBACK@sun.com.
Q. Is there any other mail list hosted by Sun About XML mailing list?
A. If you use XML technology in the Java platform, please subscribe to XML-INTEREST@java.sun.com. Back to top
Java API for XML Processing (JAXP)
Q. What is Java API for XML Processing (JAXP)?
A. Java API for XML Processing, or is referred to as "JAXP", which enables the application to parse and convert the XML document with an API implemented independently of a particular XML handler. JAXP also provides an insertable feature that allows applications to be easily switched between a particular XML handler implementation.
To implement an XML handler independence, the application should limit the use of JAXP API and avoid using the API related to implementation. This may be easy or difficult to implement according to specific applications. JAXP includes industry standard APIs such as DOM and SAX.
The reason for JAXP is to facilitate the use of XML on the Java platform. For example, the currently used API, such as DOM Level 2, does not provide a method of obtaining a DOM document object from an XML input document, JAXP can do it. (DOM Level 3 provides this feature, the new version of JAXP specification may also support this new Level 3 program. Additional parts of JAXP, such as the Javax.xml.Transform section, no other independent XSLT handler API.
Q. Where can I read more about JAXP?
A. Please see the JAXP FAQ get more information.
Back to top
Java Architecture for XML Binding (JAXB)
Q. What is Java Architecture for XML Binding (JAXB)?
A. Java Architecture for XML Binding (JAXB) simplifies creation and maintenance of the XML Java program. JAXB provides a binding compiler and a runtime frame to support two-way mapping of XML and Java objects. Binding compilers can convert W3C XML styles into one or more Java classes, which do not require developers to write complex parsing codes. Mode derived class and binding framework enable errors or validity checks for input and output XML documents, so that you can ensure that the system receives, processing, and generates a valid and error-free message. For more information, see REFERENCE IMPLEMENTATION and PUBLIC DRAFT SPECification, and the above documentation can be downloaded at the JAXB home page.
Q. What is the difference between JAXB, SAX and DOM? Which one should I choose?
A. SAX is an event-driven XML parser for high speed processing XML because it does not generate data representations in memory. In contrast, the DOM generates data representation in memory, allowing the application to manipulate the contents of the memory. SAX and DOM automatically perform the effectiveness verification of the structure. An application can use SAX and DOM to verify content, but such applications must provide additional code, which may be complicated, easy to errors and difficult to maintain.
A JAXB application can validate the structure and content using the Java class generated by the mode. Similar to the DOM, a JAXB application constructs a content tree in memory through the group (Marshalling) XML document, creating a data structure, which includes an instance object of the derived class. However, different from the DOM tree, the content tree is specific to a source mode, does not include additional tree operation, and does not allow accessor methods for derived class to access data, and cannot be dynamically constructed. If the content of the document tends to dynamically and is not intended, the DOM and SAX are more suitable than Jaxb before processing the contents of the XML content without a well-known style. Q. How does Jaxb work?
A. To build a JAXB application, first start from XML mode. Beta version Requirements pattern language is the W3C 2001 Recommendation of XML Schema.
After getting an XML mode, you can build and use the JAXB application, follow these steps:
1. Submit XML Schema to the binding compiler to generate a Java source file.
You can customize the binding declaration to overwrite the default binding between the XML Schema component and Java representation.
Compile Java source code.
3. Use the class and binding framework to write the Java application as follows:
O build an object tree representing XML data, which is valid by XML Schema, which can be unmarshalling data or instantiate the class to be created by unmarshalling data from the document.
o Access and modify the data.
You can choose to verify changes related to constraint-related data, which are represented in XML Schema.
o Set the data as a new XML document.
Q. Who participated in the development of JAXB?
A. JAXB is developed by Java Community Process (JCP), composed of an expert group, including IBM, Software AG, BEA SYSTEMS, HEWLETT-PACKARD, TIBCO SOFTWARE INC., ORACLE, Fujitsu Limited, Breeze Factor LLC, Macromedia Inc And Intalio Inc .. Sun is the most active member of W3C XML Schema Working Group and works together with other industry groups such as Oasis and Xml.org.
Q. Where can I read more about JAXB?
A. For the explanation of a higher level of JAXB, see the JAXB chapter in Java Web Services Tutorial. It is also required to be reminded that the detailed user guide is also released as part of JAXB. For more information about JAXB technology and detail, please see the latest version of the specification, you can download from the JAXB home page. Note that this specification uses the Adobe Acrobat PDF format. Download Adobe Acrobat for free.
Back to top
Java API for XML Messaging (JAXM)
Q. What is Java API for XML Messaging (JAXM)?
A. Java API for XML Messaging (JAXM) is an API that is specifically used to exchange XML business documents on the Internet. Examples of XML documents that are often used for exchange include orders, order confirmation and invoices. You can come with non-XML data in the message sent. Q. What is JAXM based?
A. JAXM is based on Simple Object Access Protocol (SOAP) 1.1 and SOAP WITH ATTACHMENTS specification. JAXM also allows standard protocols on SOAP implementations, such as SOAP-RP or EBXML TRANSPORT, ROUTING & PACKAGING V1.0-Message Service Specification.
Q. Whether to use JAXM under the J2EE platform?
A. No, you can use Java 2 Platform, Standard Edition (J2SE), just like using Java 2 Platform, Enterprise Edition (J2EE). A stand-alone client (not using a message provider) can send this message to the Web service that can handle the request-response message using the J2SE platform. This does not need to be deployed or configured on the client, so it is easy to implement.
Q. What is a message provider?
A. The message provider is a service that uses messaging infrastructure to route and deliver messages. For customers, sending and accepting messages are completely transparent. Using a message provider's application must use a connection to the message provider, called the ProviderConnection object in the JAXM API. Some kinds of deployments and configurations are required to use a message provider. Typically, the client uses the message provider-Servlet or J2EE container running in the container. When deploying, the client needs to provide information about the message provider for the container. In the future, there will be a deployment tool to make this process easier.
Q. Whether a message provider must be used?
Answer. You only need to use a message provider when your application needs to be unidirerative (asynchronous) messaging. In this type of message, a message is sent to the recipient as an operation, and then the recipient responds to another different operation after a period of time. If your application uses a request-response style message transfer, the response of the message back to this message is considered as the same operation, you do not need a message provider. When you don't use a message provider, you need to use the SOAPCONNECTION object, which supports a simpler request-response message model.
Q. Can the JAXM message can be routed to multiple destinations?
A. Yes. Instant recipients can be specified at the message header. One way of use of this capability is to enable automatic service processing. For example, two commercial organizations recognize the environment of XML documents exchanged between them so that they can achieve automatic generated messages and responses. For example, these two commercial organizations agree that the order command first enters the ordering department, then enter the order confirmation department, then enter the delivery department, and finally enter the settlement department. Each department has an instant recipient (called actor). After the Actor ends its processing, it will delete all the contents of your heads and send the message to the next Actor listed in the header.
Q. Can I use the EBXML head in the JAXM message?
A. Yes, if you use an EBXML profile implemented on SOAP, you can use the EBXML header. A profile is a standard protocol, such as EBXML TRP or SOAP-RP, which works above SOAP and provides additional features. You need to use a message provider to support profiles, and you need to let the recipient use the same profile. Back to top
Java API for XML Registries (JAXR)
Q. What is Java API for XML Registries (JAXR)?
A. Java API for XML REGISTRIES (JAXR) provides a unified, standard Java API for accessing different types of XML Registries. The XML registration item is an infrastructure that is built, deployed, and discovered Web services.
Q. What is the relationship between JAXR API and other XML API?
A. The JAXR provider can use the JAV API for XML-based RPC (JAX-RPC) between the JAXR Provider and the Registration Item provider, which outputs SOAP-based interfaces similar to RPC (for example UDDI).
The JAXR provider can communicate between JAXR providers and registration items using Java API for XML Messaging (JAXM), which outputs XML Messaging interfaces (such as EBXML TRP).
Java API for XML Processing (JAXP) and Java Architecture for XML Binding will be used by the JAXR provider and JAXR client to handle the XML content to registry or from Registry.
Q. Why does I have a new JAXR API for Java Naming and Directory Interface (JNDI)?
A. JNDI API is designed with a collection of needs with the JAXR API. Both abstract APIs follow existing specifications. However, abstract directory services are very different from XML Registries for publishing and discovering Web services. The JAXR API requires a richer metadata capability and query capabilities to classify and associate.
Q. By increasing the function of JAXR API to enhance the JNDI API will be better?
A. This choice is considered. To meet the extra needs of XML Registries, the information model needs to be refinered. In order to solve the demand for directory services, an existing information model is enforced in the JNDI API design. The extended JNDI API will limit the JAXR API and need to consider rearward compatibility of the JNDI API.
Q. What is the role of Association in the JAXR information model? It has not been used in all APIs.
A. ASSOCIATION is used to associate two registryObjects each other. A ASSociation can be defined between the two objects in the registration item and submitted using the GenericLifeCycleManager's SaveObjects method.
Q. What is the role of Classification in the JAXR information model? It has not been used in all APIs.
A. Classification is used to classify RegistryObject. You can define a classification according to RegistryObject and submit this classification using the GenericLifeCycleManager's SaveObjects method. Q. Why is Jaxr is an abstract API and does not have a specific registration item like UDDI or EBXML.
A. Abstract JAXR API allows developers to write registration item client programs that are portable across multiple target registration items. This is consistent with the philosophy of Java's "Write, Run Anywhere". It also provides value-added capabilities that transcend the registration item itself. For example, a non-JAXR's UDDI user does not have the ability to classify and classify intelligent queries, while Jaxr UDDI users have these capabilities.
Q. Why does the JAXP API do not use uddi terms and concepts?
A. JAXR API is not targeted for UDDI or any other registration specification. It is an abstract API covering a variety of specifications. It allows developers to make a choice between using Web service registration items and / or knowledge bases. When UDDI applies to the JAXR information model (for example, Service, ServiceBinding, and Method Name in BusinessLifeCycleManager), Jaxr API uses UDDI terms and concepts.
Q. Why is the JAXR information model uses EBXML REGISTRY INFORMATION MODEL as a basis without using a UDDI data structure?
A. JAXR API is used to support multi-registration items. EBXML Registry Information Model is more common and easier to expand than the UDDI data structure. For this feature, Ebxml Registry Information Model can be extended to meet the needs of UDDI and other registration items.
Q. Why don't you develop JAXR information models?
A. The development of the information model takes a long time. It is easy to improve it from existing information models.
Back to top
Java API for XML-Based RPC (JAX-RPC)
Question. What is Java API for XML-BASED RPC (JAX-RPC)?
A. Java API for XML-based RPC (JAX-RPC) enables Java technology developers to build web applications and web services using XML-based RPC feature. This feature follows SOAP (Simple Object Access Protocol, Simple Object Access Protocol) 1.1 specification .
Question. How does JAX-RPC use SOAP?
A. Please refer to JSR-101.
Question. What is RPC?
A. RPC represents a remote procedure call, which is a mechanism that enables clients to perform other systems in other systems. The RPC mechanism is often used in a distributed client / server model. The server defines the service as a series of processes for remote client calls.
Question. How XML is associated with RPC?
A. Remote process call is represented by XML-based protocol, such as SOAP. In addition to defining the envelope structure and coding rules, the SOAP specification also defines a representation of remote procedure calls and responses.
Question. What work must be done for web services?
A. A XML-based RPC server application can define, describe and export a web service, just like RPC-based services. WSDL (Web Service Description Language, Web Service Description Language) Defines an XML format that describes the service as a set of endpoints for a set of messages. By using the JAX-RPC API, developers can use the WSDL description to implement clients and services. Question. What interaction mode is used between client and JAX-RPC services?
A. There are three different modes:
Synchronous Request-Response: The client calls a remote program and blocks until it receives a return value or exception. One-way RPC (One-Way RPC): The client calls the remote process, but it does not block or waits until a return value is received. The JAX-RPC client runtime system may throw an exception. Non-blocking RPC invocation: The client calls the remote process and continues to process the content of the same thread without waiting for the return value. Thereafter, the client receives the return value or the polling return value by blocking to handle the return of the remote method.
Problem. Remote method call or response to send service content information?
A. Yes. For example, it may transmit unique transaction identifiers or digital signatures.
Question. Why did XRPCC do not generate a WSDL file?
A. XRPCC tool can actually generate a WSDL file, but due to design errors, if the -keep option is not specified, the file will be deleted with the source file. You can use the -keep option to let XRPCC do not delete the WSDL or .java source file. If you use the -s sourcePath option, all source files will be placed in the SourcePath directory, and then you can easily remove them. The WSDL file will be placed in the current directory or in the directory specified by the -d option.
Back to top
Java 2 Platform, Enterprise Edition
Question. Java 2 Platform, Can Enterprise Edition use XML?
A. Java 2 Platform, Enterprise Edition (J2EE) facilitates data messaging between the loosely coupled commercial system. J2EE Reference Implementation includes Java API for XML Parsing (JAXP).
JavaServer Pages (JSP) can generate and use XML between multi-layer servers or between servers and clients. Java Message Service, JMS provides an asynchronous transfer mechanism for an XML data message. Enterprise JavaBeans (Enterprise JavaBeans, EJB) provides a robust synchronous transport mechanism that allows business service objects to be called with an XML tag. EJB also uses XML to describe its deployment properties such as transactions and security.
Question. Is it possible to generate a dynamic XML document with a JSP page?
A. The JSP page can generate an XML page. The XML page can be generated with JSP, including those that generate document dynamic parts. The JSP specification includes a powerful label extension mechanism that can be used to perform an XML-based operation, such as using XSLT conversions to an XML document.