aspose file tools*
The moose likes Web Services and the fly likes .NET doesn't Serialize Java Set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark ".NET doesn Watch ".NET doesn New topic
Author

.NET doesn't Serialize Java Set

Luigi Smith
Ranch Hand

Joined: Nov 08, 2003
Posts: 54
We have a webservice that wraps some Java objects to send them over the wire. The problem is that these Java objects contain references to each other (ie. circular). It's fine from our end because we use SOAP RPC style to send the object graph to the .NET layer. However, on the way back, .NET complains about our java Sets in this objects. It looks like it's trying to convert to arrays.

Has anyone had any experience with this dilemna?

Thanks,


Luigi<br />------------<br />Sun Certified Java Programmer<br />IBM Certified Enterprise Developer WSAD 5.0
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Luigi Smith:
However, on the way back, .NET complains about our java Sets in this objects. It looks like it's trying to convert to arrays.


Are you able to generate .NET stubs for the given WSDL ?
What complains are you getting from .NET?


Spritle Software Blogs
Luigi Smith
Ranch Hand

Joined: Nov 08, 2003
Posts: 54
Yes, WSDL generation is fine, but we at runtime it says there is an invalid type. I can provide more details when I return to work next week.

Thank you,
Lou
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
It would help if you could post the relevant parts of your WSDL document for us to see.

(PS. remember to use the UBB CODE tags for code snippets)


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

Joined: Nov 08, 2003
Posts: 54
Thanks folks for taking a look. Here's the information.

The following is the error I receive:

Invalid Request for setTestObject
com.bea.wlw.runtime.core.request.RequestValidationException: Error
deserializing arguments.
Encountered an xml tag without a recognized type: the type must be
declared with an xsi:type attribute.
Caused by: com.bea.xml.marshal.XmlEncodingException: Encountered an xml
tag without a recognized type: the type must be declared with an
xsi:type attribute.


Here's the WSDL file for the functions were concerned with (Note: this is a partial WSDL from what BEA generated):

[Balaji]Deleted the Code Section for better reading, see the next reply for code section please.
[ August 24, 2004: Message edited by: Balaji Loganathan ]
Luigi Smith
Ranch Hand

Joined: Nov 08, 2003
Posts: 54
Here's a better post with smilies disabled: ;)


[ August 24, 2004: Message edited by: Balaji Loganathan ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: .NET doesn't Serialize Java Set