You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Grass Crm <gr...@yahoo.com> on 2014/09/15 15:07:59 UTC

Issue about "POST" method of function import

Hi All,
 
I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with “POST” method, but always doesn’t work, the following is the Java code and client code:
 
JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type = Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final String json) {
   return "checkATX";
}
 
Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json
content-Type: application/json
 
raw data:
{"json": "{\"name\":\"odata\"}"}
 
 
Error Message:
“Messing Parameter”.
 
 
Do you have any good solution or suggestion for this issue?
 
Best Regards,
Sam Dai

Re: Issue about "POST" method of function import

Posted by mibo <mi...@apache.org>.
Hi All,

yes, parameters for a Service Operation (Function Import) must be passed via URL.

@Chandan: Nothing to correct  ;o)

Kind regards,
Michael

Am 20.09.2014 um 09:06 schrieb V.A, Chandan <ch...@sap.com>:

> Hello Simon,
> As Sam pointed out the function import parameters needs to be passed via URL - http://localhost:8080/test/odata.svc/checkATX?json=’{name:odata}’&$format=json
>  
> There is no support for HTTP POST on function import from Olingo. @Michael, please correct me if I am wrong.
>  
> Thanks,
> Kind Regards
> Chandan VA
>  
> From: Carroll, Simon [mailto:simon.carroll@capco.com] 
> Sent: Friday, September 19, 2014 9:01 PM
> To: user@olingo.apache.org; Grass Crm
> Cc: V.A, Chandan
> Subject: Re: Issue about "POST" method of function import
>  
> If you pass the parameters on the URL string the function import will work.  The Olingo code does not look inside the body of the request for request parameters.
>  
> I am not sure whether this is actually a bug or as per the OData specification.
>  
> http://www.odata.org/documentation/odata-version-2-0/operations/
>  
> 2.13 Invoking Service Operations
> 
> Service Operations expose custom behaviors that do not map to the uniform interface. Service operations can be defined to take parameters, which are simple scalar values of one of the EDM primitive types as defined in [OData-Core].
> 
> Clients may invoke a Service Operation by issuing an HTTP GET or POST request against their URI. If a particular Service Operation takes parameters they should be included as part of the query string in the request URI as described in the Addressing Service Operations section of [OData-URI]. The name of each parameter is used as the name of the query string parameter, and its value should be in OData literal form. No “$” prefix should be used in parameters (“$” is reserved for OData parameters).
> 
>  
>  
> On 17 September 2014 02:08, Grass Crm <gr...@yahoo.com> wrote:
> Hi Chandan,
> Can you help to check this issue and provide your comments? This issue is urgent for us, it blocks our work.
>  
> Thanks,
> Sam
>  
> 
> On Tuesday, September 16, 2014 1:24 PM, Grass Crm <gr...@yahoo.com> wrote:
>  
> 
> I have created a JIRA ticket https://issues.apache.org/jira/browse/OLINGO-432 to track this issue.
>  
> Thanks,
> Sam
>  
> 
> On Tuesday, September 16, 2014 12:29 PM, "Bolz, Michael" <mi...@sap.com> wrote:
>  
> 
> Hi Sam,
>  
> Unfortunately I'am no expert with the JPA extension in combination with @EdmFunctionImport.
> I think Chandan can help here more otherwise I suggest you open a JIRA Issue (https://issues.apache.org/jira/browse/OLINGO) so that I could check the issue by time.
>  
> Kind regards,
> Michael
>  
>  
> From: Grass Crm <gr...@yahoo.com>
> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
> Date: Montag, 15. September 2014 15:31
> To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Subject: Re: Issue about "POST" method of function import
>  
> Hi Michael,
> The version I use is OData2 2.0.0, and the extension is JPA.
>  
> Thanks,
> Sam
>  
> 
> On Monday, September 15, 2014 9:24 PM, "Bolz, Michael" <mi...@sap.com> wrote:
>  
> 
> Hello Sam Dai,
>  
> Could you please provide information about which version of Olingo library you are using and which extension (Java Annotations / JPA) you are use in combination with the "@EdmFunctionImport".
>  
> Kind regards,
> Michael
>  
>  
> From: Grass Crm <gr...@yahoo.com>
> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
> Date: Montag, 15. September 2014 15:07
> To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Subject: Issue about "POST" method of function import
>  
> Hi All,
>  
> I got a problem when I used the Apache Olingo as my OData Service library.
> I use the Function Import with “POST” method, but always doesn’t work, the following is the Java code and client code:
>  
> JAVA side code like below:
> @EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type = Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
> public String checkATX(@EdmFunctionImportParameter(name = "json") final String json) {
>    return "checkATX";
> }
>  
> Postman call the function import like this (By Chrome):
> http://localhost:8080/test/odata.svc/checkATX?$format=json
> content-Type: application/json
>  
> raw data:
> {"json": "{\"name\":\"odata\"}"}
>  
>  
> Error Message:
> “Messing Parameter”.
>  
>  
> Do you have any good solution or suggestion for this issue?
>  
> Best Regards,
> Sam Dai
>  
>  
> 
>  
> 
>  
> 
> 
> 
>  
> --
> 
> Simon Carroll
> Principal Consultant
> T: +44 (0) 7715 849003
> E: simon.carroll@capco.com
> The information in this email is confidential and is intended solely for the
> addressee(s). Access to this email by anyone else is unauthorized. If you are not
> an intended recipient, please notify the sender of this email immediately. You
> should not copy, use or disseminate the information contained in the email.
> Any views expressed in this message are those of the individual sender, except
> where the sender specifically states them to be the views of Capco.
> http://www.capco.com


RE: Issue about "POST" method of function import

Posted by "V.A, Chandan" <ch...@sap.com>.
Hello Simon,
As Sam pointed out the function import parameters needs to be passed via URL - http://localhost:8080/test/odata.svc/checkATX?json=’{name:odata}’&$format=json<http://localhost:8080/test/odata.svc/checkATX?json='%7bname:odata%7d'&$format=json>

There is no support for HTTP POST on function import from Olingo. @Michael, please correct me if I am wrong.

Thanks,
Kind Regards
Chandan VA

From: Carroll, Simon [mailto:simon.carroll@capco.com]
Sent: Friday, September 19, 2014 9:01 PM
To: user@olingo.apache.org; Grass Crm
Cc: V.A, Chandan
Subject: Re: Issue about "POST" method of function import

If you pass the parameters on the URL string the function import will work.  The Olingo code does not look inside the body of the request for request parameters.

I am not sure whether this is actually a bug or as per the OData specification.

http://www.odata.org/documentation/odata-version-2-0/operations/

2.13 Invoking Service Operations

Service Operations expose custom behaviors that do not map to the uniform interface. Service operations can be defined to take parameters, which are simple scalar values of one of the EDM primitive types as defined in [OData-Core]<http://www.odata.org/documentation/odata-version-2-0/overview>.

Clients may invoke a Service Operation by issuing an HTTP GET or POST request against their URI. If a particular Service Operation takes parameters they should be included as part of the query string in the request URI as described in the Addressing Service Operations section of [OData-URI]<http://www.odata.org/documentation/odata-version-2-0/uri-conventions>. The name of each parameter is used as the name of the query string parameter, and its value should be in OData literal form. No “$” prefix should be used in parameters (“$” is reserved for OData parameters).


On 17 September 2014 02:08, Grass Crm <gr...@yahoo.com>> wrote:
Hi Chandan,
Can you help to check this issue and provide your comments? This issue is urgent for us, it blocks our work.

Thanks,
Sam

On Tuesday, September 16, 2014 1:24 PM, Grass Crm <gr...@yahoo.com>> wrote:

I have created a JIRA ticket https://issues.apache.org/jira/browse/OLINGO-432 to track this issue.

Thanks,
Sam

On Tuesday, September 16, 2014 12:29 PM, "Bolz, Michael" <mi...@sap.com>> wrote:

Hi Sam,

Unfortunately I'am no expert with the JPA extension in combination with @EdmFunctionImport.
I think Chandan can help here more otherwise I suggest you open a JIRA Issue (https://issues.apache.org/jira/browse/OLINGO) so that I could check the issue by time.

Kind regards,
Michael


From: Grass Crm <gr...@yahoo.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>, Grass Crm <gr...@yahoo.com>>
Date: Montag, 15. September 2014 15:31
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Issue about "POST" method of function import

Hi Michael,
The version I use is OData2 2.0.0, and the extension is JPA.

Thanks,
Sam

On Monday, September 15, 2014 9:24 PM, "Bolz, Michael" <mi...@sap.com>> wrote:

Hello Sam Dai,

Could you please provide information about which version of Olingo library you are using and which extension (Java Annotations / JPA) you are use in combination with the "@EdmFunctionImport".

Kind regards,
Michael


From: Grass Crm <gr...@yahoo.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>, Grass Crm <gr...@yahoo.com>>
Date: Montag, 15. September 2014 15:07
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Issue about "POST" method of function import

Hi All,

I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with “POST” method, but always doesn’t work, the following is the Java code and client code:

JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type = Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final String json) {
   return "checkATX";
}

Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json<https://mail.apptix.net/owa/redir.aspx?C=ZvJNM_rS4U-Wzyy2rvwWlGFkfb92pNFIVhVu7SKddiBGEGiijcF87Ak3AGaBP1DXMTFhu_fHbEo.&URL=http%3a%2f%2flocalhost%3a8080%2ftest%2fodata.svc%2fcheckATX%3f%24format%3djson>
content-Type: application/json

raw data:
{"json": "{\"name\":\"odata\"}"}


Error Message:
“Messing Parameter”.


Do you have any good solution or suggestion for this issue?

Best Regards,
Sam Dai







--
[https://innovate.mycapco.com/CapInTouch/imgs/signatureLogos/capco.png]

Simon Carroll
Principal Consultant
T: +44 (0) 7715 849003
E: simon.carroll@capco.com<ma...@capco.com>


The information in this email is confidential and is intended solely for the

addressee(s). Access to this email by anyone else is unauthorized. If you are not

an intended recipient, please notify the sender of this email immediately. You

should not copy, use or disseminate the information contained in the email.

Any views expressed in this message are those of the individual sender, except

where the sender specifically states them to be the views of Capco.

http://www.capco.com



Re: Issue about "POST" method of function import

Posted by "Carroll, Simon" <si...@capco.com>.
If you pass the parameters on the URL string the function import will work.
 The Olingo code does not look inside the body of the request for request
parameters.

I am not sure whether this is actually a bug or as per the OData
specification.

http://www.odata.org/documentation/odata-version-2-0/operations/

2.13 Invoking Service Operations

Service Operations expose custom behaviors that do not map to the uniform
interface. Service operations can be defined to take parameters, which are
simple scalar values of one of the EDM primitive types as defined in
[OData-Core] <http://www.odata.org/documentation/odata-version-2-0/overview>
.

Clients may invoke a Service Operation by issuing an HTTP GET or POST
request against their URI. *If a particular Service Operation takes
parameters they should be included as part of the query string in the
request URI* as described in the Addressing Service Operations section of
[OData-URI]
<http://www.odata.org/documentation/odata-version-2-0/uri-conventions>. The
name of each parameter is used as the name of the query string parameter,
and its value should be in OData literal form. No “$” prefix should be used
in parameters (“$” is reserved for OData parameters).


On 17 September 2014 02:08, Grass Crm <gr...@yahoo.com> wrote:

> Hi Chandan,
> Can you help to check this issue and provide your comments? This issue is
> urgent for us, it blocks our work.
>
> Thanks,
> Sam
>
>
>   On Tuesday, September 16, 2014 1:24 PM, Grass Crm <gr...@yahoo.com>
> wrote:
>
>
> I have created a JIRA ticket
> https://issues.apache.org/jira/browse/OLINGO-432 to track this issue.
>
> Thanks,
> Sam
>
>
>   On Tuesday, September 16, 2014 12:29 PM, "Bolz, Michael" <
> michael.bolz@sap.com> wrote:
>
>
> Hi Sam,
>
> Unfortunately I'am no expert with the JPA extension in combination with
> @EdmFunctionImport.
> I think Chandan can help here more otherwise I suggest you open a JIRA
> Issue (https://issues.apache.org/jira/browse/OLINGO) so that I could
> check the issue by time.
>
> Kind regards,
> Michael
>
>
> From: Grass Crm <gr...@yahoo.com>
> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <
> grasscrm@yahoo.com>
> Date: Montag, 15. September 2014 15:31
> To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Subject: Re: Issue about "POST" method of function import
>
> Hi Michael,
> The version I use is OData2 2.0.0, and the extension is JPA.
>
> Thanks,
> Sam
>
>
> On Monday, September 15, 2014 9:24 PM, "Bolz, Michael" <
> michael.bolz@sap.com> wrote:
>
>
> Hello Sam Dai,
>
> Could you please provide information about which version of Olingo library
> you are using and which extension (Java Annotations / JPA) you are use in
> combination with the "@EdmFunctionImport".
>
> Kind regards,
> Michael
>
>
> From: Grass Crm <gr...@yahoo.com>
> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <
> grasscrm@yahoo.com>
> Date: Montag, 15. September 2014 15:07
> To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Subject: Issue about "POST" method of function import
>
> Hi All,
>
> I got a problem when I used the Apache Olingo as my OData Service library.
> I use the Function Import with “POST” method, but always doesn’t work, the
> following is the Java code and client code:
>
> JAVA side code like below:
> @EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type =
> Type.*SIMPLE*, isCollection = *false*), httpMethod = HttpMethod.*POST*)
> *public* String checkATX(@EdmFunctionImportParameter(name = "json") final
> String json) {
>    return "checkATX";
> }
>
> Postman call the function import like this (By Chrome):
> http://localhost:8080/test/odata.svc/checkATX?$format=json
> <https://mail.apptix.net/owa/redir.aspx?C=ZvJNM_rS4U-Wzyy2rvwWlGFkfb92pNFIVhVu7SKddiBGEGiijcF87Ak3AGaBP1DXMTFhu_fHbEo.&URL=http%3a%2f%2flocalhost%3a8080%2ftest%2fodata.svc%2fcheckATX%3f%24format%3djson>
> content-Type: application/json
>
> raw data:
> {"json": "{\"name\":\"odata\"}"}
>
>
> Error Message:
> “Messing Parameter”.
>
>
> Do you have any good solution or suggestion for this issue?
>
> Best Regards,
> Sam Dai
>
>
>
>
>
>
>
>


-- 

Simon Carroll
Principal Consultant
T: +44 (0) 7715 849003
E: simon.carroll@capco.com

The information in this email is confidential and is intended solely for the
addressee(s). Access to this email by anyone else is unauthorized. If you are not
an intended recipient, please notify the sender of this email immediately. You
should not copy, use or disseminate the information contained in the email.
Any views expressed in this message are those of the individual sender, except
where the sender specifically states them to be the views of Capco.
http://www.capco.com


Re: Issue about "POST" method of function import

Posted by Grass Crm <gr...@yahoo.com>.
Hi Chandan,
Can you help to check this issue and provide your comments? This issue is urgent for us, it blocks our work.

Thanks,
Sam


On Tuesday, September 16, 2014 1:24 PM, Grass Crm <gr...@yahoo.com> wrote:
 


I have created a JIRA ticket https://issues.apache.org/jira/browse/OLINGO-432 to track this issue.

Thanks,
Sam


On Tuesday, September 16, 2014 12:29 PM, "Bolz, Michael" <mi...@sap.com> wrote:
 


Hi Sam,

Unfortunately I'am no expert with the JPA extension in combination with @EdmFunctionImport.
I think Chandan can help here more otherwise I suggest you open a JIRA Issue (https://issues.apache.org/jira/browse/OLINGO) so that I could check the issue by time.

Kind regards,
Michael


From:  Grass Crm <gr...@yahoo.com>
Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
Date:  Montag, 15. September 2014 15:31
To:  "user@olingo.apache.org" <us...@olingo.apache.org>
Subject:  Re: Issue about "POST" method of function import


Hi Michael,
The version I use is OData2 2.0.0, and the extension is JPA.

Thanks,
Sam


On Monday, September 15, 2014 9:24 PM, "Bolz, Michael" <mi...@sap.com> wrote:



Hello Sam Dai,

Could you please provide information about which version of Olingo library you are using and which extension (Java Annotations / JPA) you are use in combination with the "@EdmFunctionImport".

Kind regards,
Michael


From: Grass Crm <gr...@yahoo.com>
Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
Date: Montag, 15. September 2014 15:07
To: "user@olingo.apache.org" <us...@olingo.apache.org>
Subject: Issue about "POST" method of function import


Hi All,
 
I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with “POST” method, but always doesn’t work, the following is the Java code and client code:
 
JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type = Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final String json) {
   return "checkATX";
}
 
Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json
content-Type: application/json
 
raw data:
{"json": "{\"name\":\"odata\"}"}
 
 
Error Message:
“Messing Parameter”.
 
 
Do you have any good solution or suggestion for this issue?
 
Best Regards,
Sam Dai

Re: Issue about "POST" method of function import

Posted by Grass Crm <gr...@yahoo.com>.
I have created a JIRA ticket https://issues.apache.org/jira/browse/OLINGO-432 to track this issue.

Thanks,
Sam


On Tuesday, September 16, 2014 12:29 PM, "Bolz, Michael" <mi...@sap.com> wrote:
 


Hi Sam,

Unfortunately I'am no expert with the JPA extension in combination with @EdmFunctionImport.
I think Chandan can help here more otherwise I suggest you open a JIRA Issue (https://issues.apache.org/jira/browse/OLINGO) so that I could check the issue by time.

Kind regards,
Michael


From:  Grass Crm <gr...@yahoo.com>
Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
Date:  Montag, 15. September 2014 15:31
To:  "user@olingo.apache.org" <us...@olingo.apache.org>
Subject:  Re: Issue about "POST" method of function import


Hi Michael,
The version I use is OData2 2.0.0, and the extension is JPA.

Thanks,
Sam


On Monday, September 15, 2014 9:24 PM, "Bolz, Michael" <mi...@sap.com> wrote:



Hello Sam Dai,

Could you please provide information about which version of Olingo library you are using and which extension (Java Annotations / JPA) you are use in combination with the "@EdmFunctionImport".

Kind regards,
Michael


From: Grass Crm <gr...@yahoo.com>
Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
Date: Montag, 15. September 2014 15:07
To: "user@olingo.apache.org" <us...@olingo.apache.org>
Subject: Issue about "POST" method of function import


Hi All,
 
I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with “POST” method, but always doesn’t work, the following is the Java code and client code:
 
JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type = Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final String json) {
   return "checkATX";
}
 
Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json
content-Type: application/json
 
raw data:
{"json": "{\"name\":\"odata\"}"}
 
 
Error Message:
“Messing Parameter”.
 
 
Do you have any good solution or suggestion for this issue?
 
Best Regards,
Sam Dai

Re: Issue about "POST" method of function import

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Sam,

Unfortunately I'am no expert with the JPA extension in combination with
@EdmFunctionImport.
I think Chandan can help here more otherwise I suggest you open a JIRA Issue
(https://issues.apache.org/jira/browse/OLINGO) so that I could check the
issue by time.

Kind regards,
Michael


From:  Grass Crm <gr...@yahoo.com>
Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm
<gr...@yahoo.com>
Date:  Montag, 15. September 2014 15:31
To:  "user@olingo.apache.org" <us...@olingo.apache.org>
Subject:  Re: Issue about "POST" method of function import

Hi Michael,
The version I use is OData2 2.0.0, and the extension is JPA.

Thanks,
Sam


On Monday, September 15, 2014 9:24 PM, "Bolz, Michael"
<mi...@sap.com> wrote:


Hello Sam Dai,

Could you please provide information about which version of Olingo library
you are using and which extension (Java Annotations / JPA) you are use in
combination with the "@EdmFunctionImport".

Kind regards,
Michael


From: Grass Crm <gr...@yahoo.com>
Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm
<gr...@yahoo.com>
Date: Montag, 15. September 2014 15:07
To: "user@olingo.apache.org" <us...@olingo.apache.org>
Subject: Issue about "POST" method of function import

Hi All,
 
I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with ³POST² method, but always doesn¹t work, the
following is the Java code and client code:
 
JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type =
Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final
String json) {
   return "checkATX";
}
 
Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json
<https://mail.apptix.net/owa/redir.aspx?C=ZvJNM_rS4U-Wzyy2rvwWlGFkfb92pNFIVh
Vu7SKddiBGEGiijcF87Ak3AGaBP1DXMTFhu_fHbEo.&URL=http%3a%2f%2flocalhost%3a8080
%2ftest%2fodata.svc%2fcheckATX%3f%24format%3djson>
content-Type: application/json
 
raw data:
{"json": "{\"name\":\"odata\"}"}
 
 
Error Message:
³Messing Parameter².
 
 
Do you have any good solution or suggestion for this issue?
 
Best Regards,
Sam Dai






Re: Issue about "POST" method of function import

Posted by Grass Crm <gr...@yahoo.com>.
Hi Michael,
The version I use is OData2 2.0.0, and the extension is JPA.

Thanks,
Sam


On Monday, September 15, 2014 9:24 PM, "Bolz, Michael" <mi...@sap.com> wrote:
 


Hello Sam Dai,

Could you please provide information about which version of Olingo library you are using and which extension (Java Annotations / JPA) you are use in combination with the "@EdmFunctionImport".

Kind regards,
Michael


From:  Grass Crm <gr...@yahoo.com>
Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
Date:  Montag, 15. September 2014 15:07
To:  "user@olingo.apache.org" <us...@olingo.apache.org>
Subject:  Issue about "POST" method of function import


Hi All,
 
I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with “POST” method, but always doesn’t work, the following is the Java code and client code:
 
JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type = Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final String json) {
   return "checkATX";
}
 
Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json
content-Type: application/json
 
raw data:
{"json": "{\"name\":\"odata\"}"}
 
 
Error Message:
“Messing Parameter”.
 
 
Do you have any good solution or suggestion for this issue?
 
Best Regards,
Sam Dai

Re: Issue about "POST" method of function import

Posted by Grass Crm <gr...@yahoo.com>.
Hi Michael,
The version I use is OData2 2.0.0, and the extension is JPA.

Thanks,
Sam


On Monday, September 15, 2014 9:16 PM, "Bolz, Michael" <mi...@sap.com> wrote:
 


Hello Sam Dai,

Could you please provide information about which version of Olingo library you are using and which extension (Java Annotations / JPA) you are use in combination with the "@EdmFunctionImport".

Kind regards,
Michael


From:  Grass Crm <gr...@yahoo.com>
Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm <gr...@yahoo.com>
Date:  Montag, 15. September 2014 15:07
To:  "user@olingo.apache.org" <us...@olingo.apache.org>
Subject:  Issue about "POST" method of function import


Hi All,
 
I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with “POST” method, but always doesn’t work, the following is the Java code and client code:
 
JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type = Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final String json) {
   return "checkATX";
}
 
Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json
content-Type: application/json
 
raw data:
{"json": "{\"name\":\"odata\"}"}
 
 
Error Message:
“Messing Parameter”.
 
 
Do you have any good solution or suggestion for this issue?
 
Best Regards,
Sam Dai

Re: Issue about "POST" method of function import

Posted by "Bolz, Michael" <mi...@sap.com>.
Hello Sam Dai,

Could you please provide information about which version of Olingo library
you are using and which extension (Java Annotations / JPA) you are use in
combination with the "@EdmFunctionImport".

Kind regards,
Michael


From:  Grass Crm <gr...@yahoo.com>
Reply-To:  "user@olingo.apache.org" <us...@olingo.apache.org>, Grass Crm
<gr...@yahoo.com>
Date:  Montag, 15. September 2014 15:07
To:  "user@olingo.apache.org" <us...@olingo.apache.org>
Subject:  Issue about "POST" method of function import

Hi All,
 
I got a problem when I used the Apache Olingo as my OData Service library.
I use the Function Import with ³POST² method, but always doesn¹t work, the
following is the Java code and client code:
 
JAVA side code like below:
@EdmFunctionImport(name = "checkATX", returnType = @ReturnType(type =
Type.SIMPLE, isCollection = false), httpMethod = HttpMethod.POST)
public String checkATX(@EdmFunctionImportParameter(name = "json") final
String json) {
   return "checkATX";
}
 
Postman call the function import like this (By Chrome):
http://localhost:8080/test/odata.svc/checkATX?$format=json
<https://mail.apptix.net/owa/redir.aspx?C=ZvJNM_rS4U-Wzyy2rvwWlGFkfb92pNFIVh
Vu7SKddiBGEGiijcF87Ak3AGaBP1DXMTFhu_fHbEo.&URL=http%3a%2f%2flocalhost%3a8080
%2ftest%2fodata.svc%2fcheckATX%3f%24format%3djson>
content-Type: application/json
 
raw data:
{"json": "{\"name\":\"odata\"}"}
 
 
Error Message:
³Messing Parameter².
 
 
Do you have any good solution or suggestion for this issue?
 
Best Regards,
Sam Dai