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 What Java Data Types can be used with SOAP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "What Java Data Types can be used with SOAP?" Watch "What Java Data Types can be used with SOAP?" New topic
Author

What Java Data Types can be used with SOAP?

prem saggar
Ranch Hand

Joined: Aug 24, 2000
Posts: 66
Hello everyone, I'm using Axis to generate my web services. I'm trying to figure out what Java Data Types I can actually pass in and out of methods. I know I can use Axis's simple data types e.g., arrays, String, Calendar, boolean, etc... But I've also heard I can use any type that adheres to the JavaBean spec. I.e., it has only 1 contructor that accepts no parameters and has only get and set methods. How will a .Net client demarshall this arbitrary JavaBean type on their end? Also, I've also heard I can pass any type I want in Java e.g., a DriverManager, or a JFrame, as long as I create the serialization code. Again, how will a .Net client handle this? Should I just stay in the safety of using Axis's simple built in types? Thanks, Prem Saggar. :roll:
[ May 15, 2005: Message edited by: prem saggar ]
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
a search in google with 'SOAP java data type' did yield some interesting urls that might be helpful for you.


Kishore
SCJP, blog
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by prem saggar:
How will a .Net client demarshall this arbitrary JavaBean type on their end? Also, I've also heard I can pass any type I want in Java e.g., a DriverManager, or a JFrame, as long as I create the serialization code. Again, how will a .Net client handle this?


You can send and receive javabeans(encoded as complex types) between java and .NET using soap.
For example a javabean class like
public class Order
{

private String customerName;
private String shippingAddress;
private String itemCodes[];
private int quantities[];

// Bean accessors
...
}

can be sent and received between the java and .net provided you made proper de/serialization configuration in the deployment descriptor. A javabean containing bean array is also possible. Check this example that comes with Axis =>http://cvs.apache.org/viewcvs.cgi/ws-axis/java/samples/userguide/example5/


Spritle Software Blogs
Kuldeep Vaishnav
Ranch Hand

Joined: May 23, 2004
Posts: 72
my two cents..dont know about jframe and all but be VERY VERY CAREFUL using Collections...gives nightmares in prod


Kuldeep
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What Java Data Types can be used with SOAP?