JBITransportPipepublic class JBITransportPipe extends com.sun.xml.ws.api.pipe.helper.AbstractPipeImpl This is the main Pipe that is used by JAX-WS client runtime to sendRequest the
request to the service and return the response back to the client. |
Fields Summary |
---|
private URL | wsdlLocation | private QName | service | private com.sun.xml.ws.api.model.wsdl.WSDLPort | wsdlPort |
Methods Summary |
---|
public com.sun.xml.ws.api.pipe.Pipe | copy(com.sun.xml.ws.api.pipe.PipeCloner cloner)
return new JBITransportPipe(this, cloner);
| public com.sun.xml.ws.api.message.Packet | process(com.sun.xml.ws.api.message.Packet request)
try {
// TODO get the oneway flag from the message
// Boolean isOneway = request.getMessage().isOneWay(wSDLPort);
boolean isOneWay = !request.expectReply;
QName operation = request.getMessage().getOperation(wsdlPort).getName();
String endpointName = wsdlPort.getName().getLocalPart();
NMRClientConnection con =
new NMRClientConnection(wsdlLocation, service, endpointName, operation, isOneWay);
con.initialize();
con.sendRequest(request.getMessage());
Message respMsg = con.receiveResponse();
Packet reply = request.createResponse(respMsg);
if(!isOneWay) {
con.sendStatus();
}
return reply;
} catch(Exception wex) {
RuntimeException ex = new RuntimeException(wex.getMessage());
ex.setStackTrace(wex.getStackTrace());
throw ex;
}
|
|