How can I keep XML Schema types in WSDL after using XmlAdapter wrappers in web services?

Solution Unverified - Updated -

Issue

  • When using the package-info.java on our package level classes, we created a DateAdapter, BooleanAdapter, and LongAdapter wrapper classes.
  • For instance, the LongAdapter class is as follows:
public class LongAdapter extends XmlAdapter<String, Long> {
  @Override
  public Long unmarshal(String value) throws Exception { ... }
  @Override
  public String marshal(Long value) throws Exception { ... }
}
  • This worked, but we noticed that the WSDL that is generated converted the previous Date, Long, and Boolean data types in the WSDL to String.
  • We wanted to know if we can retain the previous data types from before. Is there another approach to keep the data types intact?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.