jaxb-api icon indicating copy to clipboard operation
jaxb-api copied to clipboard

Is Java source roundtripping (java->xsd->java) a requirement ?

Open Tomas-Kraus opened this issue 20 years ago • 6 comments

This is an issue for a JAXRPC service client brought up in the JAXRPC 2.0 F2F.

The following text (reproduced here to avoid document chasing) provides the background for this issue and and is taken from the second bullet item in Section 9.1,�Requirements� in JAXRPC 1.1 specification:

https://jsr222.dev.java.net/files/documents/919/2643/jaxrpc-1_1-fr-spec.pdf

A service client environment should be capable of importing a WSDL document and generating a Java based client side representation for a service described in this document. A client side representation includes classes Requirements generated based on the mapping of the WSDL definitions to the corresponding Java representation.

ISSUE: [Issue is from JAXRPC 2.0 F2F March 11,12 F2F]. It was noted at the JAXRPC 2.0 F2F that the classes generated from a WSDL document on a JAXRPC service client should be similar not necessarily identical to the JAXRPC service classes from which the WSDL document was generated on the server. The example discussed was that Date can be mapped to xsd:date in the WSDL document generated when a JAXRPC service is exported. But xsd:date may be mapped to Calendar in the generated classes on the JAXRPC service client. This is a JAXB 2.0 issue since JAXB 2.0 specifies the mapping rules used in the generation of the section.

While roundtripping may be desirable, since JAXRPC service client’s view is the WSDL document - not the JAXRPC service classes - a requirement for rountripping is not totally clear. JAXB 2.0 can assist in the roundtripping by generating schema annotations on the XML schema constructs generated in the section.

NOTE: Roundtripping of source for Schema -> Java -> Schema case is not a requirement.

Environment

Operating System: All Platform: All

Affected Versions

[2.0 draft]

Tomas-Kraus avatar Apr 12 '04 16:04 Tomas-Kraus

  • Issue Imported From: https://github.com/javaee/jaxb-spec/issues/12
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @glassfishrobot

Tomas-Kraus avatar Sep 13 '18 13:09 Tomas-Kraus

@glassfishrobot Commented Reported by sekhar

Tomas-Kraus avatar Apr 12 '04 16:04 Tomas-Kraus

@glassfishrobot Commented sekhar said: This was discused in the JAXB 2.0 F2F on March 30, 31 2004. Here are the notes from the minutes:

[ Notes from Roberto Chinnici ] After a pretty long discussion, we concluded that the actual requirement from JAX-RPC is weaker that what's stated here. In particular, in this diagram

Java -(1)> XML Schema --(2)-> Java

step (1) is actual code generation, but (2) doesn't have to be. For JAXRPC our purposes, it'd be sufficient to allow a developer to carry over the classes he used at step (1), provided there is enough metadata to allow tools to do the right thing (i.e. map schema to existing Java classes so that the logical roundtripping is preserved).

Tomas-Kraus avatar Apr 12 '04 16:04 Tomas-Kraus

@glassfishrobot Commented sekhar said: Updating the status to follow the lifecycle issue outlined in the jaxb20-note-0007.txt.

Tomas-Kraus avatar Jul 12 '04 11:07 Tomas-Kraus

@glassfishrobot Commented Was assigned to sekhar

Tomas-Kraus avatar Apr 12 '04 16:04 Tomas-Kraus

@glassfishrobot Commented This issue was imported from java.net JIRA JSR222-12

Tomas-Kraus avatar May 11 '17 05:05 Tomas-Kraus