8 Replies Latest reply on Feb 15, 2011 10:02 PM by sethusubra1

    Java AMFConnection client - what is service url?

    HamletDRC Level 1

      I can't get the AMConnection object to connect to me BlazeDS service. How can I determine the URL and endpoint of my service?


      My BlazeDS service is a simple, no parameter hello world:


      package example.blaze;

      public class HelloWorldService {

          public String getHelloWorld() {
              return "Hello From BlazeDS";


      The destination in the remoting-config.xml is configured like this:


      <?xml version="1.0" encoding="UTF-8"?>
      <service id="remoting-service" class="flex.messaging.services.RemotingService">

              <adapter-definition id="java-object"

              <channel ref="my-amf"/>

          <destination id="helloworld">
              <adapter ref="java-object"/>



      I would expect this Java client to work, but it doesn't:


              AMFConnection amfConnection = new AMFConnection()


              Object result = amfConnection.call("helloworld.getHelloWorld")


      The error is:

          message: java.io.FileNotFoundException: http://localhost:8080/blazeds/
          code: AMFConnection.Call.Failed


      I've tried a lot of different variations on this endpoint and can't get anything to work.


      What is the correct parameter to AMFConnection#connect(String) and AMFConnection#call(String, Object...)?