Issue Details (XML | Word | Printable)

Key: AXIS-2387
Type: Bug Bug
Status: Open Open
Priority: Blocker Blocker
Assignee: Unassigned
Reporter: Jesus Carrera
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Axis

CLONE -Schema version mismatch

Created: 28/Jan/06 08:07 AM   Updated: 28/Jan/06 08:11 AM
Return to search
Component/s: Serialization/Deserialization
Affects Version/s: 1.2.1
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Axis 1.2.1, Java 1.5.0_03, Tomcat 5.5.9, but doesn't really matter
Issue Links:
Cloners
 


 Description  « Hide
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(),





 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jesus Carrera added a comment - 28/Jan/06 08:11 AM
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. When I invoke the Web Service through java it works fine but when I try and invoke it through python and SOAPpy the SOAP message that is returned contains the duplicate attribute and I get an error message.