[
https://issues.apache.org/activemq/browse/CAMEL-3181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62249#action_62249
]
Willem Jiang commented on CAMEL-3181:
-------------------------------------
Just one more note, if the wsdl has multiple service or port, you need to
specify the service name and endpoint name like this.
{code}
<cxf:cxfEndpoint id="routerEndpoint"
address="http://localhost:8092/PersonService/"
serviceClass="org.apache.camel.wsdl_first.Person"
endpointName="person:soap"
serviceName="person:PersonService"
wsdlURL="person.wsdl"
xmlns:person="http://camel.apache.org/wsdl-first"/>
{code}
> Confusing IllegalArgumentException when address attribute isn't specified on
> CXF endpoint.
> ------------------------------------------------------------------------------------------
>
> Key: CAMEL-3181
> URL: https://issues.apache.org/activemq/browse/CAMEL-3181
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.4.0
> Environment: all
> Reporter: Adrian Trenaman
> Assignee: Willem Jiang
> Fix For: 2.5.0
>
>
> If you create CXF endpoint, like this, without the address attribute,
> {code:xml}
> <cxf:cxfEndpoint
> id="greeting"
> wsdlURL="greeting.wsdl"
> serviceClass="tutorial.hanbo.webservice.Greeting"
> >
> </cxf:cxfEndpoint>
> {code}
> ... then you get a really confusing error when you deploy the endpoint in
> ServiceMix: the error is
> {code}
> Caused by: java.lang.IllegalArgumentException: endpointUri is not specified
> and org.apache.camel.component.cxf.CxfSpringEndpoint
> does not implement createEndpointUri() to create a default value
> at
> org.apache.camel.impl.DefaultEndpoint.getEndpointUri(DefaultEndpoint.java:83)
> at
> org.apache.camel.management.DefaultManagementLifecycleStrategy.onEndpointAdd(DefaultManagementLifecycleStrategy.java:205)
> at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:386)
> {code}
> We find that if you explicitly set the address then the problem goes away
> (see below)
> {code:xml}
> <cxf:cxfEndpoint
> id="greeting"
> wsdlURL="greeting.wsdl"
>
> address="http://localhost:9000/GreeterContext/SOAPMessageService"
> serviceClass="tutorial.hanbo.webservice.Greeting"
> >
> </cxf:cxfEndpoint>
> {code}
> On camel-cxf web page, the 'address' attribute is not mentioned anywhere in
> the table of URI properties, so you might be lead to believe that it's not
> necessary.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.