on 06-16-2013 5:41 AM
Hi all,
I have written an OData service which is not stable. I am using a set of URLs which I just copy and paste into the address bar. In most cases, the services work fine but sometimes I get the following error:
The following error message is shown on the HTML page: Resource not found for the segment
And the Gateway Error log transaction shows this error: Resource mobile_orders('000000819740') not defined in Metadata
After a while, I can use the same URL which was causing an error and all over sudden it is working again.
Any recommendation how to fix that issue?
Many thanks for your help.
Regards,
Andreas
Hi Andreas ,
I am not familiar with problem just giving some guess suggestion ....
Try to De-activate the metadata Cache and then play with this request
http://help.sap.com/saphelp_gateway20sp03/helpdata/en/3d/45e259b4bd49e197316cbfd3c7fa8e/content.htm
Regards,
Jibin Joy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jibin Joy,
I followed your instruction but it did solve the issue.
I assume that my problem is caused by an encoding issue.
The following request is valid:
http://<host>.com:8000/sap/opu/odata/sap/LLG_SAP_PM_INTEGRATION/mobile_orders(%27000000819740%27)
Many thanks for your help.
Andreas
Can you share the complete URI (after masking host and port)? Also the metadata document can help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have just seen that error if I try to call a single order given by its order ID.
This is URL works fine:
http://<host>:8000/sap/opu/odata/sap/LLG_SAP_PM_INTEGRATION/mobile_orders('000000819740')
The following URLs fails:
http://<host>:8000/sap/opu/odata/sap/LLG_SAP_PM_INTEGRATION/mobile_orders%28%27819740%27%29
The metadata definition for an order looks like:
<EntityType Name="mobile_order" sap:content-version="1"> | |
<Key> | |
<PropertyRef Name="orderid"/> | |
</Key> | |
<Property Name="person" Type="Edm.Int16" Nullable="false" sap:label="Int2"/> | |
<Property Name="ref_equipment" Type="Edm.String" Nullable="false" MaxLength="18"/> | |
<Property Name="ref_funcloc" Type="Edm.String" Nullable="false" MaxLength="30"/> | |
<Property Name="description" Type="Edm.String" Nullable="false" MaxLength="40"/> | |
<Property Name="orderid" Type="Edm.String" Nullable="false" MaxLength="12"/> | |
<NavigationProperty Name="mobile_equipment" Relationship="LLG_SAP_PM_INTEGRATION.mobile_ordermobile_equipment" FromRole="FromRole_mobile_ordermobile_equipment" ToRole="ToRole_mobile_ordermobile_equipment"/> | |
<NavigationProperty Name="mobile_operation" Relationship="LLG_SAP_PM_INTEGRATION.mobile_ordermobile_operation" FromRole="FromRole_mobile_ordermobile_operation" ToRole="ToRole_mobile_ordermobile_operation"/> | |
<NavigationProperty Name="mobile_funcloc" Relationship="LLG_SAP_PM_INTEGRATION.order_funclo" FromRole="FromRole_order_funclo" ToRole="ToRole_order_funclo"/> | |
</EntityType> |
As you can see, the length of the order ID is limited to 12 characters. I have done that because the number range of the SAP order is defined by 12 characters. The client should not be able to provide a longer ID.
Is the metadata file used to validate the incoming message?
I set an external break point in my RFC which should be called. If the request fails as described above the RFC is never called.
Using this mobile_orders%28%27000000819740%27%29, is it possible that the actual length is based on '%28%27000000819740%27%29 so that the number of characters is bigger than the defined max length of the property?
Many thanks for your help.
Andreas
Andreas,
"Resource not found" error comes mostly because system is not able to identify a Collection with name mobile_orders.
Are you sure that is name of your collection? . Is there a typo?
I do not see name of the collection in the above post.
Thanks
Krishna
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.