0 Replies Latest reply on Sep 16, 2010 3:12 PM by mikaye

    Problem with RESTful web service

    mikaye Level 1

      I am running into a problem with Flex Web Services (REST) in trying to get the proper format returned. I can see that the HTTP header is set to

       

      Accept: */*;

       

      rather than

       

      Accept: application/xml

       

      when sending the request. The web service was generated via the web services HTTP data services wizard. I edited it to set the resultFormat to xml

       

          // Constructor

          public function _Super_UsersService()

          {

              // initialize service control

              _serviceControl = new mx.rpc.http.HTTPMultiService();

               var operations:Array = new Array();

               var operation:mx.rpc.http.Operation;

               var argsArray:Array;

       

               operation = new mx.rpc.http.Operation(null, "getUsers");

               operation.url = "http://localhost:8888/users";

               operation.contentType = "";

               operation.method = "GET";

               operation.resultFormat = "xml";

               //operation.serializationFilter = serializer0;

               operation.properties = new Object();

               operation.properties["xPath"] = "/";

               operation.resultType = valueObjects.Users;

               operations.push(operation);

       

               _serviceControl.operationList = operations; 

       

       

       

               model_internal::initialize();

          }

      How does one configure the accept header?