Thank you so much for the all the helpful infos!
I'm still struggling to get it done but now it's because my
inexperience on Ruby.
When i manage to do it i will post the code here!
Ty!

2014-12-16 18:25 GMT-02:00 Seth Robbins <[email protected]>:
> Hi Bruno,
> I'm not very familiar with swordv2, but the sword v1 error is coming from
> dspace. Usually dspace expects a zipped package of some type (by default, it
> expects the dspace mets format, though I think it can be configured to
> accept SAF, look in the sword-server.cfg file in the dspace/config directory
> to see and change how yours is set up). The tutorial code appears to just
> send a text file, which would not be depositable to dspace without being
> wrapped in a package. If you need a package to test with, there appear to be
> some examples available at
> http://swordapp.org/sword-v1/sword-v1-clients-and-demonstrator-repositories/
>
> Also, when I've tested sword in the past the request needed to include a
> header "X-Packaging: http://purl.org/net/sword-types/METSDSpaceSIP"; as well
> as "Content-Type:application/zip". That means that where the example code
> says
> collection.post_media!(:filepath=>"test.txt", :content_type=>"text/plain")
> you should try something like
>  collection.post_media!(:filepath=>"/your/example/here.zip",
> :content_type=>"application/zip", :packaging =>
> "http://purl.org/net/sword/package/METSDSpaceSIP";)
>
> Hope that's helpful,
> Seth Robbins
>
>
> On Tue, Dec 16, 2014 at 10:15 AM, Bruno Zanette <[email protected]>
> wrote:
>>
>> Hey everybody!
>>
>> This is not a dspace specific question, but i hope someone can help me.
>>
>> I'm implementing a Ruby sword client to submit itens to dspace using a
>> custom interface. I did some research and i found "sword2ruby"
>> library, but i'm trying to execute the example given on the project
>> git page (https://github.com/swordapp/sword2ruby) and it doesn't work.
>> The library is supposed to be compatible with sword 2.0 but when i
>> configure it to get swordv2/servicedocument it return an error on
>> document mime-type:
>> ------------
>>
>> /home/bruno/.rvm/gems/ruby-2.1.4/gems/atom-tools-2.0.5/lib/atom/http.rb:492:in
>> `validate_content_type': unexpected response Content-Type:
>> "application/atomserv+xml". should be one of:
>> ["application/atomsvc+xml"] (Atom::WrongMimetype)
>> ------------
>>
>> When i use sword 1.0 app, the script successfully validate
>> servicedocument but it crashes on post_media command. The logs say
>> that there is no ingester for the type of file:
>> ------------
>> ERROR org.dspace.sword.CollectionDepositor @ Unacceptable content type
>> detected: text/plain for collection 1
>> 2014-12-16 14:09:09,271 ERROR org.purl.sword.server.DepositServlet @
>> org.purl.sword.base.SWORDErrorException: Unacceptable content type in
>> deposit request: text/plain
>> ------------
>>
>> I've already tried to modify swordv2 configs to set generate options
>> to use 1.3 version, but it didn't work.
>>
>> I'm using dspace-4 (git version) on ubuntu 14.04.
>>
>> Does anyone have some advice about it? Am I doing something wrong or
>> the library is broken?
>>
>> Any thing is welcome!!!
>>
>> Thanks!!
>>
>> --
>> Bruno Nocera Zanette
>> +55 41 9992-2508
>>
>>
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> DSpace-tech mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>> List Etiquette:
>> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
>
>
> --
> Seth Robbins | Research Programmer for Repository Development
> Main Library | Room 422 | [email protected] | [email protected]



-- 
Bruno Nocera Zanette
+55 41 9992-2508

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to