0

I'm trying to create a web service out of existing Java code. I tried to use the Axis2 POJO technique, but that didn't work since Axis2 doesn't support enums or collections, which our code uses.

Then I looked at the JiBX framework, which supports enums and collections. But the Jibx2Wsdl tool didn't work on our code because we use the java.net.InetAddress class and Jibx2Wsdl doesn't know how to map that to XML. I'd need to write a custom marshaller/unmarshaller for that, but I found a post from the creator of JiBX saying that Jibx2Wsdl doesn't have the ability to invoke a custom marshaller/unmarshaller.

Is there any tool out there that can create a WSDL file from Java code, that supports enums and collections, and that also lets you invoke a custom marshaller/unmarshaller?

pacoverflow
  • 3,726
  • 11
  • 41
  • 71

1 Answers1

0

CXF can handle some of that. The JAX-WS/JAXB spec specifically allows and handles SOME of the collections things, but for the stuff that it cannot handle it does provide the options of XmlJavaTypeAdapter things to map from types it cannot handle into types it can. Thus, you can write an adapter to map from InetAddress to String or to some sort of POJO or something that is more appropriate for what you need.

Daniel Kulp
  • 14,447
  • 4
  • 45
  • 37