Implementation of the SOAP server - server.php:
<?php
// turn off WSDL caching
ini_set("soap.wsdl_cache_enabled","0");
// model, which uses in web service functions as parameter| # Author: Sunny Chakraborty (@sunnyc7) | |
| # Note: No one has written Exchange Web Services Scripts EVER without thanking Glenn Scales and Mike Pfeiffer :). | |
| # Hence..thanks Glenn and Mike. | |
| # Glenn Scales Blog > http://gsexdev.blogspot.com/ | |
| # Mike Pfeiffer blog > http://www.mikepfeiffer.net/ | |
| #region Helper Functions | |
| Function Delete-MessageItem { |
| package com.schremser.spring.jms.client; | |
| import com.schremser.spring.jms.core.JndiConfiguration; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.context.ConfigurableApplicationContext; | |
| import org.springframework.context.annotation.Bean; |
| package controllers; | |
| public class Application extends Controller { | |
| // in cache during 1800 seconds (30 min) | |
| @Cached(key = "pagingList", duration = 1800) | |
| public static Result index(Integer page) { | |
| String uuid = session("uuid"); | |
| if (uuid == null) { | |
| uuid = java.util.UUID.randomUUID().toString(); |
| package controllers; | |
| import java.io.File; | |
| import java.util.List; | |
| import play.mvc.BodyParser; | |
| import play.mvc.BodyParser.Of; | |
| import play.mvc.Controller; | |
| import play.mvc.Http.MultipartFormData; | |
| import play.mvc.Http.MultipartFormData.FilePart; |
| <!DOCTYPE html> | |
| <html class="no-js fuelux"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title>E-Learning</title> | |
| <link rel="stylesheet" href="https://fuelcdn.com/fuelux/2.3/css/fuelux.min.css"> | |
| <link rel="stylesheet" href="css/main.css"> | |
| </head> | |
| <body> |
| package object mail { | |
| implicit def stringToSeq(single: String): Seq[String] = Seq(single) | |
| implicit def liftToOption[T](t: T): Option[T] = Some(t) | |
| sealed abstract class MailType | |
| case object Plain extends MailType | |
| case object Rich extends MailType | |
| case object MultiPart extends MailType |
| package patch; | |
| import static play.libs.F.None; | |
| import static play.libs.F.Some; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; |
| public class Application extends Controller { | |
| public static void index() { | |
| render(); | |
| } | |
| public static void uploadPicture(Picture picture) { | |
| picture.save(); | |
| index(); | |
| } |