axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brenda Bell <bb...@juicesoftware.com>
Subject RE: Axis Chokes on Complex Types from MS Soap 3.0
Date Mon, 12 Aug 2002 15:19:22 GMT
>From http://www.w3.org/TR/REC-xml-names/#scoping-defaulting:

5.1 Namespace Scoping

The namespace declaration is considered to apply to the element where it is
specified and to all elements within the content of that element, unless
overridden by another namespace declaration with the same NSAttName part.

5.2 Namespace Defaulting

A default namespace is considered to apply to the element where it is
declared (if that element has no namespace prefix), and to all elements with
no prefix within the content of that element. If the URI reference in a
default namespace declaration is empty, then unprefixed elements in the
scope of the declaration are not considered to be in any namespace. Note
that default namespaces do not apply directly to attributes.

***

For rule 5.1, they give examples which do not declare a default namespace
but prefix every element.  For rule 5.2, they give examples which do declare
a default namespace and omit prefixes.  This leaves room for some ambiguity
because following either the text alone or the example alone leads to two
different conclusions.

For the sake of curiosity, I loaded the document in MSXML and discovered
that the MS parser does not put the child elements in a namespace.  This
would be consistent with my understanding of the spec... however, as you
pointed out -- this would be inconsistent with both MSSOAP and the example
given in the SOAP spec.

I'd recommend posting the question to MSDN to see what their interpretation
is.


> -----Original Message-----
> From: Riggs, David [mailto:driggs@asset.com]
> Sent: Monday, August 12, 2002 9:45 AM
> To: axis-dev@xml.apache.org
> Subject: RE: Axis Chokes on Complex Types from MS Soap 3.0
> 
> 
> The example I've given seems very similar to the example SOAP
> response given in the W3C SOAP spec containing a struct
> [http://www.w3.org/TR/SOAP/#_Toc478383541] (example 8)
> 
> ------------- W3C SOAP Response Example -----------------
> <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">
>            <PriceAndVolume>
>                <LastTradePrice>34.5</LastTradePrice>
>                <DayVolume>10000</DayVolume>
>            </PriceAndVolume>
>        </m:GetLastTradePriceResponse>
>    </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> ---------------------------------------------------------
> 
> The significant similarities between my MSSTK3 example and
> this one are:
> - No default namespace declared
> - No namespace declared explicitly for sub-elements of complex type
> - No xsd:type declared for the sub-elements of a complex type
> 
> Based on what I've seen, I don't believe that Axis beta 3 
> would be able to properly handle this response (given the
> proper WSDL of course). As stated in a previous message,
> WSDL2Java generates the proper client side code, but Axis
> complains about an 'invalid element' when it recieves the
> SOAP response.
> 
> Am I missing some significant difference between these two
> examples?
> 
> (sorry to pick this back up after half a week of silence,
> browse entire thread here:
> http://marc.theaimsgroup.com/?t=102865982600005&r=1&w=2 )
> 
> David A. Riggs
> Science Applications International Corporation - SAIC
>  (304)284-9000x201                  driggs@asset.com
> 
> 
> > David wrote: 
> >> -----Original Message----- 
> >> From: Riggs, David [mailto:driggs@asset.com] 
> >> Sent: Wednesday, August 07, 2002 9:59 AM 
> >> To: axis-dev@xml.apache.org 
> >> Subject: RE: Axis Chokes on Complex Types from MS Soap 3.0 
> >> 
> >> 
> >> Full SOAP response: 
> >> 
> >> --------------------------------- 
> >> <?xml version="1.0" encoding="UTF-8" standalone="no"?> 
> >> <SOAP-ENV:Envelope 
> xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema" 
> >> xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance" 
> >> xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/" 
> >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
> >>       <SOAP-ENV:Body 
> >> 
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
> >>               <SOAPSDK4:GetMissionsObjByDateRangeResponse 
> >> xmlns:SOAPSDK4="http://tempuri.org/TestWebService/message/"> 
> >>                       <Result href="#id1"/> 
> >>               </SOAPSDK4:GetMissionsObjByDateRangeResponse> 
> >>               <SOAPSDK5:Mission 
> >> xmlns:SOAPSDK5="http://tempuri.org/TestWebService/type/" id="id1" 
> >> SOAPSDK3:root="0" SOAPSDK2:type="SOAPSDK5:Mission"> 
> >>                       <MissionName>Some Mission Name</MissionName>

> >>                       <MissionNumber>42</MissionNumber> 
> >>               </SOAPSDK5:Mission> 
> >>       </SOAP-ENV:Body> 
> >> </SOAP-ENV:Envelope> 
> >> --------------------------------- 
> >> 
> >> Should MissionName and MissionNumber be coming across the 
> >> wire with a namespace and type attached? 
> > 
> > I believe they should have a namespace attached... either 
> by including
> an
> > explicit prefix for the http://tempuri.org/TestWebService/message/
> namespace
> > or by defining a default namespace on the Mission element.  Unless I
> have
> > grossly misinterpreted the Namespace spec, MissionName and
> MissionNumber as
> > shown in this document are not in any namespace and cannot be
> referenced as
> > such by any parser.
> > As for whether MissionName and MissionNumber should have type
> attributes:
> >  an explicitely specified type may be preferred in certain 
> situations
> such
> > as an element whose defined type is anyType, but types are not (and
> should
> > not be) an absolute requirement.
> 

Mime
View raw message