SM> Re^4: [Q] A problem of WSDL2Java

SM> Re^4: [Q] A problem of WSDL2Java

SM> Re^4: [Q] A problem of WSDL2Java

Masanori ITOH ito at
Thu May 13 05:35:40 EDT 2004

Hi Zehler-san,

I'm sorry for my late reply. 

Thank you for your comment with detailed explanation.

I can understand what you mentioned, that the Semantic Model
(SM) has various schemas and values to be able to use it in
many PWG Specifications, and permits extensional values for
vendors of PWG registered WKV so SM has the loose definition
by parts of a union with constraints.
I think that is the solution for this problem. I agree with you.

And also I understand what you suggest, that schema files
have to be modified to leave only what my implementation
needs so I have to remove the union definitions and explicitly
define my extensional values instead if need.

In the characteristics of WSDL, I know it should NOT be defined
with unknown values so WSDL files should NOT 'import' schema
files with uncertain definitions.
If not, Web service communications will not be sure.

And I know that it is proper to define complaints for
extensional values in schema files, that URLs in WSDL files
to 'import' schema files only express the place schema files
are kept ,and that schema files does not necessarily need to
be used as they are.

But I think there are many demands not to want to modify
schema files. Because there are many union definitions in
files and it takes times to remove them.

Someone may think that WKVs(Well Known Values) PWG has defined
are various and enough to general implementation, so he may
wish to use only WKVs without removing definition parts for
extensions in schema files, and may also wish to leave vague
definition parts to use values defined gradually in the test
because in developing stage the specification of implementaion
are not exactly decided. (That may be wrong process in

So if AXIS or other generation tool can treat SM schema files
with the union definition as they are, I guess it is pleased.

Someone wishs there were a tool to remove definition parts
for extensions and modify schema files automatically.

Thank you,

Masanonri Itoh
RICOH Co., Ltd.  Software R&D Center


Mr. Zehler, Peter wrote on Mon, 10 May 2004 08:23:07 -0400

Itoh San,

We discussed this at length during the development of the Semantic Model
Schema and PSI.  We could either code for the existing limitations of the
tool sets or have the schema reflect the PWG Print Model.  We chose to
reflect the PWG Print Model and let the tools catch up.  

For the extension of type II and type III keywords we modeled them as
NMTOKEN with constraints as part of a union.  The well known values (i.e.
PWG registered) we constrain the NMTOKEN with an enumeration.  To allow
federated extensions the other member of the union is a pattern that
represents qualified name (i.e. preceded by some characters and a ':').
There were limits to the schema so our definition is not a QNAME since we
did not want to mix types in a union.  NOTE: We have a similar definition
with a base type of string due to character requirements.

We required the ability in the PWG schema to represent this extensibility
since it is the application that determines if a value is supported or not.
We do not want the XML parser throwing away unknown elements or values in a
Clients request.  The primary reason for this is that in the PWG Model the
response may contain the unknown element(s) and value(s) in the Printer's

The PWG Semantic Model Schema is intended to represent the full set of PWG
registered elements and values.  It is unlikely that an implementation would
support all of these.  It is even likely that an implementation will support
vendor extensions.  Before code would be generated for your implementation a
local copy of the schema would have to be "trimmed" down to represent your
implementation.  At that time I would (and do) remove the union definitions
and replace it with a generic NMTOKEN definition.  You could also explicitly
replace the union definition with an NMTOKEN restricted by the set of
enumerated values your implementation supports.  The difficulty with that
approach is that is you would need to intercept the unknown values and pass
them to your application for appropriate processing. 

Another problem with the Schema is what Microsoft refers to as a
nondeterministic schema error.  The Microsoft tools do not like a ##ANY
followed by an optional element.  (It might be preceded by an optional's been a while since I looked at it)

Support for the Semantic Model (i.e. understanding its namespace) does not
imply that your implementation supports all its elements and values.  In my
opinion the true value of the PWG Semantic Model Schema is the reuse of the
elements and values in other print specifications.

Other opinions?

Peter Zehler 
Xerox Innovation Group 
Email: PZehler at 
Voice:    (585) 265-8755 
FAX:      (585) 422-7961 
US Mail: Peter Zehler
              Xerox Corp. 
              800 Phillips Rd. 
              M/S 128-25E 
              Webster NY, 14580-9701 

-----Original Message-----
From: McDonald, Ira [mailto:imcdonald at] 
Sent: Friday, May 07, 2004 10:32 AM
To: 'Masanori ITOH'; McDonald, Ira; 'sm at'
Cc: HALL,DAVID (HP-Vancouver,ex1); 'Zehler, Peter'; BERKEMA,ALAN C
(HP-Roseville,ex1); Alain Regnier; Harry Lewis
Subject: RE: Re^2: [Q] A problem of WSDL2Java


Please take a look at Masanori Itoh's note below
about Java RPC problems with SM/1.0 use of the
'xsd:union' construct.  Please copy all with your

- Ira

Ira McDonald (Musician / Software Architect)
Blue Roof Music / High North Inc
PO Box 221  Grand Marais, MI  49839
phone: +1-906-494-2434
email: imcdonald at

-----Original Message-----
From: Masanori ITOH [mailto:ito at]
Sent: Thursday, May 06, 2004 7:34 PM
To: McDonald, Ira
Cc: HALL,DAVID (HP-Vancouver,ex1); 'Zehler, Peter'; BERKEMA,ALAN C
(HP-Roseville,ex1); Alain Regnier; Harry Lewis
Subject: Re^2: [Q] A problem of WSDL2Java

Hi Mr. McDonald,

Thank you for your support to my problem.

After sending e-mail to Mr. Hall, I inquired that problem
to my colleague at work, and found the reason.

The Apache AXIS tool, WSDL2Java excutes binding from XML
Schema to Java in accordance with JAX-RPC (Java API for
XML-Based RPC). But the support of the schema component 
'xsd:union' is optional in JAX-RPC. 
So I guess WSDL2Java can not treat the schema component

One of the solution for that problem is not to use
the schema component 'xsd:union'.
In the Semantic Model '1.0' schema, the schema component
'xsd:union' is mostly used as the union of the part of
enumerated definitions and the part of the extension of them.
And the parts of the extension are loosely defined
with constraining facet (e.g. 'xsd:pattern').
So in order to solve that problem, the part of extension
have to be defined strictly.
But a problem remains. It is that the schema files have to
be modified.

I found that problem when I checked whether some WSDL
converting tools could treat new PSI WSDL files.
I found another problem as a matter of truth.
Both old and new WSDL files can be treated with gSOAP tool
(C or C++ code generator).
The reason is gSOAP tool has poor quality.

Some problems of generation tools were found, so I am
anxious about the implementation of PSI prototype
even if new WSDL files will be released.

[I didn't copy to the SM mailing list. If needed,
please copy this to it.]


Masanonri Itoh
RICOH Co., Ltd.  Software R&D Center

Mr. McDonald, Ira wrote on Thu, 6 May 2004 07:24:45 -0700

Hi Pete,

Please reply to Masanori Itoh about his problems with
'xsd:union' in the final (1.0) versions of SM schema.

[I copied the SM mailing list to make sure that others
are aware of this problem.]

- Ira

Ira McDonald (Musician / Software Architect)
Blue Roof Music / High North Inc
PO Box 221  Grand Marais, MI  49839
phone: +1-906-494-2434
email: imcdonald at

-----Original Message-----
From: Masanori ITOH [mailto:ito at]
Sent: Wednesday, April 28, 2004 9:47 AM
To: HALL,DAVID (HP-Vancouver,ex1)
Cc: BERKEMA,ALAN C (HP-Roseville,ex1); Alain Regnier; Harry Lewis;
McDonald, Ira
Subject: [Q] A problem of WSDL2Java

Hi Mr. Hall,

I have a problem of PSI inplementation.

I used WSDL2Java (Axis tool) with my new WSDLs included the
Semantic Model '1.0' schema files, but bad codes were generated.
I think that is why 'xsd:union' are used in the Semantic Model
'1.0' schema files.
(In the Semantic Model '0.93' which old WSDL files use,
'xsd:union' are not used. Java codes can be got with 
SM 0.93 .)

I found you had a same experience.

So could you tell me your solution of that problem if you have ?

I wonder Java codes can not be automatically generated
with WSDL2Java if the Semantic Model '1.0' is used and
that problem remains. 

Thank you,

Masanonri Itoh
RICOH Co., Ltd.  Software R&D Center

More information about the Sm mailing list