[ 
https://issues.apache.org/jira/browse/OLINGO-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887706#comment-13887706
 ] 

Stephan Klevenz commented on OLINGO-140:
----------------------------------------

1) FunctionImports allow primitive parameter types and binary is a primitive 
type. Answer is yes.
2) All parameters have to be part of URL and with that size is limited. 
3) Olingo is working on client documentation 
(https://issues.apache.org/jira/browse/OLINGO-136). This will be published 
soon. For now see this code snipped:

  public Edm readEdm(String serviceUrl) throws IOException, ODataException {
    HttpURLConnection connection = connect("http://...service/$metadata";, 
"application/xml", "GET");
    return EntityProvider.readMetadata((InputStream) connection.getContent(), 
false);
  }

This works the same also for entries, feeds ...


> Function Import support for binary data
> ---------------------------------------
>
>                 Key: OLINGO-140
>                 URL: https://issues.apache.org/jira/browse/OLINGO-140
>             Project: Olingo
>          Issue Type: Question
>    Affects Versions: V2 1.0.0
>            Reporter: M Carissimi
>            Assignee: Stephan Klevenz
>
> Hello,
> I have created a FucntionImport for one of my EnityTypes which has a single 
> parameter of type Edm.Binary. This is how the FunctionImport is shown on the 
> metedata:
> <FunctionImport Name="Import_Readings" 
> ReturnType="esys_producer.ES_IMPORT_READINGS" EntitySet="ES_IMPORT_READINGS" 
> m:HttpMethod="POST">
> <Parameter Name="Import File" Type="Edm.Binary"/>
> </FunctionImport>
> I now need to create an OData consumer which is able to invoke the 
> FunctionImport. I have created an html form where a file can be uploaded 
> which then invokes a Java servlet. The servlet uses odata4j to connect to the 
> OData service and invokes the function. Unfortunately the odata4j library 
> does not allow to set the property type as a byte array, which is what would 
> be required for a Binary parameter.
> I now have a few questions:
> - is it OK to have Binary parameters in a FunctionImport?
> - when inoking a FunctionImport, do all the parameter values get set on the 
> URL? If so, will the limit on size of a URL stop us from sending a large 
> binary parameter to a FunctionImport?
> - how can I create a client similar to the one described above using the 
> Olingo library?
> Regards
> Miki



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to