You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by "Gupta, Nishant." <ni...@informatica.com> on 2016/10/12 08:47:24 UTC
Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
RE: Adding Attachment in HTTP POST Request
Posted by "Gupta, Nishant." <ni...@informatica.com>.
Thanks Ramesh. It was really helpful. ☺
From: Ramesh Reddy [mailto:rareddy@redhat.com]
Sent: Thursday, October 13, 2016 11:44 PM
To: user@olingo.apache.org
Subject: Re: Adding Attachment in HTTP POST Request
Ok, now why do think that Olingo needs to have de-/serializer to payload that it does not understand nor part of the spec?
Serializers and DeSerilaizers in Olingo marshall and un-marshell entities types, complex types, primitives from atom/json format to java objects vice versa *defined* through OData metadata. In this case neither it is defined in metadata, nor Olingo can understand how to interpret the payload. Anything Olingo does, need to directly reflect a requirement/feature from OData specification. Any feature you deviate from specification will be a "custom" feature and will NOT interoperable. Thus Olingo will NEVER provide it.
Now, if you are struck with a usecase that OData does not currently solve it, and you see that it would require multipart/form-data to solve the issue, then I encourage you to describe your issue and propose a solution to the OData technical committee here https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata if/when it becomes part of the specification, Olingo committers will be much obliged to provide that feature in the Olingo framework.
BTW, for large file types, you need to look into Media Types and Stream Types that currently exist in OData specification, to see if that resolves your usecase.
Hope this clears the confusion for you. I just do not want you to get the feeling that Olingo is providing half backed framework :)
Ramesh..
________________________________
No particular feature of OData specification requires me to send my payload in multpart/form-data. It’s just a requirement which I have. I have a large size file which I need to send to server.
From: Ramesh Reddy [mailto:rareddy@redhat.com]
Sent: Thursday, October 13, 2016 10:16 PM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Re: Adding Attachment in HTTP POST Request
I understand that, what I am asking is what feature of OData specification you see that requires you to send the payload in the multipart/form-data? Then we can discuss the Olingo support for that feature.
________________________________
Hi Ramesh,
I am talking about the Content Type: multipart/form-data using which attachments can be sent to server. Olingo should have provided de-/serializer for multipart/form-data.
From: Ramesh Reddy [mailto:rareddy@redhat.com]
Sent: Thursday, October 13, 2016 9:47 PM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Re: Adding Attachment in HTTP POST Request
Nishant,
Can you describe your common usecase and which feature in OData specification that this should be handling?
Ramesh..
________________________________
Hi Christian,
Ok. It means that we have to use our third-party de-/serializers for multipart/form-data. I was also wondering as to why Olingo doesn’t provide support for multipart/form-data, considering it is a common use case ☺ .
From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: Thursday, October 13, 2016 6:49 PM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hi Nishant,
the multipart/form-data format is not part of the OData specification thus Olingo does not provide out of the box de-/serializers.
Best Regards,
Christian
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Donnerstag, 13. Oktober 2016 07:22
To: Grande, Oliver <ol...@sap.com>>
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hi Oliver,
Thanks for the prompt reply. I saw this tutorial but this doesn’t solve my use case. I am basically using a bounded action and the request comes to processActionEntity(….) of ActionEntityProcessor interface. I was able to use multipart/form-data by implementing CustomContentTypeSupport interface and defining modifySupportedContentTypes(..).
The issue which remains now is that there is no in-built de-serializer for multipart/form-data. Does Olingo provide any deserializer for multipart/form-data that I am not aware of ?
Regards,
Nishant Gupta
From: Grande, Oliver [mailto:oliver.grande@sap.com]
Sent: Wednesday, October 12, 2016 6:51 PM
To: Gupta, Nishant.
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hello Nishant,
to be honest I haven’t done that yet, but I would have created a Media Entity, as described within the following tutorial: https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html. Or do you see a problem?
Regards,
Oliver
Oliver Grande
PI IC HC Clinical Decision Support DE
SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
E oliver.grande@sap.com<ma...@sap.com>
Pflichtangaben/Mandatory Disclosure Statement:
http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 12. Oktober 2016 10:47
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
Re: Adding Attachment in HTTP POST Request
Posted by Ramesh Reddy <ra...@redhat.com>.
Ok, now why do think that Olingo needs to have de-/serializer to payload that it does not understand nor part of the spec?
Serializers and DeSerilaizers in Olingo marshall and un-marshell entities types, complex types, primitives from atom/json format to java objects vice versa *defined* through OData metadata. In this case neither it is defined in metadata, nor Olingo can understand how to interpret the payload. Anything Olingo does, need to directly reflect a requirement/feature from OData specification. Any feature you deviate from specification will be a "custom" feature and will NOT interoperable. Thus Olingo will NEVER provide it.
Now, if you are struck with a usecase that OData does not currently solve it, and you see that it would require multipart/form-data to solve the issue, then I encourage you to describe your issue and propose a solution to the OData technical committee here https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata if/when it becomes part of the specification, Olingo committers will be much obliged to provide that feature in the Olingo framework.
BTW, for large file types, you need to look into Media Types and Stream Types that currently exist in OData specification, to see if that resolves your usecase.
Hope this clears the confusion for you. I just do not want you to get the feeling that Olingo is providing half backed framework :)
Ramesh..
----- Original Message -----
> No particular feature of OData specification requires me to send my payload
> in multpart/form-data. It’s just a requirement which I have. I have a large
> size file which I need to send to server.
> From: Ramesh Reddy [mailto:rareddy@redhat.com]
> Sent: Thursday, October 13, 2016 10:16 PM
> To: user@olingo.apache.org
> Subject: Re: Adding Attachment in HTTP POST Request
> I understand that, what I am asking is what feature of OData specification
> you see that requires you to send the payload in the multipart/form-data?
> Then we can discuss the Olingo support for that feature.
> ----- Original Message -----
> > Hi Ramesh,
>
> > I am talking about the Content Type: multipart/form-data using which
> > attachments can be sent to server. Olingo should have provided
> > de-/serializer for multipart/form-data.
>
> > From: Ramesh Reddy [ mailto:rareddy@redhat.com ]
>
> > Sent: Thursday, October 13, 2016 9:47 PM
>
> > To: user@olingo.apache.org
>
> > Subject: Re: Adding Attachment in HTTP POST Request
>
> > Nishant,
>
> > Can you describe your common usecase and which feature in OData
> > specification
> > that this should be handling?
>
> > Ramesh..
>
> > > Hi Christian,
> >
>
> > > Ok. It means that we have to use our third-party de-/serializers for
> > > multipart/form-data. I was also wondering as to why Olingo doesn’t
> > > provide
> > > support for multipart/form-data, considering it is a common use case J .
> >
>
> > > From: Amend, Christian [ mailto:christian.amend@sap.com ]
> >
>
> > > Sent: Thursday, October 13, 2016 6:49 PM
> >
>
> > > To: user@olingo.apache.org
> >
>
> > > Subject: RE: Adding Attachment in HTTP POST Request
> >
>
> > > Hi Nishant,
> >
>
> > > the multipart/form-data format is not part of the OData specification
> > > thus
> > > Olingo does not provide out of the box de-/serializers.
> >
>
> > > Best Regards,
> >
>
> > > Christian
> >
>
> > > From: Gupta, Nishant. [ mailto:nigupta@informatica.com ]
> >
>
> > > Sent: Donnerstag, 13. Oktober 2016 07:22
> >
>
> > > To: Grande, Oliver < oliver.grande@sap.com >
> >
>
> > > Cc: user@olingo.apache.org
> >
>
> > > Subject: RE: Adding Attachment in HTTP POST Request
> >
>
> > > Hi Oliver,
> >
>
> > > Thanks for the prompt reply. I saw this tutorial but this doesn’t solve
> > > my
> > > use case. I am basically using a bounded action and the request comes to
> > > processActionEntity(….) of ActionEntityProcessor interface. I was able to
> > > use multipart/form-data by implementing CustomContentTypeSupport
> > > interface
> > > and defining modifySupportedContentTypes(..).
> >
>
> > > The issue which remains now is that there is no in-built de-serializer
> > > for
> > > multipart/form-data. Does Olingo provide any deserializer for
> > > multipart/form-data that I am not aware of ?
> >
>
> > > Regards,
> >
>
> > > Nishant Gupta
> >
>
> > > From: Grande, Oliver [ mailto:oliver.grande@sap.com ]
> >
>
> > > Sent: Wednesday, October 12, 2016 6:51 PM
> >
>
> > > To: Gupta, Nishant.
> >
>
> > > Cc: user@olingo.apache.org
> >
>
> > > Subject: RE: Adding Attachment in HTTP POST Request
> >
>
> > > Hello Nishant,
> >
>
> > > to be honest I haven’t done that yet, but I would have created a Media
> > > Entity, as described within the following tutorial:
> > > https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html
> > > .
> > > Or do you see a problem?
> >
>
> > > Regards,
> >
>
> > > Oliver
> >
>
> > > Oliver Grande
> >
>
> > > PI IC HC Clinical Decision Support DE
> >
>
> > > SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
> >
>
> > > E oliver.grande@sap.com
> >
>
> > > Pflichtangaben/Mandatory Disclosure Statement:
> >
>
> > > http://www.sap.com/company/legal/impressum.epx
> >
>
> > > Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige
> > > vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich
> > > erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine
> > > Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte
> > > benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
> >
>
> > > Vielen Dank.
> >
>
> > > This e-mail may contain trade secrets or privileged, undisclosed, or
> > > otherwise confidential information. If you have received this e-mail in
> > > error, you are hereby notified that any review, copying, or distribution
> > > of
> > > it is strictly prohibited. Please inform us immediately and destroy the
> > > original transmittal.
> >
>
> > > Thank you for your cooperation
> >
>
> > > From: Gupta, Nishant. [ mailto:nigupta@informatica.com ]
> >
>
> > > Sent: Mittwoch, 12. Oktober 2016 10:47
> >
>
> > > To: user@olingo.apache.org
> >
>
> > > Subject: Adding Attachment in HTTP POST Request
> >
>
> > > Hi,
> >
>
> > > I was wondering how can we enable support for an attachment in HTTP POST
> > > Body
> > > using Olingo V4(Java). I want to know the changes which needs to be made
> > > both in metadata document and service implementation.
> >
>
> > > It would be great if anyone can provide pointers regarding the same.
> >
>
> > > Regards,
> >
>
> > > Nishant Gupta
> >
>
RE: Adding Attachment in HTTP POST Request
Posted by "Gupta, Nishant." <ni...@informatica.com>.
No particular feature of OData specification requires me to send my payload in multpart/form-data. It’s just a requirement which I have. I have a large size file which I need to send to server.
From: Ramesh Reddy [mailto:rareddy@redhat.com]
Sent: Thursday, October 13, 2016 10:16 PM
To: user@olingo.apache.org
Subject: Re: Adding Attachment in HTTP POST Request
I understand that, what I am asking is what feature of OData specification you see that requires you to send the payload in the multipart/form-data? Then we can discuss the Olingo support for that feature.
________________________________
Hi Ramesh,
I am talking about the Content Type: multipart/form-data using which attachments can be sent to server. Olingo should have provided de-/serializer for multipart/form-data.
From: Ramesh Reddy [mailto:rareddy@redhat.com]
Sent: Thursday, October 13, 2016 9:47 PM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Re: Adding Attachment in HTTP POST Request
Nishant,
Can you describe your common usecase and which feature in OData specification that this should be handling?
Ramesh..
________________________________
Hi Christian,
Ok. It means that we have to use our third-party de-/serializers for multipart/form-data. I was also wondering as to why Olingo doesn’t provide support for multipart/form-data, considering it is a common use case ☺ .
From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: Thursday, October 13, 2016 6:49 PM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hi Nishant,
the multipart/form-data format is not part of the OData specification thus Olingo does not provide out of the box de-/serializers.
Best Regards,
Christian
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Donnerstag, 13. Oktober 2016 07:22
To: Grande, Oliver <ol...@sap.com>>
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hi Oliver,
Thanks for the prompt reply. I saw this tutorial but this doesn’t solve my use case. I am basically using a bounded action and the request comes to processActionEntity(….) of ActionEntityProcessor interface. I was able to use multipart/form-data by implementing CustomContentTypeSupport interface and defining modifySupportedContentTypes(..).
The issue which remains now is that there is no in-built de-serializer for multipart/form-data. Does Olingo provide any deserializer for multipart/form-data that I am not aware of ?
Regards,
Nishant Gupta
From: Grande, Oliver [mailto:oliver.grande@sap.com]
Sent: Wednesday, October 12, 2016 6:51 PM
To: Gupta, Nishant.
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hello Nishant,
to be honest I haven’t done that yet, but I would have created a Media Entity, as described within the following tutorial: https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html. Or do you see a problem?
Regards,
Oliver
Oliver Grande
PI IC HC Clinical Decision Support DE
SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
E oliver.grande@sap.com<ma...@sap.com>
Pflichtangaben/Mandatory Disclosure Statement:
http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 12. Oktober 2016 10:47
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
Re: Adding Attachment in HTTP POST Request
Posted by Ramesh Reddy <ra...@redhat.com>.
I understand that, what I am asking is what feature of OData specification you see that requires you to send the payload in the multipart/form-data? Then we can discuss the Olingo support for that feature.
----- Original Message -----
> Hi Ramesh,
> I am talking about the Content Type: multipart/form-data using which
> attachments can be sent to server. Olingo should have provided
> de-/serializer for multipart/form-data.
> From: Ramesh Reddy [mailto:rareddy@redhat.com]
> Sent: Thursday, October 13, 2016 9:47 PM
> To: user@olingo.apache.org
> Subject: Re: Adding Attachment in HTTP POST Request
> Nishant,
> Can you describe your common usecase and which feature in OData specification
> that this should be handling?
> Ramesh..
> ----- Original Message -----
> > Hi Christian,
>
> > Ok. It means that we have to use our third-party de-/serializers for
> > multipart/form-data. I was also wondering as to why Olingo doesn’t provide
> > support for multipart/form-data, considering it is a common use case J .
>
> > From: Amend, Christian [ mailto:christian.amend@sap.com ]
>
> > Sent: Thursday, October 13, 2016 6:49 PM
>
> > To: user@olingo.apache.org
>
> > Subject: RE: Adding Attachment in HTTP POST Request
>
> > Hi Nishant,
>
> > the multipart/form-data format is not part of the OData specification thus
> > Olingo does not provide out of the box de-/serializers.
>
> > Best Regards,
>
> > Christian
>
> > From: Gupta, Nishant. [ mailto:nigupta@informatica.com ]
>
> > Sent: Donnerstag, 13. Oktober 2016 07:22
>
> > To: Grande, Oliver < oliver.grande@sap.com >
>
> > Cc: user@olingo.apache.org
>
> > Subject: RE: Adding Attachment in HTTP POST Request
>
> > Hi Oliver,
>
> > Thanks for the prompt reply. I saw this tutorial but this doesn’t solve my
> > use case. I am basically using a bounded action and the request comes to
> > processActionEntity(….) of ActionEntityProcessor interface. I was able to
> > use multipart/form-data by implementing CustomContentTypeSupport interface
> > and defining modifySupportedContentTypes(..).
>
> > The issue which remains now is that there is no in-built de-serializer for
> > multipart/form-data. Does Olingo provide any deserializer for
> > multipart/form-data that I am not aware of ?
>
> > Regards,
>
> > Nishant Gupta
>
> > From: Grande, Oliver [ mailto:oliver.grande@sap.com ]
>
> > Sent: Wednesday, October 12, 2016 6:51 PM
>
> > To: Gupta, Nishant.
>
> > Cc: user@olingo.apache.org
>
> > Subject: RE: Adding Attachment in HTTP POST Request
>
> > Hello Nishant,
>
> > to be honest I haven’t done that yet, but I would have created a Media
> > Entity, as described within the following tutorial:
> > https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html .
> > Or do you see a problem?
>
> > Regards,
>
> > Oliver
>
> > Oliver Grande
>
> > PI IC HC Clinical Decision Support DE
>
> > SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
>
> > E oliver.grande@sap.com
>
> > Pflichtangaben/Mandatory Disclosure Statement:
>
> > http://www.sap.com/company/legal/impressum.epx
>
> > Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige
> > vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich
> > erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine
> > Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte
> > benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
>
> > Vielen Dank.
>
> > This e-mail may contain trade secrets or privileged, undisclosed, or
> > otherwise confidential information. If you have received this e-mail in
> > error, you are hereby notified that any review, copying, or distribution of
> > it is strictly prohibited. Please inform us immediately and destroy the
> > original transmittal.
>
> > Thank you for your cooperation
>
> > From: Gupta, Nishant. [ mailto:nigupta@informatica.com ]
>
> > Sent: Mittwoch, 12. Oktober 2016 10:47
>
> > To: user@olingo.apache.org
>
> > Subject: Adding Attachment in HTTP POST Request
>
> > Hi,
>
> > I was wondering how can we enable support for an attachment in HTTP POST
> > Body
> > using Olingo V4(Java). I want to know the changes which needs to be made
> > both in metadata document and service implementation.
>
> > It would be great if anyone can provide pointers regarding the same.
>
> > Regards,
>
> > Nishant Gupta
>
RE: Adding Attachment in HTTP POST Request
Posted by "Gupta, Nishant." <ni...@informatica.com>.
Hi Ramesh,
I am talking about the Content Type: multipart/form-data using which attachments can be sent to server. Olingo should have provided de-/serializer for multipart/form-data.
From: Ramesh Reddy [mailto:rareddy@redhat.com]
Sent: Thursday, October 13, 2016 9:47 PM
To: user@olingo.apache.org
Subject: Re: Adding Attachment in HTTP POST Request
Nishant,
Can you describe your common usecase and which feature in OData specification that this should be handling?
Ramesh..
________________________________
Hi Christian,
Ok. It means that we have to use our third-party de-/serializers for multipart/form-data. I was also wondering as to why Olingo doesn’t provide support for multipart/form-data, considering it is a common use case ☺ .
From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: Thursday, October 13, 2016 6:49 PM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hi Nishant,
the multipart/form-data format is not part of the OData specification thus Olingo does not provide out of the box de-/serializers.
Best Regards,
Christian
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Donnerstag, 13. Oktober 2016 07:22
To: Grande, Oliver <ol...@sap.com>>
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hi Oliver,
Thanks for the prompt reply. I saw this tutorial but this doesn’t solve my use case. I am basically using a bounded action and the request comes to processActionEntity(….) of ActionEntityProcessor interface. I was able to use multipart/form-data by implementing CustomContentTypeSupport interface and defining modifySupportedContentTypes(..).
The issue which remains now is that there is no in-built de-serializer for multipart/form-data. Does Olingo provide any deserializer for multipart/form-data that I am not aware of ?
Regards,
Nishant Gupta
From: Grande, Oliver [mailto:oliver.grande@sap.com]
Sent: Wednesday, October 12, 2016 6:51 PM
To: Gupta, Nishant.
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hello Nishant,
to be honest I haven’t done that yet, but I would have created a Media Entity, as described within the following tutorial: https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html. Or do you see a problem?
Regards,
Oliver
Oliver Grande
PI IC HC Clinical Decision Support DE
SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
E oliver.grande@sap.com<ma...@sap.com>
Pflichtangaben/Mandatory Disclosure Statement:
http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 12. Oktober 2016 10:47
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
Re: Adding Attachment in HTTP POST Request
Posted by Ramesh Reddy <ra...@redhat.com>.
Nishant,
Can you describe your common usecase and which feature in OData specification that this should be handling?
Ramesh..
----- Original Message -----
> Hi Christian,
> Ok. It means that we have to use our third-party de-/serializers for
> multipart/form-data. I was also wondering as to why Olingo doesn’t provide
> support for multipart/form-data, considering it is a common use case J .
> From: Amend, Christian [mailto:christian.amend@sap.com]
> Sent: Thursday, October 13, 2016 6:49 PM
> To: user@olingo.apache.org
> Subject: RE: Adding Attachment in HTTP POST Request
> Hi Nishant,
> the multipart/form-data format is not part of the OData specification thus
> Olingo does not provide out of the box de-/serializers.
> Best Regards,
> Christian
> From: Gupta, Nishant. [ mailto:nigupta@informatica.com ]
> Sent: Donnerstag, 13. Oktober 2016 07:22
> To: Grande, Oliver < oliver.grande@sap.com >
> Cc: user@olingo.apache.org
> Subject: RE: Adding Attachment in HTTP POST Request
> Hi Oliver,
> Thanks for the prompt reply. I saw this tutorial but this doesn’t solve my
> use case. I am basically using a bounded action and the request comes to
> processActionEntity(….) of ActionEntityProcessor interface. I was able to
> use multipart/form-data by implementing CustomContentTypeSupport interface
> and defining modifySupportedContentTypes(..).
> The issue which remains now is that there is no in-built de-serializer for
> multipart/form-data. Does Olingo provide any deserializer for
> multipart/form-data that I am not aware of ?
> Regards,
> Nishant Gupta
> From: Grande, Oliver [ mailto:oliver.grande@sap.com ]
> Sent: Wednesday, October 12, 2016 6:51 PM
> To: Gupta, Nishant.
> Cc: user@olingo.apache.org
> Subject: RE: Adding Attachment in HTTP POST Request
> Hello Nishant,
> to be honest I haven’t done that yet, but I would have created a Media
> Entity, as described within the following tutorial:
> https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html .
> Or do you see a problem?
> Regards,
> Oliver
> Oliver Grande
> PI IC HC Clinical Decision Support DE
> SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
> E oliver.grande@sap.com
> Pflichtangaben/Mandatory Disclosure Statement:
> http://www.sap.com/company/legal/impressum.epx
> Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige
> vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich
> erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine
> Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte
> benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
> Vielen Dank.
> This e-mail may contain trade secrets or privileged, undisclosed, or
> otherwise confidential information. If you have received this e-mail in
> error, you are hereby notified that any review, copying, or distribution of
> it is strictly prohibited. Please inform us immediately and destroy the
> original transmittal.
> Thank you for your cooperation
> From: Gupta, Nishant. [ mailto:nigupta@informatica.com ]
> Sent: Mittwoch, 12. Oktober 2016 10:47
> To: user@olingo.apache.org
> Subject: Adding Attachment in HTTP POST Request
> Hi,
> I was wondering how can we enable support for an attachment in HTTP POST Body
> using Olingo V4(Java). I want to know the changes which needs to be made
> both in metadata document and service implementation.
> It would be great if anyone can provide pointers regarding the same.
> Regards,
> Nishant Gupta
RE: Adding Attachment in HTTP POST Request
Posted by "Gupta, Nishant." <ni...@informatica.com>.
Hi Christian,
Ok. It means that we have to use our third-party de-/serializers for multipart/form-data. I was also wondering as to why Olingo doesn't provide support for multipart/form-data, considering it is a common use case :) .
From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: Thursday, October 13, 2016 6:49 PM
To: user@olingo.apache.org
Subject: RE: Adding Attachment in HTTP POST Request
Hi Nishant,
the multipart/form-data format is not part of the OData specification thus Olingo does not provide out of the box de-/serializers.
Best Regards,
Christian
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Donnerstag, 13. Oktober 2016 07:22
To: Grande, Oliver <ol...@sap.com>>
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hi Oliver,
Thanks for the prompt reply. I saw this tutorial but this doesn't solve my use case. I am basically using a bounded action and the request comes to processActionEntity(....) of ActionEntityProcessor interface. I was able to use multipart/form-data by implementing CustomContentTypeSupport interface and defining modifySupportedContentTypes(..).
The issue which remains now is that there is no in-built de-serializer for multipart/form-data. Does Olingo provide any deserializer for multipart/form-data that I am not aware of ?
Regards,
Nishant Gupta
From: Grande, Oliver [mailto:oliver.grande@sap.com]
Sent: Wednesday, October 12, 2016 6:51 PM
To: Gupta, Nishant.
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hello Nishant,
to be honest I haven't done that yet, but I would have created a Media Entity, as described within the following tutorial: https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html. Or do you see a problem?
Regards,
Oliver
Oliver Grande
PI IC HC Clinical Decision Support DE
SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
E oliver.grande@sap.com<ma...@sap.com>
Pflichtangaben/Mandatory Disclosure Statement:
http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 12. Oktober 2016 10:47
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
RE: Adding Attachment in HTTP POST Request
Posted by "Amend, Christian" <ch...@sap.com>.
Hi Nishant,
the multipart/form-data format is not part of the OData specification thus Olingo does not provide out of the box de-/serializers.
Best Regards,
Christian
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Donnerstag, 13. Oktober 2016 07:22
To: Grande, Oliver <ol...@sap.com>
Cc: user@olingo.apache.org
Subject: RE: Adding Attachment in HTTP POST Request
Hi Oliver,
Thanks for the prompt reply. I saw this tutorial but this doesn't solve my use case. I am basically using a bounded action and the request comes to processActionEntity(....) of ActionEntityProcessor interface. I was able to use multipart/form-data by implementing CustomContentTypeSupport interface and defining modifySupportedContentTypes(..).
The issue which remains now is that there is no in-built de-serializer for multipart/form-data. Does Olingo provide any deserializer for multipart/form-data that I am not aware of ?
Regards,
Nishant Gupta
From: Grande, Oliver [mailto:oliver.grande@sap.com]
Sent: Wednesday, October 12, 2016 6:51 PM
To: Gupta, Nishant.
Cc: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Adding Attachment in HTTP POST Request
Hello Nishant,
to be honest I haven't done that yet, but I would have created a Media Entity, as described within the following tutorial: https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html. Or do you see a problem?
Regards,
Oliver
Oliver Grande
PI IC HC Clinical Decision Support DE
SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
E oliver.grande@sap.com<ma...@sap.com>
Pflichtangaben/Mandatory Disclosure Statement:
http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 12. Oktober 2016 10:47
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
RE: Adding Attachment in HTTP POST Request
Posted by "Gupta, Nishant." <ni...@informatica.com>.
Hi Oliver,
Thanks for the prompt reply. I saw this tutorial but this doesn't solve my use case. I am basically using a bounded action and the request comes to processActionEntity(....) of ActionEntityProcessor interface. I was able to use multipart/form-data by implementing CustomContentTypeSupport interface and defining modifySupportedContentTypes(..).
The issue which remains now is that there is no in-built de-serializer for multipart/form-data. Does Olingo provide any deserializer for multipart/form-data that I am not aware of ?
Regards,
Nishant Gupta
From: Grande, Oliver [mailto:oliver.grande@sap.com]
Sent: Wednesday, October 12, 2016 6:51 PM
To: Gupta, Nishant.
Cc: user@olingo.apache.org
Subject: RE: Adding Attachment in HTTP POST Request
Hello Nishant,
to be honest I haven't done that yet, but I would have created a Media Entity, as described within the following tutorial: https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html. Or do you see a problem?
Regards,
Oliver
Oliver Grande
PI IC HC Clinical Decision Support DE
SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
E oliver.grande@sap.com<ma...@sap.com>
Pflichtangaben/Mandatory Disclosure Statement:
http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 12. Oktober 2016 10:47
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
RE: Adding Attachment in HTTP POST Request
Posted by "Grande, Oliver" <ol...@sap.com>.
Hello Nishant,
to be honest I haven't done that yet, but I would have created a Media Entity, as described within the following tutorial: https://olingo.apache.org/doc/odata4/tutorials/media/tutorial_media.html. Or do you see a problem?
Regards,
Oliver
Oliver Grande
PI IC HC Clinical Decision Support DE
SAP SE Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
E oliver.grande@sap.com
Pflichtangaben/Mandatory Disclosure Statement:
http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation
From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 12. Oktober 2016 10:47
To: user@olingo.apache.org
Subject: Adding Attachment in HTTP POST Request
Hi,
I was wondering how can we enable support for an attachment in HTTP POST Body using Olingo V4(Java). I want to know the changes which needs to be made both in metadata document and service implementation.
It would be great if anyone can provide pointers regarding the same.
Regards,
Nishant Gupta
Re: Adding Attachment in HTTP POST Request
Posted by Ramesh Reddy <ra...@redhat.com>.
The specification does not require any payload to be sent as attachment AFAIK, are you trying to extend your service in custom ways for your usecase? If yes, you need to do something similar to http://stackoverflow.com/questions/1378920/how-can-i-make-a-multipart-form-data-post-request-using-java
Ramesh..
----- Original Message -----
> Hi,
> I was wondering how can we enable support for an attachment in HTTP POST Body
> using Olingo V4(Java). I want to know the changes which needs to be made
> both in metadata document and service implementation.
> It would be great if anyone can provide pointers regarding the same.
> Regards,
> Nishant Gupta