axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Opatha <topa...@yahoo.com>
Subject RE: xmlns=" " in the doc\literal SOAP message
Date Fri, 05 Sep 2003 19:53:56 GMT
According to: Mike Perham [Mike.Perham@webifysolutions.com] his patch for RPCService provider
works for RPC/lit case, so will the same patch work with Doc/Lit style SOAP message. Any reason
why anyone can think it will NOT?
 
Thanks.
 
 
-----Original Message-----
From: Cory Wilkerson [mailto:cwilkerson@travelnow.com]
Sent: Friday, September 05, 2003 12:06 PM
To: axis-user@ws.apache.org
Subject: RE: xmlns=" " in the doc\literal SOAP message


The bug has been reopened and we await some comment from the Axis developers.  I don't think
that patch ever made it out into an actual release (which you are likely running).  Actually,
I have a nightly build and the patch is not applied.  Also, I'm fairly certain that Axis is
indifferent to the platform accessing it -- it can't be aware of such things -- hit it with
any other ws toolkit and you're going to see the same response.
 
I don't believe there is currently a "workaround" to this problem.  You seem to describe a
situation such as follows, where "sub-element" is declared in another namespace (not http://www.foo.com).
 
<soap:Body>
    <document xmlns="http://www.foo.com">
        <sub-element xmlns="">somedata</sub-element>    
  </document>
</soap:Body>
 
At this point, I don't think Axis cares much about where the thing is defined -- it simply
doesn't work.


Tony Opatha <topatha@yahoo.com> wrote:
>Since elementFormDefault is "qualified" -- then one could safely assume that since >Axis
generated this wsdl, it should also be serializing local elements in the appropriate >namespace...NOT
adding xmlns="".

Is there any workaround for this currently? 

That is exactly the problem I was identifying in AXIS previously (see below). If the elementFormDetail
is qualified then we should not see explictly xmlns attributes in each element rather the
namespace prefix should qualify the element that is part of the document instance in the SOAP
Body. 

This is especially problematic when we import additional schema from other namespaces and
declare them in the document schema that will serialized as part of the SOAP Body by AXIS.
I have observed that if you use directly AXIS SOAP APIs to serialize the payload using the
XSD schema this beahviour does not happen (if you set the QNames properly..), but it is jot
the case using the AXIS messaging pipeline (the conventional way of processing SOAP payloads
using WSDL). 

>>Is there a way in AXIS to support only inclusion of namespace prefix for elements
that
>>are defined in a namespace that is not the default namespace rather than explcitly
>>including the complete i.e., fully qualified namespace for each sub-element of the
>>document instance that is included in the SOAP Body?
>>
>>I would presume that either based on the XSD schema spec of the document and/or
>>the WSDL interface spec AXIS would be able to use the namespace prefix to identify
>>that a particular element is associated in a particular namespace.


Anne Thomas Manes <anne@manes.net> wrote: Cory,

You're correct. Please file a bug report.

Anne

At 10:05 AM 9/5/2003 -0500, you wrote:
>I think I now know what the source of Dimuthu's problem was/is -- I've 
>generated a doc/lit service in Axis and the schema that Axis generates for 
>a given service indicates that the elementFormDefault is qualified, ie:
>
>
> > targetNamespace="http://test.xml.travelnow.com" elementFormDefault="qualified">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
>As a response to this service, Axis generates the following (and IMHO, 
>wrong) response:
>
>
>>xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
>xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> 
> 

> 
CORY

> 

> 
>
>
>Since elementFormDefault is "qualified" -- then one could safely assume 
>that since Axis generated this wsdl, it should also be serializing local 
>elements in the appropriate namespace...NOT adding xmlns="". One would 
>also assume that client tools parsing this WSDL would expect to see 
>"processReturn" serialized in the "http://test.xml.travelnow.com" namespace.
>
>Thanks again!
>Cory Wilkerson
>
>
>-----Original Message-----
>From: Anne Thomas Manes [mailto:anne@manes.net]
>Sent: Tuesday, September 02, 2003 8:40 AM
>To: axis-user@ws.apache.org
>Subject: Re: xmlns=" " in the doc\literal SOAP message
>
>
>Dimuthu,
>
>Yes. It's okay for empty namespace definitions to go across the wire. In
>fact, it some cases it might be required.
>
>In your SOAP request, the element defines a default namespace
>(xmlns="blah" as opposed to xmlns:foo="blah"), which then applies to all
>subelements of the element, unless it is overridden by another
>default namespace definition. If the and elements
>are local elements to , then they should not be namespace qualified,
>and in that case, you should specify an empty default namspace definition
>in each of these subelements to override the active default namespace.
>
>Now, if the and are global elements, then this
>message would be in error.
>
>So whether or not this message is correct depends on the schema definition
>for the message.
>
>Anne
>
>At 02:20 AM 9/1/2003 -0700, you wrote:
> >Hi all,
> >
> >I'm trying to write a doc\literal web service and my soap message appears
> >as below.........
> >
> >
> > Wood carving of an Elephant
> > ER234
> >
> >
> >Has anybody else has come across a situation like this? Is it ok for empty
> >xmlns="" tags to go in the wire? Any help is greatly appreciated.
> >
> >Thank you,
> >Dimuthu
> >
> >
> >Do you Yahoo!?
> >Yahoo!
> >SiteBuilder - Free, easy-to-use web site design software




---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Mime
View raw message