[mule-user] Could not create client! No Server was found directly on the endpoint:

0 views
Skip to first unread message

Jawahar

unread,
Jun 17, 2008, 4:14:57 AM6/17/08
to us...@mule.codehaus.org

Hi

I am using Mule2.0.1, I exposed the Simple POJO as a WebService. Muleserver
started successfully with the given configuration. But when i try to call
using MuleClient i am getting Exception 'Could not create client! No Server
was found directly on the endpoint:'

I attached the configuration given in the config.xml file

<cxf:inbound-endpoint address="http://localhost:63081/services/SimpleUMO"
frontend="simple"

serviceClass="com.demo.simple.Reservation"/>

I am invoking the webservice using a MuleClient.

MuleClient client = new MuleClient();
MuleMessage result =
client.send("cxf:http://localhost:63081/services/SimpleUMO?method=getStatus",
"1234567", null);

But i am getting an Exception 'Could not create client! No Server was found
directly on the endpoint'

Exception in thread "main" org.mule.api.transport.DispatchException: Failed
to route event via endpoint:
DefaultOutboundEndpoint{endpointUri=http://localhost:63081/services/SimpleUMO?method=getStatus,
connector=CxfConnector{this=26dbec, started=true, initialised=true,
name='connector.cxf.0', disposed=false,
numberOfConcurrentTransactedReceivers=4,
createMultipleTransactedReceivers=true, connected=true,
supportedProtocols=[cxf, cxf:http, cxf:https, cxf:jms, cxf:vm, cxf:servlet],
serviceOverrides=null}, transformer=[],
name='endpoint.http.localhost.63081.services.SimpleUMO.method.getStatus',
properties={method=getStatus}, transactionConfig=Transaction{factory=null,
action=NONE, timeout=0}, filter=null, deleteUnacceptedMessages=false,
securityFilter=null, synchronous=true, initialState=started,
remoteSync=false, remoteSyncTimeout=10000, endpointEncoding=UTF-8}. Message
payload is of type: String
at
org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:188)
at org.mule.transport.AbstractConnector.send(AbstractConnector.java:1889)
at
org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:76)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:324)
at org.mule.module.client.MuleClient.send(MuleClient.java:653)
at org.mule.module.client.MuleClient.send(MuleClient.java:630)
at org.mule.module.client.MuleClient.send(MuleClient.java:583)
at com.demo.mule.client.SimpleClient.main(SimpleClient.java:14)
Caused by: org.mule.transport.FatalConnectException: ReconnectStrategy
"org.mule.transport.SingleAttemptConnectionStrategy" failed to reconnect
receiver on endpoint "CxfMessageDispatcher{this=179a49f,
endpoint=http://localhost:63081/services/SimpleUMO?method=getStatus,
disposed=false}"
at
org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:29)
at
org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)
at
org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:155)
... 7 more
Caused by: org.mule.transport.FatalConnectException: ReconnectStrategy
"org.mule.transport.SingleAttemptConnectionStrategy" failed to reconnect
receiver on endpoint "CxfMessageDispatcher{this=179a49f,
endpoint=http://localhost:63081/services/SimpleUMO?method=getStatus,
disposed=false}"
at
org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:29)
at
org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)
at
org.mule.transport.AbstractConnectable.connect(AbstractConnectable.java:200)
at
org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)
... 9 more
Caused by: org.mule.transport.ConnectException: Initialisation Failure:
Could not create client! No Server was found directly on the endpoint:
http://localhost:63081/services/SimpleUMO
at
org.mule.transport.AbstractConnectable.connect(AbstractConnectable.java:232)
at
org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)
... 12 more
Caused by: java.lang.Exception: Could not create client! No Server was found
directly on the endpoint: http://localhost:63081/services/SimpleUMO
at
org.mule.transport.cxf.ClientWrapper.createClientFromLocalServer(ClientWrapper.java:297)
at org.mule.transport.cxf.ClientWrapper.initialize(ClientWrapper.java:89)
at
org.mule.transport.cxf.CxfMessageDispatcher.doConnect(CxfMessageDispatcher.java:75)
at
org.mule.transport.AbstractConnectable.connect(AbstractConnectable.java:211)
... 13 more

Thanks in advance

Regards
Jawahar
--
View this message in context: http://www.nabble.com/Could-not-create-client%21-No-Server-was-found-directly-on-the-endpoint%3A-tp17880270p17880270.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


Dan Diephouse

unread,
Jun 18, 2008, 12:25:45 AM6/18/08
to us...@mule.codehaus.org
Are you sure the mule server is started?  What happens if you go to http://localhost:63081/services/SimpleUMO?wsdl ?

Is the server the same JVM as the client? It needs to be for Mule to pull out the service information from memory on how to invoke it using only the URL. If they aren't in the same JVM, you need to use wsdl2java.

Dan
--
Dan Diephouse
http://mulesource.com | http://netzooid.com/blog

Jawahar

unread,
Jun 18, 2008, 2:40:51 AM6/18/08
to us...@mule.codehaus.org

MuleServer is running and iam able to view the wsdl file in the browser.
I am running client program in different JVM, By providing the url i should
able to access the server. but i am not able to access the server..

Jawahar

--
View this message in context: http://www.nabble.com/Could-not-create-client%21-No-Server-was-found-directly-on-the-endpoint%3A-tp17880270p17960685.html

Dan Diephouse

unread,
Jun 18, 2008, 6:29:06 PM6/18/08
to us...@mule.codehaus.org
The Mule CXF connector does not work that way unless both the client and server and are in the same JVM. When you go down this route, the client relies on the internal service model that CXF has for the server side. Since you're in a different JVM this will not be there. Therefore, you MUST generate a client via wsdl2java and use that in your outbound endpoint as outlined in the docs.

Jawahar

unread,
Jun 19, 2008, 7:01:50 AM6/19/08
to us...@mule.codehaus.org

Thanks..
I am able to get the response. I did a wsdl2java with the wsdl
http://localhost:63081/services/HelloWorldUMO?wsdl

Called the webservice using the mule client, with the following code. I am
able to get the output.

MuleClient client = new MuleClient();

Map<String, String> props = new HashMap<String, String>();
props.put("http.method", "GET");
MuleMessage result = client.send(
"http://localhost:63081/services/HelloWorldUMO/sayHi/text/JAWA","", props);
System.out.println("Message from MuleServer ---"+
result.getPayloadAsString());

Regards
Jawahar

--
View this message in context: http://www.nabble.com/Could-not-create-client%21-No-Server-was-found-directly-on-the-endpoint%3A-tp17880270p18005769.html

Reply all
Reply to author
Forward
0 new messages