OAuth 1.0 signing code written in C# - dropbox-api

Right now I am using some open source C# library to sign my URL using OAuth 1.0. I am signing it in order to download a file from Dropbox. It works on all the cases, except when the file has the "(" character in it. When it has that character, I am getting the following error:
{"error": "Host: rpc.dropbox.com:443, FE: None, X-Dropbox-RequestId: None,
X-Dropbox-App-Error: None, Invalid or missing signature"}
I am thinking it is due to the OAuth authentication code I am using. Any good library out there ? Also, I need the library to work on .Net 2.0. Anything higher than that won't work for me. I know it sucks, but that's my limitation.

This is a file name encoding issue. I got the same error when the file name had a space in it. I solved the problem by replacing the space with %20. You could try replacing the ( char with %28.

Related

SOAP + Adobe Scene7 Uploading assets by way of HTTP POSTs

I'm trying to Uploading assets by way of HTTP POSTs to the UploadFile Servlet in Adobe Scene7 and for the life of me cannot get it to work no matter what I try. Here is their documentation:
https://marketing.adobe.com/resources/help/en_US/s7/ips_api/c_http_post.html
I usually get the following error / response:
"Header section has more than 10240 bytes (maybe it is not properly terminated)"
https://gist.github.com/erickertz/8b50c503fd0e75fdb962515051253097
One thing to note is that I could not get their example working with separate "auth" and "uploadParams" parts. I instead imported their WSDL in SOAPUI which had the following form that seemed to work:
https://gist.github.com/erickertz/a4eb13e35f7709c6e5d2b4721b08510a
Here is an example of one of my failed requests:
https://gist.github.com/erickertz/3feccd53b9cb63bdba40de86c86da289
I admit that I'm not all that familiar with SOAP in general but this is driving me nuts :( Thanks!
Well, hope this saves someone else some time. I found a somewhat unrelated post here that had the same error with SOAP and a .NET application:
https://community.tableau.com/thread/213098
Issue was the service only recognized "/r/n" as newline characters. I converted all of my "/n" characters to "/r/n" and it works! Thanks Adobe!

JSF 2.2 misspelled redirect doesn't generate an error

I'm converting an app written in JSF 1.1/ADF faces to JSF 2.2 (Mojarra) /Primefaces and converting all of the faces-config navigations to inplace (implicit?).
I just spent two hours debugging why the redirect:
"blahbla?faces-redirect=true"
wasn't working. Turns out it was supposed to be
"blahblah?faces-redirect=true"
I'm not sure why I didn't get some sort of error. Web developer didn't show anything, nothing in the logs - and my logs are working fine. The only indication was a lack of an error message but nothing redirecting.
Searching, I found only this
You only need to keep in mind that the new JSF 2.0 provided implicit
navigation doesn't scan for the presence of the file,...
Migrating from JSF 1.2 to JSF 2.0
I guess I expected a "404" type of error if the redirect page didn't exist. I told the server to display a page that doesn't exist, so some error must of raised and then discarded somewhere?
Is there some setting - maybe in web.xml - that will help display this type of coding error? Or anything else?
I just need it for dev.
PS. I did check the file name by copying it from the code and pasting it into the term but I made the mistake of using tab completion and of course it completed. If I had just put .xhtml on the end I would have seen the missing char.
if it helps, I'm running Tomcat 7

Brunch `require` not defined

I have an application that uses brunch, chaplin, and coffeescript for the front end. Brunch builds the application without any errors. However, when I do brunch watch --serverand navigate to http://localhost:3333, an error is generated and the page never loads.
This was previously working just fine. diff shows no changes in the repository that would account for the change in behavior. I also checked out previous versions of the front end code from when I know the dev. server was working, but they all give the same error. I tried deleting the built code and completely rebuilding, but that didn't help either.
I am thinking it must be something I did in an untracked file, but for the life of me, I can't find it. Here is the output of the chrome error message:
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:3333/pub/css/app.css". localhost/:10
Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:3333/pub/js/vendor.js". localhost/:11
Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:3333/pub/js/app.js". localhost/:20
Uncaught SyntaxError: Unexpected token < vendor.js:1
Uncaught SyntaxError: Unexpected token < app.js:1
Uncaught ReferenceError: require is not defined (index):21
(anonymous function) (index):21
The offending line in index appears to be
<script>require('initialize');</script>
This line is unchanged from other similarly configured projects that work perfectly. I assume it is probably something dumb, but it is just vague enough that web search hasn't helped much. Hopefully someone else has come across this.
What can I do do diagnose the problem or fix this?
You have to confirm, but I believe you are getting 404 errors on your JavaScript and Stylesheets, so they are returning HTML pages that describe the 404 error. That's why that line of JavaScript is erroring out - it depends on code in app.js, which is not being loaded.
Make sure the paths are correct, i.e. point your browser to http://localhost:3333/pub/css/app.css and confirm that you get a CSS file and not a 404 from your web server. If you get a 404, that means you have to update the href for the CSS and the src for the JS, or make sure Brunch is placing the files where they are supposed to be.

Issue in using WSDL2OBJC tool for my WebService

I am using the wsdl2objc Tool to generate the soap Searvice APIs for my webservice.
I am following this tutorial to generate code and use it
http://code.google.com/p/wsdl2objc/wiki/UsageInstructions
&&
http://brismith66.blogspot.com/2010/05/iphone-development-accesing-soap.html
I can generate My WebService APIS successfully, but when i added i am getting 8 Errors and errors are
Expected Identifier or '(' before '=' token
Please tell me what can i Do with it. I am stuffed. the WEBSERVICE URL given in the tutorial work perfectly fine when i compile but mine code giving these errors.
Can anybody Help!
First, don't use version 0.6, use version 0.7 instead. I encountered cache problem under version 0.6. The version 0.7 fixed this problem. So, my web service could use session mechanism to store state information.
Second, not any generated codes with wsdl2objc (or gSOAP) and WSDL will be compiled successfully. In practice, our team encountered some problems about compiling, so finally we implemented a proxy web service which provides an interface with simple class types (ex, int, string, byte) in order to avoid the compiling problems.

symfony/zend integration - blank screen

I need to use ZendAMF on a symfony project and I'm currently working on integrating the two.
I have a frontend app with two modules, one of which is 'gateway' - the AMF gateway. In my frontend app config, I have the following in the configure function:
// load symfony autoloading first
parent::initialize();
// Integrate Zend Framework
require_once('[MY PATH TO ZEND]\Loader.php');
spl_autoload_register(array('Zend_Loader', 'autoload'));
The executeIndex function my the gateway actions.class.php looks like this
// No Layout
$this->setLayout(false);
// Set MIME Type
$this->getResponse()->setContentType('application/x-amf; charset='.sfConfig::get('sf_charset'));
// Disable cause this is a non-html page
sfConfig::set('sf_web_debug', false);
// Create AMF Server
$server = new Zend_Amf_Server();
$server->setClass('MYCLASS');
echo $server->handle();
return sfView::NONE;
Now when I try to visit the url for the gateway module, or even the other module which was working perfectly fine until this attempt, I only see a blank screen, with not even the symfony dev bar loaded. Oddly enough, my symfony logs are not being updated as well, which suggests that Synfony is not even being 'reached'.
So presumably the error has something to do with Zend, but I have no idea how to figure out what the error could be. One thing I do know for sure is that this is not a file path error, because if I change the path in the following line (a part of frontendConfiguration as shown above), I get a Zend_Amf_Server not found error. So the path must be correct. Also if I comment out this very same line, the second module resumes to normality, and my gateway broadcasts a blank x-amf stream.
spl_autoload_register(array('Zend_Loader', 'autoload'));
Does anyone have any tips on how I could attach this problem?
Thanks
P.S. I'm currently running an older version of Zend, which is why I am using Zend_Loader instead of Zend_autoLoader (I think). But I've tried switching to the new lib, but the error still remains. So it's not a version problem as well.
got it...
I was not using
set_include_path()
while loading Zend. It's still odd that it would give such a cryptic error, but this was the missing piece indeed.