Changeset 6a8a9ec for fedd/federation
- Timestamp:
- Feb 16, 2010 9:18:22 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 2fdf4b3
- Parents:
- c3a3fe3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/remote_service.py
rc3a3fe3 r6a8a9ec 270 270 class service_caller(remote_service_base): 271 271 def __init__(self, service_name, request_message=None, 272 request_body_name=None, tracefile=None ):272 request_body_name=None, tracefile=None, strict=True): 273 273 self.service_name = service_name 274 274 … … 287 287 getattr(fedd_services, request_message_name, None) or \ 288 288 getattr(fedd_internal_services, request_message_name, None) 289 if not self.request_message :289 if not self.request_message and strict: 290 290 raise service_error(service_error.internal, 291 291 "Cannot find class for %s" % request_message_name) 292 292 293 if request_body_name: self.request_body_name = request_body_name 294 else: self.request_body_name = "%sRequestBody" % service_name 293 if request_body_name is not None: 294 self.request_body_name = request_body_name 295 else: 296 self.request_body_name = "%sRequestBody" % service_name 295 297 296 298 self.tracefile = tracefile … … 343 345 try: 344 346 remote_method = getattr(port, self.service_name, None) 345 resp = remote_method(self.apply_to_tags(\ 346 { self.request_body_name: r}, self.encap_fedids)) 347 if self.request_body_name: 348 resp = remote_method(self.apply_to_tags(\ 349 { self.request_body_name: r}, self.encap_fedids)) 350 else: 351 resp = remote_method(self.apply_to_tags(r, self.encap_fedids)) 347 352 except socket_error, e: 348 353 raise service_error(service_error.connect, … … 369 374 370 375 tf = tracefile or self.tracefile or None 376 377 if not self.request_body_name: 378 raise service_error(service_error.internal, 379 "Call to soap service without a configured request body"); 371 380 372 381 # If a context is given, use it. Otherwise construct one from
Note: See TracChangeset
for help on using the changeset viewer.