Hi Keong,

Thanks for the reply.

I put the  "service-id" and "service-description" in the request body, but it 
still have the same error:

2019-09-10T14:05:40.696+0000|9410da3b-48c2-4371-a313-87e8678e7fb1|qtp1219402581-201887|PUT
 
/aai/v13/service-design-and-creation/services/service/a61fef2b-61fa-40b7-bf03-d4db08d11eee|VFC-NFVO-LCM|DB|process
 PUT|ERROR|500|Internal Error:3002:Internal Server 
Error:java.lang.IndexOutOfBoundsException: Index: 0, Size: 
0|co=VFC-NFVO-LCM:java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 root 
cause=java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 ClassName- 
java.util.ArrayList :LineNumber- 657 :MethodName- rangeCheck ClassName- 
java.util.ArrayList :LineNumber- 433 :MethodName- get ClassName- 
org.onap.aai.rest.LegacyMoxyConsumer :LineNumber- 705 :MethodName- handleWrites 
ClassName- org.onap.aai.rest.LegacyMoxyConsumer :LineNumber- 114 :MethodName- 
update ClassName- sun.reflect.GeneratedMethodAccessor72 :LineNumber- -1 
:MethodName- invoke ClassName- sun.reflect.DelegatingMethodAccessorImpl 
:LineNumber- 43 :MethodName- invoke ClassName- java.lang.reflect.Method 
:LineNumber- 498 :MethodName- invoke ClassName- 
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1
 :LineNumber- 81 :MethodName- invoke ClassName- 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1
 :LineNumber- 144 :MethodName- run ClassName- 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher 
:LineNumber- 161 :MethodName- invoke


BR,
Yan

-----邮件原件-----
发件人: Keong Lim [mailto:[email protected]] 
发送时间: 2019年9月11日 8:48
收件人: Yan Yang; [email protected]
主题: Re: [onap-discuss] 答复: [AAI]When create service in A&AI get the 
IndexOutOfBoundsException

Hi Yan,

According to:
- 
https://nexus.onap.org/service/local/repositories/releases/archive/org/onap/aai/schema-service/aai-schema/1.5.1/aai-schema-1.5.1.jar/!/onap/aai_swagger_html/aai_swagger_v16.html#operation--service-design-and-creation-services-service--service-id--put
- 
https://nexus.onap.org/service/local/repositories/releases/archive/org/onap/aai/schema-service/aai-schema/1.5.1/aai-schema-1.5.1.jar/!/onap/aai_swagger_html/aai_swagger_v16.html#/definitions/service

The "service" object requires both a "service-id" and "service-description".

When doing the PUT, the "service-id" needs to be in both the URL and the 
request body, e.g.

curl -X PUT \
  
https://159.138.133.80:30233/aai/v13/service-design-and-creation/services/service/a61fef2b-61fa-40b7-bf03-d4db08d11eee
 \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic QUFJOkFBSQ==' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: fa571cde-0440-42ba-b9e0-a0387ea85732' \
  -H 'X-FromAppId: VFC-NFVO-LCM' \
  -H 'X-TransactionId: 9999' \
  -d '{
"service-id": "a61fef2b-61fa-40b7-bf03-d4db08d11eee",
"service-description":"service-description"
}'


Keong




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#18898): https://lists.onap.org/g/onap-discuss/message/18898
Mute This Topic: https://lists.onap.org/mt/34098799/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to