當前位置: 首頁>>代碼示例>>Java>>正文


Java SOAPFault.getFaultActor方法代碼示例

本文整理匯總了Java中javax.xml.soap.SOAPFault.getFaultActor方法的典型用法代碼示例。如果您正苦於以下問題:Java SOAPFault.getFaultActor方法的具體用法?Java SOAPFault.getFaultActor怎麽用?Java SOAPFault.getFaultActor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.xml.soap.SOAPFault的用法示例。


在下文中一共展示了SOAPFault.getFaultActor方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: SOAP11Fault

import javax.xml.soap.SOAPFault; //導入方法依賴的package包/類
SOAP11Fault(SOAPFault fault) {
    this.faultcode = fault.getFaultCodeAsQName();
    this.faultstring = fault.getFaultString();
    this.faultactor = fault.getFaultActor();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:14,代碼來源:SOAP11Fault.java

示例2: handleResultFault

import javax.xml.soap.SOAPFault; //導入方法依賴的package包/類
protected void handleResultFault(SOAPFault fault)
{
	StringBuilder errorMsg = new StringBuilder();
	errorMsg.append("XML/A fault: ");
	
	String faultString = fault.getFaultString();
	if (faultString != null)
	{
		errorMsg.append(faultString);
		errorMsg.append("; ");
	}

	String faultActor = fault.getFaultActor();
	if (faultActor != null)
	{
		errorMsg.append("Actor: ");
		errorMsg.append(faultActor);
		errorMsg.append("; ");
	}

	String faultCode = fault.getFaultCode();
	if (faultCode != null)
	{
		errorMsg.append("Code: ");
		errorMsg.append(faultCode);
		errorMsg.append("; ");
	}
	
	throw new JRRuntimeException(errorMsg.toString());
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:31,代碼來源:JRXmlaQueryExecuter.java

示例3: handleResultFault

import javax.xml.soap.SOAPFault; //導入方法依賴的package包/類
protected void handleResultFault(SOAPFault fault)
{
	StringBuffer errorMsg = new StringBuffer();
	errorMsg.append("XML/A fault: ");

	String faultString = fault.getFaultString();
	if (faultString != null)
	{
		errorMsg.append(faultString);
		errorMsg.append("; ");
	}

	String faultActor = fault.getFaultActor();
	if (faultActor != null)
	{
		errorMsg.append("Actor: ");
		errorMsg.append(faultActor);
		errorMsg.append("; ");
	}

	String faultCode = fault.getFaultCode();
	if (faultCode != null)
	{
		errorMsg.append("Code: ");
		errorMsg.append(faultCode);
		errorMsg.append("; ");
	}

	throw new JRRuntimeException(errorMsg.toString());
}
 
開發者ID:JockiHendry,項目名稱:ireport-fork,代碼行數:31,代碼來源:OLAPQueryExecuter.java

示例4: testCustomRoleNodeFault12

import javax.xml.soap.SOAPFault; //導入方法依賴的package包/類
/**
 * Tests that Role and Node
 * are set properly on SOAP 1.2 Fault.
 * @throws Exception
 */
public void testCustomRoleNodeFault12() throws Exception {
    MessageFactory mf = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
    SOAPMessage sm = mf.createMessage();
    SOAPBody body = sm.getSOAPBody();
    
    SOAPFault fault = body.addFault();
    fault.setFaultRole("TestRole");
    fault.setFaultNode("http://XMLFaultTest/testCustomRoleNodeFault/");
    
    XMLFault xmlFault = XMLFaultUtils.createXMLFault(fault);
    
    SOAPFault retFault = XMLFaultUtils.createSAAJFault(xmlFault, body);
    
    assertTrue(retFault != null);
    
    String role = retFault.getFaultRole();
    assertTrue(role != null);
    assertTrue(role.equals("TestRole"));
    
    // Actor and role should be the same
    String actor = retFault.getFaultActor();
    assertTrue(actor != null);
    assertTrue(actor.equals("TestRole"));

    String node = retFault.getFaultNode();
    assertTrue(node != null);
    assertTrue(node.equals("http://XMLFaultTest/testCustomRoleNodeFault/"));
}
 
開發者ID:wso2,項目名稱:wso2-axis2,代碼行數:34,代碼來源:XMLFaultTest.java

示例5: testGetFaultActor

import javax.xml.soap.SOAPFault; //導入方法依賴的package包/類
@Validated @Test
public void testGetFaultActor() throws Exception {
    SOAPMessage msg = MessageFactory.newInstance().createMessage();
    SOAPFault sf = msg.getSOAPBody().addFault();
    sf.setFaultActor("/faultActorURI");
    sf.setFaultActor("/faultActorURI2");
    String result = sf.getFaultActor();

    if (!result.equals("/faultActorURI2")) {
        fail("Fault Actor not properly set");
    }
}
 
開發者ID:wso2,項目名稱:wso2-axis2,代碼行數:13,代碼來源:SOAPFaultTest.java


注:本文中的javax.xml.soap.SOAPFault.getFaultActor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。