You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Hadrian Zbarcea (JIRA)" <ji...@apache.org> on 2010/01/08 16:25:16 UTC

[jira] Created: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

One should not have to explicitly provide the service/port for cxf is there's only one
--------------------------------------------------------------------------------------

                 Key: CAMEL-2345
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.1.0
            Reporter: Hadrian Zbarcea
            Assignee: Hadrian Zbarcea


This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}

{code}
        } else {
            ObjectHelper.notNull(portName, "Please provide endpoint/port name");
            ObjectHelper.notNull(serviceName, "Please provide service name");
            ClientFactoryBean factoryBean = createClientFactoryBean();
{code}

When there's only one service/port, we should just use it.

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


[jira] Commented: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56844#action_56844 ] 

Hadrian Zbarcea commented on CAMEL-2345:
----------------------------------------

I think this causes a problem only for the client now, but in general, the cxf endpoint url should not have to specify the service/port if there's only one in the wsdl. I suspect it already works like that for the server side.

> One should not have to explicitly provide the service/port for cxf is there's only one
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2345
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Hadrian Zbarcea
>
> This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}
> {code}
>         } else {
>             ObjectHelper.notNull(portName, "Please provide endpoint/port name");
>             ObjectHelper.notNull(serviceName, "Please provide service name");
>             ClientFactoryBean factoryBean = createClientFactoryBean();
> {code}
> When there's only one service/port, we should just use it.

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


[jira] Resolved: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

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

Willem Jiang resolved CAMEL-2345.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.0

i changed the NullPoint check to log warning message.


> One should not have to explicitly provide the service/port for cxf is there's only one
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2345
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Willem Jiang
>             Fix For: 2.2.0
>
>
> This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}
> {code}
>         } else {
>             ObjectHelper.notNull(portName, "Please provide endpoint/port name");
>             ObjectHelper.notNull(serviceName, "Please provide service name");
>             ClientFactoryBean factoryBean = createClientFactoryBean();
> {code}
> When there's only one service/port, we should just use it.

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


[jira] Assigned: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

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

Willem Jiang reassigned CAMEL-2345:
-----------------------------------

    Assignee: Willem Jiang  (was: Hadrian Zbarcea)

> One should not have to explicitly provide the service/port for cxf is there's only one
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2345
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Willem Jiang
>
> This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}
> {code}
>         } else {
>             ObjectHelper.notNull(portName, "Please provide endpoint/port name");
>             ObjectHelper.notNull(serviceName, "Please provide service name");
>             ClientFactoryBean factoryBean = createClientFactoryBean();
> {code}
> When there's only one service/port, we should just use it.

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


[jira] Commented: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

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

William Tam commented on CAMEL-2345:
------------------------------------

Yea, it looks like we can relax this requirement for client but NOT for the server as ServerFactoryBean fails to initialize without serviceName and portName (if serviceClass is not specified. i.e. wsdl only).   I think it is a best practice to provide serviceName and portName for wsdl only use case but I agree that they are not required on the client (producer).  We probably should update CXFWsdlOnlyPayloadModeNoSpringTest and CXFWsdlOnlyMessageModeNoSpringTest if we do change it.  And update the notes in the serviceClass option about this requirement in the http://cwiki.apache.org/confluence/display/CAMEL/CXF.  Let me know if you want me to handle it.  thx.




> One should not have to explicitly provide the service/port for cxf is there's only one
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2345
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Hadrian Zbarcea
>
> This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}
> {code}
>         } else {
>             ObjectHelper.notNull(portName, "Please provide endpoint/port name");
>             ObjectHelper.notNull(serviceName, "Please provide service name");
>             ClientFactoryBean factoryBean = createClientFactoryBean();
> {code}
> When there's only one service/port, we should just use it.

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


[jira] Commented: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

Posted by "Savas Ali Tokmen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56842#action_56842 ] 

Savas Ali Tokmen commented on CAMEL-2345:
-----------------------------------------

Hello

Can you please post a route sample? Is this only for the WS caller?

Cheers

> One should not have to explicitly provide the service/port for cxf is there's only one
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2345
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Hadrian Zbarcea
>
> This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}
> {code}
>         } else {
>             ObjectHelper.notNull(portName, "Please provide endpoint/port name");
>             ObjectHelper.notNull(serviceName, "Please provide service name");
>             ClientFactoryBean factoryBean = createClientFactoryBean();
> {code}
> When there's only one service/port, we should just use it.

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


[jira] Commented: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

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

Willem Jiang commented on CAMEL-2345:
-------------------------------------

Hi Hadrain,

Yes, CXF client and server side share the same code (ReflectionServiceFactoryBean) to create the ServiceModel.

If we don't specify the server name and port name, CXF will try to find a one for using, but if there are more than one service or one port, it will make us get into trouble of connecting a wrong endpoint. I think that is why William Tam added these checking.

How about we warning the user that don't set the service or the port name instead of using a NP checker?

Willem

> One should not have to explicitly provide the service/port for cxf is there's only one
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2345
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Hadrian Zbarcea
>
> This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}
> {code}
>         } else {
>             ObjectHelper.notNull(portName, "Please provide endpoint/port name");
>             ObjectHelper.notNull(serviceName, "Please provide service name");
>             ClientFactoryBean factoryBean = createClientFactoryBean();
> {code}
> When there's only one service/port, we should just use it.

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


[jira] Commented: (CAMEL-2345) One should not have to explicitly provide the service/port for cxf is there's only one

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

Claus Ibsen commented on CAMEL-2345:
------------------------------------

Hadrian do you get in touch with Willem about this one?

> One should not have to explicitly provide the service/port for cxf is there's only one
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2345
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2345
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.1.0
>            Reporter: Hadrian Zbarcea
>            Assignee: Hadrian Zbarcea
>
> This is due to the following code in {{Client createClient()}} in {{CxfEnpoint}}
> {code}
>         } else {
>             ObjectHelper.notNull(portName, "Please provide endpoint/port name");
>             ObjectHelper.notNull(serviceName, "Please provide service name");
>             ClientFactoryBean factoryBean = createClientFactoryBean();
> {code}
> When there's only one service/port, we should just use it.

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