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 "Gopinath M.R." <mr...@yahoo.com> on 2001/05/05 14:48:45 UTC

Namespaces missing for few elements of SOAP spec example !!!!

Hi all,
	The elements in the received SOAP response[2] does not have namespace
binding for 'return'.  If you use SAX Parser and parse below document,
you will not get namespace for element 'return'.  Ideally this should
have been in some standard namespace URI of apache soap toolkit (an
encoding URI), since this is specific to RPC invoke in apache soap.

	Most importantly, the same BUG is there in SOAP spec example [1], few
elements are not bound to any namespace (Element 'Price' is not bound to
any namespace).  It should have been 'm:Price'.

[1] SOAP request (as specified in SOAP specification example 2)
------------------------------------------------------------------

<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
   <SOAP-ENV:Body>
       <m:GetLastTradePriceResponse xmlns:m="Some-URI">
           <Price>34.5</Price>
       </m:GetLastTradePriceResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


[2] : SOAP response sent by server using apache SOAP toolkit
------------------------------------------------------------
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:getQuoteResponse xmlns:ns1="urn:StockQuoteService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <return xsi:type="xsd:float">138.25</return> 
  </ns1:getQuoteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

	Now, the question is, is it mandatory to have every element bound to
namespace in SOAP?  IMO, it should be, since the applications can
understand only namespaces specific to them and not elements in unknown
namespaces.  For example, if I send SOAP request containing UDDI
namespace elements and with few Elements (defined in UDDI schema) not
bound to UDDI namespace, UDDI registry can't understand them and may
throw error to user.
		I guess this is one of the issue when you try to use different SOAP
implementations between client and server (like MS-SOAP and apache with
RPC).

	I would be interested in knowing about any of your comments on this.

thanks and regards,
Gopinath M.R.
Sr.Product Engineer,
Aztec software (www.aztec.soft.net),
Bangalore, INDIA