Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OperationBinding.setDefaultParams has no effect #45

Closed
GoogleCodeExporter opened this issue Apr 22, 2015 · 6 comments
Closed

OperationBinding.setDefaultParams has no effect #45

GoogleCodeExporter opened this issue Apr 22, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

  I wanted to define a operation binding with some default parameters, but
the parameters have been never sent over the wire:

        OperationBinding fetch = new OperationBinding();
        fetch.setDataFormat(DSDataFormat.XML);
        fetch.setOperationType(DSOperationType.FETCH);
        fetch.setDataProtocol(DSProtocol.POSTMESSAGE);

        HashMap<String, String> params = new HashMap<String, String>();
        params.put("taxonomyKey", id);
        params.put("linkNamespace","http://www.xbrl.org/2003/linkbase");
        params.put("linkLocalname", "calculationLink");
        params.put("lang", "en");
        fetch.setDefaultParams(params);

Predrag

Original issue reported on code.google.com by pedjak@gmail.com on 14 Dec 2008 at 2:08

@GoogleCodeExporter
Copy link
Author

Original comment by sanjiv.j...@gmail.com on 14 Dec 2008 at 3:39

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

I looked into the issue. defaultParams only applies when the sataProtocol is 
GETPARAMS or POSTPARAMS. 

How were you expecting the defaultParams to be sent to the server when using 
POSTMESSAGE given the with this protocol, the post body is the data in XML 
format. 
Were you expecting the defaultParams to be passed in the query string?

Original comment by sanjiv.j...@gmail.com on 18 Dec 2008 at 3:21

@GoogleCodeExporter
Copy link
Author

well, I send this parameter by overwriting 
DataSource.transformRequest(DSRequest req)
and putting them in the request using DSRequest.setParams(). Why this could not 
be a
default behavior, no matter what the protocol is? SmartGWT could be a bit more 
than
just a wrapper around SmartClient library..

Cheers,

Predrag

Original comment by pedjak@gmail.com on 23 Dec 2008 at 12:29

@GoogleCodeExporter
Copy link
Author

The desired behavior should be resolved in SVN. defaultParams will be passed as 
request URL params even when 
using POSTMESSAGE. Please verify.

Original comment by sanjiv.j...@gmail.com on 4 Jan 2009 at 4:38

@GoogleCodeExporter
Copy link
Author

Original comment by sanjiv.j...@gmail.com on 15 Jan 2009 at 10:14

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Hi,

i verified the fix , and it works .

when using POST the parmas were added to the Posted values, they were not added 
as
query params.

Thanks for the fix,
Shay

Original comment by matas...@gmail.com on 27 Mar 2009 at 6:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant