if (address == null) {
LOG.log(Level.SEVERE, "Unable to locate a valid CORBA address");
throw new CorbaBindingException("Unable to locate a valid CORBA address");
}
List args = message.getContent(List.class);
EndpointReferenceType ref = (EndpointReferenceType)message.get(Message.ENDPOINT_ADDRESS);
org.omg.CORBA.Object targetObject;
// A non-null endpoint address from the message means that we want to invoke on a particular
// object reference specified by the endpoint reference type. If the reference is null, then
// we want to invoke on the default location as specified in the WSDL.
if (ref != null) {
targetObject = CorbaObjectReferenceHelper.getReferenceById(ref.getAddress().getValue());
} else {
targetObject = CorbaUtils.importObjectReference(orb, address.getLocation());
}
message.put(CorbaConstants.ORB, orb);
message.put(CorbaConstants.CORBA_ENDPOINT_OBJECT, targetObject);