{"id":273,"date":"2020-05-25T17:50:06","date_gmt":"2020-05-25T08:50:06","guid":{"rendered":"http:\/\/www.kis-corp.co.jp\/BBS\/?p=273"},"modified":"2020-11-23T21:30:35","modified_gmt":"2020-11-23T12:30:35","slug":"sap-odata%e3%81%a8%e3%81%af","status":"publish","type":"post","link":"https:\/\/www.kis-corp.co.jp\/BBS\/archives\/273","title":{"rendered":"SAP OData\u3068\u306f"},"content":{"rendered":"\n<p>OData\u3063\u3066\u4f55\uff1f OData\u306f\u6b63\u5f0f\u540d\u79f0\u3092\u201dOpen Data Protocol\u201d\u3068\u8a00\u3063\u3066\u3001RESTful\u306aWebAPI\uff08Web\u30b5\u30fc\u30d3\u30b9\uff09\u30d7\u30ed\u30c8\u30b3\u30eb\u3067\u3059\u3002Microsoft\u4e3b\u5c0e\u3067\u7b56\u5b9a\u3055\u308c\u305f\u3082\u306e\u3067\u3059\u304c\u3001OASIS\u3068ISO\u3067\u6a19\u6e96\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002 API\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u3068\u304b\u3001API\u30a8\u30b3\u30ce\u30df\u30fc\u3068\u3044\u3063\u305f\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u98db\u3073\u4ea4\u3046\u6628\u4eca\u3001\u4eca\u5f8c\u91cd\u8981\u306b\u306a\u308b\u3082\u306e\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002 \u300eRESTful\u300f\u3068\u306f\u3001\u7c21\u5358\u306b\u8a00\u3063\u3066\u4ee5\u4e0b\u306e\u56db\u3064\u306e\u539f\u5247\u3092\u6301\u3064\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002  \uff08\u8a73\u7d30\u306f\u5225\u8a18\u4e8b\u306b\u8b72\u308a\u307e\u3059\uff09 \u2022Addressability \u2192 \u3069\u306e\u30c7\u30fc\u30bf\u3082\u4e00\u610f\u306aURI\u8868\u73fe\u304c\u53ef\u80fd \u2022Stateless \u2192 \u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u72b6\u614b\u7ba1\u7406\uff08EC\u30b5\u30a4\u30c8\u306e\u30ab\u30fc\u30c8\u7b49\uff09\u306a\u3069\u306b\u4f9d\u5b58\u3057\u306a\u3044 \u2022Connectability \u2192 \u60c5\u5831\u3068\u60c5\u5831\u3092\u30ea\u30f3\u30af\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b \u2022Uniform Interface \u2192 \u60c5\u5831\u306e\u64cd\u4f5c\u306fHTTP\u30e1\u30bd\u30c3\u30c9\uff08GET,POST,PUT,DELETE..\uff09\u3092\u5229\u7528 \u30c7\u30fc\u30bf\u306e\u53d6\u5f97 \u89e6\u3063\u3066\u307f\u308b\u306b\u306f\u3001OData\u306e\u30b5\u30a4\u30c8\u3092\u8a2a\u308c\u3066\u307f\u307e\u3059\u3002 Developers\u30bf\u30d6\u306e\u201dReference Service\u201d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30b5\u30f3\u30d7\u30eb\u5229\u7528\u3067\u304d\u308bOData\u30b5\u30fc\u30d3\u30b9\u306e\u7d39\u4ecb\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 2017\u5e747\u6708\u73fe\u5728\u3001\u6700\u65b0\u4ed5\u69d8\u30d0\u30fc\u30b8\u30e7\u30f3\u306fv4\u3067\u30b5\u30f3\u30d7\u30eb\u306f\u4e00\u3064\u3060\u3051\u3067\u3059\u304c\u3001v2,v3\u3067\u306f\u3044\u304f\u3064\u304b\u306e\u30b5\u30f3\u30d7\u30eb\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u305b\u3063\u304b\u304f\u306a\u306e\u3067v4\u306eTripPin\u30b5\u30fc\u30d3\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002  \u82f1\u8a9e\u3067\u3059\u304c\u3001\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\uff08Basic Usage\uff09\u304c\u3053\u306e\u30da\u30fc\u30b8\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u8a18\u8f09\u3055\u308c\u3066\u3044\u308bURL\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308c\u3070\u3059\u3050\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 \u307e\u305f\u306f\u3001Developers\u30bf\u30d6\u306e\u201dGetting Started\u201d\u304b\u3089Understand OData in 6steps\u3068\u3044\u3046\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002  \uff08\u5168\u30da\u30fc\u30b8\u82f1\u8a9e\u3067\u3059\u304c\u3001\u6700\u8fd1\u306fGoogle\u7ffb\u8a33\u306e\u6027\u80fd\u304c\u5411\u4e0a\u3057\u3066\u3044\u308b\u306e\u3067\u82e6\u306b\u306a\u3089\u306a\u3044\u3067\u3059\u3088\u306d\uff01\u7b11\uff09 \u30e1\u30bf\u30c7\u30fc\u30bf OData\u3067\u306f\u3001\u63d0\u4f9b\u3055\u308c\u308b\u30b5\u30fc\u30d3\u30b9\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 OData\u30b5\u30fc\u30d3\u30b9\u306eURL\u306b\u201d$metadata\u201d\u3068\u4ed8\u4e0e\u3059\u308b\u3060\u3051\u3067\u3059\u3002   http:\/\/services.odata.org\/TripPinRESTierService\/$metadata 1  http:\/\/services.odata.org\/TripPinRESTierService\/$metadata     OData\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\uff08\u2252\u95a2\u9023\u60c5\u5831\uff09\u306b\u306f\u3001OData\u30b5\u30fc\u30d3\u30b9\u3067\u53d6\u5f97\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306e\u69cb\u9020\u3084\u95a2\u4fc2\u6027\u3001\u7279\u6b8a\u306a\u547c\u3073\u51fa\u3057\u304c\u5fc5\u8981\u306aAPI\u306a\u3069\u306e\u60c5\u5831\u304cXML\u5f62\u5f0f\u3067\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002  \u4ee5\u4e0b\u3001\u4e0a\u8a18URL\u3067\u8868\u793a\u3055\u308c\u308b\u30e1\u30bf\u30c7\u30fc\u30bf\u306eXML\u30bf\u30b0\u3092\u9806\u306b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002           1 2 3               \u4e00\u884c\u76ee\u306b\u3001\u3053\u308c\u304b\u3089\u8a18\u8f09\u3059\u308bXML\u306e\u30b9\u30ad\u30fc\u30de\uff08\u2252\u8a18\u8ff0\u30eb\u30fc\u30eb\uff09\u3092\u5ba3\u8a00\u3057\u3066\u3044\u307e\u3059\u3002OData\u306ev4\u3067\u3059\u306d\u3002 Edmx\u306f\u201dEntity Data Model\u201d+XML(Schema)\u306e\u982d\u6587\u5b57\u3068\u601d\u308f\u308c\u307e\u3059\u3002 DataServices\u3067OData\u30b5\u30fc\u30d3\u30b9\u672c\u4f53\u306e\u5ba3\u8a00\u3092\u3001Schema\u3067\u3053\u308c\u304b\u3089\u8a18\u8f09\u3059\u308bOData\u30b5\u30fc\u30d3\u30b9\u69cb\u9020\u306e\u6982\u5ff5\u3067\u3042\u308b\u3053\u3068\u3001\u5404\u7a2e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d\u7a7a\u9593\uff08\u540d\u79f0\u9818\u57df\uff09\u3092Namespace\u3067\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002  \uff08\u5404\u7a2e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u540c\u540d\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u53d6\u308a\u9055\u3048\u3092\u907f\u3051\u308b\u305f\u3081 \u201cMicrosoft.OData.Service.Sample.TrippinInMemory.Models\u201d\u3068\u3044\u3046\u540d\u524d\u3067\u4fee\u98fe\u3055\u308c\u307e\u3059\uff09                 \uff08\u4e2d\u7565\uff09    1 2 3 4 5 6 7 8                 \uff08\u4e2d\u7565\uff09        EntityType\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u9020\u306e\u5ba3\u8a00\u3067\u3001SQL\u3067\u8a00\u3048\u3070\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002 Key\u306f\u4e3b\u30ad\u30fc\u3092\u3001Property\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30e1\u30f3\u30d0\u5b9a\u7fa9\u3001NavigationProperty\u306f\u5225\u306e\u69cb\u9020\u3092\u30e1\u30f3\u30d0\u3068\u3057\u3066\u6301\u3064\u3053\u3068\u306e\u5ba3\u8a00\u3068\u306a\u308a\u307e\u3059\u3002 \u3053\u3053\u3067\u306fTrip\u3068\u3044\u3046\u540d\u524d\uff08\u201d\uff5eModels.\u201d\u307e\u3067\u306f\u540d\u524d\u7a7a\u9593\uff09\u3067\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u6301\u3064\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002  \uff08PropertyRef\u306f\u3001Property\u3067\u5b9a\u7fa9\u3057\u305f\u30e1\u30f3\u30d0\u306e\u53c2\u7167\u3092\u793a\u3057\u307e\u3059\uff09         \uff08\u4e2d\u7565\uff09          1 2 3 4 5 6 7 8 9 10         \uff08\u4e2d\u7565\uff09              \u901a\u5e38\u3001\u30e1\u30f3\u30d0\u306e\u578b\u306fEDM\u3067\u3042\u3089\u304b\u3058\u3081\u5b9a\u7fa9\u3055\u308c\u305f\u3082\u306e\uff08\u4f8b\u2026\u6587\u5b57\u5217\u578b\uff1aEdm.String\uff0f\u6570\u5024\u578b\uff1aEdm.Int32 etc\uff09\u3092\u4f7f\u7528\u3057\u307e\u3059\u304c\u3001ComplexType\u5ba3\u8a00\u3092\u4f7f\u7528\u3057\u3066\u8907\u6570\u306e\u578b\u306e\u7d44\u307f\u5408\u308f\u305b\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u305f\u308a\u3001EnumType\u3092\u6307\u5b9a\u3057\u3066\u3068\u308a\u5f97\u308b\u5024\u3092\u3042\u3089\u304b\u3058\u3081\u6c7a\u3081\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306fLocation\u3068\u3044\u3046\u201d\u4f4f\u6240\u30c7\u30fc\u30bf\u201d\u306e\u69cb\u9020\u3092ComplexType\u3067\u5b9a\u7fa9\u3057\u3001\u4eba\u3084\u7a7a\u6e2f\u306e\u30e1\u30f3\u30d0\u3068\u3057\u3066\u8907\u6570\u500b\u6240\u3067\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002City\u306f\u66f4\u306a\u308b\u5225\u69cb\u9020\u306e\u53c2\u7167\u3067\u3059\u3002\u307e\u305fPersonGender=\u6027\u5225\u3068\u3044\u3046\u5217\u6319\u578b\u3092\u5b9a\u7fa9\u3057\u3001\u898f\u5b9a\u5024\u4ee5\u5916\u304c\u5165\u3089\u306a\u3044\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002         1 2 3             \u3053\u308c\u307e\u3067\u306f\u3053\u306eOData\u30b5\u30fc\u30d3\u30b9\u306e\u4e2d\u3067\u6271\u3046\u30c7\u30fc\u30bf\u306a\u3069\u306e\u69cb\u9020\u306e\u5b9a\u7fa9\u3067\u3057\u305f\u304c\u3001EntityContainer\u30bf\u30b0\u5185\u306f\u5b9f\u969b\u306bAPI\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u4e0b\u306bURL\u3068\u3057\u3066\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u5b9a\u7fa9\u3068\u306a\u308a\u307e\u3059\u3002 EntitySet\u306f\u3001EntityType\u3067\u5b9a\u7fa9\u3057\u305f\u69cb\u9020\u3092\u6301\u3064\u30c7\u30fc\u30bf\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3082\u306e\u3067\u3001 \u30c7\u30fc\u30bf\u69cb\u9020\u306e\u540d\u524d\u304c\u201dPerson\u201d\u3067\u3042\u3063\u305f\u3068\u3053\u308d\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u306f\u201dPeople\u201d\uff08\u8907\u6570\u5f62\uff09\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002  \u5185\u90e8\u3067\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u305f\u5225\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u53c2\u7167\u540d\u3082\u201dFriends\u201d\uff08\u69cb\u9020\u306fPerson\u3068\u540c\u3058\uff09\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u3088\u3046\u306b\u3001XML\u3092\u898b\u6163\u308c\u306a\u3044\u4eba\u306b\u306f\u7406\u89e3\u3057\u3065\u3089\u3044\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u304c\u3001  \u4e00\u3064\u4e00\u3064\u7d10\u89e3\u3044\u3066\u3044\u3051\u3070OData\u3067\u4f55\u3092\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30c4\u30fc\u30eb \u57fa\u672c\u7684\u306b\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\u3060\u3051\u3067\u3042\u308c\u3070\u3001\u901a\u5e38\u306eWeb\u30d6\u30e9\u30a6\u30b6\u306e\u30a2\u30c9\u30ec\u30b9\u6b04\u3060\u3051\u3067\u4e8b\u8db3\u308a\u307e\u3059\u304c\u3001 OData\u306f\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\uff08=READ\uff09\u3060\u3051\u3067\u306a\u304f\u66f4\u65b0\uff08=CREATE\/UPDATE\/DELETE\uff09\u3082\u53ef\u80fd\u3067\u3059\u3002  \u4eca\u56de\u53c2\u7167\u3057\u305fOData\u30b5\u30fc\u30d3\u30b9\uff08TripPin\uff09\u3082\u8aad\u307f\u66f8\u304d\u53ef\u80fd\u306a\u306e\u3067\u3059\u304c\u3001\u66f4\u65b0API\u306e\u30c6\u30b9\u30c8\u306b\u306fREST\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30c4\u30fc\u30eb\u304c\u4fbf\u5229\u3067\u3059\u3002 odata.org\u3067\u306fPOSTMAN\u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u63a8\u5968\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002 Windows\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u3082\u5b58\u5728\u3057\u307e\u3059\u304c\u3001Web\u30d6\u30e9\u30a6\u30b6\u306bChrome\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30a2\u30c9\u30aa\u30f3\uff08Chrome\u30a2\u30d7\u30ea\uff09\u3068\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002  \u662f\u975e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066OData\uff08WebAPI\uff09\u306b\u6163\u308c\u89aa\u3057\u3093\u3067\u304f\u3060\u3055\u3044\u306d\u3002  \uff08\u4f59\u8ac7\u3067\u3059\u304c\u3001Google\u306fWindows\u306eChrome\u30a2\u30d7\u30ea\u8ffd\u52a0\u6a5f\u80fd\u30922018\u5e74\u307e\u3067\u306b\u6bb5\u968e\u7684\u306b\u7d42\u4e86\u3055\u305b\u308b\u305d\u3046\u3067\u3059\u3002Windows\u3067\u306e\u958b\u767a\u8005\u306f\u56f0\u308a\u307e\u3059\u3088\u306d\u3002\u3002\u3002\uff09 <\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-wordpress\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"0zrS6Yqf3O\"><a href=\"https:\/\/sapyard.com\/odata-and-sap-netweaver-gateway-part-ii-create-your-first-odata-service\/\">OData and SAP Netweaver Gateway. Part II. Create your first OData Service<\/a><\/blockquote><iframe title=\"&#8220;OData and SAP Netweaver Gateway. Part II. Create your first OData Service&#8221; &#8212; \" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/sapyard.com\/odata-and-sap-netweaver-gateway-part-ii-create-your-first-odata-service\/embed\/#?secret=0zrS6Yqf3O\" data-secret=\"0zrS6Yqf3O\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><figcaption><br><\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>OData\u3063\u3066\u4f55\uff1f OData\u306f\u6b63\u5f0f\u540d\u79f0\u3092\u201dOpen Data Protocol\u201d\u3068\u8a00\u3063\u3066\u3001RESTful\u306aWebAPI\uff08Web\u30b5\u30fc\u30d3\u30b9\uff09\u30d7\u30ed\u30c8\u30b3\u30eb\u3067\u3059\u3002Microsoft\u4e3b\u5c0e\u3067\u7b56\u5b9a\u3055\u308c\u305f\u3082\u306e\u3067\u3059\u304c\u3001OASIS\u3068ISO\u3067 &hellip; <a href=\"https:\/\/www.kis-corp.co.jp\/BBS\/archives\/273\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">SAP OData\u3068\u306f<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/posts\/273"}],"collection":[{"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":2,"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"predecessor-version":[{"id":330,"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/posts\/273\/revisions\/330"}],"wp:attachment":[{"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kis-corp.co.jp\/BBS\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}