Kaushik, tell me
if its sufficient:-
The web
service has been implemented in java. The
Web Application Server (IIS/JRUN) hosts the web service within a Java runtime
environment. The web service runs within the context of the web application
server. Apache SOAP
RPC router (SOAP Service) unmarshalls
SOAP remote procedure call (RPC) messages and forwards them to the web service.
The provider response is then marshalled and returned to the requestor. The
router is a servlet managed within the context of the Web application
server.
As
business problem domain requires complex data to be transferred between service
requestor and service provider and to support service requestor implementations
independent
of the hardware or software platform on which it is implemented and the
programming language in which it is written, it was decided that
data will be exchanged as XML documents and that the XML documents will be
transported as string since sequence of characters or string is a data type
supported (and will be :-) ) by almost all major programming
language.
XML
Schemas constrain and validate the format of information for the business
functions. The schemas are published to the service
requestor.
First,
we identified the web methods and then designed their signatures. A clean
and elegant design practise is to have 4 or 5 parameters per web method (well,
its just a thumb rule we follow :-) , and its easier for developer to
remember when implementing a requestor for the service ), data
structures were created for each method parameter (if required). Infact all the
web methods of service also return the resultant data as XML
structures. A WSDL document was then generated. An extract of the WSDL
document is below, where each part name in implementation is an
XML string.
...........
<message
name="<method name>"> <part name="meth1_inType1" type="xsd:string"/> <part name="meth1_inType2" type="xsd:string"/> <part name="meth1_inType3" type="xsd:string"/> <part name="meth1_inType4" type="xsd:string"/> <part name="meth1_inType5" type="xsd:string"/> </message> .................. Then
generate the deployment descriptor ( Java specific)
:-
....................
<isd:map
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="" qname="x:meth1_inType1"
xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="" qname="x:meth1_inType2" xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="" qname="x:meth1_inType3" xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="" qname="x:meth1_inType4" xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="" qname="x:meth1_inType5" xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/> ............................ The
service requestor's application before invoking the web method, creates XML
documents using XML parser or may build as a string and passes the XML document
as string (XML String) by serializing the DOM Document object as a string. This
informationg on invoking is transported as part of SOAP envelope and is
forwarded by the SOAP service to the web service where this string is
deserialized into a DOM Document object, parsed and binded into a Java class
implementation for that XML
document.
public
String <method name> ( String
<param1>,
String <param2>, String <param3>,
String <param4>,
String <param5>
)
{
//code
specific to Xercex XML Java Parser
below
DOMParser oParser = new
DOMParser();
oParser.parse(new InputSource( new StringReader(<param1>) )
);
Element oDocElm =
oParser.getDocument().getDocumentElement();
.................................
}
Cheers
Kapil.
----Original Message-----
From: Kaushik Patra [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 5:08 AM To: [EMAIL PROTECTED] Subject: hi
|
- hi Kapil Kapoor
- hi Neha Srivastava
- classpath question Neha Srivastava
- RE: classpath question bheemesh
- From a Servlet Vinayan Menon
- Re: From a Servlet Scott Nichol
- Re: From a Servlet Vinayan Menon
- Re: From a Servlet Scott Nichol
- Re: From a Servlet Vinayan Menon
- Re: From a Servlet Scott Nichol
- Re: classpath question Neha Srivastava