use of javax.jws.WebMethod in project cxf by apache.
the class CustomerService method getCustomers.
@WebMethod
@WebResult(name = "customers")
public Customers getCustomers() {
Customers cbean = new Customers();
cbean.setCustomer(customers.values());
return cbean;
}
use of javax.jws.WebMethod in project cxf by apache.
the class BaseGreeterImpl method testDocLitBare.
@WebMethod
public BareDocumentResponse testDocLitBare(String in) {
invocationCount++;
BareDocumentResponse res = new BareDocumentResponse();
res.setCompany("CXF");
res.setId(1);
return res;
}
use of javax.jws.WebMethod in project opentheso by miledrousset.
the class Soap method conceptToSkos.
/**
* Web service operation
* @param idConcept
* @param idThesaurus
* @return
*/
@WebMethod(operationName = "conceptToSkos")
public String conceptToSkos(@WebParam(name = "idConcept") String idConcept, @WebParam(name = "idThesaurus") String idThesaurus) {
if (ds == null)
return null;
if (prefs == null)
return null;
ExportFromBDD exportFromBDD = new ExportFromBDD();
exportFromBDD.setServerArk(prefs.getProperty("serverArk"));
exportFromBDD.setServerAdress(prefs.getProperty("cheminSite"));
String skos = exportFromBDD.exportConcept(ds, idThesaurus, idConcept).toString();
return skos;
}
use of javax.jws.WebMethod in project Payara by payara.
the class ServiceInterfaceGenerator method calculateMethods.
private Method[] calculateMethods(Class sib, Method[] initialList) {
// we start by assuming the @WebMethod was NOT used on this class
boolean webMethodAnnotationUsed = false;
List<Method> list = new ArrayList<Method>();
for (Method m : initialList) {
WebMethod wm = m.getAnnotation(WebMethod.class);
if ((wm != null) && !webMethodAnnotationUsed) {
webMethodAnnotationUsed = true;
// reset the list, this is the first annotated method we find
list.clear();
}
if (wm != null) {
list.add(m);
} else {
if (!webMethodAnnotationUsed && !m.getDeclaringClass().equals(java.lang.Object.class)) {
list.add(m);
}
}
}
return list.toArray(new Method[list.size()]);
}
use of javax.jws.WebMethod in project quickstart by wildfly.
the class RestaurantServiceATImpl method makeBooking.
/**
* Book a number of seats in the restaurant. Enrols a Participant, then passes the call through to the business logic.
*/
@WebMethod
public void makeBooking() throws RestaurantException {
System.out.println("[SERVICE] Restaurant service invoked to make a booking");
String transactionId;
try {
// get the transaction ID associated with this thread
transactionId = UserTransactionFactory.userTransaction().toString();
// enlist the Participant for this service:
RestaurantParticipant restaurantParticipant = new RestaurantParticipant(transactionId);
TransactionManager transactionManager = TransactionManagerFactory.transactionManager();
System.out.println("[SERVICE] Enlisting a Durable2PC participant into the AT");
transactionManager.enlistForDurableTwoPhase(restaurantParticipant, "restaurantServiceAT:" + UUID.randomUUID());
} catch (Exception e) {
throw new RestaurantException("Error when enlisting participant", e);
}
// invoke the backend business logic:
System.out.println("[SERVICE] Invoking the back-end business logic");
mockRestaurantManager.makeBooking(transactionId);
}
Aggregations