@SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); requestEndpoint = retrieveEndpoint(endpointURI); responseEndpointReference = retrieveEndpointReference(endpointReferenceURI); messageFactory = getMessageFactory(); if (responseTargetAddress instanceof EndpointReference){ // fix the target as in this case it will be an EPR EndpointReference epr = (EndpointReference)responseTargetAddress; responseTargetAddress = (T)retrieveEndpointReference(epr.getURI()); } // end if } // end method readObject