Relevant config:
<service name="availabilityManager">
<inbound>
<inbound-endpoint ref="availabilityRequest" connector-ref="activeMQ"
synchronous="true"/>
</inbound>
<outbound>
<pass-through-router>
<cxf:outbound-endpoint
proxy="true"
synchronous="true"
wsdlPort="AvailabilityRequestPortPort"
wsdlLocation="http://localhost:9080/availability-stubs/invoke/availability.wsdl"
address="http://localhost:9080/availability-stubs/invoke/?Service=AvailabilityRequestPortService"/>
</pass-through-router>
</outbound>
</service>
Error message is:
2009-02-24 21:52:40,406 ERROR ActiveMQ Session Task
(AbstractExceptionListener.java:390) -
********************************************************************************
Message : Initialisation Failure: Could not find definition
for service {http://support.cxf.transport.mule.org/}ProxyService.
Type : org.mule.retry.RetryPolicyExhaustedException
Code : MULE_ERROR-84
JavaDoc :
http://www.mulesource.org/docs/site/current2/apidocs/org/mule/retry/RetryPolicyExhaustedException.html
Object :
endpoint.outbound.http://localhost:9080/availability-stubs/invoke/call?Service=AvailabilityRequestPortService
********************************************************************************
Exception stack is:
1. Could not find definition for service
{http://support.cxf.transport.mule.org/}ProxyService.
(org.apache.cxf.service.factory.ServiceConstructionException)
org.apache.cxf.wsdl11.WSDLServiceFactory:114 (null)
2. Initialisation Failure: Could not find definition for service
{http://support.cxf.transport.mule.org/}ProxyService.
(org.mule.retry.RetryPolicyExhaustedException)
org.mule.retry.policies.AbstractPolicyTemplate:97
(http://www.mulesource.org/docs/site/current2/apidocs/org/mule/retry/RetryPolicyExhaustedException.html)
********************************************************************************
Root Exception stack trace:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service {http://support.cxf.transport.mule.org/}ProxyService.
at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:309)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:403)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:188)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:97)
at
org.mule.transport.cxf.ClientWrapper.createClientProxy(ClientWrapper.java:230)
at
org.mule.transport.cxf.ClientWrapper.initialize(ClientWrapper.java:109)
at
org.mule.transport.cxf.CxfMessageDispatcher.doConnect(CxfMessageDispatcher.java:76)
at
org.mule.transport.AbstractConnectable$1.doWork(AbstractConnectable.java:178)
at
org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:59)
at
org.mule.transport.AbstractConnectable.connect(AbstractConnectable.java:166)
at
org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:161)
at
org.mule.transport.AbstractConnector.send(AbstractConnector.java:2017)
at
org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:76)
at
org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327)
at
org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:213)
at
org.mule.routing.outbound.AbstractOutboundRouter$2.doInTransaction(AbstractOutboundRouter.java:152)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99)
at
org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:159)
at
org.mule.routing.outbound.FilteringOutboundRouter.route(FilteringOutboundRouter.java:79)
at
org.mule.routing.outbound.OutboundPassThroughRouter.route(OutboundPassThroughRouter.java:69)
at
org.mule.routing.outbound.DefaultOutboundRouterCollection$1.doInTransaction(DefaultOutboundRouterCollection.java:64)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:45)
at
org.mule.routing.outbound.DefaultOutboundRouterCollection.route(DefaultOutboundRouterCollection.java:69)
at
org.mule.service.AbstractService.sendToOutboundRouter(AbstractService.java:902)
at org.mule.model.seda.SedaService.doSend(SedaService.java:252)
at
org.mule.service.AbstractService.sendEvent(AbstractService.java:505)
at
org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354)
at
org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:220)
at
org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:180)
at
org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:364)
at
org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252)
at
org.mule.transport.AbstractReceiverWorker$1.doInTransaction(AbstractReceiverWorker.java:114)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99)
at
org.mule.transport.AbstractReceiverWorker.doRun(AbstractReceiverWorker.java:131)
at
org.mule.transport.AbstractReceiverWorker.run(AbstractReceiverWorker.java:62)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at
org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.java:41)
at
org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.java:268)
at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:156)
at
org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubReceiver.onMessage(MultiConsumerJmsMessageReceiver.java:313)
at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1021)
at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122)
at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192)
at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
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)
--
View this message in context: http://www.nabble.com/How-can-I-make-a-CXF-Proxy-Service-return-the-correct-WSDL--tp21774054p22191591.html
Sent from the Mule - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I tried once after adding the namespace property to my outbound endpoint,
and a second time using the namespace property and and supplying the
attribute operation="<service name>" (just guessing) but got the same error
message as before.
I'm going to try the Amazon outbound CXF endpoint from the webinar next just
to make sure that the CXF client is working with a "standard" service.
Dan Diephouse-2 wrote:
>
> Try adding this to your endpoint:
> <cxf:inbound-endpoint .... serviceName="YOUR_WSDL_SERVICE_NAME">
> <property key="namespace" value="YOUR_WSDL_TARGET_NAMESPACE">
> </cxf:inbound-endpoint>
>
--
View this message in context: http://www.nabble.com/How-can-I-make-a-CXF-Proxy-Service-return-the-correct-WSDL--tp21774054p22193293.html
Dan
If I access the WSDL specified in my CXF endpoint i.e.
http://localhost:9080/availability-stubs/invoke/availability.wsdl, then the
target namespace in the WSDL is "urn:com.hotels.availability1_0" which is
what I put in the endpoint.
I renamed my Service in the WSDL for clarities sake, and this is now
"AvailabilityService" (which is copied + pasted from the WSDL). As from the
previous posting, there is no attribute on the outbound service to specify
service which is why I put it on the address URL i.e. random guess based on
blindly copying something I don't understand from the Amazon CXF endpoint
example
I fire this all up, and I get exactly the same error message as before. For
reference, the Mule Endpoint is now:
<cxf:outbound-endpoint
proxy="true"
synchronous="true"
operation="Availability"
wsdlPort="AvailabilityPort"
wsdlLocation="http://localhost:9080/availability-stubs/invoke/availability.wsdl"
address="http://localhost:9080/availability-stubs/invoke/call?Service=AvailabilityService">
<property key="namespace" value="urn:com.hotels.availability1_0"/>
</cxf:outbound-endpoint>
and the WSDL just copied from
http://localhost:9080/availability-stubs/invoke/availability.wsdl is:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:schema="urn:com.hotels.availability1_0"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="urn:com.hotels.availability1_0"> <wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:avs="urn:com.hotels.availability1_0"
targetNamespace="urn:com.hotels.availability1_0">
<xsd:element name="AvailabilityRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="locationId"
type="xsd:long"/>
<xsd:element maxOccurs="1" minOccurs="1" name="checkInDate"
type="xsd:dateTime"/>
<xsd:element maxOccurs="1" minOccurs="1" name="numberOfDays"
type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="numberOfRooms"
type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="numberOfPeople"
type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="AvailabilityResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="available"
type="xsd:boolean"/>
<xsd:element maxOccurs="1" minOccurs="0" name="notes"
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="AvailabilityRequest">
<wsdl:part element="schema:AvailabilityRequest"
name="AvailabilityRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="AvailabilityResponse">
<wsdl:part element="schema:AvailabilityResponse"
name="AvailabilityResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="Availability">
<wsdl:operation name="Availability">
<wsdl:input message="schema:AvailabilityRequest"
name="AvailabilityRequest">
</wsdl:input>
<wsdl:output message="schema:AvailabilityResponse"
name="AvailabilityResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AvailabilityBinding" type="schema:Availability">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Availability">
<soap:operation soapAction=""/>
<wsdl:input name="AvailabilityRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="AvailabilityResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AvailabilityService">
<wsdl:port binding="schema:AvailabilityBinding" name="AvailabilityPort">
<soap:address
location="http://localhost:9080/availability-stubs/invoke/call"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Note also that I have a standalone CXF client generated using the CXF Maven
WSDL2Java plugin and this is accessing exactly the same instance of the
service using the same port etc. and this is working correctly.
Am I still missing something here?
Daniel Feist wrote:
>
> If you are using an outbound cxf endpoint with "proxy=true" then you
> are calling another webservice somewhere (e.g. amazon). Therefore
> these values need to be the target service name and namespace, not
> those from inbound wsdl.
>
> Dan
>
--
View this message in context: http://www.nabble.com/How-can-I-make-a-CXF-Proxy-Service-return-the-correct-WSDL--tp21774054p22194148.html
If you look at webinar example this is not used there, nor is
serviceName or namespace, these are not required on outbound endpoints
from what I remember.
<cxf:outbound-endpoint
address="http://soap.amazon.com/onca/soap?Service=AWSECommerceService
"
proxy="true" synchronous="true">
Dan
<cxf:outbound-endpoint
proxy="true"
synchronous="true"
address="http://localhost:9080/availability-stubs/invoke/call?Service=AvailabilityService">
<property key="namespace" value="urn:com.hotels.availability1_0"/>
</cxf:outbound-endpoint>
And now its happy (or at least onto the next problem)
Thanks heaps for the help - I tried to add a comment to
http://www.mulesource.org/display/MULE2USER/Proxying+Web+Services but it
wouldn't let me... would be great if the docs referenced the need to add the
namespace property.
Dan Diephouse-2 wrote:
>
> Ah... Well if you have proxy="true" you don't need the wsdlLocation at
> all.
> I wonder if taking that attribute off will fix things?
>
--
View this message in context: http://www.nabble.com/How-can-I-make-a-CXF-Proxy-Service-return-the-correct-WSDL--tp21774054p22194381.html
Yes, removing the wsdlLocation made it work.
However I thought the wsdlLocation was a reasonable attribute to add based
on the CXF documentation that says that WSDLs are retreived at runtime
(unless configured not to) so that WS-Policy assertions etc. can be
processed - so not sure whether wsdlLocation causing it to fail is a bug, or
a feature request to somehow get Mule to pass the wsdlLocation through to
bits of CXF that want it.
Thanks again though...
--
View this message in context: http://www.nabble.com/How-can-I-make-a-CXF-Proxy-Service-return-the-correct-WSDL--tp21774054p22194515.html