RE: Do I need a serializer ?

2002-01-14 Thread Shashi Anand
Title: Do I need a serializer ?



Apache 
comes with serializer/de-serializer for Javabean and other datatypes so if 
you pass and receive whihc is not one of such datatypes then you do not need 
your custom one.
 
Shashi 
Anand

  -Original Message-From: Jamie Tsao 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, January 15, 2002 1:52 
  AMTo: [EMAIL PROTECTED]Subject: Do I need a 
  serializer ?
  I'm a beginner with SOAP, and have been reading a 
  lot of documentation on it.  I'm a bit confused about whether or not I 
  need a serializer.
  What I'm trying to build: 
  I want to use the RPC router servlet to provide a 
  SOAP interface to our existing platform.  Outside clients would make 
  requests to our platform by sending XML request messages (in SOAP 
  format).  They would receive responses also in XML.
  So I basically need to take the XML message, grab 
  the data out and instantiate a bean to pass into our existing business 
  objects.  Is this what the deserializer is meant for ?  It doesn't 
  seem like it.  The code that does this seems very specific to the 
  particular format of the XML message, and seems more like DOM work to 
  me.  When I get the response back from the business object, I have to 
  take the data out of the javabean, and construct an XML message to be sent 
  back to the client.  This once agains seems very specific, and NOT 
  serializer work.
  If I'm right in my assumptions, do I need a 
  serializer/deserializer then ?? 
  Thanks for any help. 



RE: Do I need a serializer ?

2002-01-14 Thread Wilkins, Craig
Title: Do I need a serializer ?



 
You can use the TCP Tunnel to get an idea of what the 
SOAP Message should look like.  You'll have to write a client first, but 
you'll probably have to do this to test your SOAP Service.  The TCP Tunnel 
will show you what the SOAP Message looks 
like.
 
When you ask "How does a 
client put an xml message inside a soap message so that my service can use it 
?".  Is your SOAP Service accepting an XML parameter?  If so, is it 
going to be XML String or XML 
DOM?
 
 
 

 -Original 
Message-From: Jamie Tsao 
[mailto:[EMAIL PROTECTED]]Sent: Monday, January 14, 2002 4:54 
PMTo: [EMAIL PROTECTED]; 
[EMAIL PROTECTED]Subject: RE: Do I need a serializer 
?

  Thanks Craig for your response.
   
  I do 
  realize that the SOAP API automatically constructs the soap message as long as 
  I use the API calls.  Unfortunately in my particular situation, I'm only 
  writing the a SOAP service over HTTP (using the router servlet).  
  I'm not writing the client.  Any client that wants to use this has to 
  construct the soap xml message (they are not using the SOAP API to construct 
  the message), and send a POST to the specified URL.  Am I approaching 
  this the wrong way ?  
   
  How 
  does a client put an xml message inside a soap message so that my service can 
  use it ?
   
  something like this...
   
  
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" 
  >
    
  
  
     </SOAP-ENV:Body>
  
   
  In 
  this situation, it seems that I don't need to deserialize.  I just need 
  to take the XML out of the request, and process it as need 
  be.
   
   
   
   
  -Original Message-From: Wilkins, Craig 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, January 14, 2002 1:26 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: Do I need a 
  serializer ?
  Writing your own Serializers comes down to the 
  data types of the parameters to your SOAP Service.  
   
  Don't confuse the fact that SOAP messages are in XML 
  with the data types of the parameters that you can pass to your SOAP 
  Service.  The SOAP API is there so you don't have to worry about the 
  format of the SOAP message and all of the XML parsing that is 
  involved.  You just specify the SOAP Service, create some parameter(s) 
  and the SOAP API will contruct a SOAP Message to pass to your SOAP Server to 
  process.
   
  The 
  serializers that come with Apache SOAP allow you to pass all sorts of data 
  types to your SOAP Service.  The deserializers enable your SOAP 
  Server to convert the parameters in the SOAP XML Message back 
  into native data types for your SOAP Service to process.  The opposite is 
  true on the SOAP reply.
   
  You 
  can pass XML as the data type of parameters in SOAP Messages.  
  To do so, you will need to use Literal Encoding.  This 
  works particularly good when the parameters to your SOAP Service are very 
  complex.  For instance, you input is a Car, but your Car contains an 
  Engine which has all sorts of complex parts, etc.
   
   
   
   
   
   
   
   
   -Original 
  Message-From: Jamie Tsao 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, January 14, 2002 3:22 
  PMTo: [EMAIL PROTECTED]Subject: Do I need a 
  serializer ?
  
I'm a beginner with SOAP, and have been reading a 
lot of documentation on it.  I'm a bit confused about whether or not I 
need a serializer.
What I'm trying to build: 
I want to use the RPC router servlet to provide a 
SOAP interface to our existing platform.  Outside clients would make 
requests to our platform by sending XML request messages (in SOAP 
format).  They would receive responses also in XML.
So I basically need to take the XML message, grab 
the data out and instantiate a bean to pass into our existing business 
objects.  Is this what the deserializer is meant for ?  It doesn't 
seem like it.  The code that does this seems very specific to the 
particular format of the XML message, and seems more like DOM work to 
me.  When I get the response back from the business object, I have to 
take the data out of the javabean, and construct an XML message to be sent 
back to the client.  This once agains seems very specific, and NOT 
serializer work.
If I'm right in my assumptions, do I need a 
serializer/deserializer then ?? 
Thanks for any help. 



RE: Do I need a serializer ?

2002-01-14 Thread Jamie Tsao
Title: Do I need a serializer ?



Thanks 
Craig for your response.
 
I do 
realize that the SOAP API automatically constructs the soap message as long as I 
use the API calls.  Unfortunately in my particular situation, I'm only 
writing the a SOAP service over HTTP (using the router servlet).  I'm 
not writing the client.  Any client that wants to use this has to construct 
the soap xml message (they are not using the SOAP API to construct the message), 
and send a POST to the specified URL.  Am I approaching this the wrong way 
?  
 
How 
does a client put an xml message inside a soap message so that my service can 
use it ?
 
something like this...
 

    xmlns:xsd="http://www.w3.org/1999/XMLSchema" 
>
  


   </SOAP-ENV:Body>

 
In 
this situation, it seems that I don't need to deserialize.  I just need to 
take the XML out of the request, and process it as need be.
 
 
 
 
-Original Message-From: Wilkins, Craig 
[mailto:[EMAIL PROTECTED]]Sent: Monday, January 14, 2002 1:26 
PMTo: '[EMAIL PROTECTED]'Subject: RE: Do I need a 
serializer ?
Writing your own Serializers comes down to the 
data types of the parameters to your SOAP Service.  
 
Don't 
confuse the fact that SOAP messages are in XML with the data types of the 
parameters that you can pass to your SOAP Service.  The SOAP API is there 
so you don't have to worry about the format of the SOAP message and all of 
the XML parsing that is involved.  You just specify the SOAP Service, 
create some parameter(s) and the SOAP API will contruct a SOAP Message to pass 
to your SOAP Server to process.
 
The 
serializers that come with Apache SOAP allow you to pass all sorts of data types 
to your SOAP Service.  The deserializers enable your SOAP Server to 
convert the parameters in the SOAP XML Message back into native 
data types for your SOAP Service to process.  The opposite is true on the 
SOAP reply.
 
You 
can pass XML as the data type of parameters in SOAP Messages.  To 
do so, you will need to use Literal Encoding.  This works particularly 
good when the parameters to your SOAP Service are very complex.  For 
instance, you input is a Car, but your Car contains an Engine which has all 
sorts of complex parts, etc.
 
 
 
 
 
 
 
 
 -Original Message-From: 
Jamie Tsao [mailto:[EMAIL PROTECTED]]Sent: Monday, January 14, 2002 
3:22 PMTo: [EMAIL PROTECTED]Subject: Do I need a 
serializer ?

  I'm a beginner with SOAP, and have been reading a 
  lot of documentation on it.  I'm a bit confused about whether or not I 
  need a serializer.
  What I'm trying to build: 
  I want to use the RPC router servlet to provide a 
  SOAP interface to our existing platform.  Outside clients would make 
  requests to our platform by sending XML request messages (in SOAP 
  format).  They would receive responses also in XML.
  So I basically need to take the XML message, grab 
  the data out and instantiate a bean to pass into our existing business 
  objects.  Is this what the deserializer is meant for ?  It doesn't 
  seem like it.  The code that does this seems very specific to the 
  particular format of the XML message, and seems more like DOM work to 
  me.  When I get the response back from the business object, I have to 
  take the data out of the javabean, and construct an XML message to be sent 
  back to the client.  This once agains seems very specific, and NOT 
  serializer work.
  If I'm right in my assumptions, do I need a 
  serializer/deserializer then ?? 
  Thanks for any help. 



RE: Do I need a serializer ?

2002-01-14 Thread Wilkins, Craig
Title: Do I need a serializer ?



Writing your own Serializers comes down to the 
data types of the parameters to your SOAP Service.  
 
Don't 
confuse the fact that SOAP messages are in XML with the data types of the 
parameters that you can pass to your SOAP Service.  The SOAP API is there 
so you don't have to worry about the format of the SOAP message and all of 
the XML parsing that is involved.  You just specify the SOAP Service, 
create some parameter(s) and the SOAP API will contruct a SOAP Message to pass 
to your SOAP Server to process.
 
The 
serializers that come with Apache SOAP allow you to pass all sorts of data types 
to your SOAP Service.  The deserializers enable your SOAP Server to 
convert the parameters in the SOAP XML Message back into native 
data types for your SOAP Service to process.  The opposite is true on the 
SOAP reply.
 
You 
can pass XML as the data type of parameters in SOAP Messages.  To 
do so, you will need to use Literal Encoding.  This works particularly 
good when the parameters to your SOAP Service are very complex.  For 
instance, you input is a Car, but your Car contains an Engine which has all 
sorts of complex parts, etc.
 
 
 
 
 
 
 
 
 -Original Message-From: 
Jamie Tsao [mailto:[EMAIL PROTECTED]]Sent: Monday, January 14, 2002 
3:22 PMTo: [EMAIL PROTECTED]Subject: Do I need a 
serializer ?

  I'm a beginner with SOAP, and have been reading a 
  lot of documentation on it.  I'm a bit confused about whether or not I 
  need a serializer.
  What I'm trying to build: 
  I want to use the RPC router servlet to provide a 
  SOAP interface to our existing platform.  Outside clients would make 
  requests to our platform by sending XML request messages (in SOAP 
  format).  They would receive responses also in XML.
  So I basically need to take the XML message, grab 
  the data out and instantiate a bean to pass into our existing business 
  objects.  Is this what the deserializer is meant for ?  It doesn't 
  seem like it.  The code that does this seems very specific to the 
  particular format of the XML message, and seems more like DOM work to 
  me.  When I get the response back from the business object, I have to 
  take the data out of the javabean, and construct an XML message to be sent 
  back to the client.  This once agains seems very specific, and NOT 
  serializer work.
  If I'm right in my assumptions, do I need a 
  serializer/deserializer then ?? 
  Thanks for any help. 



RE: Do I need a serializer ?

2002-01-14 Thread Andrew Simpson


Standard apache serializers will (de)serialize most of what you need.  As
well as basic types, you can even d/s arrays of beans, or beans which
contain other beans.

Attached is a deployment descriptor for a stateless session bean which
returns arrays of beans, some sample beans, and some sample XML generated.

Andrew


 Andrew Simpson, SpeechWorks International, Inc.
 695 Atlantic Avenue, Boston, MA 02111, U.S.A.
 Voice: +1 617 428 ,  Fax: +1 617 757 2211
 [EMAIL PROTECTED]  http://www.speechworks.com


-Original Message-
From: Jamie Tsao [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 3:22 PM
To: [EMAIL PROTECTED]
Subject: Do I need a serializer ?

I'm a beginner with SOAP, and have been reading a lot of documentation on
it.  I'm a bit confused about whether or not I need a serializer.
What I'm trying to build:
I want to use the RPC router servlet to provide a SOAP interface to our
existing platform.  Outside clients would make requests to our platform by
sending XML request messages (in SOAP format).  They would receive responses
also in XML.
So I basically need to take the XML message, grab the data out and
instantiate a bean to pass into our existing business objects.  Is this what
the deserializer is meant for ?  It doesn't seem like it.  The code that
does this seems very specific to the particular format of the XML message,
and seems more like DOM work to me.  When I get the response back from the
business object, I have to take the data out of the javabean, and construct
an XML message to be sent back to the client.  This once agains seems very
specific, and NOT serializer work.
If I'm right in my assumptions, do I need a serializer/deserializer then ??
Thanks for any help.



serialization.zip
Description: Zip compressed data