axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Closed: (AXIS-581) setSchemaVersion() does not work
Date Mon, 12 Apr 2004 12:38:43 GMT

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Mon, 12 Apr 2004 5:38 AM

Am afraid 1999 is way, way OLD.
View the issue:

Here is an overview of the issue:
        Key: AXIS-581
    Summary: setSchemaVersion() does not work
       Type: Bug

     Status: Closed
 Resolution: FIXED

    Project: Axis

   Reporter: Brian Ewins

    Created: Fri, 20 Dec 2002 5:23 PM
    Updated: Mon, 12 Apr 2004 5:38 AM
Environment: Operating System: Windows NT/2K
Platform: PC

[I've marked severity major as this bug prevents interop with 1999 schema
services, but please mark it down if thats a non-goal]

I tried to use WSDL for a Soap 1.1/1999 Schema service with Axis as a client.
The service sent and recieved a single string. It would appear that what should
happen here is that WSDL2Java should generate code like:

MessageContext msgContext = _call.getMessageContext();   

WSDL2Java doesn't insert this code, but putting it in by hand doesn't help, for
many reasons. The packet that is sent uses both the 2001 XSI namespace and the
2001 XSD namespace, which causes validation failures on the 1999 service. 

Firstly, MessageContext sets the default encodingStyle without reference to the
value of soapConstants. This means that you need to set them separately:
This doesn't quite make sense; it looks like setSOAPConstants should have the
side effect of resetting the encoding style to the default.

Secondly, having got a correct encoding style, the type mappings are all wrong.
There is no registered type mapping for
{}string, so, no problem, lets register it by hand:
QName xmlType=new QName("", "string");
  new QName("", "string"),
  new SimpleSerializerFactory(String.class, xmlType),
  new SimpleDeserializerFactory(String.class, xmlType));

This doesn't solve the problem. The packet Axis sends now looks like:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=""
   <XMLRequest xsi:type="xsd:string"

Notice the envelope still uses the 2001 xsi namespace, but switches to 1999 for
xsd because of the extra type mapping. This xsi namespace is being set in
SerializationContextImpl.setTypeAttribute() to the hardcoded value
Constants.URI_DEFAULT_SCHEMA_XSI, when it should probably be be
schemaVersion.getXsiUri(). So, theres no way to fix this without altering the
code in Axis.

There are several bugs here but as they all end up breaking 1999 interop, I
thought I'd file this as one. The last bug in SerializationContextImpl is the
showstopper as it makes it impossible (as far as I can tell) to send the correct
xsi namespace. That bug is easy enough to fix but really all of the 1999 type
mappings should be registered too.  

I guess there's no impetus to integrate to broken 'legacy' interfaces like this
but it may surprise you to know the service I'm trying to talk to is in a /brand
new/ release of a product from Adobe. Eeech.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message