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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content