cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure aspect for custom rest end point CCV2

djboyd4715
Participant
0 Kudos
592
System: SAP Commerce Cloud on SAP Public Cloud ( CCV2 )V: v2105
Upgrade from 6.4 (CCV1) to V2105 CCV2
In our current production, we have created a custom webservice extension in which one gets to it in the following way:
https://my.domain.com/mycommercewebservices/v2/us/products/search
Now in CCV2 this is not working and I think it as to do with aspects.So I have tried the following by modifying the API aspect with:
{ "name" : "mycommercewebservices", "contextPath" : "/mycommercewebservices"}Switch over to using https://api.comain.com/mycommercewebservices/v2/us/products/search
I get a 404 error.

Any suggestions, help and/or direction on this as I seem to be missing some concepts of how the aspect is to be configured/working.

Accepted Solutions (0)

Answers (1)

Answers (1)

mansurarisoy
Contributor
0 Kudos

It should work if you give definitions in manifest.json correctly. (See example JSON below, I replaced unnecessary fields with ... for clarify reading)

{
  "commerceSuiteVersion": "1205",
  "extensionPacks": [
    ...
  ],
  "extensions": [
    ...
  ],
  "useConfig": {
    "properties": [
      ...
    ],
    "solr": {
      ...
    }
  },
  "storefrontAddons": [
    ...
  ],
  "properties": [
    ...
  ],
  "aspects": [
    {
      "name": "api",
      "properties": [
        ...
      ],
      "webapps": [
        {
          "name": "mycommercewebservices",
          "contextPath": "/mycommercewebservices"
        },
        ...
      ]
    },
    ...
  ]
}

If still doesn't work:

  • Check from HAC's extensions panel (/hac/platform/extensions) whether your extension is loaded
  • If it can be seen with correct contextPath from HAC, check for the startup logs which contains your extension name mycommercewebservices. There might be some configuration problem which prevents web context of the extension to be loaded correctly. Especially with Spring related issues prevents web context to be loaded correctly. Such issues do not prevent startup of the server, but specific web context only.

Hope this helps,

djboyd4715
Participant
0 Kudos

So I checked our CCV1:PROD/HAC and I can see under /hac/platform/extensions that the extension is loaded, it is in the WEB column.

But when looking at the same in CCV2, it would appear it is not loaded.

I do not see anything in the log file that indicates there was any type of error loading the extension.

Further digging required