{"action":"created","issue":{"url":"https://api.github.com/repos/SAF2/documentation/issues/45","labels_url":"https://api.github.com/repos/SAF2/documentation/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/SAF2/documentation/issues/45/comments","events_url":"https://api.github.com/repos/SAF2/documentation/issues/45/events","html_url":"https://github.com/SAF2/documentation/issues/45","id":96523298,"number":45,"title":"Help with SDI - how to call a capability","user":{"login":"vangelisv","id":51535,"avatar_url":"https://avatars.githubusercontent.com/u/51535?v=3","gravatar_id":"","url":"https://api.github.com/users/vangelisv","html_url":"https://github.com/vangelisv","followers_url":"https://api.github.com/users/vangelisv/followers","following_url":"https://api.github.com/users/vangelisv/following{/other_user}","gists_url":"https://api.github.com/users/vangelisv/gists{/gist_id}","starred_url":"https://api.github.com/users/vangelisv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vangelisv/subscriptions","organizations_url":"https://api.github.com/users/vangelisv/orgs","repos_url":"https://api.github.com/users/vangelisv/repos","events_url":"https://api.github.com/users/vangelisv/events{/privacy}","received_events_url":"https://api.github.com/users/vangelisv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-07-22T09:43:27Z","updated_at":"2015-07-24T07:58:40Z","closed_at":null,"body":"Hi, \r\nwe've created in Fispace EE, a test capability (id : 46) of an existing capability type (id:9).\r\n\r\nQuerying SDI (http://37.131.251.117:8080/sdi/api/capabilities/) we get correct XML: \r\n`...<capability>\r\n    <id>46</id>\r\n    <description>createFarm</description>\r\n    <uri>http://ifarma.agrostis.gr</uri>\r\n    <cte_id>9</cte_id>\r\n  </capability>...`\r\n\r\nWe try now to call this capability (POST to it from a client). In SDI documentation (FIspace-SDi-Tech.pdf, ed. 27-02-2015, page 15), it reads:\r\n>POST  /api/capabilities/{request_message}/(capabilityId) \r\n>i.e. request_message is “provide_weather_conditions”. This would be an example of a typical call of >a client that uses a specific capability of type “provide weather conditions”. The capabilityId is used to >define the specific implementation (i.e. the specific weather conditions provider) that should be used.\r\n\r\nWe query SDI http://37.131.251.117:8080/sdi/api/capability-types/9 (GET) to get \r\n\r\n    <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n    <capabilityType xmlns=\"http://www.limetri.eu/schemas/ygg\">\r\n      <id>9</id>\r\n      <name>provide advice</name>\r\n      <requestMessageType>ProvideAdviceRequestMessage</requestMessageType>\r\n      <responseMessageType>ProvideAdviceResponseMessage</responseMessageType>\r\n      <schemaLocation>classpath:/schema/domain/ag/AGMessages.xsd</schemaLocation>\r\n      <contextPath>eu.fispace.api.ag</contextPath>\r\n    </capabilityType>\r\n\r\nthus we try to call the capability by POSTting to \r\nhttp://37.131.251.117:8080/sdi/api/capabilities/ProvideAdviceRequestMessage/46 \r\nbut we get\r\n```\r\n<html>\r\n<head>\r\n   <title>Status page</title>\r\n</head>\r\n<body style=\"font-family: sans-serif;\">\r\n<p style=\"font-size: 1.2em;font-weight: bold;margin: 1em 0px;\">Not Found</p>\r\n<p>The server has not found anything matching the request URI</p>\r\n<p>You can get technical details <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5\">here</a>.<br>\r\nPlease continue your visit at our <a href=\"/\">home page</a>.\r\n</p>\r\n</body>\r\n</html>\r\n```\r\nAccording to https://bitbucket.org/fispace/phase3support/issues/21/test-sdi-issue-95-bitbucket-apps\r\nthe capability should be called with POST to http://37.131.251.117:8080/sdi/api/capabilities/{capabiliy description in lower case}/use\r\nStill, POSTing to http://37.131.251.117:8080/sdi/api/capabilities/createfarm/use we get again\r\n```\r\n<html>\r\n<head>\r\n   <title>Status page</title>\r\n</head>\r\n<body style=\"font-family: sans-serif;\">\r\n<p style=\"font-size: 1.2em;font-weight: bold;margin: 1em 0px;\">Not Found</p>\r\n<p>The server has not found anything matching the request URI</p>\r\n<p>You can get technical details <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5\">here</a>.<br>\r\nPlease continue your visit at our <a href=\"/\">home page</a>.\r\n</p>\r\n</body>\r\n</html>\r\n```\r\n\r\nCan you please HELP?\r\nAlso, I have is it possible to just call a capability (with a Request message) and get back the response fro the capability implementation (REST API) without involving a business process and the BCM? \r\n"},"comment":{"url":"https://api.github.com/repos/SAF2/documentation/issues/comments/124411301","html_url":"https://github.com/SAF2/documentation/issues/45#issuecomment-124411301","issue_url":"https://api.github.com/repos/SAF2/documentation/issues/45","id":124411301,"user":{"login":"vangelisv","id":51535,"avatar_url":"https://avatars.githubusercontent.com/u/51535?v=3","gravatar_id":"","url":"https://api.github.com/users/vangelisv","html_url":"https://github.com/vangelisv","followers_url":"https://api.github.com/users/vangelisv/followers","following_url":"https://api.github.com/users/vangelisv/following{/other_user}","gists_url":"https://api.github.com/users/vangelisv/gists{/gist_id}","starred_url":"https://api.github.com/users/vangelisv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vangelisv/subscriptions","organizations_url":"https://api.github.com/users/vangelisv/orgs","repos_url":"https://api.github.com/users/vangelisv/repos","events_url":"https://api.github.com/users/vangelisv/events{/privacy}","received_events_url":"https://api.github.com/users/vangelisv/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T07:58:40Z","updated_at":"2015-07-24T07:58:40Z","body":"I've seen previous versions of this code. Is there an example of a client USING a capability in a language other than java?\r\nAlso in the decoupled project, the backend is not really defining a capability. It is using a capability i.e. it is also a client. \r\nWe have a REST API, exposed at a URI, say http://agrostis.gr/someservice.php\r\nWe need to define a capabiity for this REST API and then USE this capability from a javascript client, POSTing a request message and receiving a Response.\r\nIs there an example of this?"}}