You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by John Hawkins <HA...@uk.ibm.com> on 2005/04/06 12:02:48 UTC

RE: Nested namespace prefixes

I agree - can anyone confirm our understanding of elementFormDefault? It's 
a complex area and we'd like someone else to understand it with us :-)

cc'ing axis java for help pls.






"Samisa Abeysinghe" <SA...@virtusa.com> 
06/04/2005 10:48
Please respond to
"Apache AXIS C Developers List"


To
"Apache AXIS C Developers List" <ax...@ws.apache.org>
cc

Subject
RE: Nested namespace prefixes






Apparently we get this working with Axis C++ because the server is not 
handling the case correctly.
 
Thanks,
Samisa?
 
-----Original Message-----
From: Chinthana C. Dinapala [mailto:CDinapala@virtusa.com] 
Sent: Wednesday, April 06, 2005 3:34 PM
To: Apache AXIS C Developers List
Subject: RE: Nested namespace prefixes
 
Hi Mark,
We testing against C++ server and we get the correct out put.
The enumeration test sends this request message...
 
POST /axis/EnumerationWSService HTTP/1.1Host: 127.0.0.1:8888Content-Type: 
text/xml; charset=UTF-8SOAPAction: 
"EnumerationWSService#getInput"Content-Length: 497
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:getInput xmlns:ns1="http://enumeration.test.apache.org">
<type att_enum_int="1" att_enum_string="one" 
att_enum_kind="CHEQUE"><ns1:enum_int>0</ns1:enum_int>
<ns1:enum_string>one</ns1:enum_string>
</type>
</ns1:getInput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
The enumeration test server respond message...
HTTP/1.1 200 OKDate: Wed, 06 Apr 2005 09:20:42 GMTServer: Apache/2.0.52 
(Win32)Content-Length: 513Content-Type: text/xml
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:getInputResponse xmlns:ns1="http://enumeration.test.apache.org">
<type att_enum_int="1" att_enum_string="one" 
att_enum_kind="CHEQUE"><ns1:enum_int>0</ns1:enum_int>
<ns1:enum_string>one</ns1:enum_string>
</type>
</ns1:getInputResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
Thanks
 
Chinthana Dinapala
Associate Software Engineer
Virtusa Corp. 
World Trade Center
Office: +94-11-4765300 ext 5657
Mobile: +94-77-3059107
 
-----Original Message-----
From: Mark Whitlock [mailto:mark_whitlock@uk.ibm.com]
Sent: Wednesday, April 06, 2005 3:06 PM
To: axis-c-dev@ws.apache.org
Subject: Nested namespace prefixes



Hi,
The enumeration test sends this request message...
      <SOAP-ENV:Body>
         <ns1:getInput xmlns:ns1="http://enumeration.test.apache.org">
            <type att_enum_int="1" att_enum_string="one"
att_enum_kind="CHEQUE">
               <ns1:enum_int>0</ns1:enum_int>
               <ns1:enum_string>one</ns1:enum_string>
            </type>
         </ns1:getInput>
      </SOAP-ENV:Body>
but when run against the latest WebSphere Application Server, the server
returns a deserialization fault. The problem seems to be prefixing 
enum_int
and enum_string. When these elements are unqualified (the prefixes are
removed), it works. The wsdl does not specify elementFormDefault, and the
default value is elementFormDefault="unqualified".
I discovered http://www.w3.org/TR/xmlschema-0/ which explains this. It 
says
in section 3.1 2nd para "Qualification of local elements and attributes 
can
be globally specified by a pair of attributes, elementFormDefault and
attributeFormDefault, on the schema element, or can be specified 
separately
for each local declaration using the form attribute. All such attributes'
values may each be set to unqualified or qualified, to indicate whether or
not locally declared elements and attributes must be unqualified. ". From
this and the other examples they give, elementFormDefault="unqualified"
means that an instance document (basically a soap message) must not 
qualify
elements within a complex type.
So it seems that this is a bug in Axis C++. There are other schema
attributes which we probably don't support properly such as form, fixed,
ref, use and attributeFormDefault.
What do other people think? Have I interpreted the specs correctly? Do
other people use elementFormDefault? If I fix it, will it break the 
server?
Mark
Mark Whitlock
IBM

Re: Nested namespace prefixes

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi John:

Your understanding of elementFormDefault seems correct below, but to 
know whether the message is right or not would require looking at the 
schema.  It looks like the <test> element is unqualified, and then the 
elements inside that are qualified - it is possible to set the schema up 
that way, so it might be right.  But if elementFormDefault is unqalified 
(or unspecified) and the form="qualified" attribute isn't used anywhere, 
then this is pretty clearly a bug.

Supporting element/attribute forms is hairy but necessary. :)

--Glen

John Hawkins wrote:
> I agree - can anyone confirm our understanding of elementFormDefault? It's 
> a complex area and we'd like someone else to understand it with us :-)
> 
> cc'ing axis java for help pls.
> 
> 
> 
> 
> 
> 
> "Samisa Abeysinghe" <SA...@virtusa.com> 
> 06/04/2005 10:48
> Please respond to
> "Apache AXIS C Developers List"
> 
> 
> To
> "Apache AXIS C Developers List" <ax...@ws.apache.org>
> cc
> 
> Subject
> RE: Nested namespace prefixes
> 
> 
> 
> 
> 
> 
> Apparently we get this working with Axis C++ because the server is not 
> handling the case correctly.
>  
> Thanks,
> Samisa?
>  
> -----Original Message-----
> From: Chinthana C. Dinapala [mailto:CDinapala@virtusa.com] 
> Sent: Wednesday, April 06, 2005 3:34 PM
> To: Apache AXIS C Developers List
> Subject: RE: Nested namespace prefixes
>  
> Hi Mark,
> We testing against C++ server and we get the correct out put.
> The enumeration test sends this request message...
>  
> POST /axis/EnumerationWSService HTTP/1.1Host: 127.0.0.1:8888Content-Type: 
> text/xml; charset=UTF-8SOAPAction: 
> "EnumerationWSService#getInput"Content-Length: 497
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:getInput xmlns:ns1="http://enumeration.test.apache.org">
> <type att_enum_int="1" att_enum_string="one" 
> att_enum_kind="CHEQUE"><ns1:enum_int>0</ns1:enum_int>
> <ns1:enum_string>one</ns1:enum_string>
> </type>
> </ns1:getInput>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>  
> The enumeration test server respond message...
> HTTP/1.1 200 OKDate: Wed, 06 Apr 2005 09:20:42 GMTServer: Apache/2.0.52 
> (Win32)Content-Length: 513Content-Type: text/xml
> <?xml version='1.0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:getInputResponse xmlns:ns1="http://enumeration.test.apache.org">
> <type att_enum_int="1" att_enum_string="one" 
> att_enum_kind="CHEQUE"><ns1:enum_int>0</ns1:enum_int>
> <ns1:enum_string>one</ns1:enum_string>
> </type>
> </ns1:getInputResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>  
> Thanks
>  
> Chinthana Dinapala
> Associate Software Engineer
> Virtusa Corp. 
> World Trade Center
> Office: +94-11-4765300 ext 5657
> Mobile: +94-77-3059107
>  
> -----Original Message-----
> From: Mark Whitlock [mailto:mark_whitlock@uk.ibm.com]
> Sent: Wednesday, April 06, 2005 3:06 PM
> To: axis-c-dev@ws.apache.org
> Subject: Nested namespace prefixes
> 
> 
> 
> Hi,
> The enumeration test sends this request message...
>       <SOAP-ENV:Body>
>          <ns1:getInput xmlns:ns1="http://enumeration.test.apache.org">
>             <type att_enum_int="1" att_enum_string="one"
> att_enum_kind="CHEQUE">
>                <ns1:enum_int>0</ns1:enum_int>
>                <ns1:enum_string>one</ns1:enum_string>
>             </type>
>          </ns1:getInput>
>       </SOAP-ENV:Body>
> but when run against the latest WebSphere Application Server, the server
> returns a deserialization fault. The problem seems to be prefixing 
> enum_int
> and enum_string. When these elements are unqualified (the prefixes are
> removed), it works. The wsdl does not specify elementFormDefault, and the
> default value is elementFormDefault="unqualified".
> I discovered http://www.w3.org/TR/xmlschema-0/ which explains this. It 
> says
> in section 3.1 2nd para "Qualification of local elements and attributes 
> can
> be globally specified by a pair of attributes, elementFormDefault and
> attributeFormDefault, on the schema element, or can be specified 
> separately
> for each local declaration using the form attribute. All such attributes'
> values may each be set to unqualified or qualified, to indicate whether or
> not locally declared elements and attributes must be unqualified. ". From
> this and the other examples they give, elementFormDefault="unqualified"
> means that an instance document (basically a soap message) must not 
> qualify
> elements within a complex type.
> So it seems that this is a bug in Axis C++. There are other schema
> attributes which we probably don't support properly such as form, fixed,
> ref, use and attributeFormDefault.
> What do other people think? Have I interpreted the specs correctly? Do
> other people use elementFormDefault? If I fix it, will it break the 
> server?
> Mark
> Mark Whitlock
> IBM
>