talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Creating collectionobject fails

TT
Tigran Tokmajyan
Sun, May 8, 2016 2:31 PM

Hey guys,

I'm trying to create an collectionobject using this endpoint
/cspace-services/collectionobjects

With following payload

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<ns2:collectionobjects-common xmlns:ns2="
http://services.collectionspace.org/collectionobject">
<objectNumber>1234</objectNumber>
<objectName>Test Artwork</objectName>
<title>Test Artwork</title>
<objectProductionPersonGroupList>
<objectProductionPersonGroup>
<objectProductionPersonRole>artist</objectProductionPersonRole>
<objectProductionPerson>urn:cspace:fcart.collectionspace.org:
personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson>
</objectProductionPersonGroup>
</objectProductionPersonGroupList>
</ns2:collectionobjects-common>

But I'm getting invalid payload error. I've pasted log output in this
pastebin
http://pastebin.com/rBi89HZX

Also this page from documentation is 404 (it's schema for collection object)
http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd

Thanks,
Tigran

Hey guys, I'm trying to create an collectionobject using this endpoint /cspace-services/collectionobjects With following payload > <?xml version="1.0" encoding="utf-8" standalone="yes"?> > <ns2:collectionobjects-common xmlns:ns2=" > http://services.collectionspace.org/collectionobject"> > <objectNumber>1234</objectNumber> > <objectName>Test Artwork</objectName> > <title>Test Artwork</title> > <objectProductionPersonGroupList> > <objectProductionPersonGroup> > <objectProductionPersonRole>artist</objectProductionPersonRole> > <objectProductionPerson>urn:cspace:fcart.collectionspace.org: > personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson> > </objectProductionPersonGroup> > </objectProductionPersonGroupList> > </ns2:collectionobjects-common> But I'm getting invalid payload error. I've pasted log output in this pastebin http://pastebin.com/rBi89HZX Also this page from documentation is 404 (it's schema for collection object) http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd Thanks, Tigran
RM
Richard Millet
Sun, May 8, 2016 6:07 PM

Tigran,

I think you may have a typo in your payload.  I see "collectionobjects-common " instead of "collectionobjects_common".  I'm responding via my phone, so I'm not able to test the rest of your payload.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Tigran Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 7:31 AM
To: talk@lists.collectionspace.org
Subject: [Talk] Creating collectionobject fails

Hey guys,

I'm trying to create an collectionobject using this endpoint
/cspace-services/collectionobjects

With following payload

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<ns2:collectionobjects-common xmlns:ns2="http://services.collectionspace.org/collectionobject">
<objectNumber>1234</objectNumber>
<objectName>Test Artwork</objectName>
<title>Test Artwork</title>
<objectProductionPersonGroupList>
<objectProductionPersonGroup>
<objectProductionPersonRole>artist</objectProductionPersonRole>
<objectProductionPerson>urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson>
</objectProductionPersonGroup>
</objectProductionPersonGroupList>
</ns2:collectionobjects-common>

But I'm getting invalid payload error. I've pasted log output in this pastebin
http://pastebin.com/rBi89HZX

Also this page from documentation is 404 (it's schema for collection object)
http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd

Thanks,
Tigran

Tigran, I think you may have a typo in your payload. I see "collectionobjects-common " instead of "collectionobjects_common". I'm responding via my phone, so I'm not able to test the rest of your payload. -Richard ________________________________ From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Tigran Tokmajyan <toktikweb@gmail.com> Sent: Sunday, May 08, 2016 7:31 AM To: talk@lists.collectionspace.org Subject: [Talk] Creating collectionobject fails Hey guys, I'm trying to create an collectionobject using this endpoint /cspace-services/collectionobjects With following payload <?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:collectionobjects-common xmlns:ns2="http://services.collectionspace.org/collectionobject"> <objectNumber>1234</objectNumber> <objectName>Test Artwork</objectName> <title>Test Artwork</title> <objectProductionPersonGroupList> <objectProductionPersonGroup> <objectProductionPersonRole>artist</objectProductionPersonRole> <objectProductionPerson>urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson> </objectProductionPersonGroup> </objectProductionPersonGroupList> </ns2:collectionobjects-common> But I'm getting invalid payload error. I've pasted log output in this pastebin http://pastebin.com/rBi89HZX Also this page from documentation is 404 (it's schema for collection object) http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd Thanks, Tigran
TT
Tigran Tokmajyan
Sun, May 8, 2016 9:28 PM

Hey Richard,

Thanks for quick reply! But unfortunately that didn't fix the issue.

FYI, I can also see the documentation is wrong here:
http://prntscr.com/b1tiol

Thanks,
Tigran

On Sun, May 8, 2016 at 10:07 PM, Richard Millet richard.millet@lyrasis.org
wrote:

Tigran,

I think you may have a typo in your payload.  I see "
collectionobjects-common " instead of "collectionobjects_common".  I'm
responding via my phone, so I'm not able to test the rest of your payload.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Tigran
Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 7:31 AM
To: talk@lists.collectionspace.org
Subject: [Talk] Creating collectionobject fails

Hey guys,

I'm trying to create an collectionobject using this endpoint
/cspace-services/collectionobjects

With following payload

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<ns2:collectionobjects-common xmlns:ns2="
http://services.collectionspace.org/collectionobject">
<objectNumber>1234</objectNumber>
<objectName>Test Artwork</objectName>
<title>Test Artwork</title>
<objectProductionPersonGroupList>
<objectProductionPersonGroup>

<objectProductionPersonRole>artist</objectProductionPersonRole>
<objectProductionPerson>urn:cspace:fcart.collectionspace.org:
personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson>
</objectProductionPersonGroup>
</objectProductionPersonGroupList>
</ns2:collectionobjects-common>

But I'm getting invalid payload error. I've pasted log output in this
pastebin
http://pastebin.com/rBi89HZX

Also this page from documentation is 404 (it's schema for collection
object)

http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd

Thanks,
Tigran

Hey Richard, Thanks for quick reply! But unfortunately that didn't fix the issue. FYI, I can also see the documentation is wrong here: http://prntscr.com/b1tiol Thanks, Tigran On Sun, May 8, 2016 at 10:07 PM, Richard Millet <richard.millet@lyrasis.org> wrote: > Tigran, > > > I think you may have a typo in your payload. I see " > collectionobjects-common " instead of "collectionobjects_common". I'm > responding via my phone, so I'm not able to test the rest of your payload. > > > -Richard > > > > > ------------------------------ > *From:* Talk <talk-bounces@lists.collectionspace.org> on behalf of Tigran > Tokmajyan <toktikweb@gmail.com> > *Sent:* Sunday, May 08, 2016 7:31 AM > *To:* talk@lists.collectionspace.org > *Subject:* [Talk] Creating collectionobject fails > > Hey guys, > > I'm trying to create an collectionobject using this endpoint > /cspace-services/collectionobjects > > With following payload > >> <?xml version="1.0" encoding="utf-8" standalone="yes"?> >> <ns2:collectionobjects-common xmlns:ns2=" >> http://services.collectionspace.org/collectionobject"> >> <objectNumber>1234</objectNumber> >> <objectName>Test Artwork</objectName> >> <title>Test Artwork</title> >> <objectProductionPersonGroupList> >> <objectProductionPersonGroup> >> >> <objectProductionPersonRole>artist</objectProductionPersonRole> >> <objectProductionPerson>urn:cspace:fcart.collectionspace.org: >> personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson> >> </objectProductionPersonGroup> >> </objectProductionPersonGroupList> >> </ns2:collectionobjects-common> > > > But I'm getting invalid payload error. I've pasted log output in this > pastebin > http://pastebin.com/rBi89HZX > > Also this page from documentation is 404 (it's schema for collection > object) > > http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd > > Thanks, > Tigran >
RM
Richard Millet
Sun, May 8, 2016 11:59 PM

Tigran,

Maybe try with this really simple XML payload for a cataloging record: https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml

This payload is one from the unit tests run against the latest CollectionSpace build every night.

-Richard


From: Tigran Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 2:28 PM
To: Richard Millet
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Creating collectionobject fails

Hey Richard,

Thanks for quick reply! But unfortunately that didn't fix the issue.

FYI, I can also see the documentation is wrong here: http://prntscr.com/b1tiol
[http://img.prntscr.com/img?url=http://i.imgur.com/K5NtE7d.png]http://prntscr.com/b1tiol

Screenshothttp://prntscr.com/b1tiol
prntscr.com
Captured with Lightshot

Thanks,
Tigran

On Sun, May 8, 2016 at 10:07 PM, Richard Millet <richard.millet@lyrasis.orgmailto:richard.millet@lyrasis.org> wrote:

Tigran,

I think you may have a typo in your payload.  I see "collectionobjects-common " instead of "collectionobjects_common".  I'm responding via my phone, so I'm not able to test the rest of your payload.

-Richard


From: Talk <talk-bounces@lists.collectionspace.orgmailto:talk-bounces@lists.collectionspace.org> on behalf of Tigran Tokmajyan <toktikweb@gmail.commailto:toktikweb@gmail.com>
Sent: Sunday, May 08, 2016 7:31 AM
To: talk@lists.collectionspace.orgmailto:talk@lists.collectionspace.org
Subject: [Talk] Creating collectionobject fails

Hey guys,

I'm trying to create an collectionobject using this endpoint
/cspace-services/collectionobjects

With following payload

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<ns2:collectionobjects-common xmlns:ns2="http://services.collectionspace.org/collectionobject">
<objectNumber>1234</objectNumber>
<objectName>Test Artwork</objectName>
<title>Test Artwork</title>
<objectProductionPersonGroupList>
<objectProductionPersonGroup>
<objectProductionPersonRole>artist</objectProductionPersonRole>
<objectProductionPerson>urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson>
</objectProductionPersonGroup>
</objectProductionPersonGroupList>
</ns2:collectionobjects-common>

But I'm getting invalid payload error. I've pasted log output in this pastebin
http://pastebin.com/rBi89HZX

Also this page from documentation is 404 (it's schema for collection object)
http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd

Thanks,
Tigran

Tigran, Maybe try with this really simple XML payload for a cataloging record: https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml This payload is one from the unit tests run against the latest CollectionSpace build every night. -Richard ________________________________ From: Tigran Tokmajyan <toktikweb@gmail.com> Sent: Sunday, May 08, 2016 2:28 PM To: Richard Millet Cc: talk@lists.collectionspace.org Subject: Re: [Talk] Creating collectionobject fails Hey Richard, Thanks for quick reply! But unfortunately that didn't fix the issue. FYI, I can also see the documentation is wrong here: http://prntscr.com/b1tiol [http://img.prntscr.com/img?url=http://i.imgur.com/K5NtE7d.png]<http://prntscr.com/b1tiol> Screenshot<http://prntscr.com/b1tiol> prntscr.com Captured with Lightshot Thanks, Tigran On Sun, May 8, 2016 at 10:07 PM, Richard Millet <richard.millet@lyrasis.org<mailto:richard.millet@lyrasis.org>> wrote: Tigran, I think you may have a typo in your payload. I see "collectionobjects-common " instead of "collectionobjects_common". I'm responding via my phone, so I'm not able to test the rest of your payload. -Richard ________________________________ From: Talk <talk-bounces@lists.collectionspace.org<mailto:talk-bounces@lists.collectionspace.org>> on behalf of Tigran Tokmajyan <toktikweb@gmail.com<mailto:toktikweb@gmail.com>> Sent: Sunday, May 08, 2016 7:31 AM To: talk@lists.collectionspace.org<mailto:talk@lists.collectionspace.org> Subject: [Talk] Creating collectionobject fails Hey guys, I'm trying to create an collectionobject using this endpoint /cspace-services/collectionobjects With following payload <?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:collectionobjects-common xmlns:ns2="http://services.collectionspace.org/collectionobject"> <objectNumber>1234</objectNumber> <objectName>Test Artwork</objectName> <title>Test Artwork</title> <objectProductionPersonGroupList> <objectProductionPersonGroup> <objectProductionPersonRole>artist</objectProductionPersonRole> <objectProductionPerson>urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson> </objectProductionPersonGroup> </objectProductionPersonGroupList> </ns2:collectionobjects-common> But I'm getting invalid payload error. I've pasted log output in this pastebin http://pastebin.com/rBi89HZX Also this page from documentation is 404 (it's schema for collection object) http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd Thanks, Tigran
RM
Richard Millet
Mon, May 9, 2016 12:11 AM

Also, here's a link to some examples using curl to make requests to the API: https://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services#UsingcURLasaClienttoCollectionSpaceServices-ExampleofanXMLPayloadforCreate


From: Richard Millet
Sent: Sunday, May 08, 2016 4:59 PM
To: Tigran Tokmajyan
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Creating collectionobject fails

Tigran,

Maybe try with this really simple XML payload for a cataloging record: https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml

This payload is one from the unit tests run against the latest CollectionSpace build every night.

-Richard


From: Tigran Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 2:28 PM
To: Richard Millet
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Creating collectionobject fails

Hey Richard,

Thanks for quick reply! But unfortunately that didn't fix the issue.

FYI, I can also see the documentation is wrong here: http://prntscr.com/b1tiol
[http://img.prntscr.com/img?url=http://i.imgur.com/K5NtE7d.png]http://prntscr.com/b1tiol

Screenshothttp://prntscr.com/b1tiol
prntscr.com
Captured with Lightshot

Thanks,
Tigran

On Sun, May 8, 2016 at 10:07 PM, Richard Millet <richard.millet@lyrasis.orgmailto:richard.millet@lyrasis.org> wrote:

Tigran,

I think you may have a typo in your payload.  I see "collectionobjects-common " instead of "collectionobjects_common".  I'm responding via my phone, so I'm not able to test the rest of your payload.

-Richard


From: Talk <talk-bounces@lists.collectionspace.orgmailto:talk-bounces@lists.collectionspace.org> on behalf of Tigran Tokmajyan <toktikweb@gmail.commailto:toktikweb@gmail.com>
Sent: Sunday, May 08, 2016 7:31 AM
To: talk@lists.collectionspace.orgmailto:talk@lists.collectionspace.org
Subject: [Talk] Creating collectionobject fails

Hey guys,

I'm trying to create an collectionobject using this endpoint
/cspace-services/collectionobjects

With following payload

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<ns2:collectionobjects-common xmlns:ns2="http://services.collectionspace.org/collectionobject">
<objectNumber>1234</objectNumber>
<objectName>Test Artwork</objectName>
<title>Test Artwork</title>
<objectProductionPersonGroupList>
<objectProductionPersonGroup>
<objectProductionPersonRole>artist</objectProductionPersonRole>
<objectProductionPerson>urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson>
</objectProductionPersonGroup>
</objectProductionPersonGroupList>
</ns2:collectionobjects-common>

But I'm getting invalid payload error. I've pasted log output in this pastebin
http://pastebin.com/rBi89HZX

Also this page from documentation is 404 (it's schema for collection object)
http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd

Thanks,
Tigran

Also, here's a link to some examples using curl to make requests to the API: https://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services#UsingcURLasaClienttoCollectionSpaceServices-ExampleofanXMLPayloadforCreate ________________________________ From: Richard Millet Sent: Sunday, May 08, 2016 4:59 PM To: Tigran Tokmajyan Cc: talk@lists.collectionspace.org Subject: Re: [Talk] Creating collectionobject fails Tigran, Maybe try with this really simple XML payload for a cataloging record: https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml This payload is one from the unit tests run against the latest CollectionSpace build every night. -Richard ________________________________ From: Tigran Tokmajyan <toktikweb@gmail.com> Sent: Sunday, May 08, 2016 2:28 PM To: Richard Millet Cc: talk@lists.collectionspace.org Subject: Re: [Talk] Creating collectionobject fails Hey Richard, Thanks for quick reply! But unfortunately that didn't fix the issue. FYI, I can also see the documentation is wrong here: http://prntscr.com/b1tiol [http://img.prntscr.com/img?url=http://i.imgur.com/K5NtE7d.png]<http://prntscr.com/b1tiol> Screenshot<http://prntscr.com/b1tiol> prntscr.com Captured with Lightshot Thanks, Tigran On Sun, May 8, 2016 at 10:07 PM, Richard Millet <richard.millet@lyrasis.org<mailto:richard.millet@lyrasis.org>> wrote: Tigran, I think you may have a typo in your payload. I see "collectionobjects-common " instead of "collectionobjects_common". I'm responding via my phone, so I'm not able to test the rest of your payload. -Richard ________________________________ From: Talk <talk-bounces@lists.collectionspace.org<mailto:talk-bounces@lists.collectionspace.org>> on behalf of Tigran Tokmajyan <toktikweb@gmail.com<mailto:toktikweb@gmail.com>> Sent: Sunday, May 08, 2016 7:31 AM To: talk@lists.collectionspace.org<mailto:talk@lists.collectionspace.org> Subject: [Talk] Creating collectionobject fails Hey guys, I'm trying to create an collectionobject using this endpoint /cspace-services/collectionobjects With following payload <?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:collectionobjects-common xmlns:ns2="http://services.collectionspace.org/collectionobject"> <objectNumber>1234</objectNumber> <objectName>Test Artwork</objectName> <title>Test Artwork</title> <objectProductionPersonGroupList> <objectProductionPersonGroup> <objectProductionPersonRole>artist</objectProductionPersonRole> <objectProductionPerson>urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson> </objectProductionPersonGroup> </objectProductionPersonGroupList> </ns2:collectionobjects-common> But I'm getting invalid payload error. I've pasted log output in this pastebin http://pastebin.com/rBi89HZX Also this page from documentation is 404 (it's schema for collection object) http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd Thanks, Tigran
TT
Tigran Tokmajyan
Mon, May 9, 2016 6:05 AM

Okay. That worked and I iteratively transformed my XML to this and found 2
other problems.

I was missing <document> and xmlns:ns2 was wrong, it should have been "
http://collectionspace.org/services/collectionobject".

I suggest to fix documentation here:
https://wiki.collectionspace.org/display/DOC/CollectionObject+Service+RESTful+APIs+-+Release+v0.5

I appreciate your help! Thanks.

On Mon, May 9, 2016 at 4:11 AM, Richard Millet richard.millet@lyrasis.org
wrote:

Also, here's a link to some examples using curl to make requests to the
API:
https://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services#UsingcURLasaClienttoCollectionSpaceServices-ExampleofanXMLPayloadforCreate


From: Richard Millet
Sent: Sunday, May 08, 2016 4:59 PM
To: Tigran Tokmajyan

Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Creating collectionobject fails

Tigran,

Maybe try with this really simple XML payload for a cataloging record:
https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml

This payload is one from the unit tests run against the latest
CollectionSpace build every night.

-Richard


From: Tigran Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 2:28 PM
To: Richard Millet
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Creating collectionobject fails

Hey Richard,

Thanks for quick reply! But unfortunately that didn't fix the issue.

FYI, I can also see the documentation is wrong here:
http://prntscr.com/b1tiol
http://prntscr.com/b1tiol
Screenshot http://prntscr.com/b1tiol
prntscr.com
Captured with Lightshot

Thanks,
Tigran

On Sun, May 8, 2016 at 10:07 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Tigran,

I think you may have a typo in your payload.  I see "
collectionobjects-common " instead of "collectionobjects_common".  I'm
responding via my phone, so I'm not able to test the rest of your payload.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of
Tigran Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 7:31 AM
To: talk@lists.collectionspace.org
Subject: [Talk] Creating collectionobject fails

Hey guys,

I'm trying to create an collectionobject using this endpoint
/cspace-services/collectionobjects

With following payload

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<ns2:collectionobjects-common xmlns:ns2="
http://services.collectionspace.org/collectionobject">
<objectNumber>1234</objectNumber>
<objectName>Test Artwork</objectName>
<title>Test Artwork</title>
<objectProductionPersonGroupList>
<objectProductionPersonGroup>

<objectProductionPersonRole>artist</objectProductionPersonRole>
<objectProductionPerson>urn:cspace:fcart.collectionspace.org:
personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson>
</objectProductionPersonGroup>
</objectProductionPersonGroupList>
</ns2:collectionobjects-common>

But I'm getting invalid payload error. I've pasted log output in this
pastebin
http://pastebin.com/rBi89HZX

Also this page from documentation is 404 (it's schema for collection
object)

http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd

Thanks,
Tigran

Okay. That worked and I iteratively transformed my XML to this and found 2 other problems. I was missing <document> and xmlns:ns2 was wrong, it should have been " http://collectionspace.org/services/collectionobject". I suggest to fix documentation here: https://wiki.collectionspace.org/display/DOC/CollectionObject+Service+RESTful+APIs+-+Release+v0.5 I appreciate your help! Thanks. On Mon, May 9, 2016 at 4:11 AM, Richard Millet <richard.millet@lyrasis.org> wrote: > Also, here's a link to some examples using curl to make requests to the > API: > https://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services#UsingcURLasaClienttoCollectionSpaceServices-ExampleofanXMLPayloadforCreate > > > > > ------------------------------ > *From:* Richard Millet > *Sent:* Sunday, May 08, 2016 4:59 PM > *To:* Tigran Tokmajyan > > *Cc:* talk@lists.collectionspace.org > *Subject:* Re: [Talk] Creating collectionobject fails > > > Tigran, > > > Maybe try with this really simple XML payload for a cataloging record: > https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml > > > This payload is one from the unit tests run against the latest > CollectionSpace build every night. > > > -Richard > > > ------------------------------ > *From:* Tigran Tokmajyan <toktikweb@gmail.com> > *Sent:* Sunday, May 08, 2016 2:28 PM > *To:* Richard Millet > *Cc:* talk@lists.collectionspace.org > *Subject:* Re: [Talk] Creating collectionobject fails > > Hey Richard, > > Thanks for quick reply! But unfortunately that didn't fix the issue. > > FYI, I can also see the documentation is wrong here: > http://prntscr.com/b1tiol > <http://prntscr.com/b1tiol> > Screenshot <http://prntscr.com/b1tiol> > prntscr.com > Captured with Lightshot > > > Thanks, > Tigran > > On Sun, May 8, 2016 at 10:07 PM, Richard Millet < > richard.millet@lyrasis.org> wrote: > >> Tigran, >> >> >> I think you may have a typo in your payload. I see " >> collectionobjects-common " instead of "collectionobjects_common". I'm >> responding via my phone, so I'm not able to test the rest of your payload. >> >> >> -Richard >> >> >> >> >> ------------------------------ >> *From:* Talk <talk-bounces@lists.collectionspace.org> on behalf of >> Tigran Tokmajyan <toktikweb@gmail.com> >> *Sent:* Sunday, May 08, 2016 7:31 AM >> *To:* talk@lists.collectionspace.org >> *Subject:* [Talk] Creating collectionobject fails >> >> Hey guys, >> >> I'm trying to create an collectionobject using this endpoint >> /cspace-services/collectionobjects >> >> With following payload >> >>> <?xml version="1.0" encoding="utf-8" standalone="yes"?> >>> <ns2:collectionobjects-common xmlns:ns2=" >>> http://services.collectionspace.org/collectionobject"> >>> <objectNumber>1234</objectNumber> >>> <objectName>Test Artwork</objectName> >>> <title>Test Artwork</title> >>> <objectProductionPersonGroupList> >>> <objectProductionPersonGroup> >>> >>> <objectProductionPersonRole>artist</objectProductionPersonRole> >>> <objectProductionPerson>urn:cspace:fcart.collectionspace.org: >>> personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson> >>> </objectProductionPersonGroup> >>> </objectProductionPersonGroupList> >>> </ns2:collectionobjects-common> >> >> >> But I'm getting invalid payload error. I've pasted log output in this >> pastebin >> http://pastebin.com/rBi89HZX >> >> Also this page from documentation is 404 (it's schema for collection >> object) >> >> http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd >> >> Thanks, >> Tigran >> > >
AR
Aron Roberts
Mon, May 9, 2016 5:00 PM

Thanks, Tigran, for the pointer to the documentation error. We'll fix that.
Aron

On Sun, May 8, 2016 at 11:05 PM, Tigran Tokmajyan toktikweb@gmail.com
wrote:

Okay. That worked and I iteratively transformed my XML to this and found 2
other problems.

I was missing <document> and xmlns:ns2 was wrong, it should have been "
http://collectionspace.org/services/collectionobject".

I suggest to fix documentation here:
https://wiki.collectionspace.org/display/DOC/CollectionObject+Service+RESTful+APIs+-+Release+v0.5

I appreciate your help! Thanks.

On Mon, May 9, 2016 at 4:11 AM, Richard Millet <richard.millet@lyrasis.org

wrote:

Also, here's a link to some examples using curl to make requests to the
API:
https://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services#UsingcURLasaClienttoCollectionSpaceServices-ExampleofanXMLPayloadforCreate


From: Richard Millet
Sent: Sunday, May 08, 2016 4:59 PM
To: Tigran Tokmajyan

Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Creating collectionobject fails

Tigran,

Maybe try with this really simple XML payload for a cataloging record:
https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml

This payload is one from the unit tests run against the latest
CollectionSpace build every night.

-Richard


From: Tigran Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 2:28 PM
To: Richard Millet
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Creating collectionobject fails

Hey Richard,

Thanks for quick reply! But unfortunately that didn't fix the issue.

FYI, I can also see the documentation is wrong here:
http://prntscr.com/b1tiol
http://prntscr.com/b1tiol
Screenshot http://prntscr.com/b1tiol
prntscr.com
Captured with Lightshot

Thanks,
Tigran

On Sun, May 8, 2016 at 10:07 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Tigran,

I think you may have a typo in your payload.  I see "
collectionobjects-common " instead of "collectionobjects_common".  I'm
responding via my phone, so I'm not able to test the rest of your payload.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of
Tigran Tokmajyan toktikweb@gmail.com
Sent: Sunday, May 08, 2016 7:31 AM
To: talk@lists.collectionspace.org
Subject: [Talk] Creating collectionobject fails

Hey guys,

I'm trying to create an collectionobject using this endpoint
/cspace-services/collectionobjects

With following payload

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<ns2:collectionobjects-common xmlns:ns2="
http://services.collectionspace.org/collectionobject">
<objectNumber>1234</objectNumber>
<objectName>Test Artwork</objectName>
<title>Test Artwork</title>
<objectProductionPersonGroupList>
<objectProductionPersonGroup>

<objectProductionPersonRole>artist</objectProductionPersonRole>

<objectProductionPerson>urn:cspace:fcart.collectionspace.org:
personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson>
</objectProductionPersonGroup>
</objectProductionPersonGroupList>
</ns2:collectionobjects-common>

But I'm getting invalid payload error. I've pasted log output in this
pastebin
http://pastebin.com/rBi89HZX

Also this page from documentation is 404 (it's schema for collection
object)

http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd

Thanks,
Tigran

Thanks, Tigran, for the pointer to the documentation error. We'll fix that. Aron On Sun, May 8, 2016 at 11:05 PM, Tigran Tokmajyan <toktikweb@gmail.com> wrote: > Okay. That worked and I iteratively transformed my XML to this and found 2 > other problems. > > I was missing <document> and xmlns:ns2 was wrong, it should have been " > http://collectionspace.org/services/collectionobject". > > I suggest to fix documentation here: > https://wiki.collectionspace.org/display/DOC/CollectionObject+Service+RESTful+APIs+-+Release+v0.5 > > I appreciate your help! Thanks. > > On Mon, May 9, 2016 at 4:11 AM, Richard Millet <richard.millet@lyrasis.org > > wrote: > >> Also, here's a link to some examples using curl to make requests to the >> API: >> https://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services#UsingcURLasaClienttoCollectionSpaceServices-ExampleofanXMLPayloadforCreate >> >> >> >> >> ------------------------------ >> *From:* Richard Millet >> *Sent:* Sunday, May 08, 2016 4:59 PM >> *To:* Tigran Tokmajyan >> >> *Cc:* talk@lists.collectionspace.org >> *Subject:* Re: [Talk] Creating collectionobject fails >> >> >> Tigran, >> >> >> Maybe try with this really simple XML payload for a cataloging record: >> https://github.com/collectionspace/services/blob/master/services/IntegrationTests/src/test/resources/test-data/xmlreplay/collectionobject/co1.xml >> >> >> This payload is one from the unit tests run against the latest >> CollectionSpace build every night. >> >> >> -Richard >> >> >> ------------------------------ >> *From:* Tigran Tokmajyan <toktikweb@gmail.com> >> *Sent:* Sunday, May 08, 2016 2:28 PM >> *To:* Richard Millet >> *Cc:* talk@lists.collectionspace.org >> *Subject:* Re: [Talk] Creating collectionobject fails >> >> Hey Richard, >> >> Thanks for quick reply! But unfortunately that didn't fix the issue. >> >> FYI, I can also see the documentation is wrong here: >> http://prntscr.com/b1tiol >> <http://prntscr.com/b1tiol> >> Screenshot <http://prntscr.com/b1tiol> >> prntscr.com >> Captured with Lightshot >> >> >> Thanks, >> Tigran >> >> On Sun, May 8, 2016 at 10:07 PM, Richard Millet < >> richard.millet@lyrasis.org> wrote: >> >>> Tigran, >>> >>> >>> I think you may have a typo in your payload. I see " >>> collectionobjects-common " instead of "collectionobjects_common". I'm >>> responding via my phone, so I'm not able to test the rest of your payload. >>> >>> >>> -Richard >>> >>> >>> >>> >>> ------------------------------ >>> *From:* Talk <talk-bounces@lists.collectionspace.org> on behalf of >>> Tigran Tokmajyan <toktikweb@gmail.com> >>> *Sent:* Sunday, May 08, 2016 7:31 AM >>> *To:* talk@lists.collectionspace.org >>> *Subject:* [Talk] Creating collectionobject fails >>> >>> Hey guys, >>> >>> I'm trying to create an collectionobject using this endpoint >>> /cspace-services/collectionobjects >>> >>> With following payload >>> >>>> <?xml version="1.0" encoding="utf-8" standalone="yes"?> >>>> <ns2:collectionobjects-common xmlns:ns2=" >>>> http://services.collectionspace.org/collectionobject"> >>>> <objectNumber>1234</objectNumber> >>>> <objectName>Test Artwork</objectName> >>>> <title>Test Artwork</title> >>>> <objectProductionPersonGroupList> >>>> <objectProductionPersonGroup> >>>> >>>> <objectProductionPersonRole>artist</objectProductionPersonRole> >>>> >>>> <objectProductionPerson>urn:cspace:fcart.collectionspace.org: >>>> personauthorities:name(person):item:name(Saryan1462716580574)'Saryan'</objectProductionPerson> >>>> </objectProductionPersonGroup> >>>> </objectProductionPersonGroupList> >>>> </ns2:collectionobjects-common> >>> >>> >>> But I'm getting invalid payload error. I've pasted log output in this >>> pastebin >>> http://pastebin.com/rBi89HZX >>> >>> Also this page from documentation is 404 (it's schema for collection >>> object) >>> >>> http://fisheye.collectionspace.org/browse/~raw,r=1445/collectionspace/src/services/trunk/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd >>> >>> Thanks, >>> Tigran >>> >> >> > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > >