From: <id...@us...> - 2009-04-21 16:55:57
|
Revision: 140 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=140&view=rev Author: idueppe Date: 2009-04-21 16:55:12 +0000 (Tue, 21 Apr 2009) Log Message: ----------- add additional web service annotation to bean class Modified Paths: -------------- trunk/sandbox/cse-ip/sc-mapper/src/main/java/de/campussource/cse/mapper/IdentityMapperBean.java Modified: trunk/sandbox/cse-ip/sc-mapper/src/main/java/de/campussource/cse/mapper/IdentityMapperBean.java =================================================================== --- trunk/sandbox/cse-ip/sc-mapper/src/main/java/de/campussource/cse/mapper/IdentityMapperBean.java 2009-04-21 16:51:55 UTC (rev 139) +++ trunk/sandbox/cse-ip/sc-mapper/src/main/java/de/campussource/cse/mapper/IdentityMapperBean.java 2009-04-21 16:55:12 UTC (rev 140) @@ -3,6 +3,9 @@ import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; import javax.jws.WebService; import javax.persistence.EntityExistsException; import javax.persistence.EntityManager; @@ -27,7 +30,8 @@ @Override @TransactionAttribute(TransactionAttributeType.REQUIRED) - public void persistClientObjectId(Long busId, Long clientInstanceId, String clientObjectId) { + @WebMethod(action="persistClientObjectId") + public void persistClientObjectId(@WebParam(name="BusId") Long busId, @WebParam(name="ClientInstanceId") Long clientInstanceId, @WebParam(name="ClientObjectId") String clientObjectId) { Validate.notNull(busId, "IdentityMapper.persistClientObjectId: Parameter busId is mandatory."); Validate.notNull(clientInstanceId, "IdentityMapper.persistClientObjectId: Parameter clientInstanceId is mandatory."); Validate.notEmpty(clientObjectId, "IdentityMapper.persistClientObjectId: Parameter clientObjectId is mandatory."); @@ -42,7 +46,8 @@ @Override @TransactionAttribute(TransactionAttributeType.REQUIRED) - public Long toBusId(Long clientInstanceId, String clientObjectId) { + @WebMethod(action="toBusId") + public @WebResult(name="BusId") Long toBusId(@WebParam(name="ClientInstanceId") Long clientInstanceId, @WebParam(name="ClientObjectId") String clientObjectId) { Validate.notNull(clientInstanceId, "IdentityMapper.toBusId: Parameter clientInstanceId is mandatory."); Validate.notNull(clientObjectId, "IdentityMapper.toBusId: Parameter clientObjectId is mandatory."); try { @@ -55,17 +60,11 @@ } } - private Long createMapping(Long clientInstanceId, String clientObjectId) { - MappedClientObject mapped = new MappedClientObject(); - mapped.setClientInstanceId(clientInstanceId); - mapped.setClientObjectId(clientObjectId); - manager.persist(mapped); - return mapped.getBusId(); - } @Override @TransactionAttribute(TransactionAttributeType.REQUIRED) - public String toClientObjectId(Long busId, Long clientInstanceId) throws IdNotFoundException { + @WebMethod(action="toClientObjectId") + public @WebResult(name="ClientObjectId") String toClientObjectId(@WebParam(name="busId") Long busId, @WebParam(name="clientInstanceId") Long clientInstanceId) throws IdNotFoundException { Validate.notNull(busId,"IdentityMapper.toClientObjectId: Parameter busId is mandatory."); Validate.notNull(clientInstanceId,"IdentityMapper.toClientObjectId: Parameter clientInstanceId is mandatory."); try { @@ -76,7 +75,13 @@ } catch (NoResultException nre) { throw new IdNotFoundException(nre); } + } + private Long createMapping(Long clientInstanceId, String clientObjectId) { + MappedClientObject mapped = new MappedClientObject(); + mapped.setClientInstanceId(clientInstanceId); + mapped.setClientObjectId(clientObjectId); + manager.persist(mapped); + return mapped.getBusId(); } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |