Hi Reza,

The problem is that there are many different ways you could represent a 
HashMap in XML, depending on the type of data you expect in the map. 
JiBX has some support classes that handle several forms of HashMaps, 
which are discussed here: 
http://jibx.sourceforge.net/tutorial/binding-custom.html#marunmar and 
http://jibx.sourceforge.net/extras.html#hashmap

But there's no way at present to tell Jibx2Wsdl to use a custom 
marshaller/unmarshaller, so the best you can do is exclude the HashMap 
field when you're generating the class and then add the appropriate 
binding and schema fragments later. I think the Jibx2Wsdl examples show 
how you can use customizations to exclude a field from a class; you can 
also find (partial) documentation of the customizations format here: 
http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl/customize

I'm finally getting this cleaned up for the 1.2 beta release, and should 
have some better documentation available next week.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Reza Eslami wrote:
> Hello,
>
> I'm new to the Tool Jibx2Wsdl, so please be patient with me.
>
> I took the Standard "example1" = BookServer1 and I was able to generate a
> WSDL File from it. 
>
> Then i just added this simple line to the book.java Class (along with the
> import):
>
> private HashMap m_bookMap;
>
> and i got this error when i tried to generate the WSDL File: 
>
>      [java] Exception in thread "main" java.lang.IllegalStateException: No
> way to handle type 'java.util.HashMap'
>      [java]   at
> org.jibx.binding.generator.BindingGenerator.expandReferences(BindingGenerato
> r.java:191)
>      [java]   at
> org.jibx.binding.generator.BindingGenerator.expandReferences(BindingGenerato
> r.java:194)
>      [java]   at
> org.jibx.binding.generator.BindingGenerator.findReferences(BindingGenerator.
> java:983)
>      [java]   at
> org.jibx.binding.generator.BindingGenerator.generateSpecified(BindingGenerat
> or.java:1122)
>      [java]   at org.jibx.ws.wsdl.Jibx2Wsdl.generate(Jibx2Wsdl.java:484)
>      [java]   at org.jibx.ws.wsdl.Jibx2Wsdl.main(Jibx2Wsdl.java:588)
>
> what is the problem? why is this happening?
>
> i also added a getter and setter methods and I tried to add the parameter 
> <arg value="-x"/>
> <arg value="com.sosnoski.ws.library.jibx2wsdl.Book"/>
>
> but always got the same error. What's wrong?
>
> i would appreciate any help.
>
> With many Thanks in advance.
>
> Reza
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>   

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to