Arkady, Luciano, Olivier, Somesh,

 thanks for your input. That is very helpful.

  After reading below mentioned article I am not sure about the consequences. I
figured so far:

  a) Users (Clients) of our WebService can still go without Castor, right? As
long as we stay away from "choice" they can just use WSDL2Java as they did
before?

  b) We have to rely on code which is not final as of now, i.e. is not in the
Axis 1.1 jar. Any idea when this will be incorporated into a release?

  c) The deployment descriptor needs to be altered by hand (as opposed to be
generated by WSDL2Java)

  d) xxPortType.java and xxSOAPBindingStub.java need to be altered by hand.

  We are actually too late in the process to change and rework our existing
code, but the approach using Castor seems to be the way to go and there are
always the weekends ;-)
I guess I will dig into it some more and then go for it.

Cheers,
Mariano






"Arkady Kasianski" <[EMAIL PROTECTED]>
02.03.2004 11:14

Bitte antworten an [EMAIL PROTECTED]
An:     <[EMAIL PROTECTED]>
Kopie:  (Blindkopie: Mariano Kamp/FEA_EXT/Essen/Arcor)
Thema:  RE: 3rd repost. Schema-Validation with Axis


See here

http://www-106.ibm.com/developerworks/webservices/library/ws-castor/



-AK

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 12:13 PM
To: [EMAIL PROTECTED]
Subject: RE: 3rd repost. Schema-Validation with Axis

Mariano,

You could use the Castor extension that I have added to Axis 1.1.

I hope that helps.

Cheers

Olivier


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 11:08 AM
To: [EMAIL PROTECTED]
Subject: 3rd repost. Schema-Validation with Axis

Hi,

  sorry for bothering you again, but as of the moment I haven't got any
information I can work on.

  If it is not possible to validate SOAP messages against the Schema
from the WSDL out of the box, or not even with a homegrown handler, I
really like to know. I'll stfu then.

  The problem once again. Here are my steps:

  1) Building a WSDL by hand.
  2) Generating classes and deploy.wsdd with WSDL2Java.
  3) copying the service element from deploy.wsdd to server-config.wsdd.
Changing the name of the implementation class by hand.
  4) deploying generated classes plus server-config.wsdd.
  5) restarting axis.

  When I now write a test client, which sends a message violating the
schema, like sending a String with 18 characters instead of 12, which is
the constraint from the WSDL, it doesn't fail, which it should.

  Anyway, I believe the reason for that is, WSDL2Java ignores the
restrictions from the Schema and the generated classes and deploy.wsdd
don't contain this information anymore.
When accessing the ?wsdl from axis it returns a WSDL without the
constraints and also turned all defined simple types to complex types.

  Somebody on the list, Luciano, mentioned to use the wsdlFile-tag in
server-config.wsdd to use the original wsdl (the one with all the
constraints in place etc.). That I did... Now ?wsdl returns the original
WSDL, but this seems to be about the only thing Axis does with my WSDL
(serving it). It still doesn't reject messages not obeying the defined
constraints.  I left everything else in place in the server-config.wsdd.
Was that ok?

  What else can I do?

  How do other people use Axis with validation? Do I miss something?
This seems to be a very basic and neccessary task, doesn't it?

  I am using Axis 1.1 with Tomcat 5.0.x. And I can only use Axis 1.1 for
the moment.

 On a sidebar...  When I restrict a simple type, like a String, Axis
always makes it a complex type, which bloats the generated code
seriously. Any way around this?

Cheers,
Mariano

(See attached file: disclaimer.txt)




Attachment: disclaimer.txt
Description: Text - character set unknown

Reply via email to