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 "Konstantin Kasatkin (JIRA)" <ax...@ws.apache.org> on 2005/03/30 08:38:21 UTC

[jira] Created: (AXIS-1904) CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values

CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values
------------------------------------------------------------------------------

         Key: AXIS-1904
         URL: http://issues.apache.org/jira/browse/AXIS-1904
     Project: Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.2    
 Environment: Windows 2000 Pro SP4 JDK 1.4.2-05
    Reporter: Konstantin Kasatkin
    Priority: Blocker


There is a problem of interaction Axis WebService Client (as console application) with Microsoft WebService Server (as .Net application)

Here WEBService method description is from MS side:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SetParameterValues xmlns="http://tempuri.org/">
      <strUser>string</strUser>
      <strBusinessSystem>string</strBusinessSystem>
      <strParameter>string</strParameter>
      <strValues>
        <string>string</string>
        <string>string</string>
      </strValues>
    </SetParameterValues>
  </soap:Body>
</soap:Envelope>

Here real Axis SOAP envelope is from Java applicaton:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope 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">
  <soapenv:Body>
    <SetParameterValues xmlns="http://tempuri.org/">
        <strUser>test</strUser>
        <strBusinessSystem>SYS</strBusinessSystem>
        <strParameter>100</strParameter>
        <strValues>
           <string xmlns="">123</string>
           <string xmlns="">234</string>
        </strValues>
    </SetParameterValues>
   </soapenv:Body>
</soapenv:Envelope>

As you can see in section <strValues> all of inner elements contain attribute xmlns="".
This notation does not work in MS (It is very strange, but I don't know why).
MS ignores all such lines and returns empty collection.
If I'm removing empty "xmlns" attributes all works fine.

I've already found the point where you can place fix code.

CLASS: org.apache.axis.encoding.SerializationContext
CODE:
                if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
                    !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")))

It need to be added one more check in the condition. Here modified condition

                if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
                    !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")) &&
                    !map.getNamespaceURI().equals(""))

Maybe I didn't take into account something, but after this change all have worked fine.









-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-1904) CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1904?page=all ]
     
Davanum Srinivas resolved AXIS-1904:
------------------------------------

    Resolution: Fixed

Looks like this is fixed in latest CVS. Here's what i get:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope 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">
    <soapenv:Body>
        <SetParameterValues xmlns="http://tempuri.org/">
            <strUser>test</strUser>
            <strBusinessSystem>SYS</strBusinessSystem>
            <strParameter>100</strParameter>
            <strValues>
                <string>123</string>
                <string>234</string>
            </strValues>
        </SetParameterValues>
    </soapenv:Body>
</soapenv:Envelope>





> CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1904
>          URL: http://issues.apache.org/jira/browse/AXIS-1904
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Windows 2000 Pro SP4 JDK 1.4.2-05
>     Reporter: Konstantin Kasatkin
>  Attachments: AuthService.wsdl
>
> There is a problem of interaction Axis WebService Client (as console application) with Microsoft WebService Server (as .Net application)
> Here WEBService method description is from MS side:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>       <strUser>string</strUser>
>       <strBusinessSystem>string</strBusinessSystem>
>       <strParameter>string</strParameter>
>       <strValues>
>         <string>string</string>
>         <string>string</string>
>       </strValues>
>     </SetParameterValues>
>   </soap:Body>
> </soap:Envelope>
> Here real Axis SOAP envelope is from Java applicaton:
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope 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">
>   <soapenv:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>         <strUser>test</strUser>
>         <strBusinessSystem>SYS</strBusinessSystem>
>         <strParameter>100</strParameter>
>         <strValues>
>            <string xmlns="">123</string>
>            <string xmlns="">234</string>
>         </strValues>
>     </SetParameterValues>
>    </soapenv:Body>
> </soapenv:Envelope>
> As you can see in section <strValues> all of inner elements contain attribute xmlns="".
> This notation does not work in MS (It is very strange, but I don't know why).
> MS ignores all such lines and returns empty collection.
> If I'm removing empty "xmlns" attributes all works fine.
> I've already found the point where you can place fix code.
> CLASS: org.apache.axis.encoding.SerializationContext
> CODE:
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")))
> It need to be added one more check in the condition. Here modified condition
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")) &&
>                     !map.getNamespaceURI().equals(""))
> Maybe I didn't take into account something, but after this change all have worked fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1904) CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1904?page=comments#action_63545 ]
     
Davanum Srinivas commented on AXIS-1904:
----------------------------------------

Konstantin, i need the actual WSDL of the .NET web service.

thanks,
dims

> CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1904
>          URL: http://issues.apache.org/jira/browse/AXIS-1904
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Windows 2000 Pro SP4 JDK 1.4.2-05
>     Reporter: Konstantin Kasatkin

>
> There is a problem of interaction Axis WebService Client (as console application) with Microsoft WebService Server (as .Net application)
> Here WEBService method description is from MS side:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>       <strUser>string</strUser>
>       <strBusinessSystem>string</strBusinessSystem>
>       <strParameter>string</strParameter>
>       <strValues>
>         <string>string</string>
>         <string>string</string>
>       </strValues>
>     </SetParameterValues>
>   </soap:Body>
> </soap:Envelope>
> Here real Axis SOAP envelope is from Java applicaton:
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope 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">
>   <soapenv:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>         <strUser>test</strUser>
>         <strBusinessSystem>SYS</strBusinessSystem>
>         <strParameter>100</strParameter>
>         <strValues>
>            <string xmlns="">123</string>
>            <string xmlns="">234</string>
>         </strValues>
>     </SetParameterValues>
>    </soapenv:Body>
> </soapenv:Envelope>
> As you can see in section <strValues> all of inner elements contain attribute xmlns="".
> This notation does not work in MS (It is very strange, but I don't know why).
> MS ignores all such lines and returns empty collection.
> If I'm removing empty "xmlns" attributes all works fine.
> I've already found the point where you can place fix code.
> CLASS: org.apache.axis.encoding.SerializationContext
> CODE:
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")))
> It need to be added one more check in the condition. Here modified condition
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")) &&
>                     !map.getNamespaceURI().equals(""))
> Maybe I didn't take into account something, but after this change all have worked fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1904) CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values

Posted by "Konstantin Kasatkin (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1904?page=comments#action_63643 ]
     
Konstantin Kasatkin commented on AXIS-1904:
-------------------------------------------

Davanum, I have uploaded WSDL, but may be I haven't quite understoond your question so this file had already been attached to issue AXIS-1827.

> CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1904
>          URL: http://issues.apache.org/jira/browse/AXIS-1904
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Windows 2000 Pro SP4 JDK 1.4.2-05
>     Reporter: Konstantin Kasatkin
>  Attachments: AuthService.wsdl
>
> There is a problem of interaction Axis WebService Client (as console application) with Microsoft WebService Server (as .Net application)
> Here WEBService method description is from MS side:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>       <strUser>string</strUser>
>       <strBusinessSystem>string</strBusinessSystem>
>       <strParameter>string</strParameter>
>       <strValues>
>         <string>string</string>
>         <string>string</string>
>       </strValues>
>     </SetParameterValues>
>   </soap:Body>
> </soap:Envelope>
> Here real Axis SOAP envelope is from Java applicaton:
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope 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">
>   <soapenv:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>         <strUser>test</strUser>
>         <strBusinessSystem>SYS</strBusinessSystem>
>         <strParameter>100</strParameter>
>         <strValues>
>            <string xmlns="">123</string>
>            <string xmlns="">234</string>
>         </strValues>
>     </SetParameterValues>
>    </soapenv:Body>
> </soapenv:Envelope>
> As you can see in section <strValues> all of inner elements contain attribute xmlns="".
> This notation does not work in MS (It is very strange, but I don't know why).
> MS ignores all such lines and returns empty collection.
> If I'm removing empty "xmlns" attributes all works fine.
> I've already found the point where you can place fix code.
> CLASS: org.apache.axis.encoding.SerializationContext
> CODE:
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")))
> It need to be added one more check in the condition. Here modified condition
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")) &&
>                     !map.getNamespaceURI().equals(""))
> Maybe I didn't take into account something, but after this change all have worked fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1904) CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1904?page=history ]

Davanum Srinivas updated AXIS-1904:
-----------------------------------

    Priority: Major  (was: Blocker)

Not a blocker.

> CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1904
>          URL: http://issues.apache.org/jira/browse/AXIS-1904
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Windows 2000 Pro SP4 JDK 1.4.2-05
>     Reporter: Konstantin Kasatkin

>
> There is a problem of interaction Axis WebService Client (as console application) with Microsoft WebService Server (as .Net application)
> Here WEBService method description is from MS side:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>       <strUser>string</strUser>
>       <strBusinessSystem>string</strBusinessSystem>
>       <strParameter>string</strParameter>
>       <strValues>
>         <string>string</string>
>         <string>string</string>
>       </strValues>
>     </SetParameterValues>
>   </soap:Body>
> </soap:Envelope>
> Here real Axis SOAP envelope is from Java applicaton:
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope 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">
>   <soapenv:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>         <strUser>test</strUser>
>         <strBusinessSystem>SYS</strBusinessSystem>
>         <strParameter>100</strParameter>
>         <strValues>
>            <string xmlns="">123</string>
>            <string xmlns="">234</string>
>         </strValues>
>     </SetParameterValues>
>    </soapenv:Body>
> </soapenv:Envelope>
> As you can see in section <strValues> all of inner elements contain attribute xmlns="".
> This notation does not work in MS (It is very strange, but I don't know why).
> MS ignores all such lines and returns empty collection.
> If I'm removing empty "xmlns" attributes all works fine.
> I've already found the point where you can place fix code.
> CLASS: org.apache.axis.encoding.SerializationContext
> CODE:
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")))
> It need to be added one more check in the condition. Here modified condition
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")) &&
>                     !map.getNamespaceURI().equals(""))
> Maybe I didn't take into account something, but after this change all have worked fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1904) CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values

Posted by "Konstantin Kasatkin (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1904?page=all ]

Konstantin Kasatkin updated AXIS-1904:
--------------------------------------

    Attachment: AuthService.wsdl

.NET service WSDL

> CLONE -Unnecessary empty-valued attribute "xmlns" in Envelope parameter values
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1904
>          URL: http://issues.apache.org/jira/browse/AXIS-1904
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Windows 2000 Pro SP4 JDK 1.4.2-05
>     Reporter: Konstantin Kasatkin
>  Attachments: AuthService.wsdl
>
> There is a problem of interaction Axis WebService Client (as console application) with Microsoft WebService Server (as .Net application)
> Here WEBService method description is from MS side:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>       <strUser>string</strUser>
>       <strBusinessSystem>string</strBusinessSystem>
>       <strParameter>string</strParameter>
>       <strValues>
>         <string>string</string>
>         <string>string</string>
>       </strValues>
>     </SetParameterValues>
>   </soap:Body>
> </soap:Envelope>
> Here real Axis SOAP envelope is from Java applicaton:
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope 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">
>   <soapenv:Body>
>     <SetParameterValues xmlns="http://tempuri.org/">
>         <strUser>test</strUser>
>         <strBusinessSystem>SYS</strBusinessSystem>
>         <strParameter>100</strParameter>
>         <strValues>
>            <string xmlns="">123</string>
>            <string xmlns="">234</string>
>         </strValues>
>     </SetParameterValues>
>    </soapenv:Body>
> </soapenv:Envelope>
> As you can see in section <strValues> all of inner elements contain attribute xmlns="".
> This notation does not work in MS (It is very strange, but I don't know why).
> MS ignores all such lines and returns empty collection.
> If I'm removing empty "xmlns" attributes all works fine.
> I've already found the point where you can place fix code.
> CLASS: org.apache.axis.encoding.SerializationContext
> CODE:
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")))
> It need to be added one more check in the condition. Here modified condition
>                 if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && map.getPrefix().equals("xmlns")) &&
>                     !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && map.getPrefix().equals("xml")) &&
>                     !map.getNamespaceURI().equals(""))
> Maybe I didn't take into account something, but after this change all have worked fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira