0
votes

I am getting the following error when starting MuleServer --

11:07:44.523 [main] ERROR org.mule.MuleServer -


Message : Component "{http://xyz.com/services/mvi}ProxyService" not found while searching in definition. Check if the namespace attribute in your endpoint is missing or has an invalid value. Probable service matches: "[]". All services for the definition: [{http://xyz.com/services/mvi}MVIService] Type : org.mule.api.lifecycle.InitialisationException Code : MULE_ERROR-71999 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/InitialisationException.html Object : org.mule.module.cxf.config.FlowConfiguringMessageProcessor@4c372a96

I'm not sure why Mule is looking for ProxyService whereas I have defined MVIServiceProxy as component class. My cxf proxy client config is --

<flow name="mviProxyService">
    <http:inbound-endpoint address="http://localhost:61005/mvi/service" exchange-pattern="request-response">
        <cxf:proxy-service wsdlLocation="classpath:mvi.wsdl" namespace="http://xyz.com/services/mvi" />
    </http:inbound-endpoint>

    <component>
        <prototype-object class="com.xyz.services.mvi.MVIServiceProxy">
            <property key="requestDispatchUrl" value="jms://mviq.121.order?connector=jmsConnector" />
            <property key="responsePollUrl" value="jms://mviq.async.service.reply?connector=jmsConnector" />
            <property key="serviceTimeout" value="90000" />
        </prototype-object>
    </component>
    <request-reply timeout="60000">
        <jms:outbound-endpoint queue="mviq.121.order" />
        <jms:inbound-endpoint queue="mviq.async.service.reply" exchange-pattern="one-way" />
    </request-reply>
</flow>

=========== Modification to the flow ===============

<flow name="mviProxyService">
    <http:inbound-endpoint address="http://localhost:61005/mvi/service" exchange-pattern="request-response">
        <cxf:proxy-service wsdlLocation="classpath:mvi.wsdl" namespace="http://xyz.com/services/mvi" />
    </http:inbound-endpoint>

    <component class="com.xyz.services.mvi.MVIServiceProxy" />
    <request-reply timeout="60000">
        <jms:outbound-endpoint queue="mviq.121.order" />
        <jms:inbound-endpoint queue="mviq.async.service.reply" exchange-pattern="one-way" />
    </request-reply>
</flow>
1
Do you mind showing the full flow? The CXF part is not visible. Also why using a prototype-object? You really want one component object to be created for each call?David Dossot
Side note/question: I notice that you inject JMS endpoint URLs in the component. Why? Will the component perform a dispatch then read response? And then the request-reply will also do it?David Dossot
Thanks! I have removed prototype-object and JMS endpoint URLs but still get same error. The error, however, goes away when I remove the reference to WSDL. So, if I take out [wsdlLocation="classpath:mvi.wsdl"] from mule config it works fine. May be proxy class need to have the methods as exposed by wsdl. Not sure. I have an understanding implementing Callable interface and implementing onCall method will send payload to onCall() method of component, where I can do anything with XML. Am I missing something? Why is wsdl creating problem?user1493140
Do I need to use <cxf:proxy-service ..... service="MVIServiceProxy"> instead of <component ...>?user1493140

1 Answers

1
votes

You need to specify the service attribute on the cxf:proxy-service. This is the value you find in the WSDL, in the name attribute of the wsdl:service element.

Also your component doesn't need to implement org.mule.api.lifecycle.Callable. Just have one public method that accepts a javax.xml.stream.XMLStreamReader argument and you'll gain access to the XML payload.