Interoperability of complex objects between Web Services on Java and. Net heterogeneous platforms

Source: Internet
Author: User
Tags wsdl

I am most busy studying a Java open-source project. This open-source project is based on the SOA architecture, and all the services provided need to be accessed by the. NET client. I always thought that the Web service is not only a little performance problem, but it is omnipotent. After this training, I finally understood that the world is not as perfect as I imagined... Okay, let's get started. This document describes how to access platform-specific objects on heterogeneous platforms through Web Services. The following is a summary of this study.

The W3C XML Schema standard defines a series of built-in data types, including various types of strings of different lengths, integer, Boolean, single precision, double precision, floating point, time type, and other types. Each application platform supports a series of its own data types. The intersection of these data types defines types with collaboration capabilities across different platforms. Therefore, A. Net client can recognize XML elements as record sets, which does not mean that a Web service client written in Java can do the same thing.

First, let's talk about the Web Service Development Method: 1.Execution priority"Or"Code first", That is, to start with the code to complete the function, first develop the interface function, and then rely on the. Net or Java WSDL framework to generate the WSDL description file. Disadvantage: some non-public types are difficult to map to heterogeneous platforms. 2 ."WSDL Priority"Or"Mode first", That is, start with the WSDL file, first build the WSDL file, and then develop and implement the web service and client. This increases the possibility of cross-platform data types to a certain extent.

To develop a. NET web service, we must realize that the asmx file is a real web service. The page you see is derived from the framework. It is used to prove Web Services and allows developers to test web services without manually creating client applications. This function is only used to browse local pages and is unavailable when you enter a complex data type as a parameter to Web Services.

Run the following command to run wsdl.exe to generate the Web Service source code file.

Wsdl.exe/Server webservice1.wsdl

 

Soap messages can have one of two encoding styles:

  • EncodedStyle follows the encoding rules specified in section 7 of the SOAP specification; basically, these rules dictate the content of the soap <body> element, and require that a data type be specified for each element encoded in a SOAP request or response message.
  • LiteralStyle does not follow the rules in any special specification. the content of the <body> element must be agreed upon and implemented in both the service and client implementations. literal-encoded soap messages do not necessarily specify a data type for each element, and it is usually up to the specified er to decide how each parameter shoeter be translated into its own data types.

(To be continued)

 

References:

Http://msdn.microsoft.com/zh-cn/library/aa700847.aspx

Http://msdn.microsoft.com/en-us/library/aa478995.aspx

Http://wiki.apache.org/ws/FrontPage/Axis/DotNetInterop

Http://wiki.apache.org/ws/FrontPage/Axis/DotNetInteropMapInfo (map object to C # in Java #)

Related Article

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.