Package uk.org.woodcraft.bookings.soap.jaxws

Examples of uk.org.woodcraft.bookings.soap.jaxws.AuthenticateResponse


 
  public SOAPMessage handleSOAPRequest(SOAPMessage request) throws SOAPException {
      SOAPBody soapBody = request.getSOAPBody();
      @SuppressWarnings("rawtypes")
    Iterator iterator = soapBody.getChildElements();
      AuthenticateResponse authResponse = null;
      Object responsePojo = null;
     
      while (iterator.hasNext()) {
        Object next = iterator.next();
        if (next instanceof SOAPElement) {
          SOAPElement soapElement = (SOAPElement) next;
          QName qname = soapElement.getElementQName();
            if (AUTHENTICATE_QNAME.equals(qname)) {
              authResponse = handleAuthRequest(soapElement);
              break;
            } else if (MYVILLAGE_SIGNUP_QNAME.equals(qname)) {
              responsePojo = handleMyVillageSignupRequest(soapElement);
              break;
            }
        }
      }
     
      SOAPMessage soapResponse = messageFactory.createMessage();
      soapBody = soapResponse.getSOAPBody();
     
      if (authResponse == null)
      {
        SOAPFault fault = soapBody.addFault();
        fault.setFaultString("Missing authetication data");
        return soapResponse;
       
      } else if (!authResponse.isReturn())
      {
        SOAPFault fault = soapBody.addFault();
        fault.setFaultString("Failed authentication");
        return soapResponse;
      }
View Full Code Here


    String apiUsername = request.getUsername();
    String apiPassword = request.getPassword();
   
    boolean success = api.authenticate(apiSitekey, apiUsername, apiPassword);
   
    AuthenticateResponse response = new AuthenticateResponse();
    response.setReturn(success);
    return response;
  }
View Full Code Here

TOP

Related Classes of uk.org.woodcraft.bookings.soap.jaxws.AuthenticateResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.