Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Thanks for the reply -

    1. The post to which you refer is this post :) - reading through, it looked to me like there was a bunch of overriding methods (e.g. getServiceInputs) and workarounds involved - if that's not the case any more - great :)

    2. I was imagining a RESTful DataSource (like David's that I referenced) which would allow substitutions of DataSource fields into the URL - is this what you mean when you refer to pathSegmentFields? Given that this approach is quite common in a RESTful application, this would be a good addition, and shouldn't break the existing API.

    3. Ok - took me a second to identify the relationship - for others, the DSRequest object that is a parameter in the transformRequest() method being overriden in point 2 extends RPCRequest.

    4. I hadn't considered that the browser would be a barrier - I guess you need the browser API to allow you to set the OPTIONS method? I had assumed that given 15 years or so, and one protocol to work with, and only a handful of methods, that the browser would actually implement the protocol :) Naive I guess.

    5. Urgh. WSDL. :) I did realise after I submitted the comment here that the XPath usually won't be enough to reconstruct the message reliably - you probably need a schema (which you should get with WSDL).

    So I guess my feature request has been boiled down to requesting support for datasource field substitutions in the 4 method URL's. This would be a welcome addition - thanks,

    Colin

    Comment


      #17
      I'm in the process of working out how to do it in SmartGWT :) - for httpMethod, I figured I would use DataSource.setOperationBindings(), but I can't see an API on OperationBinding that let me configure the httpMethod.

      I also can't see a way of doing the equivalent of overriding transformRequest() - there's a ResponseTransformHandler, but not a RequestTransformHandler.

      Am I missing some stuff here, or are these in an upcoming SmartGWT API? Thanks,

      Colin

      Comment


        #18
        transformRequest() is indeed missing, will be in an upcoming nightly build.

        Comment


          #19
          Great - am I looking in the wrong place for httpMethod setting in GWT? If not I guess this will be needed also to imlpement the REST datasource solution above - cheers,

          Colin

          Comment


            #20
            Override point DataSource.transformRequest(..) has been added to build 12-04-2008.

            Sanjiv

            Comment


              #21
              Thanks Sanjiv for such a fast turnaround - have I missed the approach for setting the httpMethod? Cheers,

              Colin

              Comment


                #22
                httpMethod

                Hi - just wanted to clear up the process for setting the httpMethod - am I correct in thinking this should be supported via DataSource.setOperationBindings() - thanks,

                Colin

                Comment


                  #23
                  Originally posted by hawkettc
                  Hi - just wanted to clear up the process for setting the httpMethod - am I correct in thinking this should be supported via DataSource.setOperationBindings() - thanks,

                  Colin
                  Have you tried something like this :

                  Code:
                  OpereationBinding fetchBinding = new OperationBinding();
                  ...
                  DSRequest requestProperties = new DSRequest();
                  requestProperties.setHttpMethod("POST");
                  fetchBinding.setRequestProperties(requestProperties);

                  Comment


                    #24
                    Seems so obvious its difficult to see how I missed it - thanks :)

                    Comment

                    Working...
                    X