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 "Thorsten Jungblut (JIRA)" <ax...@ws.apache.org> on 2005/07/19 11:10:51 UTC

[jira] Created: (AXIS-2127) Schema version mismatch

Schema version mismatch
-----------------------

         Key: AXIS-2127
         URL: http://issues.apache.org/jira/browse/AXIS-2127
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.2.1    
 Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
    Reporter: Thorsten Jungblut
    Priority: Blocker


If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>

This mixture seems to not only apply to arrays but i didn't test it any further.

It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:

diff -r1.109 SerializationContext.java
1325a1326,1330
>         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
>         if (msgContext != null) {
>             schema = msgContext.getSchemaVersion();
>         }
>
1329c1334
<              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
---
>              (attributes.getIndex(schema.getXsiURI(),
1337c1342
<         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
---
>         String prefix = getPrefixForURI(schema.getXsiURI(),
1340c1345
<         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
---
>         attrs.addAttribute(schema.getXsiURI(),





-- 
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-2127) Schema version mismatch

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

Dan F updated AXIS-2127:
------------------------

    Attachment: SerializationContext.java

src/org/apache/axis/encoding/SerializationContext.java from 1.2.1, with the patch in this bug applied.

No guarantees! It does compile. It seems to work, but I haven't tested much.

> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker
>  Attachments: SerializationContext.java
>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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-2127) Schema version mismatch

Posted by "Dan F (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2127?page=comments#action_12364619 ] 

Dan F commented on AXIS-2127:
-----------------------------

Jesus,

I have no idea why it's not working for you.

By the way, it's not my patch, it's Thorsten Jungblut's. All I did was apply it to a source file, and upload the source file and the jar for others' convenience. I am not planning to provide any further support.

Dan


> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker
>  Attachments: SerializationContext.java, axis.jar
>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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-2127) Schema version mismatch

Posted by "Jesus Carrera (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2127?page=comments#action_12364241 ] 

Jesus Carrera commented on AXIS-2127:
-------------------------------------

I am getting the duplicate xsi:type="soapenc:Array" error still even after applying your patch. I am using Axis 1.3.  Why hasn't this issue been resolved? I am testing  a simple web service method that returns a String array.

> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker
>  Attachments: SerializationContext.java, axis.jar
>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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-2127) Schema version mismatch

Posted by "Dan F (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2127?page=comments#action_12318629 ] 

Dan F commented on AXIS-2127:
-----------------------------

I need this fix, too. What do you recommend until the next release? 1.1?

I suppose I could download the 1.2.1 source and apply the patch myself. I'd rather not.

Dan


> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker

>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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-2127) Schema version mismatch

Posted by "Dan F (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2127?page=comments#action_12318630 ] 

Dan F commented on AXIS-2127:
-----------------------------

And when are you planning to release? It would be nice to have a quickie 1.2.1.1 with this patch, although I realize there are reasons not to do that.

Dan


> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker

>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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-2127) Schema version mismatch

Posted by "Thorsten Jungblut (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2127?page=comments#action_12316069 ] 

Thorsten Jungblut commented on AXIS-2127:
-----------------------------------------

The above patch fixes the problem for me. I don't know if its a general/good solution.

> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker

>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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-2127) Schema version mismatch

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

Dan F updated AXIS-2127:
------------------------

    Attachment: axis.jar

I downloaded Axis 1.2.1, applied the patch, built with ant. This is the JAR that resulted. It might work; I haven't tested it that much yet.


> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker
>  Attachments: SerializationContext.java, axis.jar
>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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] Resolved: (AXIS-2127) Schema version mismatch

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

    Resolution: Fixed

Applied your patch.

thanks,
dims

> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker

>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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-2127) Schema version mismatch

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

Davanum Srinivas commented on AXIS-2127:
----------------------------------------

Fix is in latest CVS. Last version we released was 1.2.1 a month or two ago. We are yet to pick a name for the next version. It will probably be 1.3. THis fix will make it into that version.

thanks,
dims

> Schema version mismatch
> -----------------------
>
>          Key: AXIS-2127
>          URL: http://issues.apache.org/jira/browse/AXIS-2127
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2.1
>  Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
>     Reporter: Thorsten Jungblut
>     Priority: Blocker

>
> If i send a soap message to axis using http://www.w3.org/1999/XMLSchema-instance as it's schema instance and the target service returns an array, the return message contains both references to http://www.w3.org/2001/XMLSchema-instance and to http://www.w3.org/1999/XMLSchema-instance in the same message. Even worse, the array-return tag itself contains two xsi:type-attributes, resulting from the mixture of the two schemas:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><soapenv:Body><ns1:searchPageIDsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PageService"><searchPageIDsReturn soapenc:arrayType="soapenc:string[8]" xsi:type="soapenc:Array" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><searchPageIDsReturn xsi:type="soapenc:string">0d6f95d44f127c11aa8a3078b8575e05</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">1b4190cafc6365ede444bb3ab1c5ce9e</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">231b4e03659c6764078c63ceebbbfab4</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">48976c8d98b3725017ccd206583d5f39</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">601940d36f1b873a080ce7fc3120e06b</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">8656b292d411236b7af40c793df24b28</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c31808c8b908a7cd85e41fcebec57bda</searchPageIDsReturn><searchPageIDsReturn xsi:type="soapenc:string">c9782177a9619f920fb75ed0403b63a7</searchPageIDsReturn></searchPageIDsReturn></ns1:searchPageIDsResponse></soapenv:Body></soapenv:Envelope>
> This mixture seems to not only apply to arrays but i didn't test it any further.
> It seems to be a problem in the class org.apache.axis.encoding.SerializationContext.java, Method setTypeAttribute. That method uses the default schema, no matter what actual schema should be used. Path:
> diff -r1.109 SerializationContext.java
> 1325a1326,1330
> >         SchemaVersion schema = SchemaVersion.SCHEMA_2001;
> >         if (msgContext != null) {
> >             schema = msgContext.getSchemaVersion();
> >         }
> >
> 1329c1334
> <              (attributes.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >              (attributes.getIndex(schema.getXsiURI(),
> 1337c1342
> <         String prefix = getPrefixForURI(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         String prefix = getPrefixForURI(schema.getXsiURI(),
> 1340c1345
> <         attrs.addAttribute(Constants.URI_DEFAULT_SCHEMA_XSI,
> ---
> >         attrs.addAttribute(schema.getXsiURI(),

-- 
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