Cabinetman Posted May 18, 2010 Posted May 18, 2010 After days of attempts I'd just like to scream... LOL 1. I have been able to do a lot using other peoples examples and amending but I don't know Java. 2. I'm sure straight Java is the best way to go but if I can get this right I can at least speed up SOME of my work while I try to figure out/learn the rest. I've downloaded and played with the java libraries and the scatchpad but to no avail.... I currently use Scriptmaster to adjust prices with a crude method of opening a FFox window and uploading a tab file thru that. I also have one adapted to generate the HMAC signature to request product data although I didn't write it. I have tried and tried... and tried to adjust the later to at least create the URL needed to create a shipment with the items I want to ship in it but to no avail. The signature doesn't match what Amazon expects.... I've tried hard coding and many variations.... Sure I would love to manage all my FBA using the Java but it's way beyond me right now, I think, and I can't see that I can afford to pay what it would cost to get it. Any help, ideas or whatever is appreciated. FBA_HMAC_signatured.zip
Valentin Posted May 18, 2010 Posted May 18, 2010 I took a quick look at your code, it mostly looks straightforward. When I run it I get a 'NullPointerException' looks like you're trying to use 'getBytes()' method on an object that has not been instantiated, ie 'null'. I dont know what amazon FBA is. But if you'd like to hire us to help you implement the interaction with amazon, then please send us the documentation and we can give you an estimate.
Cabinetman Posted May 18, 2010 Author Posted May 18, 2010 (edited) FBA = Fulfillment by Amazon And I wish I could afford you guys. I know it would be much easier in the long run. Down the road maybe I can.... "...trying to use 'getBytes()' method on an object that has not been instantiated, ie 'null'." I don't recall where that was.. I don't have the file in front of me but I'll have to check that in a few minutes. EDIT : AKA - Amazon Fulfillment Web Service (Amazon FWS) Edited May 18, 2010 by Guest
Cabinetman Posted May 19, 2010 Author Posted May 19, 2010 (edited) Well I'm not sure which object is the problem.... Hopefully someone can point it out to me. EDIT: I added.. import junit.framework.TestCase public Object next() { try { String result = internal.readLine(); if (result == null) { throw new NoSuchElementException(); } else { return result; } } catch (IOException e) { // The original exception is included in the message to notify the // client that an IOException has occurred. throw new NoSuchElementException(e.toString()); } } And get this at the end after running the script... Script: import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.text.DateFormat; import java.text.SimpleDateFormat; import javax.crypto.Mac; import junit.framework.TestCase public Object next() { try { String result = internal.readLine(); if (result == null) { throw new NoSuchElementException(); } else { return result; } } catch (IOException e) { // The original exception is included in the message to notify the // client that an IOException has occurred. throw new NoSuchElementException(e.toString()); } } // Get current timestamp String timestamp = null; Calendar cal = Calendar.getInstance(); DateFormat dfm = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.000Z'"); dfm.setTimeZone(TimeZone.getTimeZone("GMT")); timestamp = dfm.format(cal.getTime()); // Encode timestamp try { timestamp2 = URLE... Does this mean the null is coming here? And if so any idea on how to fix it? Finally .. does this need to be in a diff. forum? Thanks Edited May 19, 2010 by Guest
Recommended Posts
This topic is 5321 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now