Hi Ozzie,
                    Thanks for the help. I have few questions based on ur
email reply.
1.  What are castor enum type classes.
2.  Do i have to change typmapping for every entry in deploy.wsdd file to
refer to CastorEnumTypeSerializorFactory/CastorEnumTypeSerializorFactory or
only few selected castor classes files.If so what kind of castor files??
3. Can we use Doc/literal with ur approach.
4.When you define namespaces  package mappings in castorbuilder.properties
file and generate source with source generator do you see namespace
references in Descriptor files??. For example the descriptor code might
look like this
   public AliasDescriptor() {
        super();
        nsURI = "http://beans";;
        setExtendsWithoutFlatten(new beans.AliasTypeDescriptor());
        xmlName = "Alias";
    } //--

5. Can i infer that i do not need to make any changes on client side .Can u
send ur client code??.
6. How do you generate client code from thw wsdl?.
Ur answers would help a, lot.
thx
pradeep.


----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------




                                                                                       
                                               
                      "Gurkan, Ozzie                                                   
                                               
                      (MAN-Corporate)"         To:      "'[EMAIL PROTECTED]'" <[EMAIL 
PROTECTED]>                         
                      <Ozzie.Gurkan            cc:                                     
                                               
                      @cox.com>                Subject: RE: 1.2 alpha and castor 
serialization                                        
                                                                                       
                                               
                      12/11/2003 01:04                                                 
                                               
                      PM                                                               
                                               
                      Please respond                                                   
                                               
                      to axis-user                                                     
                                               
                                                                                       
                                               
                                                                                       
                                               




One other advantage to my approach is that the client side doesn't need the
Castor Serializer/Deserializers at all--not even the enum type. That is
because I allow the WSDL to be created by Axis Server automatically and
hence the WSDL2Java creates pure Bean Serializer/Deserialzer code. As a
matter of fact, I don't generate client code anymore. I just tell my
clients
to get the WSDL and generate it themselves. They have no clue that I am
using Castor beans in the background!

Ozzie

-----Original Message-----
From: Gurkan, Ozzie (MAN-Corporate) [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 1:37 PM
To: '[EMAIL PROTECTED]'
Subject: RE: 1.2 alpha and castor serialization


Unlike the article, I don't include the XSD in the WSDL file. I let the
automatic WSDL generation process that Axis does generate it for me. I do
generate the castor classes (along with the *Descriptor classes) from the
XSD file and define these as beanMappings:

                         <!-- Custom serializer/deserializer for Castor
Enum types-->
                         <typeMapping
deserializer
="org.apache.axis.encoding.ser.castor.CastorEnumTypeDeserializer
Factory" qname="ns19:creditBrokerSelected"
serializer
="org.apache.axis.encoding.ser.castor.CastorEnumTypeSerializerFact
ory"
type="
java:com.manheim.service.creditreport.schema.types.CreditBrokerSelecte
dType" xmlns:ns19="http://creditreport.service.portal.manheim.com/2003/8"/>

                         <!-- Normal BeanMapping tag for a Castor bean
class -->
                         <beanMapping
languageSpecificType="
java:com.manheim.service.creditreport.schema.CreditChe
ckRequest" qname="ns176:creditCheckRequest"
xmlns:ns176="http://creditreport.service.portal.manheim.com/2003/8"/>
                         <beanMapping
languageSpecificType="
java:com.manheim.service.creditreport.schema.CreditChe
ckResponse" qname="ns176:creditCheckResponse"
xmlns:ns176="http://creditreport.service.portal.manheim.com/2003/8"/>

I am using RPC/encoded style and had it successfully working with literal,
too. The only difference is that when you are doing "literal", you have to
set the "encodingStyle" on the typeMapping element to a "".

So, the difference from the article is that I don't allow delegation of the
entire SOAP body to a CastorSerializer, which ends up using DOM--that is
incredibly bad! I can attach the code for the EnumType serializer, if you
do
need it.

A couple things to note on the code generation:
- I almost always use namespace mapping to generate proper class package
names. That is specified in castorbuilder.properties.
- I wrap my messages with request and response objects. See beanMapping
elements, CreditCheckRequest and CreditCheckResponse. These objects inherit
a ServiceRequest and ServiceResponse abstract class.

Advantages:
- No hand modification to WSDL. Use the ?wsdl to auto generate with no
customization.
- Uses standard BeanSerializer/Deserializer methods, which are optimized to
use SAX pipeline.
- Minimal customization for EnumTypes, which doesn't use DOM, and
automatically generates the proper schema for WSDL.
- Works with RPC encoded/literal, etc.


Ozzie Gurkan

-----Original Message-----
From: Pradeep Jonnalagadda [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 11:12 AM
To: [EMAIL PROTECTED]
Subject: RE: 1.2 alpha and castor serialization



Hi Ozzie,
       I'm interested in ur solution. Can u send me the required files and
give me a short note on how to use them in the context of the article . thx
pradeep.



----------------------------------------------------------------------------

------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind
CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------

------------







Reply via email to