com.sun.xml.internal.ws.api.model.wsdl.WSDLFault Java Examples

The following examples show how to use com.sun.xml.internal.ws.api.model.wsdl.WSDLFault. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JavaMethodImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #2
Source File: PolicyWSDLGeneratorExtension.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #3
Source File: JavaMethodImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #4
Source File: PolicyWSDLGeneratorExtension.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #5
Source File: JavaMethodImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #6
Source File: PolicyWSDLGeneratorExtension.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #7
Source File: JavaMethodImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #8
Source File: PolicyWSDLGeneratorExtension.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #9
Source File: JavaMethodImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #10
Source File: PolicyWSDLGeneratorExtension.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #11
Source File: JavaMethodImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #12
Source File: PolicyWSDLGeneratorExtension.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #13
Source File: JavaMethodImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #14
Source File: PolicyWSDLGeneratorExtension.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #15
Source File: JavaMethodImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void freeze(WSDLPort portType) {
    this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
    // TODO: replace this with proper error handling
    if(wsdlOperation ==null)
        throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());

    //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
    //set the values from WSDLModel, if such annotations are not present or defaulted
    if(inputAction.equals("")) {
            inputAction = wsdlOperation.getOperation().getInput().getAction();
    } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
            //TODO input action might be from @Action or WebMethod(action)
            LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");

    if (!mep.isOneWay()) {
        if (outputAction.equals(""))
            outputAction = wsdlOperation.getOperation().getOutput().getAction();

        for (CheckedExceptionImpl ce : exceptions) {
            if (ce.getFaultAction().equals("")) {
                QName detailQName = ce.getDetailType().tagName;
                WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
                if(wsdlfault == null) {
                    // mismatch between wsdl model and SEI model, log a warning and use  SEI model for Action determination
                    LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
                            wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
                            ce.getDetailType().tagName);
                    ce.setFaultAction(ce.getDefaultFaultAction());
                } else {
                    ce.setFaultAction(wsdlfault.getAction());
                }
            }
        }
    }
}
 
Example #16
Source File: PolicyWSDLGeneratorExtension.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
    LOGGER.entering();
    final String messageName = (null == exception) ? null : exception.getMessageName();
    selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
    LOGGER.exiting();
}
 
Example #17
Source File: WsaTubeHelper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #18
Source File: WsaTubeHelper.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #19
Source File: WsaTubeHelper.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #20
Source File: WsaTubeHelper.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #21
Source File: WsaTubeHelper.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #22
Source File: WsaTubeHelper.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #23
Source File: WsaTubeHelper.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #24
Source File: WsaTubeHelper.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
    String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
    if (action != null) {
        return action;
    }

    action = addVer.getDefaultFaultAction();
    if (wbo == null) {
        return action;
    }

    try {
        SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
        if (sm == null) {
            return action;
        }

        if (sm.getSOAPBody() == null) {
            return action;
        }

        if (sm.getSOAPBody().getFault() == null) {
            return action;
        }

        Detail detail = sm.getSOAPBody().getFault().getDetail();
        if (detail == null) {
            return action;
        }

        String ns = detail.getFirstChild().getNamespaceURI();
        String name = detail.getFirstChild().getLocalName();

        WSDLOperation o = wbo.getOperation();

        WSDLFault fault = o.getFault(new QName(ns, name));
        if (fault == null) {
            return action;
        }

        action = fault.getAction();

        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}