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

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

Zehler, Peter PZehler at crt.xerox.com
Mon May 10 08:23:07 EDT 2004


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
response.

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
element...it'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?
Pete

Peter Zehler 
XEROX 
Xerox Innovation Group 
Email: PZehler at crt.xerox.com 
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 sharplabs.com] 
Sent: Friday, May 07, 2004 10:32 AM
To: 'Masanori ITOH'; McDonald, Ira; 'sm at pwg.org'
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

Pete,

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
reply.

Thanks,
- 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 sharplabs.com

-----Original Message-----
From: Masanori ITOH [mailto:ito at src.ricoh.co.jp]
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
'xsd:union'.

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.]

Thanks,

-----------------------
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.]

Cheers,
- 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 sharplabs.com

-----Original Message-----
From: Masanori ITOH [mailto:ito at src.ricoh.co.jp]
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.
   http://nagoya.apache.org/jira/browse/AXIS-568

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