2012-06-18 65 views
1

如果GradesManagementService發生系統錯誤,則返回的響應對象爲空,但響應標頭包含診斷信息。我用什麼課程來獲取這些信息?GradesManagementService系統錯誤爲空

這裏是我的代碼:

GradesManagementServiceV10 port = service.getGradesManagementServiceV10(); 
GetGradeValuesByOrgUnitRequest r = new GetGradeValuesByOrgUnitRequest(); GetGradeValuesByOrgUnitResponse resp = new GetGradeValuesByOrgUnitResponse(); WSBindingProvider bp = (WSBindingProvider)port; bp.setOutboundHeaders(Headers.create(formatSOAPHeader())); ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, getUrl()); 
resp = port.getGradeValuesByOrgUnit(r); // the response is null. <------ How do I see what the error is? 

回答

1

在服務對象(在上面的代碼片段,將是port,Web服務代理類GradesManagementServiceV10的對象),ResponseHeader屬性將包含該信息(此物業的類型是ResponseHeaderInfo)。

0

如果你正在用Desire2Learn進行新的開發,我還建議你看一下Valence REST/JSON API。新功能和新API調用將在該系統中顯示http://docs.valence.desire2learn.com/(它始終部署,文檔打開等)