Community
cancel
Showing results for 
Search instead for 
Did you mean: 
kalpah
Beginner
56 Views

WSManFault

Can anyone tell me the reason why I am getting the error "WSManFault.Code: SOAP-ENV:Sender WSManFault.SubCode: wsman:SchemaValidationError" The error occurs at the following code segment. It throws an exception.

--------------------------------------------------------------------------------------------------------
[csharp]private AmtStorageStatus WSMAN_LockBlock(string SessionHandle, uint BlockHandle)
        {
            if (WsMan == null) return AmtStorageStatus.NO_WSMAN;

            try
            {
                AMT_ThirdPartyDataStorageService service = new AMT_ThirdPartyDataStorageService(WsMan);
                return (AmtStorageStatus)service.LockBlock(SessionHandle, BlockHandle);
            }
            catch (Exception e)
            {
                WSManException wsManException = e as WSManException;
                if (wsManException != null)
                {
                    AmtDebugForm.LogEvent(this, AmtDebugForm.EventType.CallFailed, "AmtStorageWrapper.WSMAN_LockBlock WSMAN error",
                    String.Format("WSMAN Fault\r\nCode: {0} (subcode: {1})\r\nDetail: {2}\r\nReason: {3}",
                    wsManException.WSManFault.Code.Value, wsManException.WSManFault.Code.Subcode.Value,
                    wsManException.WSManFault.Detail.Text, wsManException.WSManFault.Reason.Text));
                }
                CimException cimException = e as CimException;
                if (cimException != null)
                {
                    AmtDebugForm.LogEvent(this, AmtDebugForm.EventType.CallFailed, "AmtStorageWrapper.WSMAN_LockBlock CIM error",
                    String.Format("CIM Fault\r\nCode: {0} (subcode: {1})\r\nDetail: {2}\r\nReason: {3}",
                    cimException.CimFault.Code.Value, cimException.CimFault.Code.Subcode.Value,
                    cimException.CimFault.Detail.Text, cimException.CimFault.Reason.Text));
                }

                AmtDebugForm.LogEvent(this, AmtDebugForm.EventType.CallFailed, "AmtStorageWrapper.WSMAN_LockBlock",
                    String.Format("{0}\r\n{1}", e.Message, e.StackTrace));
                Debug.Print("EXCEPTION: {0} (type {1})", e.Message, e.GetType());
                Debug.Print("EXCEPTION STACK: {0}", e.StackTrace);

                throw; // ERROR OCCURS HERE

            }
        }[/csharp]

--------------------------------------------------------------------------------------------------------
0 Kudos
0 Replies
Reply