Web Services Interoperability

Written by Senthil Krishnamurthy from Aspire System (India) Pvt. Ltd.

Interoperability is one ofrepparttar main promises of Web services. Web services are designed to be independent ofrepparttar 131499 underlying operating system and programming language. In this article we will address some basic web services interoperability issues that are useful for developers. We will focus onrepparttar 131500 two most popular platforms - Java and Microsoft C#.

Introduction More and more we're finding that WSDL lies atrepparttar 131501 heart of Web services interoperability. WSDL isrepparttar 131502 description language for Web services. Usually a WSDL document is automatically generated by Web services framework tools (e.g., Axis, WASP WSDLCompiler) fromrepparttar 131503 code written in a particular programming language. Developers can userepparttar 131504 WSDL document to generate client-side stubs or proxies, which provide convenient access to Web services. Thusrepparttar 131505 key to enabling seamless Web services interoperability isrepparttar 131506 ability of one Web services framework to consumerepparttar 131507 WSDL documents generated by other frameworks. The WSDL interoperability effort is just taking off. You can see further details at http://soap.systinet.net/interop/wsdl/index.html. How to not get trapped The following subchapters give you some basic tips on how to write interoperable Web services using today's Web services frameworks. These tips may significantly ease your life as well asrepparttar 131508 lives of other developers who will use your Web services. Hopefully some of those tips will be outdated soon. Keep your types simple - avoid advanced XML Schema constructs The XML Schema standard is very complex and difficult to implement. Moreover, XML Schema processing is quite time consuming, so many frameworks sacrifice full XML Schema support for performance. Some advanced XML Schema constructs (e.g., choice) are quite hard to express in a programming language, and few Web services frameworks support them. Sorepparttar 131509 key success factor in Web services interoperability is to use basic data types, such as primitive data types, arrays, and structures. As a best practice, decomposerepparttar 131510 complex types in your interfaces into simple and clean interfaces with basic data types. Also avoid using specific techniques (e.g. INOUT parameter passing) that aren't widely supported. Sample Architecture Let we seerepparttar 131511 architecture of my sample application which uses web services along with messaging concepts. Architecture Diagram Here 3 web services are used. Two web services, Place Order and Get Order are developed and deployed in Java environment and another one, Send Message is in C# environment.

The Ordering System callsrepparttar 131512 Place Order web service to place an item to order. The Place Order web service stores that item and notifiesrepparttar 131513 Java Expeditor Client through JMS. Afterrepparttar 131514 intimation message has come from JMSrepparttar 131515 Java Expeditor Client callsrepparttar 131516 Get Order web service to retrieverepparttar 131517 ordered items and details. The same Place Order web service callsrepparttar 131518 another web service, Send Message to sendrepparttar 131519 message to MSMQ, thenrepparttar 131520 Notification message is sent torepparttar 131521 C# Expeditor Client from MSMQ. Afterrepparttar 131522 intimation message has come from MSMQ,repparttar 131523 C# Expeditor Client callsrepparttar 131524 Get Order web service to retrieverepparttar 131525 ordered items and details. Here functionality ofrepparttar 131526 Java Expeditor and C# Expeditor Client are same except that they are developed in different platform to illustraterepparttar 131527 interoperability of web services. So here its proved that web service Get Order, which is developed and deployed in Java environment is accessed fromrepparttar 131528 C# Expeditor client andrepparttar 131529 web service Send Message, which is developed and deployed in C# environment is accessed from Place Order web service of Java environment.

Accessing Java Web Service from C# To invokerepparttar 131530 Get Order web service in C# Expeditor Client application, we are going to Add Web Reference torepparttar 131531 Get Order web service. The steps to be followed to do this are, 1. In Project menu, click Add Web Reference…

Serialize this - Saving Objects in PHP

Written by Kevin Davies

When building my website "Crossword Heaven" I came across a problem. I created a PHP object called "crossword" but needed to saverepparttar information inrepparttar 105975 object to a database. Now considering that this object contained a lot of information this was not an easy thing to do. Or was it?

The answer: serialize().

Whatrepparttar 105976 serialize() function does is take something like an array or object and converts it into a string that can be stored in a database. All I had to do so that I could saverepparttar 105977 crossword object is something like "serialize($crossword)." Easy! Some words of warning though. If you're using a version of PHP less than version 4 watch out because only properties get saved, not methods.

Here's a peek atrepparttar 105978 actual code:

$data = addslashes(serialize($crossword)); $name=""; if(isset($xwordInfo['xword_name'])){ $name = $xwordInfo['xword_name']; } $today = date('Y-m-d H-i-s'); $sql = "INSERT INTO `xword` ( `xword_id` , `xword_obj` , `xword_name`, `xword_owner`, `xword_width`, `xword_height`,`xword_date`) VALUES ('', '" . $data . "', '$name', '$owner', '$width', '$height', '$today');";

And here'srepparttar 105979 SQL to createrepparttar 105980 table 'xword':

CREATE TABLE `xword` ( `xword_id` int(11) NOT NULL auto_increment, `xword_obj` blob NOT NULL, `xword_name` varchar(100) NOT NULL default '', `xword_owner` varchar(100) NOT NULL default '', `xword_width` int(11) NOT NULL default '0', `xword_height` int(11) NOT NULL default '0', `xword_date` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`xword_id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ;

Cont'd on page 2 ==>
ImproveHomeLife.com © 2005
Terms of Use