axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Resolved: (AXIS-1295) Type mapping information incorrect for anonymous types
Date Mon, 12 Apr 2004 14:26:44 GMT
Message:

   The following issue has been resolved as CANNOT REPRODUCE.

   Resolver: Glen Daniels
       Date: Mon, 12 Apr 2004 7:26 AM

Hi Andrei:

So this works fine for me running with the current CVS.  The deployment descriptors are absolutely
supposed to have the ">" characters in the type mappings, because it is critical for the
system to know when anonymous types are in use (for one thing it prevents the writing of erroneous
xsi:type attributes, and for another it lets us regenerate the correct schemas).

I took your WSDL, ran WSDL2Java -st with it, deployed the generated service and filled in
some data on the client, and got the following wire trace with no faults:

REQUEST:
<?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>
  <DoExampleX xmlns="urn:AddressFetcher2">
   <value1 xsi:type="xsd:base64Binary">SGVsbG8=</value1>
   <value2 xsi:type="xsd:long">4</value2>
   <value2 xsi:type="xsd:long">5</value2>
  </DoExampleX>
 </soapenv:Body>
</soapenv:Envelope>

RESPONSE:
<?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>
  <DoExampleResponse xsi:nil="true" xmlns="urn:AddressFetcher2"/>
 </soapenv:Body>
</soapenv:Envelope>

I also then looked at the generated WSDL with ?wsdl, and it was correct.  Incidentally, the
endpoint URL in your WSDL is wrong, since it uses "/AddressBook" as the last bit of the URL
and not "Example".... so I had to fix the locator class on the client to correct this.

I marked this can't reproduce for now - if you can detail a small reproducible set of steps
we can use to see the problem, feel free to reopen.  Thanks.

--Glen
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1295

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1295
    Summary: Type mapping information incorrect for anonymous types
       Type: Bug

     Status: Resolved
   Priority: Critical
 Resolution: CANNOT REPRODUCE

    Project: Axis
 Components: 
             Serialization/Deserialization
             WSDL processing
   Versions:
             1.2 Beta
             1.1

   Assignee: Glen Daniels
   Reporter: Andrei Iltchenko

    Created: Fri, 9 Apr 2004 3:43 AM
    Updated: Mon, 12 Apr 2004 7:26 AM

Description:
Currently WSDL2Java (JavaDeployWriter.java) makes no attempt to treat the QNames of anonymous
types specially. As a result, deployment descriptors with type mapping enries like the ones
below are sometimes produced:

      <typeMapping
        xmlns:ns="urn:AddressFetcher2"
        qname="ns:>DoExampleX"
        type="java:AddressFetcher2._DoExampleX"
        serializer=
           "org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer=
           "org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
      <typeMapping
        xmlns:ns="urn:AddressFetcher2"
        qname="ns:>DoExampleResponse"
        type="java:AddressFetcher2._DoExampleResponse"
        serializer=
           "org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer=
           "org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />

The problem here is the ANON_TOKEN '>', which appears in both the qnames. When a client
generated from the same WSDL document as the WS component featuring the above DD makes an
attempt to call the service:

Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2beta
Host: 127.0.0.1
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 354

<?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>
  <DoExampleX xmlns="urn:AddressFetcher2">
   <value1 xsi:nil="true"/>
  </DoExampleX>
 </soapenv:Body>
</soapenv:Envelope>

Axis fails to find a deserializer for the '{urn:AddressFetcher2}DoExampleX' type since it
doesn't appear in the deployment descriptor. Correcting the DD by removing the '>' character
from the qnames remedies the problem.

I am attaching a document-style WSDL document, which, when fed to WSDL2Java, highlights the
issue.


---------------------------------------------------------------------
JIRA INFORMATION:
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


Mime
View raw message