axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <gdani...@macromedia.com>
Subject RE: Axis Chokes on Complex Types from MS Soap 3.0
Date Mon, 12 Aug 2002 21:23:58 GMT

David:

Could you post the actual WSDL?

We should (and do, as far as I can tell) deal correctly with unqualified schema elements like
this.  Schema has a setting "elementFormDefault" which can be either qualified or unqualified.
 For this schema:

    <s:schema [ATTR] targetNamespace="urn:qualifyTest">
      <s:element name="Simple">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>

If [ATTR] = "elementFormDefault='qualified'", we'd get XML like this:

<ns:Simple xmlns:ns="urn:qualifyTest">
  <ns:name>Glen</ns:name>
</ns:Simple>

If [ATTR] = "elementFormDefault='unqualified'", we'd get XML like this:

<ns:Simple xmlns:ns="urn:qualifyTest">
  <name>Glen</name>
</ns:Simple>

The default is unqualified, so "name" wouldn't be in any namespace on the wire.  I just tested
this, and we do the right thing for the cases I tried.

--Glen

> -----Original Message-----
> From: Riggs, David [mailto:driggs@asset.com]
> Sent: Monday, August 12, 2002 2:20 PM
> To: axis-dev@xml.apache.org
> Subject: RE: Axis Chokes on Complex Types from MS Soap 3.0
> 
> 
> I posted the following message to microsoft.public.xml.soapsdk and
> microsoft.public.msdn.soaptoolkit, if I get any useful response
> I'll post here (or at least a link to the groups.google archive).
> Thanks for your help!
> ------------------------------------------------------------------
> 
> From: driggs@asset.com (David A. Riggs)
> Newsgroups: microsoft.public.msdn.soaptoolkit
> Subject: Complex Type Namespacing Problem With MSSTK3
> NNTP-Posting-Host: 192.131.125.2
> Message-ID: <1745c75b.0208120933.636eeb2f@posting.google.com>
> 
> I've developed a test web service that returns a complex data type
> (struct)
> with MSSTK3 as the provider. The client side is a non-MS toolkit, and
> is
> complaining that the SOAP response is not what it expects given the
> WSDL.
> 
> My complex data type looks like this (as generated by MSSTK3's generic
> type
> mapper):
> ----------- WSDL Excerpt -----------
> <complexType name="Mission">
>    <sequence>
>       <element name="MissionName" type="string" /> 
>       <element name="MissionNumber" type="int" /> 
>    </sequence>
> </complexType>
> ------------------------------------
> 
> The actual SOAP response is pasted below, note the following facts
> about it:
> - There is no default namespace declared anywhere in the document
> - An xsd:type is explicitly declared for the parent element of the
> complex type
> - An xsd:type is NOT declared for the child elements of the complex
> type
> 
> It appears to me that these child elements do not belong to any
> namespace, and
> as such, my client app (Apache Axis beta 3) rejects the SOAP envelope
> when it
> gets to the MissionName element (complaining 'Invalid element in 
> org.tempuri.Mission - MissionName').
> 
> Can anyone shed any light on this matter?
> 
> ----------- MSSTK3 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:GetMissionsObjResponse
> xmlns:SOAPSDK4="http://tempuri.org/TestWebService/message/">
> 			<Result href="#id1"/>
> 		</SOAPSDK4:GetMissionsObjResponse>
> 		<SOAPSDK5:Mission
> xmlns:SOAPSDK5="http://tempuri.org/TestWebService/type/"
> id="id1" SOAPSDK3:root="0" SOAPSDK2:type="SOAPSDK5:Mission">
> 			<MissionName>Test Value</MissionName>
> 			<MissionNumber>42</MissionNumber>
> 		</SOAPSDK5:Mission>
> 	</SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----------------------------------------------
> 
> Thanks,
> David A. Riggs
> Science Applications International Corp.
> 

Mime
View raw message