use of org.jboss.jbossts.xts.servicetests.service.XTSServiceTestInterpreter in project narayana by jbosstm.
the class XTSSubordinateServiceTestPortTypeImpl method serve.
/**
* @param commands
* @return
* returns org.jboss.jbossts.xts.servicetests.generated.ResultsType
*/
@WebMethod
@WebResult(name = "results", targetNamespace = "http://jbossts.jboss.org/xts/servicetests/generated", partName = "results")
public ResultsType serve(@WebParam(name = "commands", targetNamespace = "http://jbossts.jboss.org/xts/servicetests/generated", partName = "commands") CommandsType commands) {
ResultsType results = new ResultsType();
List<String> resultsList = results.getResultList();
List<String> commandList = commands.getCommandList();
MessageContext messageContext = context.getMessageContext();
HttpServletRequest servletRequest = ((HttpServletRequest) messageContext.get(MessageContext.SERVLET_REQUEST));
String path = servletRequest.getServletPath();
System.out.println("service " + path);
for (String s : commandList) {
System.out.println(" command " + s);
}
XTSServiceTestInterpreter service = XTSServiceTestInterpreter.getService(path);
service.processCommands(commandList, resultsList);
return results;
}
Aggregations