@@ -352,7 +352,8 @@ public void reserve(javax.xml.ws.Holder<String> connectionId, String globalReser
352
352
LOG .fine (String .format ("global reservation ID %s" , globalReservationId ));
353
353
LOG .fine (String .format ("description %s" , description ));
354
354
LOG .fine (String .format ("service type %s" , soapCriteria .getServiceType ()));
355
- LOG .fine (String .format ("version %d" , soapCriteria .getVersion ()));
355
+ if (soapCriteria .getVersion () != null )
356
+ LOG .fine (String .format ("version %d" , soapCriteria .getVersion ()));
356
357
357
358
try {
358
359
Header pbHeader = toProtobuf (soapHeader .value );
@@ -369,20 +370,22 @@ public void reserve(javax.xml.ws.Holder<String> connectionId, String globalReser
369
370
370
371
// ReservationRequestCriteria
371
372
ReservationRequestCriteria .Builder pbReservationRequestCriteriaBuilder = ReservationRequestCriteria
372
- .newBuilder ().setVersion (soapCriteria .getVersion ());
373
+ .newBuilder ();
374
+ if (soapCriteria .getVersion () != null )
375
+ pbReservationRequestCriteriaBuilder .setVersion (soapCriteria .getVersion ());
373
376
374
377
// Schedule
375
378
if (soapCriteria .getSchedule () != null ) {
376
379
Schedule .Builder pbScheduleBuilder = Schedule .newBuilder ();
377
380
if (soapCriteria .getSchedule ().getStartTime () != null ) {
378
381
LOG .fine (String .format ("start time %s" , soapCriteria .getSchedule ().getStartTime ()
379
382
.format (DateTimeFormatter .ISO_OFFSET_DATE_TIME )));
380
- LOG .fine (String .format ("end time %s" , soapCriteria .getSchedule ().getEndTime ()
381
- .format (DateTimeFormatter .ISO_OFFSET_DATE_TIME )));
382
383
pbScheduleBuilder .setStartTime (Timestamps .parse (soapCriteria .getSchedule ().getStartTime ()
383
384
.format (DateTimeFormatter .ISO_OFFSET_DATE_TIME )));
384
385
}
385
386
if (soapCriteria .getSchedule ().getEndTime () != null ) {
387
+ LOG .fine (String .format ("end time %s" , soapCriteria .getSchedule ().getEndTime ()
388
+ .format (DateTimeFormatter .ISO_OFFSET_DATE_TIME )));
386
389
pbScheduleBuilder .setEndTime (Timestamps .parse (soapCriteria .getSchedule ().getEndTime ()
387
390
.format (DateTimeFormatter .ISO_OFFSET_DATE_TIME )));
388
391
}
@@ -422,15 +425,19 @@ public void reserve(javax.xml.ws.Holder<String> connectionId, String globalReser
422
425
pbP2PServiceBuilder .setDirectionality (directionality );
423
426
}
424
427
425
- /* TODO Need to test each of the following SOAP elements for null. As some might not be set
428
+ /* Need to test each of the following SOAP elements for null. As some might not be set
426
429
in case of an Reserve message update. An update generally only specifies a subset. Eg
427
430
the initial Reservation included the wrong bandwidth. The update Reserve message will then
428
431
only specifies the bandwidth (with the correct value).
429
432
*/
430
433
LOG .fine (String .format ("source STP %s" , soapP2PService .getSourceSTP ()));
431
434
LOG .fine (String .format ("destination STP %s" , soapP2PService .getDestSTP ()));
432
- pbP2PServiceBuilder .setSymmetricPath (soapP2PService .isSymmetricPath ())
433
- .setSourceStp (soapP2PService .getSourceSTP ()).setDestStp (soapP2PService .getDestSTP ());
435
+ if (soapP2PService .isSymmetricPath () != null )
436
+ pbP2PServiceBuilder .setSymmetricPath (soapP2PService .isSymmetricPath ());
437
+ if (soapP2PService .getSourceSTP () != null )
438
+ pbP2PServiceBuilder .setSourceStp (soapP2PService .getSourceSTP ());
439
+ if (soapP2PService .getDestSTP () != null )
440
+ pbP2PServiceBuilder .setDestStp (soapP2PService .getDestSTP ());
434
441
435
442
if (soapP2PService .getEro () != null ) {
436
443
List <OrderedStpType > soapOrderedSTP = soapP2PService .getEro ().getOrderedSTP ();
0 commit comments