Java Code Examples for com.sun.xml.internal.ws.api.message.Packet#getWSDLOperationMapping()

The following examples show how to use com.sun.xml.internal.ws.api.message.Packet#getWSDLOperationMapping() . 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: WsaTubeHelper.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public String getSOAPAction(Packet packet) {
    String action = "";

    if (packet == null || packet.getMessage() == null) {
        return action;
    }

    if (wsdlPort == null) {
        return action;
    }

    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if (wsdlOp == null) {
        return action;
    }

    WSDLBoundOperation op = wsdlOp.getWSDLBoundOperation();
    action = op.getSOAPAction();
    return action;
}
 
Example 2
Source File: WsaTubeHelper.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public String getFaultAction(Packet requestPacket, Packet responsePacket) {
    String action = null;
    if(seiModel != null) {
        action = getFaultActionFromSEIModel(requestPacket,responsePacket);
    }
    if (action != null) {
        return action;
    } else {
        action = addVer.getDefaultFaultAction();
    }
    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            return getFaultAction(wbo, responsePacket);
        }
    }
    return action;
}
 
Example 3
Source File: WsaTubeHelper.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public String getOutputAction(Packet packet) {
    //String action = AddressingVersion.UNSET_OUTPUT_ACTION;
    String action = null;
    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if (wsdlOp != null) {
        JavaMethod javaMethod = wsdlOp.getJavaMethod();
        if (javaMethod != null) {
            JavaMethodImpl jm = (JavaMethodImpl) javaMethod;
            if (jm != null && jm.getOutputAction() != null && !jm.getOutputAction().equals("")) {
                return jm.getOutputAction();
            }
        }
        WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
        if (wbo != null) return getOutputAction(wbo);
    }
    return action;
}
 
Example 4
Source File: WsaTubeHelper.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method gives the Input addressing Action for a message.
 * It gives the Action set in the wsdl operation for the corresponding payload.
 * If it is not explicitly set, it gives the soapAction
 * @param packet
 * @return input Action
 */
public String getEffectiveInputAction(Packet packet) {
    //non-default SOAPAction beomes wsa:action
    if(packet.soapAction != null && !packet.soapAction.equals("")) {
        return packet.soapAction;
    }
    String action;

    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            WSDLOperation op = wbo.getOperation();
            action = op.getInput().getAction();
        } else {
            action = packet.soapAction;
        }
    } else {
        action = packet.soapAction;
    }
    return action;
}
 
Example 5
Source File: WsaTubeHelper.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method gives the Input addressing Action for a message.
 * It gives the Action set in the wsdl operation for the corresponding payload.
 * If it is not explicitly set, it gives the soapAction
 * @param packet
 * @return input Action
 */
public String getEffectiveInputAction(Packet packet) {
    //non-default SOAPAction beomes wsa:action
    if(packet.soapAction != null && !packet.soapAction.equals("")) {
        return packet.soapAction;
    }
    String action;

    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            WSDLOperation op = wbo.getOperation();
            action = op.getInput().getAction();
        } else {
            action = packet.soapAction;
        }
    } else {
        action = packet.soapAction;
    }
    return action;
}
 
Example 6
Source File: WsaTubeHelper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public String getFaultAction(Packet requestPacket, Packet responsePacket) {
    String action = null;
    if(seiModel != null) {
        action = getFaultActionFromSEIModel(requestPacket,responsePacket);
    }
    if (action != null) {
        return action;
    } else {
        action = addVer.getDefaultFaultAction();
    }
    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            return getFaultAction(wbo, responsePacket);
        }
    }
    return action;
}
 
Example 7
Source File: WsaTubeHelper.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public String getOutputAction(Packet packet) {
    //String action = AddressingVersion.UNSET_OUTPUT_ACTION;
    String action = null;
    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if (wsdlOp != null) {
        JavaMethod javaMethod = wsdlOp.getJavaMethod();
        if (javaMethod != null) {
            JavaMethodImpl jm = (JavaMethodImpl) javaMethod;
            if (jm != null && jm.getOutputAction() != null && !jm.getOutputAction().equals("")) {
                return jm.getOutputAction();
            }
        }
        WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
        if (wbo != null) return getOutputAction(wbo);
    }
    return action;
}
 
Example 8
Source File: WsaTubeHelper.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public String getOutputAction(Packet packet) {
    //String action = AddressingVersion.UNSET_OUTPUT_ACTION;
    String action = null;
    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if (wsdlOp != null) {
        JavaMethod javaMethod = wsdlOp.getJavaMethod();
        if (javaMethod != null) {
            JavaMethodImpl jm = (JavaMethodImpl) javaMethod;
            if (jm != null && jm.getOutputAction() != null && !jm.getOutputAction().equals("")) {
                return jm.getOutputAction();
            }
        }
        WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
        if (wbo != null) return getOutputAction(wbo);
    }
    return action;
}
 
Example 9
Source File: WsaTubeHelper.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public String getFaultAction(Packet requestPacket, Packet responsePacket) {
    String action = null;
    if(seiModel != null) {
        action = getFaultActionFromSEIModel(requestPacket,responsePacket);
    }
    if (action != null) {
        return action;
    } else {
        action = addVer.getDefaultFaultAction();
    }
    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            return getFaultAction(wbo, responsePacket);
        }
    }
    return action;
}
 
Example 10
Source File: WsaTubeHelper.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method gives the Input addressing Action for a message.
 * It gives the Action set in the wsdl operation for the corresponding payload.
 * If it is not explicitly set, it gives the soapAction
 * @param packet
 * @return input Action
 */
public String getEffectiveInputAction(Packet packet) {
    //non-default SOAPAction beomes wsa:action
    if(packet.soapAction != null && !packet.soapAction.equals("")) {
        return packet.soapAction;
    }
    String action;

    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            WSDLOperation op = wbo.getOperation();
            action = op.getInput().getAction();
        } else {
            action = packet.soapAction;
        }
    } else {
        action = packet.soapAction;
    }
    return action;
}
 
Example 11
Source File: WsaTubeHelper.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public String getInputAction(Packet packet) {
    String action = null;

    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            WSDLOperation op = wbo.getOperation();
            action = op.getInput().getAction();
        }
    }

    return action;
}
 
Example 12
Source File: WsaTubeHelper.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public boolean isInputActionDefault(Packet packet) {
    if (wsdlPort == null) {
        return false;
    }
    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if(wsdlOp == null) {
        return false;
    }
    WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
    WSDLOperation op = wbo.getOperation();
    return op.getInput().isDefaultAction();

}
 
Example 13
Source File: WsaTubeHelper.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isInputActionDefault(Packet packet) {
    if (wsdlPort == null) {
        return false;
    }
    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if(wsdlOp == null) {
        return false;
    }
    WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
    WSDLOperation op = wbo.getOperation();
    return op.getInput().isDefaultAction();

}
 
Example 14
Source File: WsaTubeHelper.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isInputActionDefault(Packet packet) {
    if (wsdlPort == null) {
        return false;
    }
    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if(wsdlOp == null) {
        return false;
    }
    WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
    WSDLOperation op = wbo.getOperation();
    return op.getInput().isDefaultAction();

}
 
Example 15
Source File: DatabindingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
JavaMethodImpl resolveJavaMethod(Packet req) throws DispatchException {
    WSDLOperationMapping m = req.getWSDLOperationMapping();
    if (m == null) {
        synchronized (this) {
            m = (operationDispatcher != null)
                    ? operationDispatcher.getWSDLOperationMapping(req)
                    : operationDispatcherNoWsdl.getWSDLOperationMapping(req);
        }
    }
    return (JavaMethodImpl) m.getJavaMethod();
}
 
Example 16
Source File: DatabindingImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
JavaMethodImpl resolveJavaMethod(Packet req) throws DispatchException {
    WSDLOperationMapping m = req.getWSDLOperationMapping();
    if (m == null) {
        synchronized (this) {
            m = (operationDispatcher != null)
                    ? operationDispatcher.getWSDLOperationMapping(req)
                    : operationDispatcherNoWsdl.getWSDLOperationMapping(req);
        }
    }
    return (JavaMethodImpl) m.getJavaMethod();
}
 
Example 17
Source File: WsaTubeHelper.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public String getInputAction(Packet packet) {
    String action = null;

    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            WSDLOperation op = wbo.getOperation();
            action = op.getInput().getAction();
        }
    }

    return action;
}
 
Example 18
Source File: WsaTubeHelper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
String getFaultActionFromSEIModel(Packet requestPacket, Packet responsePacket) {
    String action = null;
    if (seiModel == null || wsdlPort == 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();

        WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
        JavaMethodImpl jm = (wsdlOp != null) ? (JavaMethodImpl)wsdlOp.getJavaMethod() : null;
        if (jm != null) {
          for (CheckedExceptionImpl ce : jm.getCheckedExceptions()) {
              if (ce.getDetailType().tagName.getLocalPart().equals(name) &&
                      ce.getDetailType().tagName.getNamespaceURI().equals(ns)) {
                  return ce.getFaultAction();
              }
          }
        }
        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 getFaultActionFromSEIModel(Packet requestPacket, Packet responsePacket) {
    String action = null;
    if (seiModel == null || wsdlPort == 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();

        WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
        JavaMethodImpl jm = (wsdlOp != null) ? (JavaMethodImpl)wsdlOp.getJavaMethod() : null;
        if (jm != null) {
          for (CheckedExceptionImpl ce : jm.getCheckedExceptions()) {
              if (ce.getDetailType().tagName.getLocalPart().equals(name) &&
                      ce.getDetailType().tagName.getNamespaceURI().equals(ns)) {
                  return ce.getFaultAction();
              }
          }
        }
        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example 20
Source File: WsaTubeHelper.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
String getFaultActionFromSEIModel(Packet requestPacket, Packet responsePacket) {
    String action = null;
    if (seiModel == null || wsdlPort == 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();

        WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
        JavaMethodImpl jm = (wsdlOp != null) ? (JavaMethodImpl)wsdlOp.getJavaMethod() : null;
        if (jm != null) {
          for (CheckedExceptionImpl ce : jm.getCheckedExceptions()) {
              if (ce.getDetailType().tagName.getLocalPart().equals(name) &&
                      ce.getDetailType().tagName.getNamespaceURI().equals(ns)) {
                  return ce.getFaultAction();
              }
          }
        }
        return action;
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}