You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Guillaume Alleon (JIRA)" <ji...@apache.org> on 2007/05/31 22:47:15 UTC

[jira] Created: (CXF-697) Agis ClassCastException:

Agis ClassCastException: 
-------------------------

                 Key: CXF-697
                 URL: https://issues.apache.org/jira/browse/CXF-697
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.0-RC
         Environment: Linux Debian - Java 1.5- CXF trunk
            Reporter: Guillaume Alleon
             Fix For: 2.0


Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Commented: (CXF-697) Agis ClassCastException:

Posted by "Guillaume Alleon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501068 ] 

Guillaume Alleon commented on CXF-697:
--------------------------------------

Hi Freeman,
I was a bit puzzled by your comment but got the confirmation. In a previous version, it was definitely possible to have Aegis on the server side and then use the dynamic client.
Something has been broken there ?

Do you want to open a different JIRA for this ?

Cheers
Tog

> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz, cxftestwithaegis.tar
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Commented: (CXF-697) Agis ClassCastException:

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501084 ] 

Freeman Fang commented on CXF-697:
----------------------------------

Hi Tog,

Yes, you can have aegis databinding on the server side and use the dynamic client on the client side, but when you use dynamic client, the client will use jaxb databinding. Which means your client side and server side use different databinding, I am not sure if this is suitable for all case regarding complex object marshall/unmarshall. Maybe we need add api to specify databinding when use dynamic client.

Anyway, finally I get your demo working, as you wish, have aegis databinding on the server side and use the dynamic client on the client side.
But I have to extract interface(BookServiceIntf) for BookService, and use Thread.currentThread().getContextClassLoader() replace Thread.currentThread().getClass().getClassLoader() to create dynamic client.

Please see the cxftestnew.tar and play it with the latest trunk

Cheers

Freeman


> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz, cxftestwithaegis.tar
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Assigned: (CXF-697) Agis ClassCastException:

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang reassigned CXF-697:
--------------------------------

    Assignee: Freeman Fang

> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Commented: (CXF-697) Agis ClassCastException:

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500658 ] 

Freeman Fang commented on CXF-697:
----------------------------------

I realize your testcase may have problem, if you use DynamicClientFactory to create client, then you use jaxb datebinding.
If you want to use Aegis databinding,
you should follow the code to setup client in our wiki.

http://cwiki.apache.org/confluence/display/CXF20DOC/Aegis+Databinding

I just change your testcase slightly to use aegis databinding and it runs ok.
Please see the cxftestwithaegis.tar



> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz, cxftestwithaegis.tar
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Commented: (CXF-697) Agis ClassCastException:

Posted by "Guillaume Alleon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500610 ] 

Guillaume Alleon commented on CXF-697:
--------------------------------------


Yes but I have now this, What am I doing wrong ?
Cheers

lleon@oggy:~/projects/groovy/cplx_groovyws/client$ groovy Client.groovy
log4j:WARN No appenders could be found for logger (org.apache.cxf.bus.spring.BusApplicationContext).
log4j:WARN Please initialize the log4j system properly.
1 juin 2007 09:06:08 org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
INFO: Could not find the configuration file cxf.xml on the classpath.
java.lang.UnsupportedOperationException: Only document-style SOAP 1.1 http are supported for auto-selection of endpoint; none were found.
        at org.apache.cxf.endpoint.ClientImpl.findEndpoint(ClientImpl.java:162)
        at org.apache.cxf.endpoint.ClientImpl.<init>(ClientImpl.java:106)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:150)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:136)


> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Commented: (CXF-697) Agis ClassCastException:

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500574 ] 

Freeman Fang commented on CXF-697:
----------------------------------

The ClassCastException was fixed by Dan Kulp days ago

See the code after change
        if (b instanceof SoapBindingInfo) {
            SoapBindingInfo sbi = (SoapBindingInfo)b;
            transportURI = sbi.getTransportURI();
        }
Before do class exception, check the type first
Would you please test with the latest trunk

Thanks 

> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Closed: (CXF-697) Agis ClassCastException:

Posted by "Dan Diephouse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Diephouse closed CXF-697.
-----------------------------

    Resolution: Fixed

Yeah, I just took a look at this and I noticed the same things freeman did.
1. You were passing in a null classloader. I changed the code to this and it worked:

ClassLoader cl = Thread.currentThread().getContextClassLoader();
Client client = dcf.createClient("http://localhost:8080/service?wsdl",cl);
...
Object book = cl.loadClass("com.acme.test.Book").newInstance();

2. You're methods on BookService were package protected, not public. CXF ignores package protected methods. I'm sure this was just a cut/paste error from Groovy though :-)

So I'm going to close this issue unless you have other issues...

> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz, cxftestnew.tar, cxftestwithaegis.tar
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Updated: (CXF-697) Agis ClassCastException:

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang updated CXF-697:
-----------------------------

    Attachment: cxftestwithaegis.tar

> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz, cxftestwithaegis.tar
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Updated: (CXF-697) Agis ClassCastException:

Posted by "Guillaume Alleon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Alleon updated CXF-697:
---------------------------------

    Attachment: cxftest.tgz

the eclipse project showing the problem

> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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


[jira] Updated: (CXF-697) Agis ClassCastException:

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang updated CXF-697:
-----------------------------

    Attachment: cxftestnew.tar

> Agis ClassCastException: 
> -------------------------
>
>                 Key: CXF-697
>                 URL: https://issues.apache.org/jira/browse/CXF-697
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>         Environment: Linux Debian - Java 1.5- CXF trunk
>            Reporter: Guillaume Alleon
>            Assignee: Freeman Fang
>             Fix For: 2.0
>
>         Attachments: cxftest.tgz, cxftestnew.tar, cxftestwithaegis.tar
>
>
> Got a  java.lang.ClassCastException: org.apache.cxf.service.model.BindingInfo when using a Dynamic client (Aegis Binding)

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