[ 
https://issues.apache.org/jira/browse/OLINGO-932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Amend resolved OLINGO-932.
------------------------------------
    Resolution: Information Provided
      Assignee: Christian Amend

Hi Sagar,

the issue is not with the return type. The issue is with the following 
parameter type: <Parameter Name="InstanceData" Type="c4codata.Employee" 
Mode="Out"/>

OData V2 only supports simple types for parameters: 
"Type of the <Parameter> MUST be defined. Type MUST be an EDMSimpleType ..."
per specification complex types would be allowed as well but the specification 
does not say how those complex types have to appear within the URL so with 
Olingo V2 we only support simple types for function parameters.

Best Regards,
Chris

> Error while parsing $metadata (Edmx) string
> -------------------------------------------
>
>                 Key: OLINGO-932
>                 URL: https://issues.apache.org/jira/browse/OLINGO-932
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.6
>            Reporter: Sagar
>            Assignee: Christian Amend
>            Priority: Critical
>         Attachments: error.png, metadata.xml
>
>
> Hi,
> I am using the Apache olingo 2.0.6 library and I have come across following 
> issue.
> Apache olingo 2.0.6 library is not able to parse $metadata (Edmx) string when 
> FuntionImport returns a non Edm data type.
> For e.g. when $metadata has following function import which returns of custom 
> type c4codata.Employee 
>                 <FunctionImport Name="EmployeeByEmail" 
> ReturnType="c4codata.Employee" EntitySet="EmployeeCollection" 
> m:HttpMethod="GET">
>                     <Parameter Name="NumberOfRows" Type="Edm.String" 
> Mode="In"/>
>                     <Parameter Name="StartRow" Type="Edm.String" Mode="In"/>
>                     <Parameter Name="InstanceData" Type="c4codata.Employee" 
> Mode="Out"/>
>                     <Parameter Name="EMailURI" Type="Edm.String" Mode="In"/>
>                 </FunctionImport>
> I am getting below error while reading the metadata 
> (EntityProvider.readMetadata)
> No enum constant org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind.Employee.
> Find the attached stracetrace along with screenshot (indicates the exact 
> place of an error).
> Also I am attaching the $metadata contain in metadata.xml file, so that you 
> can reproduce this issue locally.
> I think as per odata specification FunctionImport can return any custom data 
> type and not just the primitive data types.
> Please me know if you believe that this is bug in olingo 2.0.6 libraries.
> Thanks,
> Sagar Biyani



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to