Aside from JAX-RPC, Java Web Services include the SOAP with Attachments API for Java (SAAJ). This API is used to pass business documents (in binary format) by attaching them to the SOAP message. To ensure interoperability of the binary data attachments in the SOAP document, both Java Web Services (via JAX-WS) and .NET offer the SOAP Message Transmission Optimization Mechanism (MTOM) Developer's NoteSince the release of JAX-RPC 1.0, new specifications and new versions of the standards that it implements have been released. JAX-WS 2.0 is the successor to JAX-RPC and relates to the same specifications and standards, but adding significantly to it. It includes the following:
Perhaps the most important feature of the Java EE APIs for Web services and XML is that they all support industry standards, thus ensuring interoperability. Various network interoperability standards groups, such as the World Wide Web Consortium (W3C) and the Organization for the Advancement of Structured Information Standards (OASIS), have been defining Web services standards to allow disparate applications to seamlessly integrate with each other. Web Services in Microsoft .NET FrameworkMicrosoft .NET provides two mechanisms for building Web services. The first and more widely used approach to implement Web services is to use the Microsoft .NET System.Web.Webservices namespace in the .NET Framework. A server application might have its methods defined as Web methods using the [WebMethod] attribute. This approach will be used to build a Microsoft .NET Web service for illustrating interoperability with a Java EE client, along with an explanation of the significance of various attributes and directives in WebMethods Framework. Another technique is to write a custom HTTP handler class that plugs into the Microsoft .NET HTTP pipeline by implementing the IHTTPHandler interface. HTTP Handlers are objects that process requests for individual URLs or URLs with certain file extensions (such as .asmx or .aspx). Building custom handlers requires the use of System.Web APIs to process the incoming HTTP message along with the System.Xml APIs to process the SOAP envelope found in the HTTP body. Writing a custom handler also necessitates manually authoring the WSDL document that accurately describes the Web service implementation. It also requires a solid understanding of the XML, XSD, SOAP, and WSDL specifications. Microsoft ASP.NET ships with a special IHttpHandler class for .asmx endpoints (called WebServiceHandler), which provides the basic XML, XSD, SOAP, and WSDL functionality that developers need to build Web services. The latter methodology allows for greater flexibilityparticularly when there is the need to pre- or post-process the contents of the SOAP message. On the client side, proxies are used to communicate with a Web service. These proxies are automatically generated by the wsdl.exe tool that is available within the .NET Framework or from Visual Studio.NET. These proxies, once included in a project and linked in when compiling code, manage communication with the Web methods that are exposed by the service. They are generated by parsing the WSDL file that describes the Web service.XML Processing, which is central to Web services, is inherently part of the .NET Framework. For SOAP messages being passed in and out of a Web service, the XML processing is implicit, being performed by the runtime on the developer's behalf. So if a Web method is exposed (that expects a string to be passed into it) while the underlying communication from the client to the Web method is a SOAP message, the code simply receives the string passed in as if it were a local method call.XML can, of course, be used directly, using the classes within the System.Xml namespace to create, load, parse, and edit XML documents, including SOAP examples.The .NET Framework does not include UDDI functionality by default. If you want to publish or otherwise interact with UDDI servers, the platform UDDI software development kit (SDK) is necessary. This SDK implements a .NET assembly that may be used in applications, providing the Microsoft.Uddi namespace.Following is an example of the UDDI SDK in action where the directory is being enquired for a particular service, and then the business services that match the enquiry are iterated:UddiConnection myConn = new
UddiConnection("http://test.uddi.myserver.com/inquire");
GetServiceDetail gs = new GetServiceDetail(strKey);
ServiceDetail servDetail = gs.Send(myConn);
foreach (BusinessService bs in servDetail.BusinessServices)
{
...
}
To handle attachments such as Direct Internet Message Encapsulation (DIME) or Message Transmission Optimization Mechanism (MTOM), Microsoft has a suite of libraries as an add-on to the .NET Framework called the Web Services Enhancement packs. These are updates to the .NET Framework that implement the latest WS-* standards in between large scale releases of the framework. For a complete guide on all things to do with Web services in the Microsoft and .NET world, the MSDN Web services developer portal is an excellent resource.
The Microsoft philosophy for software is very much centered around building software as atomic service-oriented components. It is with this in mind that the next generation of Microsoft software development APIs includes a new Windows Communication Foundation, a single API for building software-as-a-service, which adds on to version 2.0 of the .NET Framework. This API, part of a family of foundation APIs (Windows Workflow Foundation, Windows Presentation Foundation, and so on), will be the core API for building connected service-oriented systems.
|
|||||||||||||||||||||||||
Disclaimer
1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us or use the "Report this article" button on this page to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here. |
|||||||||||||||||||||||||