WSDL 스키마에서 POJO가 생성되었지만 오류가 적절한 @Webfault
예외로 매핑되지 않은 것처럼 보입니다. AXLError
을받는 대신 ServerSOAPFaultException
을받습니다.SOAP - 적절한 @WebFault 예외 대신 ServerSOAPFaultException이 throw됩니다.
생성 된 예외 파일 : 다음 예외가 발생
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>Cannot insert or update pattern. A DN exists with the same pattern and partition.</faultstring>
<detail>
<axlError>
<axlcode>4052</axlcode>
<axlmessage>Cannot insert or update pattern. A DN exists with the same pattern and partition.</axlmessage>
<request>addLine</request>
</axlError>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
: 내가받을 결코 왜
com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Cannot insert or update pattern. A DN exists with the same pattern and partition. Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:124)
at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
at com.sun.proxy.$Proxy135.addLine(Unknown Source)
at com.company.product.provisioning.AxlApi.addLine(AxlApi.java:243)
...
당신이 날 지점 시겠어요
package com.cisco.axlapiservice;
import javax.xml.ws.WebFault;
/**
* This class was generated by Apache CXF 3.1.8
* 2016-11-13T14:30:37.692+02:00
* Generated source version: 3.1.8
*/
@WebFault(name = "axlError", targetNamespace = "http://www.cisco.com/AXL/API/11.5")
public class AXLError extends Exception {
private com.cisco.axl.api._11.AXLError axlError;
public AXLError() {
super();
}
public AXLError(String message) {
super(message);
}
public AXLError(String message, Throwable cause) {
super(message, cause);
}
public AXLError(String message, com.cisco.axl.api._11.AXLError axlError) {
super(message);
this.axlError = axlError;
}
public AXLError(String message, com.cisco.axl.api._11.AXLError axlError, Throwable cause) {
super(message, cause);
this.axlError = axlError;
}
public com.cisco.axl.api._11.AXLError getFaultInfo() {
return this.axlError;
}
}
응답 서버에서 반환 AXLError
?
이것은 @ WebFault를 매핑하는 CXF의 표준 방식입니다. WebFault를받는 WebService 메소드를 잡으려고 시도하면,'AXLError' 예외가 발생합니다.이 예외는'com.cisco.axl.api._11.AXLError getFaultInfo()'에 오류의 세부 사항을 담고 있습니다. 문제가 무엇입니까? – pedrofb
불행히도'AXLError' 대신'ServerSOAPFaultException'을 던집니다. –
스택 추적을 게시 할 때 도움이 될 것입니다. – pedrofb