Search Results

Search found 2 results on 1 pages for 'danjo519'.

Page 1/1 | 1 

  • .NET Remoting Exception not handled Client-Side

    - by DanJo519
    I checked the rest of the remoting questions, and this specific case did not seem to be addressed. I have a .NET Remoting server/client set up. On the server side I have an object with a method that can throw an exception, and a client which will try to call that method. Server: public bool MyEquals(Guid myGuid, string a, string b) { if (CheckAuthentication(myGuid)) { logger.Debug("Request for \"" + a + "\".Equals(\"" + b + "\")"); return a.Equals(b); } else { throw new AuthenticationException(UserRegistryService.USER_NOT_REGISTERED_EXCEPTION_TEXT); } } Client: try { bool result = RemotedObject.MyEquals(myGuid, "cat", "dog"); } catch (Services.Exceptions.AuthenticationException e) { Console.WriteLine("You do not have permission to execute that action"); } When I call MyEquals with a Guid which causes CheckAuthentication to return false, .NET tries to throw the exception and says the AuthenticationException was unhandled. This happens server side. The exception is never marshaled over to the client-side, and I cannot figure out why. All of the questions I have looked at address the issue of an exception being handled client-side, but it isn't the custom exception but a base type. In my case, I can't even get any exception to cross the remoting boundary to the client. Here is a copy of AuthenticationException. It is in the shared library between both server and client. [Serializable] public class AuthenticationException : ApplicationException, ISerializable { public AuthenticationException(string message) : base(message) { } public AuthenticationException(SerializationInfo info, StreamingContext context) : base(info, context) { } #region ISerializable Members void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); } #endregion }

    Read the article

  • Hibernate configuration files not found by Axis2

    - by DanJo519
    I am writing a web service to be deployed on Tomcat using Axis2. I am using Hibernate3 to persist data between the web service and a MySQL database. When running the application through by IDE, the method I am exposing through Axis2 works as intended, however when I deploy the .aar to Tomcat, I receive a SOAP Error claiming that hibernate.cfg.xml cannot be found. However, inside the .aar, I clearly see that all the configuration file and all the mapping files are included. I have determined a workaround: If I place the resulting files from the Netbeans build/class folder into the axis2/WEB-INF/class folder, then the application works as expected. My question, then, is is there a better way to deploy my application so that Axis2 will pick up the configuration and mapping files through the deployed .aar without my manually having to copy the contents of the build/class folder into the axis2/WEB-INF/class folder?

    Read the article

1