For AMFConnection#connect, you need to provide the url of the endpoint and for AMFConnection#call, you need to provide destination id and method name in this form: destinationId.methodName. It looks like you're calling AMFConnection#call correctly, so I'd double check that the url is indeed the correct endpoint url.
That's exactly my question!
How do I double check that the url is indeed the correct endpoint url.
This works fine from FlexBuilder, where my project properties have the Flex Server properties are:
Root Folder = D:\dev\apache-tomcat-6.0.18\webapps\blazeds
Root URL = http://localhost:8080/blazeds
Context root: /blazeds
Look at the endpoint definition in services-config.xml and make sure the url in there is the url you're trying to connect to with AMFConnection.
Mete is correct. The URL is defined within the services-config.xml under the <channels> element:
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
So this is the correct calling code:
Object result = amfConnection.call("helloworld.getHelloWorld")
/flex2gateway is a web application context root that you set up yourself (maybe unknowingly), so this will not work. Mete's answer was correct.
I am trying to use Java-AMF connection, to connect from my java program to connect to LCDS. I am getting the following error:
Here is the code snippet I use:
// Create the AMF connection.
AMFConnection amfConnection = new AMFConnection();
String url = "http://localhost:8080/SampleBlazeDS/messagebroker/amf";
catch (ClientStatusException cse)
System.out.println("Exception in connection");
The exception I get is:
Exception in thread "main" java.lang.NoSuchFieldError: createASObjectForMissingType
I have verified my endpoint in the service-config.xml and it seems to be correct.Here I am just trying to connect to the end point but am not able to.
Can anyone please help me what is going wrong?
Thanx in advance.