This repository contains documentation for the Open Smart Grid Platform project. This repository is built as a GitBook, therefore all content has to be written using markdown syntax. See the latest GitBook:
Owner is defined as optional Device parameter in DeviceInstallation IF, but when we try to create device without sending owner information, exception is thrown.
stacktrace from osgp-adapter-ws-core.log
2020-06-25 08:15:53.393] [dev-box] [ajp-nio-8009-exec-20] INFO o.o.a.w.e.WebServiceMonitorInterceptor@printSoapMessage:338 - soap message: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns3:FindDeviceModelResponse xml
ns:ns2="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/firmwaremanagement/2014/10" xmlns:ns4="http://www.opensmartgridplatform.org/schemas/devicemanagement/2014/10"><ns3:DeviceModel><ns3:Manufacturer>Iskr<
/ns3:Manufacturer><ns3:ModelCode>AM550T_GPRS</ns3:ModelCode><ns3:Description>AM550T_GPRS 3fase SMR 5.0.0 GPRS</ns3:Description><ns3:Metered>true</ns3:Metered></ns3:DeviceModel></ns3:FindDeviceModelResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
2020-06-25 08:15:53.524] [dev-box] [ajp-nio-8009-exec-14] INFO o.o.a.w.e.WebServiceMonitorInterceptor@printSoapMessage:338 - soap message: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header><OrganisationIdentification xmlns="http://www.op
ensmartgridplatform.org/schemas/common">test-org</OrganisationIdentification><ApplicationName xmlns="http://www.opensmartgridplatform.org/schemas/common">client-application</ApplicationName><UserName xmlns="http://www.opensmartgridplatform.org/schemas/common">client-application-use
r</UserName></SOAP-ENV:Header><SOAP-ENV:Body><ns2:AddDeviceRequest xmlns:ns2="http://www.opensmartgridplatform.org/schemas/deviceinstallation/2014/10" xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/2014/10" xmlns:ns4="http://www.opensmartgridplatform.org/schemas/dev
icemanagement/2014/10"><ns2:Device><ns2:DeviceIdentification>SSLD_OSIJEK_02</ns2:DeviceIdentification><ns2:Alias/><ns2:Owner/><ns2:Activated>false</ns2:Activated><ns2:HasSchedule>false</ns2:HasSchedule><ns2:PublicKeyPresent>false</ns2:PublicKeyPresent><ns2:DeviceModel><ns2:Manufact
urer>Iskr</ns2:Manufacturer><ns2:ModelCode>AM550T_GPRS</ns2:ModelCode></ns2:DeviceModel></ns2:Device></ns2:AddDeviceRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
2020-06-25 08:15:53.527] [dev-box] [ajp-nio-8009-exec-14] INFO o.o.a.w.c.e.DeviceInstallationEndpoint@addDevice:145 - Adding device: SSLD_OSIJEK_02.
2020-06-25 08:15:53.633] [dev-box] [ajp-nio-8009-exec-14] ERROR o.o.a.w.c.e.DeviceInstallationEndpoint@addDevice:154 - Exception: addDevice.ownerOrganisationIdentification: Invalid identification while adding device: SSLD_OSIJEK_02 for organisation test-org.
javax.validation.ConstraintViolationException: addDevice.ownerOrganisationIdentification: Invalid identification
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:117)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
at org.opensmartgridplatform.adapter.ws.core.application.services.DeviceInstallationService$$EnhancerBySpringCGLIB$$5fc6e3a3.addDevice(<generated>)
at org.opensmartgridplatform.adapter.ws.core.endpoints.DeviceInstallationEndpoint.addDevice(DeviceInstallationEndpoint.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.ws.server.endpoint.MethodEndpoint.invoke(MethodEndpoint.java:134)
at org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter.invokeInternal(DefaultMethodEndpointAdapter.java:291)
at org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter.invoke(AbstractMethodEndpointAdapter.java:55)
at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:236)
at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:176)
at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:89)
at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:61)
at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:293)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at psiprobe.Tomcat90AgentValve.invoke(Tomcat90AgentValve.java:35)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
When owner information is provided in the request, device is created successfully.
Owner is defined as optional Device parameter in DeviceInstallation IF, but when we try to create device without sending owner information, exception is thrown.
stacktrace from osgp-adapter-ws-core.log
When owner information is provided in the request, device is created successfully.