• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML Messaging

 
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Can anyone explain me about XML Messaging.
Sun has provided the API known as JAXM1.0 in J2EE 1.3 which states that this API enables applications to send and receive document oriented XML messages using a pure Java API. JAXM implements Simple Object Access Protocol (SOAP) 1.1 with Attachments messaging so that developers can focus on building, sending, receiving, and decomposing messages for their applications instead of programming low level XML communications routines.
Can you explain this?
TIA.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOAP (Simple Object Access Protocol) send messages to a remote server with instructions to do something. For example you can have a class existing on one server with certain methods and routines.
Using SOAP (or XML Messaging) you can send an XML structure to make the remote class do something. For example the following XML (WSDL)structure describes the class on the remote server and displays what methods are available to this class:
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:ikeda-industries">
<isd :provider type="java" scope="Application" methods="addCompany getAllListings getCompany publishCompanies publishCompany putListings">
<isd:java class="org.ikeda.soap.CompanyListing"/>
</isd :provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="urn:ikeda-industries" qname="x:company" javaType="org.ikeda.soap.Company" java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer" xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
</isd:mappings>
</isd:service>
As you can see it defines a class called org.ikeda.soap.CompanyListing. This class allows people to access the methods: addCompany(), getAllListings(), getCompany(), publishCompanies(), publishCompany() and putListings().
You can invoke any of these methods from another class using the following technique:
CompanyListing cl = new CompanyListing();
Company company = new Company("Tone Inc",
"Anthony Ikeda",
"210 Copeland Road(East)",
"Beecroft",
"NSW",
"Australia");
cl.publishCompany("http://localhost:8100/soap/servlet/rpcrouter",company);
Here I'm using the class Company to construct a company (which is what a CompanyListing class is made up of) with cl.publishCompany() I'm sending the details to the soap server (http://localhost:8100/soap/servlet/rpcrouter). These details are now readily available to whoever has similar classes (Company/CompanyListing).
The following example gets the data from the Soap Server:
...
System.out.println(cl.gatherAllCompanies("http://localhost:8100/soap/servlet/rpcrouter"));
It invokes the method on the server (gatherAllCompanies) which gets the data as an element, converts it to a string and returns the string (if you want it can be returned as an element only).
From my experience, SOAP is very "circular" in that the class you use to get the data work on themselves in another location so you are more or less constructing a class to return what it invokes (make sense?). This logic can be separated, but I keep it contained for the sake that I don't have too many classes everywhere.
Anyhow, check out xml.apache.org and look up SOAP for Java if your a Java user, else I'm sure www.google.com will find the right SOAP implementation.
Cheers,
Anthony
[This message has been edited by Anthony Ikeda (edited August 27, 2001).]
 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can you give me some reference sites so that I can learn about this topic in detail.
Thanks.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check this thread
http://www.javaranch.com/ubb/Forum31/HTML/000268.html

Originally posted by L Goundalkar:
Hi,
Can you give me some reference sites so that I can learn about this topic in detail.
Thanks.


 
Are you here to take over the surface world? Because this tiny ad will stop you!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic