File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes interoperability to what extent? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "interoperability to what extent?" Watch "interoperability to what extent?" New topic
Author

interoperability to what extent?

Sree Jag
Ranch Hand

Joined: Oct 14, 2003
Posts: 77
Hi all,

I am just starting with webservices interoperability.

To what extent are webservices interoperable?

for e.g in my java webservice if i return a java object (not String, Integer....custom java objects) are these custom java objects accessible by an .NET client?

Thanks all,
Seshu


Sree Jag<br />SCJP 1.4
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
If you want real interoperability, you'll have to stick to those data types listed in the WS-I specification (i.e. integers, strings, etc.).

However, as long as your Java web service is configured to serialize your custom Java object into the outgoing SOAP message properly (with a custom serializer in Axis-speak), the .NET client can be programmed to parse that SOAP message and construct a similar (but not the same, of course) object from that XML.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Kuldeep Vaishnav
Ranch Hand

Joined: May 23, 2004
Posts: 72
Yes,.NET client should have no problems consuming your custom object.While doing tests for various data types and custom objects I figured that if you are using Arrays or Vectors or any such entity(Collection for that matter)to hold more then one objects in you custom object you are better off with Document Literal(sometimes known as Doc/Lit) then with RPC SOAP(RPC/SOAP) style.

Hope this helps.
Kuldeep


Kuldeep
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Yes,.NET client should have no problems consuming your custom object.

I don't think so - if you try to get it to recognize a custom object, .NET is going to choke - I've heard it even chokes on vector.
Like Lasse says, stick to the WS-I specification if you want interoperability. For example - convert your Vector to an array of String.
Bill
Kuldeep Vaishnav
Ranch Hand

Joined: May 23, 2004
Posts: 72
--------------------------------------------------
- I've heard it even chokes on vector.
--------------------------------------------------

If you are using RPC/SOAP..Yes..but not with Doc/Lit.And that is why I said you are better off with doc/lit while using vector,array,collection etc etc.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: interoperability to what extent?