Search in sources :

Example 1 with TieHandler

use of com.sun.xml.ws.server.sei.TieHandler in project metro-jax-ws by eclipse-ee4j.

the class DatabindingImpl method deserializeRequest.

public JavaCallInfo deserializeRequest(Packet req) {
    com.sun.xml.ws.api.databinding.JavaCallInfo call = new com.sun.xml.ws.api.databinding.JavaCallInfo();
    try {
        JavaMethodImpl wsdlOp = resolveJavaMethod(req);
        TieHandler tie = wsdlOpMap.get(wsdlOp);
        call.setMethod(tie.getMethod());
        Object[] args = tie.readRequest(req.getMessage());
        call.setParameters(args);
    } catch (DispatchException e) {
        call.setException(e);
    }
    return call;
}
Also used : JavaMethodImpl(com.sun.xml.ws.model.JavaMethodImpl) DispatchException(com.sun.xml.ws.wsdl.DispatchException) JavaCallInfo(com.oracle.webservices.api.databinding.JavaCallInfo) TieHandler(com.sun.xml.ws.server.sei.TieHandler)

Example 2 with TieHandler

use of com.sun.xml.ws.server.sei.TieHandler in project metro-jax-ws by eclipse-ee4j.

the class DatabindingImpl method serializeResponse.

@Override
public Packet serializeResponse(JavaCallInfo call) {
    Method method = call.getMethod();
    Message message = null;
    if (method != null) {
        TieHandler th = tieHandlers.get(method);
        if (th != null) {
            return th.serializeResponse(call);
        }
    }
    if (call.getException() instanceof DispatchException) {
        message = ((DispatchException) call.getException()).fault;
    }
    Packet p = (Packet) packetFactory.createContext(message);
    p.setState(Packet.State.ServerResponse);
    return p;
}
Also used : Packet(com.sun.xml.ws.api.message.Packet) Message(com.sun.xml.ws.api.message.Message) Method(java.lang.reflect.Method) DispatchException(com.sun.xml.ws.wsdl.DispatchException) TieHandler(com.sun.xml.ws.server.sei.TieHandler)

Aggregations

TieHandler (com.sun.xml.ws.server.sei.TieHandler)2 DispatchException (com.sun.xml.ws.wsdl.DispatchException)2 JavaCallInfo (com.oracle.webservices.api.databinding.JavaCallInfo)1 Message (com.sun.xml.ws.api.message.Message)1 Packet (com.sun.xml.ws.api.message.Packet)1 JavaMethodImpl (com.sun.xml.ws.model.JavaMethodImpl)1 Method (java.lang.reflect.Method)1