You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/01/14 08:50:59 UTC

[jira] Created: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

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
            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.


Re: [jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by Willem Jiang <wi...@gmail.com>.
@ 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.&lt;init&gt;(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 <wi...@gmail.com> 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) <ji...@apache.org> 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.
>>>>
>>>>
>>
> 


Re: [jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by William Tam <em...@gmail.com>.
@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 <wi...@gmail.com> 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) <ji...@apache.org> 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.
>>>
>>>
>>
>
>

Re: [jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by Willem Jiang <wi...@gmail.com>.
@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) <ji...@apache.org> 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.
>>
>>
> 


Re: [jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by William Tam <em...@gmail.com>.
@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) <ji...@apache.org> 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.
>
>

[jira] Assigned: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-1254:
-----------------------------------

    Assignee: Willem Jiang  (was: William Tam)

> 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: Willem Jiang
>            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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49274#action_49274 ] 

Willem Jiang commented on CAMEL-1254:
-------------------------------------

@Charles,

I think the fix for Case 1 only works in Camel 2.0.
Please feel free to try it out.

I think you just need to update camel version to 2.0-SNAPSHOT in the pom, maybe you need do some modification in you pom if you are using some other version of CXF.

BTW, I think CAMEL 2.0-SNAPSHOT should work with the fresh release CXF 2.1.4 :).

> 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
>             Fix For: 1.6.0, 2.0.0
>
>
> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48695#action_48695 ] 

Claus Ibsen commented on CAMEL-1254:
------------------------------------

See also CAMEL-797 where Charles hint that setting a ref in XML is also not possible

> 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
>            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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48751#action_48751 ] 

Willem Jiang commented on CAMEL-1254:
-------------------------------------

@Clause
Since Camel will create a Spring injector which will turn "#reportService" into a instance of reportService, so we can only get the serviceClass with reportService toString() result.

So I just did a quick fix for this issue-- added a option serviceClassInstance, 
Camel will look up the registry with this instance name , and set the serviceClass  with this instance's real class.


> 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.


[jira] Updated: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Jonathan Anstey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Anstey updated CAMEL-1254:
-----------------------------------

    Fix Version/s: 1.6.0

> 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
>             Fix For: 1.6.0, 2.0.0
>
>
> 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.


[jira] Assigned: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam reassigned CAMEL-1254:
----------------------------------

    Assignee: William Tam

> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49270#action_49270 ] 

Charles Moulliard commented on CAMEL-1254:
------------------------------------------

@William,

This is strange because I have made the following test.

1) Case 1 : bean reference passed to the serviceClass

      <bean id="reportIncidentEndpoint" class="org.apache.camel.example.reportincident.service.ReportIncidentEndpoint"/>
                    
        <!-- webservice endpoint -->             
        <cxf:cxfEndpoint id="reportIncident"
                     address="/incident" wsdlURL="/WEB-INF/wsdl/report_incident.xml"
                     serviceClass="#reportIncidentEndpoint"
                     endpointName="s:ReportIncidentPort"
                     serviceName="s:ReportIncidentService" 
                     xmlns:s="http://reportincident.example.camel.apache.org"
        />

This case generates the error reported hereunder. As we can see, the bean that Spring must be created point to the interface class generated by wsdl2java of CXF and does not reference any OSGI bean service. 

2) Case 2 : class defined in the serviceClass

        <!-- webservice endpoint -->             
        <cxf:cxfEndpoint id="reportIncident"
                     address="/incident" wsdlURL="/WEB-INF/wsdl/report_incident.xml"
                     serviceClass="org.apache.camel.example.reportincident.service.ReportIncidentEndpoint"
                     endpointName="s:ReportIncidentPort"
                     serviceName="s:ReportIncidentService" 
                     xmlns:s="http://reportincident.example.camel.apache.org"
        />
   
This implementation works.

Question : How can I verify/check that the snapshots used (2.0 for Camel and 2.2 for CXF) include the modification ?

> 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
>             Fix For: 1.6.0, 2.0.0
>
>
> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48770#action_48770 ] 

William Tam commented on CAMEL-1254:
------------------------------------

Assign to me to remind me that my cleanup won't lose this fix in the merge.

> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48954#action_48954 ] 

Charles Moulliard commented on CAMEL-1254:
------------------------------------------

@Willem,

I have made a test but unfortunately, the following syntax does not work if I try to deploy my WAR in a OSGI server like Spring DM

      <bean id="reportIncidentEndpoint" class="org.apache.camel.example.reportincident.service.ReportIncidentEndpoint"/>
                    
        <!-- webservice endpoint -->             
        <cxf:cxfEndpoint id="reportIncident"
                     address="/incident" wsdlURL="/WEB-INF/wsdl/report_incident.xml"
                     serviceClass="#reportIncidentEndpoint"
                     endpointName="s:ReportIncidentPort"
                     serviceName="s:ReportIncidentService" 
                     xmlns:s="http://reportincident.example.camel.apache.org"
        />

remark : ReportIncidentEndpoint is the interface generated by wsdl2java. 

Error :

[2009-01-26 16:47:29.199] async-delivery-thread-1  e.server.web.dm.ServerOsgiBundleXmlWebApplicationContext.unknown E Refresh error
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportIncidentEndpoint' defined in OSGi resource[classpath:camel-context.xml|bnd.id=84|bnd.sym=org.apache.camel.example.reportincident.web]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.camel.example.reportincident.service.ReportIncidentEndpoint]: Specified class is an interface
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalRefresh(AbstractDelegatedExecutionApplicationContext.java:148)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$NoDependenciesWaitRefreshExecutor.refresh(AbstractDelegatedExecutionApplicationContext.java:73)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:136)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at com.springsource.server.servlet.tomcat.TomcatServletContainer.addContext(TomcatServletContainer.java:948)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy43.addContext(Unknown Source)
	at com.springsource.server.web.core.WebModulePersonality.deploy(WebModulePersonality.java:391)
	at com.springsource.server.deployer.core.module.AbstractModule.deploy(AbstractModule.java:235)
	at com.springsource.server.deployer.core.module.StandardModule.onStarted(StandardModule.java:572)
	at com.springsource.server.deployer.core.module.DeployerBundleListener$2$1.run(DeployerBundleListener.java:148)
	at com.springsource.server.concurrent.core.ExecutorServiceDelegate$StatisticsGatheringRunnable.run(ExecutorServiceDelegate.java:137)
	at com.springsource.server.concurrent.core.ServerThreadPoolExecutor$1.run(ServerThreadPoolExecutor.java:145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)

As you can see, Spring does not support to instantiate an interface in this case ?



> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Assigned: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam reassigned CAMEL-1254:
----------------------------------

    Assignee: William Tam  (was: Willem Jiang)

> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48956#action_48956 ] 

William Tam commented on CAMEL-1254:
------------------------------------

@Charles
I think that is the case.   That's one of the reasons I suspect in
most usecase, users are better off spelling out the service endpoint
interface class.   Other edge cases includes bean object being a
proxy.  Willem addressed the case that the bean is a Spring AOP proxy
but we don't handle other type of proxies.

On Mon, Jan 26, 2009 at 10:55 AM, Charles Moulliard (JIRA)


> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48789#action_48789 ] 

Willem Jiang commented on CAMEL-1254:
-------------------------------------

@ William

Cool,  but here is one comment for getting the Class name from a instance in the spring context.
Since the spring instance could be wrapped by some AOP interceptor, you may not get the right class name if you just call the instance.getClass().getName().

Don't  worry ,  I will take care of that :).

> 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.


[jira] Updated: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam updated CAMEL-1254:
-------------------------------

    Fix Version/s:     (was: 1.6.0)

We only fixed the trunk (2,x).  

> 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
>             Fix For: 2.0.0
>
>
> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48714#action_48714 ] 

Willem Jiang commented on CAMEL-1254:
-------------------------------------

The key point of issue is we need to find the SEI (service endpoint interface) from a bean's instance.

CXF is using org.apache.cxf.jaxws.support.JaxWsImplementorInfo to help us to get the SEI from a bean's instance.
Now we just need  to add the support of simple front endpoint on camel-cxf side.

So I think it is easy to add this kind of support in camel-cxf :)

> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48786#action_48786 ] 

William Tam commented on CAMEL-1254:
------------------------------------

I made serviceClass=#bean to work in 2.0.  (2.0 camel-cxf code is quite different now)  Basically, I added a setter in CxfEndpoint  that takes object type of "Object" and read the class out of it.  

{code}
    public void setServiceClass(Object instance) {
        serviceClass = instance.getClass().getName();
    }
{code}

I haven't done a lot of testing but I did update the test.

{code}
   public void testGetServiceClass() throws Exception {
        CxfEndpoint endpoint = createEndpoint("cxf:bean:helloServiceEndpoint?serviceClass=#helloServiceImpl");      
        assertEquals("org.apache.camel.component.cxf.HelloServiceImpl", endpoint.getServiceClass());
    }
{code}

There is one thing worth pointing out.  The producer endpoint requires service class to be an interface (due to proxy client factory bean) so I don't know if being able to set service class instance is very useful.  I guess we can revisit using proxy client factory bean.

I didn't port the serviceClassRef option to the 2.0 camel-cxf refactoring since we can do it with # notation.

> 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.


[jira] Updated: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam updated CAMEL-1254:
-------------------------------

    Fix Version/s: 1.6.0

Actually, it has been fixed in 1.x, too.  But the property name is serviceClassInstance.  So, you can do something like serviceClassInstance=beanID in 1.x.  I will make sure it is mentioned in wiki.

> 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
>             Fix For: 1.6.0, 2.0.0
>
>
> 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.


[jira] Resolved: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "William Tam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Tam resolved CAMEL-1254.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

> 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
>             Fix For: 2.0.0
>
>
> 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.


[jira] Commented: (CAMEL-1254) camel-cxf: URI option for serviceClass does not support lookup in registry

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48867#action_48867 ] 

Willem Jiang commented on CAMEL-1254:
-------------------------------------

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.&lt;init&gt;(CxfProducer.java:60)
	at
org.apache.camel.component.cxf.CxfEndpoint.createProducer(CxfEndpoint.java:89)

Found this issue was caused by the IntrospectionSupport always return setServiceClass(Object ) instead of setServiceClass(String) in windows box.
I just filled a JIRA CAMEL-1279  for it.


> 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.