package de.factoryfx.soap;

import de.factoryfx.factory.FactoryBase;
import de.factoryfx.factory.SimpleFactoryBase;
import de.factoryfx.factory.atrribute.FactoryReferenceAttribute;

import javax.servlet.http.HttpServletRequest;
import java.util.Optional;
import java.util.function.Predicate;

public class SoapHandlerFactory<S,V,R extends FactoryBase<?,V,R>> extends SimpleFactoryBase<SoapHandler<S>,V,R> {

    public final FactoryReferenceAttribute<S,FactoryBase<S,V,R>> serviceBean = new FactoryReferenceAttribute<>(null);
    public final FactoryReferenceAttribute<Predicate<HttpServletRequest>,FactoryBase<Predicate<HttpServletRequest>,V,R>> urlTest = new FactoryReferenceAttribute<>(null);

    @Override
    public SoapHandler<S> createImpl() {
        S webService = serviceBean.instance();
        return new SoapHandler<>(new WebServiceRequestDispatcher(webService), new SOAPMessageUtil(JAXBSoapUtil.getJAXBContextForWebService(webService.getClass())), Optional.ofNullable(urlTest.instance()).orElse(s->true));
    }
}



@@ -21,16 +21,128 @@
 .soap;%0A%0A
+import java.util.Optional;%0Aimport java.util.function.Predicate;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0A%0A
 import d
@@ -291,119 +291,8 @@
 e;%0A%0A
-import javax.servlet.http.HttpServletRequest;%0Aimport java.util.Optional;%0Aimport java.util.function.Predicate;%0A%0A
 publ
@@ -390,19 +390,16 @@
 pHandler
-%3CS%3E
 ,V,R%3E %7B%0A
@@ -728,11 +728,8 @@
 dler
-%3CS%3E
  cre
@@ -817,18 +817,16 @@
 pHandler
-%3C%3E
 (new Web

fix build error