dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27652
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13765: csd: minor fixes
------------------------------------------------------------
revno: 13765
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-01-17 14:59:42 +0700
message:
csd: minor fixes
modified:
dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-17 07:31:46 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java 2014-01-17 07:59:42 +0000
@@ -150,17 +150,24 @@
// Helpers
// -------------------------------------------------------------------------
- private void validateRequest( Envelope env )
+ private void validateRequest( Envelope envelope )
{
- if ( !"urn:ihe:iti:csd:2013:GetDirectoryModificationsRequest".equals(
- env.getHeader().getAction().getValue() ) )
- {
- throw new MissingGetDirectoryModificationsRequestException();
+ try
+ {
+ if ( !"urn:ihe:iti:csd:2013:GetDirectoryModificationsRequest".equals(
+ envelope.getHeader().getAction().getValue() ) )
+ {
+ throw new MissingGetDirectoryModificationsRequestException();
+ }
+ }
+ catch ( NullPointerException ex )
+ {
+ throw new SoapException();
}
try
{
- if ( env.getBody().getGetModificationsRequest() == null )
+ if ( envelope.getBody().getGetModificationsRequest() == null )
{
throw new MissingGetModificationsRequestException();
}
@@ -172,7 +179,7 @@
try
{
- if ( env.getBody().getGetModificationsRequest().getLastModified() == null )
+ if ( envelope.getBody().getGetModificationsRequest().getLastModified() == null )
{
throw new MissingLastModifiedException();
}