Search in sources :

Example 1 with WSDLPort

use of com.sun.xml.ws.api.model.wsdl.WSDLPort in project Payara by payara.

the class PipeHelper method isTwoWay.

public boolean isTwoWay(boolean twoWayIsDefault, Packet request) {
    boolean twoWay = twoWayIsDefault;
    Message m = request.getMessage();
    if (m != null) {
        WSDLPort wsdlModel = (WSDLPort) getProperty(PipeConstants.WSDL_MODEL);
        if (wsdlModel != null) {
            twoWay = (m.isOneWay(wsdlModel) ? false : true);
        }
    }
    return twoWay;
}
Also used : Message(com.sun.xml.ws.api.message.Message) WSDLPort(com.sun.xml.ws.api.model.wsdl.WSDLPort)

Example 2 with WSDLPort

use of com.sun.xml.ws.api.model.wsdl.WSDLPort in project Payara by payara.

the class WebServicesDelegateImpl method getAuthContextID.

public String getAuthContextID(MessageInfo messageInfo) {
    // make this more efficient by operating on packet
    String rvalue = null;
    if (messageInfo instanceof PacketMessageInfo) {
        PacketMessageInfo pmi = (PacketMessageInfo) messageInfo;
        Packet p = (Packet) pmi.getRequestPacket();
        if (p != null) {
            Message m = p.getMessage();
            if (m != null) {
                WSDLPort port = (WSDLPort) messageInfo.getMap().get("WSDL_MODEL");
                if (port != null) {
                    WSDLBoundOperation w = m.getOperation(port);
                    if (w != null) {
                        QName n = w.getName();
                        if (n != null) {
                            rvalue = n.getLocalPart();
                        }
                    }
                }
            }
        }
        return rvalue;
    } else {
        // make this more efficient by operating on packet
        return getOpName((SOAPMessage) messageInfo.getRequestMessage());
    }
}
Also used : Packet(com.sun.xml.ws.api.message.Packet) Message(com.sun.xml.ws.api.message.Message) SOAPMessage(javax.xml.soap.SOAPMessage) WSDLBoundOperation(com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation) QName(javax.xml.namespace.QName) PacketMessageInfo(com.sun.enterprise.security.jmac.provider.PacketMessageInfo) WSDLPort(com.sun.xml.ws.api.model.wsdl.WSDLPort)

Example 3 with WSDLPort

use of com.sun.xml.ws.api.model.wsdl.WSDLPort in project Payara by payara.

the class WebServicesDelegateImpl method getBinding.

public MessageSecurityBindingDescriptor getBinding(ServiceReferenceDescriptor svcRef, Map properties) {
    MessageSecurityBindingDescriptor binding = null;
    WSDLPort p = (WSDLPort) properties.get("WSDL_MODEL");
    QName portName = null;
    if (p != null) {
        portName = p.getName();
    }
    if (portName != null) {
        ServiceRefPortInfo i = svcRef.getPortInfoByPort(portName);
        if (i != null) {
            binding = i.getMessageSecurityBinding();
        }
    }
    return binding;
}
Also used : MessageSecurityBindingDescriptor(com.sun.enterprise.deployment.runtime.common.MessageSecurityBindingDescriptor) QName(javax.xml.namespace.QName) ServiceRefPortInfo(com.sun.enterprise.deployment.ServiceRefPortInfo) WSDLPort(com.sun.xml.ws.api.model.wsdl.WSDLPort)

Aggregations

WSDLPort (com.sun.xml.ws.api.model.wsdl.WSDLPort)3 Message (com.sun.xml.ws.api.message.Message)2 QName (javax.xml.namespace.QName)2 ServiceRefPortInfo (com.sun.enterprise.deployment.ServiceRefPortInfo)1 MessageSecurityBindingDescriptor (com.sun.enterprise.deployment.runtime.common.MessageSecurityBindingDescriptor)1 PacketMessageInfo (com.sun.enterprise.security.jmac.provider.PacketMessageInfo)1 Packet (com.sun.xml.ws.api.message.Packet)1 WSDLBoundOperation (com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation)1 SOAPMessage (javax.xml.soap.SOAPMessage)1