@ William,
I removed the code of setServiceClass(String), because this code will
never be called in my box.
<error type="java.lang.IllegalArgumentException"
message="java.lang.String is not an
interface">java.lang.IllegalArgumentException: java.lang.String is not
an interface
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:362)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:118)
at
org.apache.camel.component.cxf.CxfEndpoint.createClient(CxfEndpoint.java:240)
at
org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:60)
at
org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:89)
Now the test failed in my box, I don't know if there any thing that I'm
missing?
Did you get same error when you ran the mvn clean install in your local
box ?
Willem
William Tam wrote:
> @Willem
> Ah, that's because the setServiceClass(String) method was
> inadvertently removed. I'll fix it.
>
> On Tue, Jan 20, 2009 at 1:36 AM, Willem Jiang <[email protected]> wrote:
>> @William,
>>
>> The setServiceClass(String) never was called in my box (Windows vista +
>> JDK 1.5.0_13), so I changed the codes.
>>
>> William Tam wrote:
>>> @Willem
>>>
>>> Thanks for taking care of it. I just wonder whether the "instanceof
>>> String" check is required. I thought the introspection logic would
>>> pick the right method (i.e. setServiceClass(String)) if the argument
>>> is a String.
>>>
>>> On Mon, Jan 19, 2009 at 3:30 AM, Willem Jiang (JIRA) <[email protected]>
>>> wrote:
>>>> [
>>>> https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48800#action_48800
>>>> ]
>>>>
>>>> Willem Jiang commented on CAMEL-1254:
>>>> -------------------------------------
>>>>
>>>> @ William
>>>> I changed the code to be here, and it also fixed the CXF test failures on
>>>> my box (JDK1.5.0_13)
>>>> {code}
>>>> public void setServiceClass(Object instance) {
>>>> if (instance instanceof String) {
>>>> serviceClass = (String) instance;
>>>> } else {
>>>> serviceClass = ClassHelper.getRealClass(instance).getName();
>>>> }
>>>> }
>>>> {code}
>>>>
>>>>> camel-cxf: URI option for serviceClass does not support lookup in registry
>>>>> --------------------------------------------------------------------------
>>>>>
>>>>> Key: CAMEL-1254
>>>>> URL: https://issues.apache.org/activemq/browse/CAMEL-1254
>>>>> Project: Apache Camel
>>>>> Issue Type: Improvement
>>>>> Components: camel-cxf
>>>>> Affects Versions: 1.5.0
>>>>> Reporter: Claus Ibsen
>>>>> Assignee: William Tam
>>>>> Priority: Minor
>>>>>
>>>>> Having an endpoint such as:
>>>>> {code}
>>>>> String cxfEndpoint =
>>>>> "cxf://http://localhost:8080/part-five/webservices/incident"
>>>>> +
>>>>> "?serviceClass=org.apache.camel.example.reportincident.ReportIncidentEndpoint"
>>>>> + "&wsdlURL=report_incident.wsdl";
>>>>> {code}
>>>>> The serviceClass option currently only supports defining a FQN for the
>>>>> class.
>>>>> I think we need to support Registry lookup as well using the # notation.
>>>>> So you can do:
>>>>> {code}
>>>>> String cxfEndpoint =
>>>>> "cxf://http://localhost:8080/part-five/webservices/incident"
>>>>> + "?serviceClass=#reportService"
>>>>> + "&wsdlURL=report_incident.wsdl";
>>>>> {code}
>>>>> And then have it defined in Spring XML:
>>>>> {code}
>>>>> <bean id="reportService" class="...">
>>>>> {code}
>>>>> The # notation is already supported if you use the cxf Spring XML
>>>>> configuration. We need this in the Java DSL as well.
>>>>> Sorry if it already exists. But I got a hint from a Camel end user that
>>>>> it didn't
>>>> --
>>>> This message is automatically generated by JIRA.
>>>> -
>>>> You can reply to this email to add a comment to the issue online.
>>>>
>>>>
>>
>