WS-Notification HTTP Binding
This example demonstrates how to actually expose the WS-Notification Service Engine over SOAP/HTTP.
You will find an example scenario that you can use to understand how it works.
External WSN client communicating over SOAP: URL format
When formatting URLs to Web Services inside WSN messages (e.g. when subscribing to a broker) use guidelines provided below.
The rules:
- when not using SOAP /raw HTTP/ the endpoint address has to end with slash, e.g. http://localhost:11111/wsn/NotificationConsumer/ (http://localhost:11111/wsn/NotificationConsumer is wrong - SM will fail to understand this URL) => you have to deploy the WS with a trailing slash in the name (NotificationConsumer/)
- when using properties, you cannot use the trailing slash - http://localhost:11111/wsn/NotificationConsumer/?http.soap=true is wrong, http://localhost:11111/wsn/NotificationConsumer?http.soap=true is ok (but still it does not make SM use SOAP)
- when using http.soap=true, you have to use http.soapVersion=1.x, e.g. http://localhost:11111/wsn/NotificationConsumer?http.soap=true&http.soapVersion=1.1 . It does not work without the http.soapVersion=1.x property.
To sum up: http://localhost:11111/wsn/NotificationConsumer?http.soap=true&http.soapVersion=1.1 is the only solution when communication over SOAP is required. Other options cause SM to throw an exception while parsing the address or while trying to access address that does not exist (404), or make the XFire generate a fault (no SOAP envelope present).