Search in sources :

Example 66 with WebMethod

use of javax.jws.WebMethod in project trainning by fernandotomasio.

the class SGCAuthService method createTurmaEfetiva.

/**
 * This is a sample web service operation
 *
 * @param cursoId
 * @param organizacaoGestoraId
 * @param organizacaoResponsavelId
 * @param numeroTurma
 * @param quantidadeVagas
 * @param inicioIndicacoes
 * @param terminoIndicacoes
 * @param fases
 * @return
 */
@WebMethod(operationName = "createTurmaEfetiva")
public Long createTurmaEfetiva(@WebParam(name = "cursoId") Long cursoId, @WebParam(name = "organizacaoGestoraId") Long organizacaoGestoraId, @WebParam(name = "organizacaoResponsavelId") Long organizacaoResponsavelId, @WebParam(name = "numeroTurma") Integer numeroTurma, @WebParam(name = "quantidadeVagas") Integer quantidadeVagas, @WebParam(name = "inicioIndicacoes") Date inicioIndicacoes, @WebParam(name = "terminoIndicacoes") Date terminoIndicacoes, @WebParam(name = "fases") FaseDTO[] fases) {
    TurmaEfetivaDTO turma = new TurmaEfetivaDTO();
    CursoDTO curso = trainningService.findCurso(cursoId);
    turma.setCurso(curso);
    turma.setOrganizacaoGestoraId(organizacaoGestoraId);
    turma.setResponsavelId(organizacaoResponsavelId);
    turma.setNumeroTurma(numeroTurma);
    PeriodoDTO periodoIndicacoes = new PeriodoDTO();
    periodoIndicacoes.setDataInicio(inicioIndicacoes);
    periodoIndicacoes.setDataTermino(terminoIndicacoes);
    turma.setPeriodoIndicacao(periodoIndicacoes);
    turma.setFases(fases);
    return trainningService.createCurso(curso);
}
Also used : TurmaEfetivaDTO(com.tomasio.projects.trainning.dto.TurmaEfetivaDTO) PeriodoDTO(com.tomasio.projects.trainning.dto.PeriodoDTO) CursoDTO(com.tomasio.projects.trainning.dto.CursoDTO) WebMethod(javax.jws.WebMethod)

Example 67 with WebMethod

use of javax.jws.WebMethod in project narayana by jbosstm.

the class InitiatorPortTypeImpl method response.

/**
 */
@WebMethod(operationName = "Response", action = "http://www.wstf.org/docs/scenarios/sc007/Response")
@Oneway
@Action(input = "http://www.wstf.org/docs/scenarios/sc007/Response")
@RequestWrapper(localName = "Response", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
public void response() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    InitiatorProcessor.getInitiator().handleResponse(inboundMap);
}
Also used : MessageContext(javax.xml.ws.handler.MessageContext) MAP(org.jboss.ws.api.addressing.MAP) WebMethod(javax.jws.WebMethod) Action(javax.xml.ws.Action) Oneway(javax.jws.Oneway) RequestWrapper(javax.xml.ws.RequestWrapper)

Example 68 with WebMethod

use of javax.jws.WebMethod in project narayana by jbosstm.

the class InitiatorPortTypeImpl method response.

/**
 */
@WebMethod(operationName = "Response", action = "http://fabrikam123.com/Response")
@Oneway
@Action(input = "http://fabrikam123.com/Response")
@RequestWrapper(localName = "Response", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
public void response() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    ATInitiatorProcessor.getInitiator().handleResponse(inboundMap);
}
Also used : MessageContext(javax.xml.ws.handler.MessageContext) MAP(org.jboss.ws.api.addressing.MAP) WebMethod(javax.jws.WebMethod) Action(javax.xml.ws.Action) Oneway(javax.jws.Oneway) RequestWrapper(javax.xml.ws.RequestWrapper)

Example 69 with WebMethod

use of javax.jws.WebMethod in project narayana by jbosstm.

the class TestServiceImpl method enlistXAResource.

@WebMethod(exclude = true)
public void enlistXAResource(int count) {
    TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
    try {
        for (int i = 0; i < count; i++) {
            TestXAResource testXAResource = new TestXAResource();
            tm.getTransaction().enlistResource(testXAResource);
        }
    } catch (Exception e) {
        log.error("could not enlist", e);
    }
}
Also used : TestXAResource(org.jboss.jbossts.txbridge.tests.inbound.utility.TestXAResource) TransactionManager(javax.transaction.TransactionManager) XAException(javax.transaction.xa.XAException) WebMethod(javax.jws.WebMethod)

Example 70 with WebMethod

use of javax.jws.WebMethod in project ART-TIME by Artezio.

the class IntegrationFacade method getAllSubprojects.

@WebMethod
@WebResult(name = "subprojects")
public List<Project> getAllSubprojects(@WebParam(name = "masterProjectCode") String masterProjectCode) {
    Project rootProject = projectRepository.findProject(masterProjectCode);
    List<Project> projects = projectService.getSubprojectsByProject(rootProject);
    projects.remove(rootProject);
    return projects;
}
Also used : Project(com.artezio.arttime.datamodel.Project) WebMethod(javax.jws.WebMethod) WebResult(javax.jws.WebResult)

Aggregations

WebMethod (javax.jws.WebMethod)107 Method (java.lang.reflect.Method)18 Path (javax.ws.rs.Path)17 IOException (java.io.IOException)16 WebResult (javax.jws.WebResult)13 MessageContext (javax.xml.ws.handler.MessageContext)12 WebServiceException (javax.xml.ws.WebServiceException)11 Test (org.junit.Test)10 DataHandler (javax.activation.DataHandler)9 GET (javax.ws.rs.GET)9 Action (javax.xml.ws.Action)9 ArrayList (java.util.ArrayList)8 Oneway (javax.jws.Oneway)8 POST (javax.ws.rs.POST)8 File (java.io.File)7 InputStream (java.io.InputStream)6 HttpServletRequest (javax.servlet.http.HttpServletRequest)6 QName (javax.xml.namespace.QName)6 RequestWrapper (javax.xml.ws.RequestWrapper)6 AbstractCodeGenTest (org.apache.cxf.tools.wsdlto.AbstractCodeGenTest)6