DZone Forums
Go Back   DZone Forums > Community > Enterprise Development > Web Services, SOA & ESB
Reload this Page Generating WSDL and artifacts from eclipse
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Nov 2008
Default Generating WSDL and artifacts from eclipse - 11-13-2008, 06:52 AM

Hi,

I wrote a web service using JAX-WS (2.1.2). I used collections in my code, and SOAP1.1 to deliver them.

The resulting schema can be handled by the server-side framework, but on the client side, using JAX-WS wsimport, I get weird classes. It's understandable that the framework can't figure out that a Collection should be created, but is there a solution to this? How can I make the client's generated classes to be reasonable?

This is the schema generated by JAX-WS for the class with the collections:

<xs:element name="compositions">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="key" minOccurs="0" type="xs:int"/>
<xs:element name="value" minOccurs="0" type="tns:composition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

The compositions member, in the server-side original class, is in fact a java.util.Map.
On the client side I get a class named Compositions, with an inner class named Entry, that has two members - key and value. That sucks...

I hope the problem is clear.
Thanks anyway,
Daniel
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse auto generating code pedro_pacheco@yahoo.com Eclipse 0 06-20-2008 08:18 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com