fault.java

来自「openacs source for CPE wan management」· Java 代码 · 共 55 行

JAVA
55
字号
/*
 * FactoryResetResponse.java
 *
 * Created on Tre鑙adienis, 2008, Sausio 30, 20.33
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.openacs.message;

import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import org.openacs.Message;

/**
 *
 * @author Administrator
 */
public class Fault extends Message  {
    public Fault () {
        name = "Fault";
}

    protected void createBody(SOAPBodyElement body, SOAPFactory spf) throws SOAPException {
    }

    protected void parseBody(SOAPBodyElement body, SOAPFactory spf) throws SOAPException {
        faultCode = getRequestElement (spf, body, "faultcode");
        faultString = getRequestElement (spf, body, "faultstring");
        SOAPElement detail = getRequestChildElement (spf, body, "detail");
        SOAPElement cwmpfault = getRequestChildElement2 (spf, detail, "Fault");
        faultCodeCwmp = getRequestElement (spf, cwmpfault, "FaultCode");
        faultStringCwmp = getRequestElement (spf, cwmpfault, "FaultString");
    }

    @Override
    public String toString () {
        return "FAULT: code="+faultCode+" msg="+faultString+" ccode="+faultCodeCwmp+" cmsg="+faultStringCwmp;
    }
    private String faultCode;
    private String faultString;
    private String faultCodeCwmp;
    private String faultStringCwmp;
    
    public String getFaultString () {
        return faultString;
    }
    public String getFaultStringCwmp () {
        return faultStringCwmp;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?