Saturday, November 8, 2008

Uploads continued

So after building the proper multipart request and posting to the content tool I of course was granted NPEs. The content tool behaves differently than the 2.4 era access servlet, and preforms a lot of wiggling as it gathers magic pipes for accepting the upload. The short of it is that having a session isn't sufficient - the request has to be part of an overarching tool state.

I'll admit I wasn't looking forward to using the content tool this way - scrounging around to ge the tool ID seemed pretty tedious.

The good Dr. S. threw me a bone in comments here yesterday - thanks. I had examined this builds version of the Access servlet and didn't see that the Post did anything but login. I'll have to do some future archeology and see what post 2.4 version of access had the Rutgers extensions to allow uploads. The SAF app I'm building is already using the access servlet a great deal to pull media.

later doh. I should of looked at the zenly named "WebServlet" in the Access project. I had ignored it thinking that the name implied it was somebodies scratchpad. This WebServlet servlet looks more promising. it looks like it's using some deprecated methods but heck if it works off we go. I may have to dork around more; the upload has to go to an area which the the Student cannot Read, and which the Instructor sometimes cannot read, and sometimes to another site altogether. These rules are why I'll probably end up in a WS solution with sessions for both the user and an agent. anyway this WebServlet servlet is where I start my morning coding.


SteveS mentioned webservices - I see that the 2.4 ContentHosting.jws did get some upload endpoints. That will be where I go after the access servlet. Steve, is there an alternate webservice package you would recommend?

In my original plan I fall back to working with a Java WebDAV client if I can't get the access upload verion integrated or the WS to work out quickly. I expect that would be a real mess

2 comments:

Steve Swinsburg said...

Yup I'd definitely be using the webservices for this. That way you don't need to worry about trying to reconstruct the HTTP level stuff. I've had the webservices working from a desktop app in just the same way as a normal remote webapp.

Would be happy to nut out the ContentHosting webservices with you.

caseyd said...

One of the things I've found in this is that I am dorking around alot to get around self-signed and expired certs. You know, the kind of stuff a mature organization has layng around software development shops.

by sticking with the AXIS 'fakeout' SSL factory I would of saved a lot of time. ( er, except for the Quicktime bits )

I may yet ping you mister swinsburg!