tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunny Ip (JIRA)" <tuscany-...@ws.apache.org>
Subject [jira] Created: (TUSCANY-1199) ClassCastException when getting back a type extended from anything besides a string
Date Mon, 02 Apr 2007 21:15:33 GMT
ClassCastException when getting back a type extended from anything besides a string

                 Key: TUSCANY-1199
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1199
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Web App Runtime
    Affects Versions: Java-M2
         Environment: Apache Tomcat 5.5.17
            Reporter: Sunny Ip

Originally posted under SDO Implementation, but it was suggested it may be an SCA proxy problem:

In my client code (originating from a JSP), whenever I am expecting a return type that extends
anything but a string (tried so far with boolean, int, double, decimal, long), I get the following
when I call my service: 

java.lang.ClassCastException: java.lang.String 
$Proxy34.getAccountBalance(Unknown Source) 


Here is a snippet from a WSDL file that is being used: 

<xs:schema xmlns:sample="http://sample" targetNamespace="http://sample"> 
  <xsd:element name="getAccountBalance"> 
        <xsd:element name="accountNumber" type="sample:AccountNumber" /> 
  <xsd:element name="getAccountBalanceResponse"> 
        <xsd:element name="return" type="sample:Dollars" /> 
  <xsd:simpleType name="Dollars"> 
    <xsd:restriction base="xsd:double"> 
      <xsd:minInclusive value="0" /> 

with everything else exactly the same, changing the return type for getAccountBalanceResponse
from "sample:Dollars" to "xsd:double" makes everything work fine. I have attached the wsdl
and scdl (client side) files for reference. To reproduce:

1) create/generate classes to implement and consume the service described by the wsdl
2) expose the service in your scdl 
3) call the getAccountBalance operation

The crash will occur after the method on the service side is complete, but before the client
gets a response.  

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org

View raw message