├── .gitignore ├── Procfile ├── tests ├── probe_wsd.sh ├── invoke.sh ├── PullPointSubscription_PullMessages.xml ├── PullPointSubscription_unsubscribe.xml ├── getdns.xml ├── Media_getvideosources.xml ├── Media_getprofiles.xml ├── device_service_GetCapabilities.xml ├── device_service_getUsers.xml ├── device_service_GetDeviceInformation.xml ├── device_service_GetNetworkInterfaces.xml ├── device_service_getNetworkInterfaces.xml ├── device_service_getservices.xml ├── Media_GetCompatibleMetadataConfigurations.xml ├── DiscoveryLookupPort_probe.xml ├── EventPortType_getEventsProperties.xml ├── Media_getprofile.xml ├── Media_DeleteProfile.xml ├── Media_CreateProfile.xml ├── device_service_deleteUsers.xml ├── probe_wsd.xml ├── device_service_createUsers.xml ├── EventPortType_CreatePullPoint.xml └── Media_GetVideoEncoderConfigurationOptions.xml ├── src └── main │ ├── webapp │ ├── snapshot.jpg │ ├── index.html │ └── WEB-INF │ │ └── web.xml │ └── resources │ ├── groovy │ ├── Media │ │ ├── GetAudioSources.groovy │ │ ├── GetAudioSourceConfigurations.groovy │ │ ├── GetCompatibleMetadataConfigurations.groovy │ │ ├── GetVideoEncoderConfiguration.groovy │ │ ├── GetVideoEncoderConfigurations.groovy │ │ ├── GetVideoSourceConfiguration.groovy │ │ ├── GetVideoSourceConfigurations.groovy │ │ ├── GetCompatibleVideoEncoderConfigurations.groovy │ │ ├── GetVideoSources.groovy │ │ ├── GetProfiles.groovy │ │ ├── GetSnapshotUri.groovy │ │ ├── GetStreamUri.groovy │ │ ├── GetMetadataConfigurationOptions.groovy │ │ ├── DeleteProfile.groovy │ │ ├── GetProfile.groovy │ │ ├── CreateProfile.groovy │ │ └── GetVideoEncoderConfigurationOptions.groovy │ ├── PullPointSubscription │ │ ├── Renew.groovy │ │ ├── Unsubscribe.groovy │ │ └── PullMessages.groovy │ ├── Device │ │ ├── GetDNS.groovy │ │ ├── GetNTP.groovy │ │ ├── GetDiscoveryMode.groovy │ │ ├── GetNetworkDefaultGateway.groovy │ │ ├── GetHostname.groovy │ │ ├── GetUsers.groovy │ │ ├── GetDeviceInformation.groovy │ │ ├── GetNetworkProtocols.groovy │ │ ├── DeleteUsers.groovy │ │ ├── GetNetworkInterfaces.groovy │ │ ├── CreateUsers.groovy │ │ ├── GetSystemDateAndTime.groovy │ │ ├── GetScopes.groovy │ │ ├── GetServices.groovy │ │ └── GetCapabilities.groovy │ ├── PTZ │ │ ├── GetConfigurations.groovy │ │ └── GetNodes.groovy │ ├── EventPortType │ │ ├── GetServiceCapabilities.groovy │ │ ├── GetEventProperties.groovy │ │ └── CreatePullPointSubscription.groovy │ ├── RemoteDiscoveryPort │ │ └── Hello.groovy │ └── DiscoveryLookup │ │ └── Probe.groovy │ ├── META-INF │ ├── jax-ws-catalog.xml │ ├── device.properties │ └── spring │ │ ├── camel-application-context.xml │ │ ├── camel-routes.xml │ │ ├── camel-route-servlet.xml │ │ └── camel-route-ressources.xml │ ├── wsdl │ ├── local │ │ ├── www.w3.org │ │ │ ├── 2001 │ │ │ │ └── xml.xsd │ │ │ ├── 2003 │ │ │ │ └── 05 │ │ │ │ │ └── soap-envelope │ │ │ ├── 2004 │ │ │ │ └── 08 │ │ │ │ │ └── xop │ │ │ │ │ └── include │ │ │ ├── 2005 │ │ │ │ ├── 05 │ │ │ │ │ └── xmlmime │ │ │ │ └── 08 │ │ │ │ │ └── addressing │ │ │ └── 2006 │ │ │ │ └── 03 │ │ │ │ └── addressing │ │ │ │ └── ws-addr.xsd │ │ ├── www.onvif.org │ │ │ └── ver10 │ │ │ │ ├── topics │ │ │ │ └── topicns.xml │ │ │ │ └── pacs │ │ │ │ └── types.xsd │ │ ├── docs.oasis-open.org │ │ │ ├── wsrf │ │ │ │ ├── r-2.xsd │ │ │ │ ├── rw-2.wsdl │ │ │ │ └── bf-2.xsd │ │ │ └── wsn │ │ │ │ └── t-1.xsd │ │ └── schemas.xmlsoap.org │ │ │ ├── soap │ │ │ └── envelope │ │ │ └── ws │ │ │ ├── 2004 │ │ │ └── 08 │ │ │ │ └── addressing │ │ │ └── 2005 │ │ │ └── 04 │ │ │ └── discovery │ │ │ └── ws-discovery.xsd │ ├── jax-ws-catalog.xml │ ├── remotediscovery.wsdl │ └── replay.wsdl │ └── log4j.xml ├── .travis.yml ├── LICENSE ├── README.md └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /target -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war 2 | -------------------------------------------------------------------------------- /tests/probe_wsd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cat probe_wsd.xml | tr -d '\n' | nc -u 239.255.255.250 3702 3 | 4 | -------------------------------------------------------------------------------- /src/main/webapp/snapshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mpromonet/spring-onvif/HEAD/src/main/webapp/snapshot.jpg -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetAudioSources.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.media.wsdl.GetAudioSourcesResponse(); 2 | response; 3 | -------------------------------------------------------------------------------- /src/main/resources/groovy/PullPointSubscription/Renew.groovy: -------------------------------------------------------------------------------- 1 | println "==> Renew" 2 | 3 | def rep = new org.oasis_open.docs.wsn.b_2.RenewResponse(); 4 | rep; -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetAudioSourceConfigurations.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.media.wsdl.GetAudioSourceConfigurationsResponse(); 2 | response; 3 | -------------------------------------------------------------------------------- /src/main/resources/groovy/PullPointSubscription/Unsubscribe.groovy: -------------------------------------------------------------------------------- 1 | println "==> Ubsubscribe" 2 | 3 | def rep = new org.oasis_open.docs.wsn.b_2.UnsubscribeResponse(); 4 | rep; -------------------------------------------------------------------------------- /tests/invoke.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | URI=${1%_*} 3 | echo "=======${URI}" 4 | if [ "${URI}" != "" ] 5 | then 6 | wget http://127.0.0.1:8080/onvif/webservices/${URI} --post-file=$1 -O - -nv 7 | fi 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetDNS.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetDNSResponse(); 2 | 3 | dns = new org.onvif.ver10.schema.DNSInformation(); 4 | response.setDNSInformation(dns); 5 | 6 | response; 7 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetNTP.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetNTPResponse(); 2 | 3 | ntp = new org.onvif.ver10.schema.NTPInformation(); 4 | response.setNTPInformation(ntp); 5 | 6 | response; 7 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/jax-ws-catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetDiscoveryMode.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetDiscoveryModeResponse(); 2 | 3 | response.setDiscoveryMode(org.onvif.ver10.schema.DiscoveryMode.NON_DISCOVERABLE); 4 | 5 | response; 6 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetNetworkDefaultGateway.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetNetworkDefaultGatewayResponse(); 2 | 3 | gw = new org.onvif.ver10.schema.NetworkGateway(); 4 | response.setNetworkGateway(gw); 5 | 6 | response; 7 | -------------------------------------------------------------------------------- /src/main/resources/groovy/PTZ/GetConfigurations.groovy: -------------------------------------------------------------------------------- 1 | def ptzCfg = context.getApplicationContext().getBean('ptzCfg'); 2 | 3 | response = new org.onvif.ver20.ptz.wsdl.GetConfigurationsResponse(); 4 | response.getPTZConfiguration().add(ptzCfg); 5 | response; 6 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetCompatibleMetadataConfigurations.groovy: -------------------------------------------------------------------------------- 1 | def response = new org.onvif.ver10.media.wsdl.GetCompatibleMetadataConfigurationsResponse(); 2 | response.getConfigurations().add(context.getApplicationContext().getBean('metadataCfg')); 3 | response; 4 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetVideoEncoderConfiguration.groovy: -------------------------------------------------------------------------------- 1 | def cfg = context.getApplicationContext().getBean('videoEncoderCfg'); 2 | 3 | response = new org.onvif.ver10.media.wsdl.GetVideoEncoderConfigurationResponse(); 4 | response.setConfiguration(cfg); 5 | response; -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetVideoEncoderConfigurations.groovy: -------------------------------------------------------------------------------- 1 | def cfg = context.getApplicationContext().getBean('videoEncoderCfg'); 2 | 3 | response = new org.onvif.ver10.media.wsdl.GetVideoEncoderConfigurationsResponse(); 4 | response.getConfigurations().add(cfg); 5 | response; -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetVideoSourceConfiguration.groovy: -------------------------------------------------------------------------------- 1 | def cfg = context.getApplicationContext().getBean('videoSourceCfg'); 2 | 3 | response = new org.onvif.ver10.media.wsdl.GetVideoSourceConfigurationResponse(); 4 | response.setConfiguration(cfg); 5 | response; 6 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetVideoSourceConfigurations.groovy: -------------------------------------------------------------------------------- 1 | def cfg = context.getApplicationContext().getBean('videoSourceCfg'); 2 | 3 | response = new org.onvif.ver10.media.wsdl.GetVideoSourceConfigurationsResponse(); 4 | response.getConfigurations().add(cfg); 5 | response; 6 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetHostname.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetHostnameResponse(); 2 | 3 | host = new org.onvif.ver10.schema.HostnameInformation(); 4 | host.setName(java.net.InetAddress.getLocalHost().getHostName()); 5 | response.setHostnameInformation(host); 6 | 7 | response; 8 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetCompatibleVideoEncoderConfigurations.groovy: -------------------------------------------------------------------------------- 1 | def videoEncoderCfg = context.getApplicationContext().getBean('videoEncoderCfg'); 2 | 3 | response = new org.onvif.ver10.media.wsdl.GetCompatibleVideoEncoderConfigurationsResponse(); 4 | response.getConfigurations().add(videoEncoderCfg); 5 | response; 6 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetVideoSources.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.media.wsdl.GetVideoSourcesResponse(); 2 | 3 | response.getVideoSources().add(context.getApplicationContext().getBean('videoSource1')); 4 | response.getVideoSources().add(context.getApplicationContext().getBean('videoSource2')); 5 | 6 | response; 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | script: mvn install 3 | deploy: 4 | provider: heroku 5 | api_key: 6 | secure: bJloLs6wbKIoCIfBol6vQo1HDn62tO1M/seRgZSWoWNstd77N8ivQc/ibq9twmrCNcuVAFJ9LrPOQ2QFXL7xiE8xpXS9qBuQ+6ZfGZ4KZ0uTMo96kU8dR1d7WB17X3zuhWASdlzXMuJ3isBusu+PFPYZ+iklb10kzEjFNGWOPVk= 7 | app: spring-onvif 8 | on: 9 | repo: mpromonet/spring-onvif 10 | -------------------------------------------------------------------------------- /src/main/resources/groovy/EventPortType/GetServiceCapabilities.groovy: -------------------------------------------------------------------------------- 1 | def capability = new org.onvif.ver10.events.wsdl.Capabilities(); 2 | capability.setWSPullPointSupport(true); 3 | capability.setWSPausableSubscriptionManagerInterfaceSupport(false); 4 | 5 | def rep = new org.onvif.ver10.events.wsdl.GetServiceCapabilitiesResponse(); 6 | rep.setCapabilities(capability); 7 | 8 | rep; 9 | -------------------------------------------------------------------------------- /tests/PullPointSubscription_PullMessages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/groovy/PTZ/GetNodes.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver20.ptz.wsdl.GetNodesResponse(); 2 | 3 | ptzSpace = new org.onvif.ver10.schema.PTZSpaces(); 4 | ptznode = new org.onvif.ver10.schema.PTZNode(); 5 | ptznode.setName("ptznode"); 6 | ptznode.setSupportedPTZSpaces(ptzSpace); 7 | ptznode.setHomeSupported(true); 8 | response.getPTZNode().add(ptznode); 9 | 10 | response; 11 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetUsers.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetUsersResponse(); 2 | 3 | def template = context.createProducerTemplate(); 4 | def userList=template.requestBody("direct:getUserList",""); 5 | 6 | userList.each( 7 | { 8 | println "==> User:" + it; 9 | response.getUser().add(it); 10 | 11 | } 12 | ); 13 | 14 | println "==> nb users:" + response.getUser().size() 15 | 16 | response; 17 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetProfiles.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.media.wsdl.GetProfilesResponse(); 2 | 3 | def template = context.createProducerTemplate(); 4 | def profileList=template.requestBody("direct:getProfile",null); 5 | profileList.each( 6 | { 7 | println "==> Profile:" + it; 8 | response.getProfiles().add(it); 9 | } 10 | ); 11 | 12 | println "==> nb profiles:" + response.getProfiles().size() 13 | 14 | response; 15 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetSnapshotUri.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.media.wsdl.GetSnapshotUriResponse(); 2 | 3 | uri = new org.onvif.ver10.schema.MediaUri(); 4 | url = properties.resolve("media.snapshoturi.urlbase"); 5 | if (url =="") 6 | { 7 | url = request.getHeader("CamelCxfMessage")["http.base.path"]; 8 | } 9 | url += properties.resolve("media.snapshoturi.urlsuffix"); 10 | uri.setUri(url); 11 | 12 | response.setMediaUri(uri); 13 | response; 14 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetStreamUri.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.media.wsdl.GetStreamUriResponse(); 2 | 3 | url = properties.resolve("media.streamuri.urlbase"); 4 | if (url =="") 5 | { 6 | url = "rtsp://" + java.net.InetAddress.getLocalHost().getHostAddress(); 7 | } 8 | url += properties.resolve("media.streamuri.urlsuffix"); 9 | 10 | uri = new org.onvif.ver10.schema.MediaUri(); 11 | uri.setUri(url); 12 | 13 | response.setMediaUri(uri); 14 | response; 15 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetDeviceInformation.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetDeviceInformationResponse(); 2 | 3 | response.setManufacturer(properties.resolve("deviceid.manufacturer")); 4 | response.setModel(properties.resolve("deviceid.model")); 5 | response.setFirmwareVersion(properties.resolve("deviceid.firmware")); 6 | response.setSerialNumber(properties.resolve("deviceid.serialnumber")); 7 | response.setHardwareId(properties.resolve("deviceid.hardwareid")); 8 | 9 | response; 10 | -------------------------------------------------------------------------------- /tests/PullPointSubscription_unsubscribe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeRequest 6 | 7 | http://160.10.64.10/Subscription?Idx=0 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.w3.org/2004/08/xop/include: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetMetadataConfigurationOptions.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.media.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.media.wsdl.GetMetadataConfigurationOptions) unmarshaller.unmarshal(soapMessage); 7 | println "==> configuration:" + req.getConfigurationToken() + " profile:"+ req.getProfileToken() 8 | 9 | response = new org.onvif.ver10.media.wsdl.GetMetadataConfigurationOptionsResponse(); 10 | response; -------------------------------------------------------------------------------- /src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetNetworkProtocols.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetNetworkProtocolsResponse(); 2 | 3 | protocol = new org.onvif.ver10.schema.NetworkProtocol(); 4 | protocol.setName(org.onvif.ver10.schema.NetworkProtocolType.HTTP); 5 | protocol.setEnabled(true); 6 | protocol.getPort().add(9999); 7 | response.getNetworkProtocols().add(protocol); 8 | 9 | protocol = new org.onvif.ver10.schema.NetworkProtocol(); 10 | protocol.setName(org.onvif.ver10.schema.NetworkProtocolType.RTSP); 11 | protocol.setEnabled(true); 12 | protocol.getPort().add(9999); 13 | response.getNetworkProtocols().add(protocol); 14 | 15 | response; 16 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/DeleteUsers.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.device.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.device.wsdl.DeleteUsers) unmarshaller.unmarshal(soapMessage); 7 | 8 | def template = context.createProducerTemplate(); 9 | req.getUsername().each( 10 | { 11 | println "==> Username:" + it 12 | template.requestBody("direct:delUser",it); 13 | } 14 | ); 15 | 16 | // answer 17 | // ==== 18 | response = new org.onvif.ver10.device.wsdl.DeleteUsersResponse(); -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/DeleteProfile.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.media.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.media.wsdl.DeleteProfile) unmarshaller.unmarshal(soapMessage); 7 | 8 | // answer 9 | // ==== 10 | response = new org.onvif.ver10.media.wsdl.DeleteProfileResponse(); 11 | 12 | println "==> profile name:" + req.getProfileToken(); 13 | 14 | def template = context.createProducerTemplate(); 15 | template.requestBody("direct:delProfile",req.getProfileToken()); 16 | 17 | response; 18 | -------------------------------------------------------------------------------- /tests/getdns.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/Media_getvideosources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/Media_getprofiles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/device_service_GetCapabilities.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/device_service_getUsers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/device_service_GetDeviceInformation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/device_service_GetNetworkInterfaces.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/device_service_getNetworkInterfaces.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/device_service_getservices.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/Media_GetCompatibleMetadataConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/DiscoveryLookupPort_probe.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | urn:schemas-xmlsoap-org:ws:2005:04:discovery 9 | http://www.onvif.org/ver10/network/wsdl/Probe 10 | urn:uuid:29cf10da-5c41-4d55-b184-5ee15e38ce23 11 | 12 | 13 | 14 | onvif:NetworkVideoTransmitter 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/EventPortType_getEventsProperties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | http://www.onvif.org/ver10/events/wsdl/EventPortType/GetEventPropertiesRequest 4 | urn:uuid:1ba2529b-c997-44c2-97c2-d0b479096388 5 | http://www.w3.org/2005/08/addressing/anonymous 6 | http://192.168.56.1:8080/webservices/EventPortType 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/Media_getprofile.xml: -------------------------------------------------------------------------------- 1 | 2 | profiletoken 3 | -------------------------------------------------------------------------------- /tests/Media_DeleteProfile.xml: -------------------------------------------------------------------------------- 1 | 2 | new token 3 | -------------------------------------------------------------------------------- /tests/Media_CreateProfile.xml: -------------------------------------------------------------------------------- 1 | 2 | new profilenew token 3 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetProfile.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.media.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.media.wsdl.GetProfile) unmarshaller.unmarshal(soapMessage); 7 | println "==> " + req.getProfileToken() 8 | 9 | response = new org.onvif.ver10.media.wsdl.GetProfileResponse(); 10 | 11 | def template = context.createProducerTemplate(); 12 | def profileList=template.requestBody("direct:getProfile",null); 13 | 14 | profileList.each( 15 | { 16 | if (req.getProfileToken() == it.getToken()) 17 | { 18 | response.setProfile(it); 19 | } 20 | } 21 | ); 22 | 23 | response; 24 | -------------------------------------------------------------------------------- /src/main/resources/groovy/RemoteDiscoveryPort/Hello.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.xmlsoap.schemas.ws._2005._04.discovery"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.xmlsoap.schemas.ws._2005._04.discovery.HelloType) unmarshaller.unmarshal(soapMessage); 7 | 8 | 9 | // Query Discovery 10 | // ---------------------------- 11 | helloMsg = new org.apache.cxf.ws.discovery.wsdl.HelloType(); 12 | 13 | client = new org.apache.cxf.ws.discovery.WSDiscoveryClient(); 14 | def probeMatches = client.register(helloMsg); 15 | client.close(); 16 | 17 | 18 | // answer 19 | // ------------- 20 | def rep = new org.xmlsoap.schemas.ws._2005._04.discovery.ResolveType() 21 | 22 | rep; -------------------------------------------------------------------------------- /tests/device_service_deleteUsers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | operator 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/probe_wsd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe 5 | uuid:aeccc46a-d10f-41dd-8ecc-5fa0a53712ce 6 | http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous 7 | urn:schemas-xmlsoap-org:ws:2005:04:discovery 8 | 9 | 10 | 11 | dp0:NetworkVideoTransmitter 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/CreateProfile.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.media.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.media.wsdl.CreateProfile) unmarshaller.unmarshal(soapMessage); 7 | 8 | // answer 9 | // ==== 10 | response = new org.onvif.ver10.media.wsdl.CreateProfileResponse(); 11 | 12 | println "==> profile name:" + req.getName() + " token:" + req.getToken(); 13 | 14 | def profile = new org.onvif.ver10.schema.Profile(); 15 | profile.setName(req.getName()); 16 | profile.setToken(req.getToken()); 17 | 18 | def template = context.createProducerTemplate(); 19 | template.requestBody("direct:addProfile",profile); 20 | 21 | response.setProfile(profile); 22 | 23 | response; 24 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/jax-ws-catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/device_service_createUsers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | root 7 | Administrator 8 | 9 | 10 | operator 11 | User 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetNetworkInterfaces.groovy: -------------------------------------------------------------------------------- 1 | response = new org.onvif.ver10.device.wsdl.GetNetworkInterfacesResponse(); 2 | 3 | def ip = java.net.InetAddress.getLocalHost(); 4 | 5 | linkLocal = new org.onvif.ver10.schema.PrefixedIPv4Address(); 6 | linkLocal.setAddress(ip.getHostAddress()); 7 | linkLocal.setPrefixLength(24); 8 | 9 | ipv4Config = new org.onvif.ver10.schema.IPv4Configuration(); 10 | ipv4Config.setDHCP(false); 11 | ipv4Config.getManual().add(linkLocal); 12 | 13 | ipv4 = new org.onvif.ver10.schema.IPv4NetworkInterface(); 14 | ipv4.setEnabled(true); 15 | ipv4.setConfig(ipv4Config); 16 | 17 | def mac = java.net.NetworkInterface.getByInetAddress(ip).getHardwareAddress(); 18 | interfaceInfo = new org.onvif.ver10.schema.NetworkInterfaceInfo(); 19 | interfaceInfo.setHwAddress(mac.encodeHex().toString()); 20 | 21 | network = new org.onvif.ver10.schema.NetworkInterface(); 22 | network.setEnabled(true); 23 | network.setIPv4(ipv4); 24 | network.setInfo(interfaceInfo); 25 | response.getNetworkInterfaces().add(network); 26 | 27 | response; 28 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/CreateUsers.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.device.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.device.wsdl.CreateUsers) unmarshaller.unmarshal(soapMessage); 7 | 8 | println "==> nb User:" + req.getUser().size(); 9 | 10 | def template = context.createProducerTemplate(); 11 | req.getUser().each( 12 | { 13 | println "==> User:" + it 14 | 15 | def schemaCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.schema"); 16 | def result = new java.io.StringWriter(); 17 | def marshaller = schemaCtx.createMarshaller(); 18 | marshaller.marshal(new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName("org.onvif.ver10.schema","User"), it.class, it),result); 19 | template.requestBodyAndHeader("direct:addUser",result.toString(),"username",it.getUsername()); 20 | } 21 | ); 22 | 23 | // answer 24 | // ==== 25 | response = new org.onvif.ver10.device.wsdl.CreateUsersResponse(); -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetSystemDateAndTime.groovy: -------------------------------------------------------------------------------- 1 | currentdate = new java.util.GregorianCalendar(); 2 | date = new org.onvif.ver10.schema.Date(); 3 | date.setYear(currentdate.get(java.util.Calendar.YEAR)); 4 | date.setMonth(currentdate.get(java.util.Calendar.MONTH)+1); 5 | date.setDay(currentdate.get(java.util.Calendar.DAY_OF_MONTH)); 6 | time = new org.onvif.ver10.schema.Time(); 7 | time.setHour(currentdate.get(java.util.Calendar.HOUR)); 8 | time.setMinute(currentdate.get(java.util.Calendar.MINUTE)); 9 | time.setSecond(currentdate.get(java.util.Calendar.SECOND)); 10 | 11 | dateTime = new org.onvif.ver10.schema.DateTime(); 12 | dateTime.setTime(time); 13 | dateTime.setDate(date); 14 | 15 | tz = new org.onvif.ver10.schema.TimeZone(); 16 | tz.setTZ("UTC"); 17 | 18 | systemDateTime = new org.onvif.ver10.schema.SystemDateTime (); 19 | systemDateTime.setDateTimeType(org.onvif.ver10.schema.SetDateTimeType.MANUAL); 20 | systemDateTime.setTimeZone(tz); 21 | systemDateTime.setUTCDateTime(dateTime); 22 | 23 | response = new org.onvif.ver10.device.wsdl.GetSystemDateAndTimeResponse(); 24 | response.setSystemDateAndTime(systemDateTime); 25 | response; 26 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Media/GetVideoEncoderConfigurationOptions.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.media.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.media.wsdl.GetVideoEncoderConfigurationOptions) unmarshaller.unmarshal(soapMessage); 7 | println "==> configuration:" + req.getConfigurationToken() + " profile:"+ req.getProfileToken() 8 | 9 | frameRateRange = new org.onvif.ver10.schema.IntRange(); 10 | frameRateRange.setMin(1); 11 | frameRateRange.setMax(25); 12 | 13 | qualityRange = new org.onvif.ver10.schema.IntRange(); 14 | qualityRange.setMin(1); 15 | qualityRange.setMax(25); 16 | 17 | h264Opts = new org.onvif.ver10.schema.H264Options(); 18 | h264Opts.setFrameRateRange(frameRateRange); 19 | 20 | options = new org.onvif.ver10.schema.VideoEncoderConfigurationOptions(); 21 | options.setH264(h264Opts); 22 | options.setQualityRange(qualityRange); 23 | 24 | response = new org.onvif.ver10.media.wsdl.GetVideoEncoderConfigurationOptionsResponse(); 25 | response.setOptions(options); 26 | response; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build status](https://travis-ci.org/mpromonet/spring-onvif.svg)](https://travis-ci.org/mpromonet/spring-onvif) 2 | [![Heroku](https://heroku-badge.herokuapp.com/?app=spring-onvif)](https://spring-onvif.herokuapp.com/) 3 | 4 | Spring-ONVIF 5 | ======== 6 | The aim is to try to implement ONVIF services in a flexible way and to learn a bit more about what could do Apache Camel. 7 | This should probably never run inside a camera, but it could be use to test ONVIF client. 8 | 9 | The application is based on Spring Framework and use : 10 | - Apache CXF to manage WS endpoints 11 | - Apache Camel to route the SOAP request 12 | - Groovy to process SOAP request and produce SOAP response 13 | 14 | The application instantiate an ONVIF Device Service and publish it using the WS-Discovery of Apache CXF. 15 | Apache Camel is used to dispatch each ONVIF method to a groovy script located in groovy//.groovy. 16 | Then adding support for a new method just need to add a new script. Modifying behaviour of a method could be done modifying the script without restart the application. 17 | 18 | Container is a war, but it should be possible to use a jar assembly or an osgi bundle. 19 | 20 | Build 21 | -------- 22 | - `mvn package` build the web application. 23 | - `mvn` build and run the web application in embedded tomcat. 24 | 25 | -------------------------------------------------------------------------------- /tests/EventPortType_CreatePullPoint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | 17 | tns1:Device 18 | 19 | 20 | PT1M 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/device.properties: -------------------------------------------------------------------------------- 1 | # cxf 2 | soap.mtomEnabled=true 3 | soap.binding=1.2 4 | 5 | # discovery 6 | org.apache.cxf.service.ws-discovery.address=soap.udp://239.255.255.250:3702 7 | device.ws-discovery.type={http://www.onvif.org/ver10/network/wsdl}NetworkVideoTransmitter 8 | device.ws-discovery.scopes=onvif://www.onvif.org/type/Network_Video_Transmitter onvif://www.onvif.org/type/video_encoder onvif://www.onvif.org/type/audio_encoder onvif://www.onvif.org/type/ptz onvif://www.onvif.org/Profile/Streaming 9 | device.address=/device_service 10 | 11 | # onvif version 12 | onvif.major=1 13 | onvif.minor=2 14 | 15 | # active services 16 | service.deviceio.enabled=true 17 | service.event.enabled=true 18 | service.media.enabled=true 19 | service.replay.enabled=true 20 | service.recording.enabled=true 21 | service.ptz.enabled=true 22 | service.receiver.enabled=true 23 | service.imaging.enabled=true 24 | service.display.enabled=true 25 | service.search.enabled=true 26 | 27 | # identification + scope 28 | deviceid.manufacturer=__MANUFACTURER_ 29 | deviceid.model=__MODEL__ 30 | deviceid.firmware=__FIRMWARE__ 31 | deviceid.serialnumber=__SN__ 32 | deviceid.hardwareid=__HWID__ 33 | deviceid.name=__NAME__ 34 | deviceid.location=__LOCATION__ 35 | deviceid.hardware=__HW__ 36 | deviceid.profile=__PROFILE__ 37 | 38 | # streaming url 39 | media.snapshoturi.urlbase= 40 | media.snapshoturi.urlsuffix=/snapshot.jpg 41 | 42 | media.streamuri.urlbase= 43 | media.streamuri.urlsuffix=/replay 44 | -------------------------------------------------------------------------------- /src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | camel cxf 8 | 9 | 10 | 11 | CamelServlet 12 | org.apache.camel.component.servlet.CamelHttpTransportServlet 13 | 1 14 | 15 | 16 | CamelServlet 17 | /services/* 18 | 19 | 20 | 21 | 22 | CXFServlet 23 | org.apache.cxf.transport.servlet.CXFServlet 24 | 1 25 | 26 | 27 | CXFServlet 28 | /webservices/* 29 | 30 | 31 | 32 | 33 | org.springframework.web.context.ContextLoaderListener 34 | 35 | 36 | contextConfigLocation 37 | classpath:META-INF/spring/*-context.xml 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/Media_GetVideoEncoderConfigurationOptions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | root 7 | FyjTaK5w90bDNRb5hzWwoaYpX5M= 8 | VNAN0Nuy6gsm6YwAZh8HwA== 9 | 2013-02-19T15:16:46.862Z 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.w3.org/2005/05/xmlmime: -------------------------------------------------------------------------------- 1 | 2 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.onvif.org/ver10/topics/topicns.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetScopes.groovy: -------------------------------------------------------------------------------- 1 | def response = new org.onvif.ver10.device.wsdl.GetScopesResponse(); 2 | 3 | def scope = new org.onvif.ver10.schema.Scope(); 4 | scope.setScopeDef(org.onvif.ver10.schema.ScopeDefinition.FIXED) 5 | scope.setScopeItem("onvif://www.onvif.org/name/" + properties.resolve("deviceid.name")) 6 | response.getScopes().add(scope); 7 | 8 | scope = new org.onvif.ver10.schema.Scope(); 9 | scope.setScopeDef(org.onvif.ver10.schema.ScopeDefinition.FIXED) 10 | scope.setScopeItem("onvif://www.onvif.org/location/" + properties.resolve("deviceid.location")) 11 | response.getScopes().add(scope); 12 | 13 | scope = new org.onvif.ver10.schema.Scope(); 14 | scope.setScopeDef(org.onvif.ver10.schema.ScopeDefinition.FIXED) 15 | scope.setScopeItem("onvif://www.onvif.org/hardware/" + properties.resolve("deviceid.hardware")) 16 | response.getScopes().add(scope); 17 | 18 | scope = new org.onvif.ver10.schema.Scope(); 19 | scope.setScopeDef(org.onvif.ver10.schema.ScopeDefinition.FIXED) 20 | scope.setScopeItem("onvif://www.onvif.org/Profile/" + properties.resolve("deviceid.profile")) 21 | response.getScopes().add(scope); 22 | 23 | if (properties.resolve("service.ptz.enabled") != "0") 24 | { 25 | scope = new org.onvif.ver10.schema.Scope(); 26 | scope.setScopeDef(org.onvif.ver10.schema.ScopeDefinition.FIXED) 27 | scope.setScopeItem("onvif://www.onvif.org/type/ptz") 28 | response.getScopes().add(scope); 29 | } 30 | 31 | if (properties.resolve("service.recording.enabled") != "0") 32 | { 33 | scope = new org.onvif.ver10.schema.Scope(); 34 | scope.setScopeDef(org.onvif.ver10.schema.ScopeDefinition.FIXED) 35 | scope.setScopeItem("onvif://www.onvif.org/type/Network_Video_Storage") 36 | response.getScopes().add(scope); 37 | } 38 | 39 | if (properties.resolve("service.media.enabled") != "0") 40 | { 41 | scope = new org.onvif.ver10.schema.Scope(); 42 | scope.setScopeDef(org.onvif.ver10.schema.ScopeDefinition.FIXED) 43 | scope.setScopeItem("onvif://www.onvif.org/type/Network_Video_Transmitter") 44 | response.getScopes().add(scope); 45 | } 46 | 47 | response; 48 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/camel-application-context.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | classpath:META-INF/device.properties 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/main/resources/groovy/PullPointSubscription/PullMessages.groovy: -------------------------------------------------------------------------------- 1 | def rep = new org.onvif.ver10.events.wsdl.PullMessagesResponse(); 2 | def marshaller = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.schema").createMarshaller(); 3 | 4 | for ( i in 0..9 ) 5 | { 6 | // build message 7 | //----------------------- 8 | def sourceItem = new org.onvif.ver10.schema.ItemList.SimpleItem(); 9 | sourceItem.setName("source"); 10 | sourceItem.setValue( "**************"); 11 | 12 | def source = new org.onvif.ver10.schema.ItemList(); 13 | source.getSimpleItem().add(sourceItem); 14 | 15 | def dataItem = new org.onvif.ver10.schema.ItemList.SimpleItem(); 16 | dataItem.setName("data"); 17 | dataItem.setValue( "message" + i); 18 | 19 | def data = new org.onvif.ver10.schema.ItemList(); 20 | data.getSimpleItem().add(dataItem); 21 | 22 | def currentdate = new java.util.GregorianCalendar(); 23 | def currentXmlDate = javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar(currentdate.get(java.util.Calendar.YEAR), 24 | currentdate.get(java.util.Calendar.MONTH) + 1, 25 | currentdate.get(java.util.Calendar.DAY_OF_MONTH), 26 | currentdate.get(java.util.Calendar.HOUR_OF_DAY), 27 | currentdate.get(java.util.Calendar.MINUTE), 28 | currentdate.get(java.util.Calendar.SECOND), 29 | currentdate.get(java.util.Calendar.MILLISECOND), 0); 30 | 31 | def msg = new org.onvif.ver10.schema.Message(); 32 | msg.setSource(source); 33 | msg.setData(data); 34 | msg.setUtcTime(currentXmlDate); 35 | 36 | // convert message to dom 37 | //---------------------------------------- 38 | def domResult = new javax.xml.transform.dom.DOMResult(); 39 | marshaller.marshal(msg,domResult); 40 | 41 | // append notification to the list 42 | //---------------------------------------- 43 | def message = new org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType.Message(); 44 | message.setAny(domResult.getNode().getDocumentElement()); 45 | 46 | def notification = new org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType(); 47 | notification.setMessage(message); 48 | 49 | rep.getNotificationMessage().add(notification); 50 | } 51 | 52 | rep; 53 | -------------------------------------------------------------------------------- /src/main/resources/groovy/EventPortType/GetEventProperties.groovy: -------------------------------------------------------------------------------- 1 | // SOAP headers 2 | // ================= 3 | request.getBody().getHeaders().each( { println "==> SOAP Header: {" + it.getObject().getNamespaceURI()+ "}:"+ it.getObject().getLocalName() + "=" + it.getObject().getTextContent() } ); 4 | 5 | def sourceDescription = new org.onvif.ver10.schema.ItemListDescription.SimpleItemDescription() 6 | sourceDescription.setName("source"); 7 | sourceDescription.setType(new javax.xml.namespace.QName("{http://www.w3.org/2001/XMLSchema}string")); 8 | 9 | def sourceDescriptionList = new org.onvif.ver10.schema.ItemListDescription(); 10 | sourceDescriptionList.getSimpleItemDescription().add(sourceDescription); 11 | 12 | def dataDescription = new org.onvif.ver10.schema.ItemListDescription.SimpleItemDescription() 13 | dataDescription.setName("data"); 14 | dataDescription.setType(new javax.xml.namespace.QName("{http://www.w3.org/2001/XMLSchema}string")); 15 | 16 | def dataDescriptionList = new org.onvif.ver10.schema.ItemListDescription(); 17 | dataDescriptionList.getSimpleItemDescription().add(dataDescription); 18 | 19 | def messageDecription = new org.onvif.ver10.schema.MessageDescription(); 20 | messageDecription.setSource(sourceDescriptionList); 21 | messageDecription.setData(dataDescriptionList); 22 | 23 | def domResult = new javax.xml.transform.dom.DOMResult(); 24 | def marshaller = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.schema").createMarshaller(); 25 | marshaller.marshal(new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName("http://www.onvif.org/ver10/schema","MessageDescription"), messageDecription.class, messageDecription),domResult) 26 | 27 | def topic = new org.oasis_open.docs.wsn.t_1.TopicSetType(); 28 | topic.getAny().add(domResult.getNode().getDocumentElement()); 29 | 30 | def response = new org.onvif.ver10.events.wsdl.GetEventPropertiesResponse(); 31 | response.setFixedTopicSet(false); 32 | response.setTopicSet(topic); 33 | response.getTopicExpressionDialect().add("http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete"); 34 | response.getTopicExpressionDialect().add("http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"); 35 | response.getMessageContentFilterDialect().add("http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter"); 36 | response.getTopicNamespaceLocation().add("http://www.onvif.org/onvif/ver10/topics/topicns.xml"); 37 | 38 | response; 39 | -------------------------------------------------------------------------------- /src/main/resources/groovy/EventPortType/CreatePullPointSubscription.groovy: -------------------------------------------------------------------------------- 1 | // SOAP headers 2 | // ================= 3 | request.getBody().getHeaders().each( { println "==> SOAP Header: {" + it.getObject().getNamespaceURI()+ "}:"+ it.getObject().getLocalName() + "=" + it.getObject().getTextContent() } ); 4 | 5 | pullpoint = context.getApplicationContext().getBean("CxfPullPointSubscription"); 6 | def url = request.getHeader("CamelCxfMessage")["http.base.path"]+ "/webservices"; 7 | 8 | def s = ""+request.getHeader("CamelCxfMessage")+""; 9 | def stringbuffer = new java.io.StringBufferInputStream(s); 10 | def docbuiler = javax.xml.parsers.DocumentBuilderFactory.newInstance(); 11 | def db = docbuiler.newDocumentBuilder(); 12 | def doc = db.parse(stringbuffer); 13 | 14 | def refbuilder = new javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder(); 15 | refbuilder.address(url+pullpoint.getAddress()); 16 | refbuilder.serviceName(pullpoint.getServiceName()); 17 | refbuilder.wsdlDocumentLocation(pullpoint.getWsdlURL()); 18 | refbuilder.referenceParameter(doc.getDocumentElement()); 19 | 20 | def currentdate = new java.util.GregorianCalendar(); 21 | def currentXmlDate = javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar(currentdate.get(java.util.Calendar.YEAR), 22 | currentdate.get(java.util.Calendar.MONTH) + 1, 23 | currentdate.get(java.util.Calendar.DAY_OF_MONTH), 24 | currentdate.get(java.util.Calendar.HOUR_OF_DAY), 25 | currentdate.get(java.util.Calendar.MINUTE), 26 | currentdate.get(java.util.Calendar.SECOND), 27 | currentdate.get(java.util.Calendar.MILLISECOND), 0); 28 | 29 | currentdate.add(java.util.Calendar.MINUTE,10); 30 | def terminaisonXmlDate = javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar(currentdate.get(java.util.Calendar.YEAR), 31 | currentdate.get(java.util.Calendar.MONTH) + 1, 32 | currentdate.get(java.util.Calendar.DAY_OF_MONTH), 33 | currentdate.get(java.util.Calendar.HOUR_OF_DAY), 34 | currentdate.get(java.util.Calendar.MINUTE), 35 | currentdate.get(java.util.Calendar.SECOND), 36 | currentdate.get(java.util.Calendar.MILLISECOND), 0); 37 | 38 | response = new org.onvif.ver10.events.wsdl.CreatePullPointSubscriptionResponse(); 39 | response.setSubscriptionReference(refbuilder.build()); 40 | response.setCurrentTime(currentXmlDate); 41 | response.setTerminationTime(terminaisonXmlDate); 42 | 43 | response; 44 | -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetServices.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.device.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.device.wsdl.GetServices) unmarshaller.unmarshal(soapMessage); 7 | 8 | println "==> isIncludeCapability:" + req.isIncludeCapability(); 9 | 10 | def url = request.getHeader("CamelCxfMessage")["http.base.path"]+ "/webservices"; 11 | def onvifversion = new org.onvif.ver10.schema.OnvifVersion(); 12 | onvifversion.setMajor(properties.resolve("onvif.major").toInteger() ); 13 | onvifversion.setMinor(properties.resolve("onvif.minor").toInteger()); 14 | 15 | def rep = new org.onvif.ver10.device.wsdl.GetServicesResponse(); 16 | 17 | def service = new org.onvif.ver10.device.wsdl.Service(); 18 | service.setNamespace("http://www.onvif.org/ver10/device/wsdl"); 19 | service.setXAddr(url+properties.resolve("device.address")); 20 | service.setVersion(onvifversion); 21 | rep.getService().add(service); 22 | 23 | if (properties.resolve("service.deviceio.enabled") != "0") 24 | { 25 | service = new org.onvif.ver10.device.wsdl.Service(); 26 | service.setNamespace("http://www.onvif.org/ver10/deviceIO/wsdl"); 27 | service.setXAddr(url+"/DeviceIO"); 28 | service.setVersion(onvifversion); 29 | rep.getService().add(service); 30 | } 31 | 32 | if (properties.resolve("service.event.enabled") != "0") 33 | { 34 | service = new org.onvif.ver10.device.wsdl.Service(); 35 | service.setNamespace("http://www.onvif.org/ver10/events/wsdl"); 36 | service.setXAddr(url+"/EventPortType"); 37 | service.setVersion(onvifversion); 38 | rep.getService().add(service); 39 | } 40 | 41 | if (properties.resolve("service.media.enabled") != "0") 42 | { 43 | service = new org.onvif.ver10.device.wsdl.Service(); 44 | service.setNamespace("http://www.onvif.org/ver10/media/wsdl"); 45 | service.setXAddr(url+"/Media"); 46 | service.setVersion(onvifversion); 47 | rep.getService().add(service); 48 | } 49 | 50 | if (properties.resolve("service.ptz.enabled") != "0") 51 | { 52 | service = new org.onvif.ver10.device.wsdl.Service(); 53 | service.setNamespace("http://www.onvif.org/ver10/ptz/wsdl"); 54 | service.setXAddr(url+"/PTZ"); 55 | service.setVersion(onvifversion); 56 | rep.getService().add(service); 57 | } 58 | 59 | if (properties.resolve("service.replay.enabled") != "0") 60 | { 61 | service = new org.onvif.ver10.device.wsdl.Service(); 62 | service.setNamespace("http://www.onvif.org/ver10/replay/wsdl"); 63 | service.setXAddr(url+"/Replay"); 64 | service.setVersion(onvifversion); 65 | rep.getService().add(service); 66 | } 67 | 68 | if (properties.resolve("service.recording.enabled") != "0") 69 | { 70 | service = new org.onvif.ver10.device.wsdl.Service(); 71 | service.setNamespace("http://www.onvif.org/ver10/recording/wsdl"); 72 | service.setXAddr(url+"/Recording"); 73 | service.setVersion(onvifversion); 74 | rep.getService().add(service); 75 | } 76 | 77 | 78 | rep; -------------------------------------------------------------------------------- /src/main/resources/groovy/DiscoveryLookup/Probe.groovy: -------------------------------------------------------------------------------- 1 | // SOAP headers 2 | // ================= 3 | request.getBody().getHeaders().each( { println "==> SOAP Header: {" + it.getObject().getNamespaceURI()+ "}:"+ it.getObject().getLocalName() + "=" + it.getObject().getTextContent() } ); 4 | 5 | // unmarshall request 6 | // ================= 7 | def soapMessage = request.getBody().getBody().get(0); 8 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.network.wsdl"); 9 | def probe = jaxbCtx.createUnmarshaller().unmarshal(soapMessage).getValue(); 10 | 11 | probe.getTypes().each( { println "==> Type:" + it } ); 12 | probe.getScopes().each( { println "==> Scope:" + it } ); 13 | probe.getAny().each( { println "==> Any:" + it } ); 14 | probe.getOtherAttributes().each( { println "==> Other:" + it } ); 15 | 16 | 17 | // Query Discovery 18 | // ---------------------------- 19 | client = new org.apache.cxf.ws.discovery.WSDiscoveryClient(); 20 | client.setDefaultProbeTimeout(1000); 21 | 22 | probeType = new org.apache.cxf.ws.discovery.wsdl.ProbeType(); 23 | probe.getTypes().each( {probeType.getTypes().add(it); }) 24 | def probeMatches = client.probe(probeType); 25 | client.close(); 26 | 27 | // Print Discovery Result 28 | // ---------------------------- 29 | def matchesList = probeMatches.getProbeMatch(); 30 | matchesList.each( { item -> 31 | println "========================" 32 | println "XAddrs:" +item.getXAddrs(); 33 | println "Scopes:" + item.getScopes().getValue(); 34 | println "Types:" + item.getTypes(); 35 | println "Endpoints:" + item.getEndpointReference() 36 | println "MetadataVersion:" + item.getMetadataVersion() 37 | } ); 38 | 39 | // Build Response 40 | // ---------------------------- 41 | rep = new org.xmlsoap.schemas.ws._2005._04.discovery.ProbeMatchesType() 42 | 43 | matchesList.each( { item -> 44 | responseItem = new org.xmlsoap.schemas.ws._2005._04.discovery.ProbeMatchType() ; 45 | item.getXAddrs().each ( { responseItem.getXAddrs().add(it); } ); 46 | item.getTypes().each ( { responseItem.getTypes().add(it); } ); 47 | def endpoint = new org.xmlsoap.schemas.ws._2004._08.addressing.EndpointReferenceType(); 48 | def address = new org.xmlsoap.schemas.ws._2004._08.addressing.AttributedURI(); 49 | address.setValue(item.getEndpointReference().address.uri); 50 | endpoint.setAddress(address); 51 | responseItem.setEndpointReference(endpoint); 52 | def scope = new org.xmlsoap.schemas.ws._2005._04.discovery.ScopesType(); 53 | item.getScopes().getValue().each ( { scope.getValue().add(it); } ); 54 | responseItem.setScopes(scope); 55 | responseItem.setMetadataVersion(item.getMetadataVersion()); 56 | rep.getProbeMatch().add(responseItem); 57 | } ); 58 | 59 | // Print Response 60 | // ---------------------------- 61 | rep.getProbeMatch().each( { item -> 62 | println "========================="; 63 | println "XAddrs:" +item.getXAddrs(); 64 | println "Scopes:" + item.getScopes().getValue(); 65 | println "Types:" + item.getTypes(); 66 | println "Endpoints:" + item.getEndpointReference().getAddress().getValue(); 67 | println "MetadataVersion:" + item.getMetadataVersion() 68 | } ); 69 | 70 | def result = new java.io.StringWriter(); 71 | def marshaller = jaxbCtx.createMarshaller(); 72 | marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FRAGMENT, true); 73 | marshaller.marshal(new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName("http://www.onvif.org/ver10/network/wsdl","ProbeResponse"), rep.class, rep),result) 74 | println "========================="; 75 | 76 | result.toString(); -------------------------------------------------------------------------------- /src/main/resources/groovy/Device/GetCapabilities.groovy: -------------------------------------------------------------------------------- 1 | // unmarshall request 2 | // ================= 3 | def soapMessage = request.getBody().getBody().get(0); 4 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.device.wsdl"); 5 | def unmarshaller = jaxbCtx.createUnmarshaller(); 6 | def req = (org.onvif.ver10.device.wsdl.GetCapabilities) unmarshaller.unmarshal(soapMessage); 7 | 8 | req.getCategory().each( { println "==> Category:" + it } ); 9 | 10 | // prepare answer 11 | // ================= 12 | def url = request.getHeader("CamelCxfMessage")["http.base.path"]+ "/webservices"; 13 | 14 | def rep = new org.onvif.ver10.device.wsdl.GetCapabilitiesResponse(); 15 | def capabilities = new org.onvif.ver10.schema.Capabilities(); 16 | def extendCapability = new org.onvif.ver10.schema.CapabilitiesExtension(); 17 | 18 | 19 | def deviceCapability = new org.onvif.ver10.schema.DeviceCapabilities(); 20 | deviceCapability.setXAddr(url+properties.resolve("device.address")); 21 | 22 | def onvifversion = new org.onvif.ver10.schema.OnvifVersion(); 23 | onvifversion.setMajor(properties.resolve("onvif.major").toInteger() ); 24 | onvifversion.setMinor(properties.resolve("onvif.minor").toInteger()); 25 | 26 | def systemCapability = new org.onvif.ver10.schema.SystemCapabilities(); 27 | systemCapability.getSupportedVersions().add(onvifversion); 28 | deviceCapability.setSystem(systemCapability); 29 | 30 | def networkCapability = new org.onvif.ver10.schema.NetworkCapabilities(); 31 | deviceCapability.setNetwork(networkCapability); 32 | capabilities.setDevice(deviceCapability); 33 | 34 | if (properties.resolve("service.deviceio.enabled") != "0") 35 | { 36 | def deviceIOCapability = new org.onvif.ver10.schema.DeviceIOCapabilities(); 37 | deviceIOCapability.setXAddr(url+"/DeviceIO"); 38 | extendCapability.setDeviceIO(deviceIOCapability); 39 | } 40 | 41 | if (properties.resolve("service.event.enabled") != "0") 42 | { 43 | def eventCapability = new org.onvif.ver10.schema.EventCapabilities(); 44 | eventCapability.setXAddr(url+"/EventPortType"); 45 | eventCapability.setWSPullPointSupport(true); 46 | eventCapability.setWSSubscriptionPolicySupport(true); 47 | capabilities.setEvents(eventCapability); 48 | } 49 | 50 | if (properties.resolve("service.media.enabled") != "0") 51 | { 52 | def streamingCapability = new org.onvif.ver10.schema.RealTimeStreamingCapabilities(); 53 | streamingCapability.setRTPMulticast(false); 54 | streamingCapability.setRTPTCP(true); 55 | streamingCapability.setRTPRTSPTCP(true); 56 | 57 | def mediaCapability = new org.onvif.ver10.schema.MediaCapabilities(); 58 | mediaCapability.setXAddr(url+"/Media"); 59 | mediaCapability.setStreamingCapabilities(streamingCapability); 60 | 61 | capabilities.setMedia(mediaCapability); 62 | } 63 | 64 | if (properties.resolve("service.ptz.enabled") != "0") 65 | { 66 | def ptzCapability = new org.onvif.ver10.schema.PTZCapabilities(); 67 | ptzCapability.setXAddr(url+"/PTZ"); 68 | capabilities.setPTZ(ptzCapability); 69 | } 70 | 71 | if (properties.resolve("service.replay.enabled") != "0") 72 | { 73 | def replayCapability = new org.onvif.ver10.schema.ReplayCapabilities(); 74 | replayCapability.setXAddr(url+"/Replay"); 75 | extendCapability.setReplay(replayCapability); 76 | } 77 | 78 | if (properties.resolve("service.recording.enabled") != "0") 79 | { 80 | def recordCapability = new org.onvif.ver10.schema.RecordingCapabilities(); 81 | recordCapability.setXAddr(url+"/Recording"); 82 | extendCapability.setRecording(recordCapability); 83 | } 84 | 85 | capabilities.setExtension(extendCapability); 86 | rep.setCapabilities(capabilities); 87 | 88 | rep; -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/r-2.xsd: -------------------------------------------------------------------------------- 1 | 2 | 17 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/rw-2.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 25 | 26 | 27 | 28 | 33 | 34 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.onvif.org/ver10/pacs/types.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 29 | 34 | 35 | 36 | 37 | 38 | Type used to reference logical and physical entities. 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | General datastructure referenced by a token. 50 | Should be used as extension base. 51 | 52 | 53 | 54 | 55 | A service-unique identifier of the item. 56 | 57 | 58 | 59 | 60 | 61 | 62 | Type used for names of logical and physical entities. 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | Description is optional and the maximum length is device specific. 74 | If the length is more than maximum length, it is silently chopped to the maximum length 75 | supported by the device/service (which may be 0). 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/docs.oasis-open.org/wsrf/bf-2.xsd: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 26 | 30 | 31 | 33 | 34 | 35 | Get access to the xml: attribute groups for xml:lang as declared on 'schema' 36 | and 'documentation' below 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 48 | 50 | 52 | 54 | 55 | 56 | 57 | 59 | 60 | 61 | 62 | 63 | 64 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/camel-routes.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | org.apache.camel.onvif 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | exchange.getFromRouteId() 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | "language:groovy:classpath:groovy/" + request.getHeader("interface") + "/" + request.getHeader("operationName") + ".groovy?contentCache=false" 97 | 98 | 99 |
target
100 |
101 | 102 | java.io.FileNotFoundException 103 | 104 | 105 | 106 | new java.lang.IllegalArgumentException(exchange.getFromEndpoint() .getEndpointUri() + ":" + request.getHeader("interface") + "/" + request.getHeader("operationName") + " not implemented." ); 107 | 108 | 109 | 110 | 111 | java.lang.Exception 112 | 113 | 114 | 115 | new java.lang.IllegalArgumentException(exchange.getFromEndpoint() .getEndpointUri() + ":" + request.getHeader("interface") + "/" + request.getHeader("operationName") + " raised an exception" ); 116 | 117 | 118 | 119 |
120 | 121 |
122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
130 | 131 |
132 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/remotediscovery.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.w3.org/2006/03/addressing/ws-addr.xsd: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.w3.org/2003/05/soap-envelope: -------------------------------------------------------------------------------- 1 | 17 | 18 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Elements replacing the wildcard MUST be namespace qualified, but can be in the targetNamespace 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | 64 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Fault reporting structure 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 106 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 126 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.w3.org/2005/08/addressing: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/schemas.xmlsoap.org/soap/envelope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 35 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | Prose in the spec does not specify that attributes are allowed on the Body element 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 'encodingStyle' indicates any canonicalization conventions followed in the contents of the containing element. For example, the value 'http://schemas.xmlsoap.org/soap/encoding/' indicates the pattern described in SOAP specification 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | Fault reporting structure 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2004/08/addressing: -------------------------------------------------------------------------------- 1 | 2 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | If "Policy" elements from namespace "http://schemas.xmlsoap.org/ws/2002/12/policy#policy" are used, they must appear first (before any extensibility elements). 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/camel-route-servlet.xml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | response = "" 24 | response += "<p> name:" + context.getName() + "</p>"; 25 | response += "<p> status:" + context.getStatus() + "</p>"; 26 | response += "<p> version:" +context.getVersion() + "</p>"; 27 | response += "<p> uptime:" + context.getUptime() + "</p>"; 28 | 29 | response += "<p> application id:" + context.getApplicationContext().getId() + "</p>"; 30 | response += "<p> application class:" + context.getApplicationContext().getClass() + "</p>"; 31 | response += "<p> application context name:" + context.getApplicationContext().getDisplayName() + "</p>"; 32 | 33 | response += "<p> servlet config.serverInfo :" + context.getApplicationContext().getServletContext().getServerInfo() + "</p>"; 34 | response += "<p> servlet config.servletcontextname :" + context.getApplicationContext().getServletContext().getServletContextName() + "</p>"; 35 | response += "<p> servlet config.realpath :" + context.getApplicationContext().getServletContext().getRealPath("/") + "</p>"; 36 | response += "<p> servlet config.contextpath :" + context.getApplicationContext().getServletContext().getContextPath() + "</p>"; 37 | 38 | response += "<p> servlet config.servletNames :</p>" ; 39 | context.getApplicationContext().getServletContext().getServletNames().each( { response += it + "<br/>" }); 40 | 41 | response += "<p> servlet config.servlets :</p>" ; 42 | context.getApplicationContext().getServletContext().getServlets().each( { response += it + "<br/>" }); 43 | 44 | response += "<p> servlet config.atributes :</p>" ; 45 | context.getApplicationContext().getServletContext().getAttributeNames().each( { response += it + "=" + context.getApplicationContext().getServletContext().getAttribute(it) + "<br/>" }); 46 | 47 | response += "<p> servlet config.init param :</p>" ; 48 | context.getApplicationContext().getServletContext().getInitParameterNames().each( { response += it + "=" + context.getApplicationContext().getServletContext().getInitParameter(it) + "<br/>" }); 49 | 50 | 51 | 52 | response; 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | client = new org.apache.cxf.ws.discovery.WSDiscoveryClient(); 63 | println "###############servlet:///probe wsclient address:" + client.getAddress() + "#############"; 64 | client.setDefaultProbeTimeout(1000); 65 | client.setVersion10(); 66 | probeMatches = client.probe(new org.apache.cxf.ws.discovery.wsdl.ProbeType()); 67 | client.close(); 68 | println "############################"; 69 | 70 | response = "" 71 | def matchesList = probeMatches.getProbeMatch(); 72 | matchesList.each( { item -> 73 | response += "<p>" 74 | response += "<li> XAddrs:" +item.getXAddrs() + "</li>"; 75 | response += "<li> Scopes:" +item.getScopes().getValue() + "</li>"; 76 | response += "<li> Types:" +item.getTypes() + "</li>"; 77 | response += "</p>" 78 | } ); 79 | 80 | response; 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | response = context.getEndpointMap(); 91 | 92 | content = ""; 93 | response.each( { content += "<p>"; content += it; content += "</p>"; } ); 94 | 95 | content; 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | response = context.getDataFormats(); 104 | 105 | content = ""; 106 | response.each( { content += "<p>"; content += it; content += "</p>"; } ); 107 | 108 | content; 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | response = context.getRoutes(); 117 | 118 | content = ""; 119 | response.each( { content += "<p>"; content += it; content += "</p>"; } ); 120 | 121 | content; 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | response = context.getProperties(); 130 | 131 | content = ""; 132 | response.each( { content += "<p>"; content += it; content += "</p>"; } ); 133 | 134 | content; 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | response = context.getLanguageNames(); 143 | 144 | content = ""; 145 | response.each( { content += "<p>"; content += it; content += "</p>"; } ); 146 | 147 | content; 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | response = context.getComponentNames(); 156 | 157 | content = ""; 158 | response.each( { content += "<p>"; content += it; content += "</p>"; } ); 159 | 160 | content; 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | response = context.getApplicationContext().getBeanDefinitionNames(); 169 | 170 | content = ""; 171 | response.each( { content += "<p><b>"; content += it + "</b>:"; content += context.getApplicationContext().getBean(it).getClass(); content += "</p>"; } ); 172 | 173 | content; 174 | 175 | 176 | 177 | 178 | 179 | 180 | ${header.sql} 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/docs.oasis-open.org/wsn/t-1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 35 | 36 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 67 | 68 | 69 | 71 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 97 | 99 | 100 | 101 | 102 | 103 | 104 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | TopicPathExpression ::= TopicPath ( '|' TopicPath )* 143 | TopicPath ::= RootTopic ChildTopicExpression* 144 | RootTopic ::= NamespacePrefix? ('//')? (NCName | '*') 145 | NamespacePrefix ::= NCName ':' 146 | ChildTopicExpression ::= '/' '/'? (QName | NCName | '*'| '.') 147 | 148 | 149 | 150 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | The pattern allows strings matching the following EBNF: 161 | ConcreteTopicPath ::= RootTopic ChildTopic* 162 | RootTopic ::= QName 163 | ChildTopic ::= '/' (QName | NCName) 164 | 165 | 166 | 167 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | The pattern allows strings matching the following EBNF: 178 | RootTopic ::= QName 179 | 180 | 181 | 182 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | spring 6 | onvif 7 | 1.0-SNAPSHOT 8 | war 9 | ONVIF Device 10 | ONVIF Device based on spring framework 11 | http://spring-onvif.mpr.cloudbees.net 12 | 13 | 14 | UTF-8 15 | 16 | 2.14.1 17 | 4.1.4.RELEASE 18 | 1.7.10 19 | 2.4.0 20 | 3.0.3 21 | 1.4.185 22 | 23 | 1.6 24 | 3.0 25 | 2.3.7 26 | 1.5 27 | 2.2 28 | 2.5.1 29 | 30 | 31 | 32 | 33 | MPR 34 | Michel Promonet 35 | 36 | 37 | 38 | 39 | 40 | Public domain (Unlicense) 41 | http://unlicense.org/ 42 | repo 43 | 44 | 45 | 46 | 47 | HEAD 48 | scm:git://github.com/mpromonet/spring-onvif.git 49 | scm:git@github.com:mpromonet/spring-onvif.git 50 | https://github.com/mpromonet/spring-onvif/tree/master 51 | 52 | 53 | 54 | https://github.com/mpromonet/spring-onvif/issues 55 | GitHub Issues 56 | 57 | 58 | 59 | jenkins 60 | https://mpr.ci.cloudbees.com/job/spring-onvif 61 | 62 | 63 | 64 | 65 | internal.repo 66 | file://${project.build.directory}/maven-repo 67 | false 68 | 69 | 70 | cloudbees 71 | dav:http://repository-mpr.forge.cloudbees.com/snapshot/spring/onvif/site/ 72 | 73 | 74 | 75 | 76 | 77 | 78 | org.slf4j 79 | slf4j-log4j12 80 | ${slf4j-version} 81 | 82 | 83 | 84 | 85 | org.apache.cxf 86 | cxf-rt-frontend-jaxws 87 | ${cxf-version} 88 | 89 | 90 | org.apache.cxf 91 | cxf-rt-transports-http 92 | ${cxf-version} 93 | 94 | 95 | org.apache.cxf 96 | cxf-rt-ws-security 97 | ${cxf-version} 98 | 99 | 100 | org.apache.cxf.services.ws-discovery 101 | cxf-services-ws-discovery-service 102 | ${cxf-version} 103 | 104 | 105 | 106 | 107 | org.apache.camel 108 | camel-spring 109 | ${camel-version} 110 | 111 | 112 | org.apache.camel 113 | camel-servlet 114 | ${camel-version} 115 | 116 | 117 | org.apache.camel 118 | camel-cxf 119 | ${camel-version} 120 | 121 | 122 | org.apache.camel 123 | camel-soap 124 | ${camel-version} 125 | 126 | 127 | org.apache.camel 128 | camel-script 129 | ${camel-version} 130 | 131 | 132 | org.apache.camel 133 | camel-jdbc 134 | ${camel-version} 135 | 136 | 137 | 138 | 139 | org.codehaus.groovy 140 | groovy-all 141 | ${groovy-version} 142 | 143 | 144 | 145 | 146 | com.h2database 147 | h2 148 | ${h2-version} 149 | 150 | 151 | 152 | 153 | org.springframework 154 | spring-core 155 | ${spring-version} 156 | 157 | 158 | org.springframework 159 | spring-context 160 | ${spring-version} 161 | 162 | 163 | org.springframework 164 | spring-beans 165 | ${spring-version} 166 | 167 | 168 | org.springframework 169 | spring-jdbc 170 | ${spring-version} 171 | 172 | 173 | org.springframework 174 | spring-web 175 | ${spring-version} 176 | 177 | 178 | 179 | 180 | tomcat:run 181 | 182 | 183 | org.apache.maven.plugins 184 | maven-compiler-plugin 185 | ${maven-compiler-plugin.version} 186 | 187 | ${java-version} 188 | ${java-version} 189 | 190 | 191 | 192 | 193 | 194 | org.apache.cxf 195 | cxf-codegen-plugin 196 | ${cxf-version} 197 | 198 | 199 | generate-sources 200 | 201 | 202 | *.wsdl 203 | 204 | 205 | 206 | -verbose 207 | -catalog 208 | ${basedir}/src/main/resources/wsdl/jax-ws-catalog.xml 209 | 210 | 211 | 212 | 213 | wsdl2java 214 | 215 | 216 | 217 | 218 | 219 | org.apache.maven.plugins 220 | maven-dependency-plugin 221 | 2.3 222 | 223 | 224 | package 225 | copy 226 | 227 | 228 | 229 | com.github.jsimone 230 | webapp-runner 231 | 7.0.40.0 232 | webapp-runner.jar 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | org.apache.maven.plugins 246 | maven-project-info-reports-plugin 247 | ${maven-project-info-reports-plugin.version} 248 | 249 | 250 | 251 | index 252 | license 253 | summary 254 | project-team 255 | scm 256 | issue-tracking 257 | cim 258 | distribution-management 259 | dependency-info 260 | dependencies 261 | 262 | 263 | 264 | 265 | 266 | org.apache.maven.plugins 267 | maven-changelog-plugin 268 | ${maven-changelog-plugin.version} 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/www.w3.org/2001/xml.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 |
11 |

About the XML namespace

12 | 13 |
14 |

15 | This schema document describes the XML namespace, in a form 16 | suitable for import by other schema documents. 17 |

18 |

19 | See 20 | http://www.w3.org/XML/1998/namespace.html and 21 | 22 | http://www.w3.org/TR/REC-xml for information 23 | about this namespace. 24 |

25 |

26 | Note that local names in this namespace are intended to be 27 | defined only by the World Wide Web Consortium or its subgroups. 28 | The names currently defined in this namespace are listed below. 29 | They should not be used with conflicting semantics by any Working 30 | Group, specification, or document instance. 31 |

32 |

33 | See further below in this document for more information about how to refer to this schema document from your own 35 | XSD schema documents and about the 36 | namespace-versioning policy governing this schema document. 37 |

38 |
39 |
40 |
41 |
42 | 43 | 44 | 45 | 46 |
47 | 48 |

lang (as an attribute name)

49 |

50 | denotes an attribute whose value 51 | is a language code for the natural language of the content of 52 | any element; its value is inherited. This name is reserved 53 | by virtue of its definition in the XML specification.

54 | 55 |
56 |
57 |

Notes

58 |

59 | Attempting to install the relevant ISO 2- and 3-letter 60 | codes as the enumerated possible values is probably never 61 | going to be a realistic possibility. 62 |

63 |

64 | See BCP 47 at 65 | http://www.rfc-editor.org/rfc/bcp/bcp47.txt 66 | and the IANA language subtag registry at 67 | 68 | http://www.iana.org/assignments/language-subtag-registry 69 | for further information. 70 |

71 |

72 | The union allows for the 'un-declaration' of xml:lang with 73 | the empty string. 74 |

75 |
76 |
77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |

space (as an attribute name)

95 |

96 | denotes an attribute whose 97 | value is a keyword indicating what whitespace processing 98 | discipline is intended for the content of the element; its 99 | value is inherited. This name is reserved by virtue of its 100 | definition in the XML specification.

101 | 102 |
103 |
104 |
105 | 106 | 107 | 108 | 109 | 110 | 111 |
112 | 113 | 114 | 115 |
116 | 117 |

base (as an attribute name)

118 |

119 | denotes an attribute whose value 120 | provides a URI to be used as the base for interpreting any 121 | relative URIs in the scope of the element on which it 122 | appears; its value is inherited. This name is reserved 123 | by virtue of its definition in the XML Base specification.

124 | 125 |

126 | See http://www.w3.org/TR/xmlbase/ 128 | for information about this attribute. 129 |

130 |
131 |
132 |
133 |
134 | 135 | 136 | 137 | 138 |
139 | 140 |

id (as an attribute name)

141 |

142 | denotes an attribute whose value 143 | should be interpreted as if declared to be of type ID. 144 | This name is reserved by virtue of its definition in the 145 | xml:id specification.

146 | 147 |

148 | See http://www.w3.org/TR/xml-id/ 150 | for information about this attribute. 151 |

152 |
153 |
154 |
155 |
156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 |
167 | 168 |

Father (in any context at all)

169 | 170 |
171 |

172 | denotes Jon Bosak, the chair of 173 | the original XML Working Group. This name is reserved by 174 | the following decision of the W3C XML Plenary and 175 | XML Coordination groups: 176 |

177 |
178 |

179 | In appreciation for his vision, leadership and 180 | dedication the W3C XML Plenary on this 10th day of 181 | February, 2000, reserves for Jon Bosak in perpetuity 182 | the XML name "xml:Father". 183 |

184 |
185 |
186 |
187 |
188 |
189 | 190 | 191 | 192 |
193 |

About this schema document

194 | 195 |
196 |

197 | This schema defines attributes and an attribute group suitable 198 | for use by schemas wishing to allow xml:base, 199 | xml:lang, xml:space or 200 | xml:id attributes on elements they define. 201 |

202 |

203 | To enable this, such a schema must import this schema for 204 | the XML namespace, e.g. as follows: 205 |

206 |
207 |           <schema . . .>
208 |            . . .
209 |            <import namespace="http://www.w3.org/XML/1998/namespace"
210 |                       schemaLocation="http://www.w3.org/2001/xml.xsd"/>
211 |      
212 |

213 | or 214 |

215 |
216 |            <import namespace="http://www.w3.org/XML/1998/namespace"
217 |                       schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
218 |      
219 |

220 | Subsequently, qualified reference to any of the attributes or the 221 | group defined below will have the desired effect, e.g. 222 |

223 |
224 |           <type . . .>
225 |            . . .
226 |            <attributeGroup ref="xml:specialAttrs"/>
227 |      
228 |

229 | will define a type which will schema-validate an instance element 230 | with any of those attributes. 231 |

232 |
233 |
234 |
235 |
236 | 237 | 238 | 239 |
240 |

Versioning policy for this schema document

241 |
242 |

243 | In keeping with the XML Schema WG's standard versioning 244 | policy, this schema document will persist at 245 | 246 | http://www.w3.org/2009/01/xml.xsd. 247 |

248 |

249 | At the date of issue it can also be found at 250 | 251 | http://www.w3.org/2001/xml.xsd. 252 |

253 |

254 | The schema document at that URI may however change in the future, 255 | in order to remain compatible with the latest version of XML 256 | Schema itself, or with the XML namespace itself. In other words, 257 | if the XML Schema or XML namespaces change, the version of this 258 | document at 259 | http://www.w3.org/2001/xml.xsd 260 | 261 | will change accordingly; the version at 262 | 263 | http://www.w3.org/2009/01/xml.xsd 264 | 265 | will not change. 266 |

267 |

268 | Previous dated (and unchanging) versions of this schema 269 | document are at: 270 |

271 | 281 |
282 |
283 |
284 |
285 | 286 |
287 | 288 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/replay.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | The capabilities for the replay service is returned in the Capabilities element. 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Indicator that the Device supports reverse playback as defined in the ONVIF Streaming Specification. 41 | 42 | 43 | 44 | 45 | The list contains two elements defining the minimum and maximum valid values supported as session timeout in seconds. 46 | 47 | 48 | 49 | 50 | Indicates support for RTP/RTSP/TCP. 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Specifies the connection parameters to be used for the stream. The URI that is returned may depend on these parameters. 63 | 64 | 65 | 66 | 67 | The identifier of the recording to be streamed. 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | The URI to which the client should connect in order to stream the recording. 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Description of the new replay configuration parameters. 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | The current replay configuration parameters. 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | Returns the capabilities of the replay service. The result is returned in a typed answer. 147 | 148 | 149 | 150 | 151 | 152 | Requests a URI that can be used to initiate playback of a recorded stream 153 | using RTSP as the control protocol. The URI is valid only as it is 154 | specified in the response. 155 | This operation is mandatory. 156 | 157 | 158 | 159 | 160 | 161 | 162 | Returns the current configuration of the replay service. 163 | This operation is mandatory. 164 | 165 | 166 | 167 | 168 | 169 | 170 | Changes the current configuration of the replay service. 171 | This operation is mandatory. 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | -------------------------------------------------------------------------------- /src/main/resources/wsdl/local/schemas.xmlsoap.org/ws/2005/04/discovery/ws-discovery.xsd: -------------------------------------------------------------------------------- 1 | 2 | 53 | 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 129 | 130 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 170 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 263 | 264 | 267 | 268 | 269 | 270 | 271 | 272 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/camel-route-ressources.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 0 15 | 0 16 | 640 17 | 480 18 | 19 | 20 | 0.5 21 | 0.5 22 | 0.5 23 | 0.5 24 | 25 | 26 | videotoken1 27 | 28 | 29 | 30 | 31 | videotoken2 32 | 33 | 34 | 35 | 36 | videosrcname 37 | videosrctoken 38 | videotoken1 39 | 40 | 41 | 42 | 640 43 | 480 44 | 45 | 46 | encodername 47 | encodertoken 48 | 49 | 50 | 51 | 52 | ptzname 53 | ptztoken 54 | nodeToken 55 | 56 | 57 | 58 | 59 | 60 | 61 | metaname 62 | metatoken 63 | false 64 | 65 | 66 | 67 | 68 | profilename 69 | profiletoken 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | admin 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.schema"); 87 | def result = new java.io.StringWriter(); 88 | def marshaller = jaxbCtx.createMarshaller(); 89 | marshaller.marshal(new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName("org.onvif.ver10.schema","Profile"), request.getBody().class, request.getBody()),result); 90 | result; 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.schema"); 101 | def unmarshaller = jaxbCtx.createUnmarshaller(); 102 | def list = [] 103 | body.each( 104 | { 105 | def xmlStr = new java.lang.StringBuffer( it.get("MSG") ); 106 | def item = unmarshaller.unmarshal( new javax.xml.transform.stream.StreamSource( new java.io.StringReader( xmlStr.toString() ) ) , org.onvif.ver10.schema.Profile.class); 107 | list.add((org.onvif.ver10.schema.Profile)item.getValue()); 108 | } 109 | ); 110 | list; 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | ${body} 119 | 120 | 121 | 122 | create table if not exists PROFILES(id varchar primary key not null, msg varchar) 123 | 124 | 125 | 126 | 127 | ${ref:profile} 128 | ${body.token} 129 | 130 | 131 | merge into PROFILES values('${header.token}','${body}') 132 | 133 | 134 | 135 | 136 | ${header.body} 137 | 138 | 139 | 140 | 141 | 142 | 143 | select * from PROFILES 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | ${body.token} 152 | 153 | 154 | insert into PROFILES values('${header.token}','${body}') 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | delete from PROFILES where id='${body}' 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.schema"); 175 | def result = new java.io.StringWriter(); 176 | def marshaller = jaxbCtx.createMarshaller(); 177 | marshaller.marshal(new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName("org.onvif.ver10.schema","User"), request.getBody().class, request.getBody()),result); 178 | result; 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | def jaxbCtx = javax.xml.bind.JAXBContext.newInstance("org.onvif.ver10.schema"); 189 | def unmarshaller = jaxbCtx.createUnmarshaller(); 190 | def list = [] 191 | body.each( 192 | { 193 | def xmlStr = new java.lang.StringBuffer( it.get("MSG") ); 194 | def item = unmarshaller.unmarshal( new javax.xml.transform.stream.StreamSource( new java.io.StringReader( xmlStr.toString() ) ) , org.onvif.ver10.schema.User.class); 195 | list.add((org.onvif.ver10.schema.User)item.getValue()); 196 | } 197 | ); 198 | list; 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | ${body} 208 | 209 | 210 | 211 | create table if not exists USERS(id varchar primary key not null, msg varchar) 212 | 213 | 214 | 215 | 216 | ${ref:AdminUser} 217 | ${body.username} 218 | 219 | 220 | merge into USERS values('${header.adminname}','${body}') 221 | 222 | 223 | 224 | 225 | ${header.body} 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | select * from USERS 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | insert into USERS values('${header.username}','${body}') 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | delete from USERS where id='${body}' 253 | 254 | 255 | 256 | 257 | 258 | --------------------------------------------------------------------------------