Web Services Interoperability

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

Continued from page 1
2. Inrepparttar URL box type http://localhost:8888/axis/servlet/AxisServlet (or u can giverepparttar 131499 web service URL) 3. Now it will showrepparttar 131500 list of services that are available. From that select Get Order (wsdl) link. 4. Click Add Reference button. We need to create a proxy client to access this web reference. For that we needrepparttar 131501 wsdl file of that particular web service. Save WSDL file The AxisServlet generatesrepparttar 131502 wsdl file forrepparttar 131503 web service. To getrepparttar 131504 wsdl for Get Order Web service, Type this URL in browser: http://localhost:8888/axis/servlet/AxisServlet. Click on wsdl link belongs to Get Order Web service. It will displayrepparttar 131505 wsdl xml content. Save this content with .wsdl extension. Create Proxy Client Forrepparttar 131506 creation of proxy client we can utilizerepparttar 131507 wsdl tool of Microsoft Visual Studio. Now, openrepparttar 131508 Command Prompt (preferablyrepparttar 131509 Visual Studio.NET Command Prompt, which verifiesrepparttar 131510 PATH environmental parameters are set correctly). Navigate torepparttar 131511 directory containingrepparttar 131512 GetOrder.wsdl file. Typerepparttar 131513 following atrepparttar 131514 command prompt: wsdl /o:GetOrderService.cs GetOrder.wsdl Nowrepparttar 131515 GetOrderService.cs file will be created. This isrepparttar 131516 proxy class forrepparttar 131517 referenced web service. So, add this file intorepparttar 131518 assembly of your C# project. By making instance to this proxy client we can callrepparttar 131519 Get Order Web service asrepparttar 131520 following code, GetOrderService GOService = new GetOrderService (); string strOrders; strOrders = GOService.getOrder (); Accessing .Net Web Service from Java For accessingrepparttar 131521 .Net web service we can userepparttar 131522 org.apache.soap package and it sub package rpc. We need to providerepparttar 131523 Service URL, Target namespace andrepparttar 131524 Soap Action which is present inrepparttar 131525 wsdl file. By usingrepparttar 131526 Call class we can invokerepparttar 131527 Web service method as inrepparttar 131528 following code: String URLString = "http://localhost/WebService1/Service1.asmx"; String TargetNamespace = "http://localhost/WebService1/Service1"; String SOAPAction = "http://Walkthrough/XmlWebServices/sendMessage"; URL url = new URL (URLString); //setup arepparttar 131529 invocation Call call = new Call(); call.setTargetObjectURI (TargetNamespace); call.setMethodName ("sendMessage"); call.setEncodingStyleURI (Constants.NS_URI_SOAP_ENC); Response resp = call.invoke (url, SOAPAction);

Messaging Concepts Inrepparttar 131530 given architecture, u can seerepparttar 131531 JMS and MSMQ messaging concepts are used. Hererepparttar 131532 brief notes on these concepts.

JMS JMS is a set of interfaces and associated semantics that define how a JMS client accessesrepparttar 131533 facilities of an enterprise-messaging product. Enterprise messaging is recognized as an essential tool for building enterprise applications and Ecommerce systems, and JMS provides a common way for Java programs to create, send, receive, and read an enterprise messaging system's messages. You can learn more about JMS inrepparttar 131534 following URL: http://www.chrispeiris.com/articles/JavaMessageService.html MSMQ Microsoft Message Queuing (MSMQ) technology enables .net applications running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Applications send messages to queues and read messages from queues. You can get more details on MSMQ from http://www.microsoft.com/windows2000/technologies/communications/msmq/default.asp Conclusion In this part ofrepparttar 131535 Web services tutorial we learned how to write interoperable Web services. All examples were focused onrepparttar 131536 integration of MS .NET and Java. We demonstrated that Web services technology gives usrepparttar 131537 opportunity to pickrepparttar 131538 best technology for each particular piece of our system. Some of us may want to know how to create web services in Java and C#, and also more details on integration of JMS and MSMQ with web services. Those things we are not discussed here. If you have doubts on those areas, please feel free to contact me at senthil.krishnamurthy@aspiresys.com

K. Senthil B.E., is working in Aspire Systems (India) Pvt. Ltd.

Serialize this - Saving Objects in PHP

Written by Kevin Davies

Continued from page 1

You'll see that I usedrepparttar addSlashes() function. That's because whenrepparttar 105975 crossword object was serialized it contained characters like double quotes. These had to be escaped beforerepparttar 105976 crossword could be saved torepparttar 105977 database.

Now having saved a crossword object to a database I had to have a way to get it back. Surely, if there was a method to serialize an object there had to be one to unserialize an object, right? And yes, there is: unserialize().

As you'd expect, unserialize() worksrepparttar 105978 same way as serialize(), but inrepparttar 105979 opposite direction. You give it some serialized data and it returnsrepparttar 105980 thing that was serialized. To getrepparttar 105981 crossword back all I had to do was something like "unserialize($crosswordData)."

Here's a look atrepparttar 105982 code:

$xwordId = (get_magic_quotes_gpc()) ? $xwordId : addslashes($xwordId); $sql = "SELECT xword_id, xword_obj, xword_name, xword_age from w3b_xword where xword_id=$xwordId"; $result = parent::getSQL($sql); $row = parent::getRow($result);

if(parent::getNumRows($result)>0){ $crossword = unserialize($row['xword_obj']); }

And that's it. Obviously serialize() and unserialize() are pretty handy functions to have around. And in my case I couldn't do without them.

Kevin Davies is the webmaster of Crossword Heaven (http://www.crosswordheaven.com) - a site that lets you create and solve crosswords online. If you're a webmaster you can also link to crosswords. Crosswords are a great way to keep your visitors on your site and keep them returning.

    <Back to Page 1
ImproveHomeLife.com © 2005
Terms of Use