You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Ravi Natarajan <NR...@quark.de> on 2002/08/13 16:59:16 UTC

some doubts

Hi,

I am having a soap service which takes three parameters , the SOAP
request for the same is shown below


<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" >
<SOAP-ENV:Body>
<ns:executeCommand xmlns:ns="urn:executeCommand">
<commandName xsi:type="xsd:string">login</commandName>
<parameters xsi:type="xsd:string"><?xml
version="1.0" encoding="utf-8"?><TestData
xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance"
xsi:noNamespaceSchemaLocation="http://localhost:8080/soap/FileName.xsd"><Ses
sion UserName='xxx' Password=''
ServerName='yyyy' SessionLanguage='zxzxz'></Session></TestData >
</parameters>
<sessionID xsi:type="xsd:string">3423952</sessionID>
</ns:executeCommand>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The parameter data eventhough a string it is also in XML format with
a validating XSD.In my soap service class I validate the parameters data for
the given xsd and generate a dom from the incoming string.


I would like to change this SOAP request into an all XML format call
as shown below

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:msd="this would
point to the location where my xsd file">
<SOAP-ENV:Body>
<ns:executeCommand xmlns:ns="urn:executeCommand">
<commandName xsi:type="xsd:string">login</commandName>
<msd:TestData>
<Session UserName='xxx' Password=''
ServerName='yyyy' SessionLanguage='zxzxz'></Session></TestData >
</msd:TestData>
<sessionID xsi:type="xsd:string">3423952</sessionID>
</ns:executeCommand>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
How do I create such SOAP request. Should I create a request from
scratch . Also I want my soap service to access the incoming data. How do I
get the SOAP request into my service class so that I can access the Body of
the SOAP call, so that I can parse the incoming data.

regards
ravi.n