RESTful HTTP Service

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Mar 20, 2012
Company: Abaco Soluciones S.A.

Hello.
I'm trying to implement new OData based RESTful Web Service.

When I trying to call this method:

Code
GET /Infobase/odata/standard.odata/InformationRegister_PreciosDeNomenclatura/SliceLast() 


i've got this error:

Code
<m:error><m:code>6</m:code><m:message>Extra segments are found in a request to an entity container!</m:message></m:error>
.

What am I doing wrong?

Edited: Mikhail Ivanenko - Nov 04, 2014 08:00 PM
 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Mikhail!

Can you provide raw HTTP request data?
Also please check, is it possible to execute SliceLast() for PreciosDeNomenclatura information register without parameters?

 
#3
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Mar 20, 2012
Company: Abaco Soluciones S.A.

I just entered this request into the browser address field. With accumulation register balance() method it works fine. But with information register, even with parameters, it shows the same error message.

How can I check this:

Quote
Timofey Bugaevsky wrote:
is it possible to execute SliceLast() for PreciosDeNomenclatura information register without parameters?
?

What exactly means this error message?

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Is PreciosDeNomenclatura information register periodical? If it does not, it can not have a slice of last values.
See the result of

Code
InformationRegisters.PreciosDeNomenclatura.SliceLast()

Does it return Undefined instead of ValueTable?

 
#5
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Mar 20, 2012
Company: Abaco Soluciones S.A.

It returns ValueTable.

 
#6
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Thank you, I need to doublecheck this information and will inform you later.

 
#7
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Mikhail!
You need to set the compatibility mode of the configuration to 8.3.4 and publish OData and Web and Thin clients.
I have created a simple example, see attached files.

Download 1Cv8.dt (15.02 KB)
 
#8
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

If you want too disable the compatibility mode of the configuration, you need to specify the standard OData interface content. For this, you can create an external data processor or build this into the applied solution. The data processor should run script that configures the list of objects, which are available for OData interface. Here is the example:

Code
Array = New Array();

For Each InformationRegister In Metadata.InformationRegisters Do
    Array.Add(InformationRegister);
EndDo;

SetStandardODataInterfaceContent(Array);

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.