Are you implying that the fix is to revise the RPCProvider.java
using the patch below?
 
 
Will this fix the problem of the SOAP Body not serializing as:
 
soap:Body>
    <document xmlns="http://www.foo.com">
        <sub-element xmlns="">somedata</sub-element>   
  </document>
</soap:Body>
 
rather serializing as:
 
soap:Body>
    <document xmlns:ns1="http://www.foo.com">
        <ns1:sub-element>somedata</sub-element>   
  </document>
</soap:Body>
 

The former is prefered way since it we are not including explicitly the complete namespace per sub-element (particularly if the sub-element does not belong to the default namespace of the document instance serialized as part of the SOAP Body.

Will the attached patch work for Doc/Lit style SOAP messages?

Has anyoone tested this?

Thank you very much. 

 



Mike Perham <[EMAIL PROTECTED]> wrote:
This rolls back the code change in question.  You'll need to download the source and build your own patched axis.jar though...
 
Index: RPCProvider.java
===================================================================
RCS file: /home/cvspublic/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
retrieving revision 1.107
diff -u -r1.107 RPCProvider.java
--- RPCProvider.java    2 May 2003 04:28:16 -0000       1.107
+++ RPCProvider.java    5 Sep 2003 18:53:21 -0000
@@ -342,8 +342,7 @@
             if (operation.getMethod().getReturnType() != Void.TYPE) {
                 QName returnQName = operation.getReturnQName();
                 if (returnQName == null) {
-                    returnQName = new QName(body.getNamespaceURI(),
-                    methodName + "Return");
+                    returnQName = new QName(methodName + "Return");
                 }
 
                 RPCParam param = new RPCParam(returnQName, objRes);
-----Original Message-----
From: Tony Opatha [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:45 PM
To: [EMAIL PROTECTED]
Subject: RE: xmlns=" " in the doc\literal SOAP message

This bug was logged in May it seems. Furthermore, this seems to imply that
a patch became available. However, there is a problem pertaining to this using
AXIS 1.1 Final and I am not sure this problem is *only* manifesting itself in
the case when we attempt to interoperate with .NET WSE.
 
I think again the problem is that AXIS should NOT explicitly place the
xmlns=".... attribute as part of a sub-element of the document instance
that is serialized as part of the SOAP Body if that sub-element belongs
to an imported namespace which is declared in the document schema
as one of the namespaces used by the document.
 
Is there any workaround to this problem?
 
Thanks


Cory Wilkerson <[EMAIL PROTECTED]> wrote:
-----Original Message-----
From: Tony Opatha [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 12:13 PM
To: [EMAIL PROTECTED]
Subject: RE: xmlns=" " in the doc\literal SOAP message

>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 <[EMAIL PROTECTED]> 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
>

>

>

>
>S! ince 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:[EMAIL PROTECTED]
>Sent: Tuesday, September 02, 2003 8:40 AM
>To: [EMAIL PROTECTED]
>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


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

Reply via email to