java

  • I would like to retain the default behaviour of using java.lang.
  • Since posting the question, I discovered the sample binding in the question are not quite right.
  • I have a mix of optional and required fields whose types are both plain XSD types and custom restricted simple types.
  • rounding to four decimal places some arbitrary field.
  • Stack Overflow works best with JavaScript enabled

Before getting into actually calling the web service, I’ve been working with classes generated by xjc from the schema and which I’ve manually tuned for:

@ng_real_ninja: Applying a type adapter to both boxed and primitive doubles using external bindings …

I have a WSDL file with an embedded XML schema that specifies the shape of operation parameters and results.

from the schema and which I’ve manually tuned for:

to generate the interfaces for the web service. So, I’m trying to remove manual intervention for rounding purposes by writing a bindings file.

For number 2, I’m pretty confident I can do:

But I’m getting a hard time trying to make number 1 work. The two easy solutions, one of which is transcribed below, limit the generated classes to use either boxed or primitive doubles.

I have a mix of optional and required fields whose types are both plain XSD types and custom restricted simple types. Thus, I would like to retain the default behaviour of using

for required fields.

For instance, one of the elements of the schema is an optional, restricted double that looks like in the snippet below.

Some are required fields of a restricted double type:

And others are plain doubles but required, like below:

I guess this boils down to XPath questions:

How do I limit that binding to those element’s that actually declare to restrict a double XSD type?

attribute are also considered? Will it pick the type if the prefix used in the schema is different?

I think I can solve this case given the answers of the questions above 🙂

Thanks

java