public RawFaultException(XmlDictionaryReader reader) :
     base("The service returned a fault - see FaultMessage, FaultStackTrace, and FaultType.")
 {
     reader.ReadToFollowing("Message");
     m_faultMessage = reader.ReadElementContentAsString();
     m_stackTrace = reader.ReadElementContentAsString("StackTrace", reader.NamespaceURI);
     m_type = Type.GetType(reader.ReadElementContentAsString("Type", reader.NamespaceURI));
 }
Example #2
0
        public object Call(string op, string action, string[] varnames, object[] varvals, Type returntype)
        {
            requestChannel.Open(TimeSpan.MaxValue);

            //Message msg =
            //Message.CreateMessage(MessageVersion.<FromBinding>,
            //      action,
            //      new CustomBodyWriter(op, varnames, varvals,
            //"<ns passed in from Proxy>"));

            Message msg =
                Message.CreateMessage(this.messageVersion, action, new CustomBodyWriter(op, varnames, varvals, "<ns passed in from Proxy>"));

            Message reply = requestChannel.Request(msg, TimeSpan.MaxValue);

            System.Xml.XmlDictionaryReader reader = reply.GetReaderAtBodyContents();
            reader.ReadToFollowing(op + "Result");
            return(reader.ReadElementContentAs(returntype, null));
        }