ServiceException e = new ServiceException();
e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"HTTPProxy", "HTTPMessage"});
throw e;
}
HTTPMessage message = (HTTPMessage)msg;
String destination = message.getDestination();
HTTPProxyDestination dest = (HTTPProxyDestination)destinations.get(destination);
//use the remote settings if the message didn't specify them
FlexRemoteCredentials remoteCredentials =
FlexContext.getFlexSession().getRemoteCredentials(getId(), destination);
if (remoteCredentials != null)
{
message.setRemoteUsername(remoteCredentials.getUsername());
message.setRemotePassword((String)remoteCredentials.getCredentials());
}
else if (dest.getRemoteUsername() != null && dest.getRemotePassword() != null)
{
message.setRemoteUsername(dest.getRemoteUsername());
message.setRemotePassword(dest.getRemotePassword());
}
ServiceAdapter adapter = dest.getAdapter();
Object result;