/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.hello_world_soap_http;

import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.handler.MessageContext;

import javax.annotation.Resource;
import javax.annotation.PreDestroy;
import javax.annotation.PostConstruct;

public class GreeterHandler implements SOAPHandler<SOAPMessageContext> {
    
    @Resource(name="greeting")
    private String greeting;

    @PostConstruct
    public void init() {
        System.out.println(this + " PostConstruct");
    }

    @PreDestroy
    public void destroy() {
        System.out.println(this + " PreDestroy");
    }

    public boolean handleMessage(SOAPMessageContext smc) {
        System.out.println(this + " handleMessage(): " + greeting);
        return true;
    }
       
    public boolean handleFault(SOAPMessageContext smc) {
        System.out.println(this + " handleFault()");
        return true;
    }
    
    public void close(MessageContext messageContext) {
        System.out.println(this + " close()");
    }
    
    public Set<QName> getHeaders(){
        return null;
    }
    
}
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.hello_world_soap_http;

import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.handler.MessageContext;

import javax.annotation.Resource;
import javax.annotation.PreDestroy;
import javax.annotation.PostConstruct;

public class GreeterHandler implements SOAPHandler<SOAPMessageContext> {
    
    @Resource(name="greeting")
    private String greeting;

    @PostConstruct
    public void init() {
        System.out.println(this + " PostConstruct");
    }

    @PreDestroy
    public void destroy() {
        System.out.println(this + " PreDestroy");
    }

    public boolean handleMessage(SOAPMessageContext smc) {
        System.out.println(this + " handleMessage(): " + greeting);
        return true;
    }
       
    public boolean handleFault(SOAPMessageContext smc) {
        System.out.println(this + " handleFault()");
        return true;
    }
    
    public void close(MessageContext messageContext) {
        System.out.println(this + " close()");
    }
    
    public Set<QName> getHeaders(){
        return null;
    }
    
}
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.hello_world_soap_http;

import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.handler.MessageContext;

import javax.annotation.Resource;
import javax.annotation.PreDestroy;
import javax.annotation.PostConstruct;

public class GreeterHandler implements SOAPHandler<SOAPMessageContext> {
    
    @Resource(name="greeting")
    private String greeting;

    @PostConstruct
    public void init() {
        System.out.println(this + " PostConstruct");
    }

    @PreDestroy
    public void destroy() {
        System.out.println(this + " PreDestroy");
    }

    public boolean handleMessage(SOAPMessageContext smc) {
        System.out.println(this + " handleMessage(): " + greeting);
        return true;
    }
       
    public boolean handleFault(SOAPMessageContext smc) {
        System.out.println(this + " handleFault()");
        return true;
    }
    
    public void close(MessageContext messageContext) {
        System.out.println(this + " close()");
    }
    
    public Set<QName> getHeaders(){
        return null;
    }
    
}

@@ -1984,3978 +1984,4 @@
  %0A%7D%0A
-/**%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements. See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership. The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License. You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing,%0A * software distributed under the License is distributed on an%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied. See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0Apackage org.apache.hello_world_soap_http;%0A%0Aimport java.util.Set;%0Aimport javax.xml.namespace.QName;%0Aimport javax.xml.ws.handler.soap.SOAPHandler;%0Aimport javax.xml.ws.handler.soap.SOAPMessageContext;%0Aimport javax.xml.ws.handler.MessageContext;%0A%0Aimport javax.annotation.Resource;%0Aimport javax.annotation.PreDestroy;%0Aimport javax.annotation.PostConstruct;%0A%0Apublic class GreeterHandler implements SOAPHandler%3CSOAPMessageContext%3E %7B%0A    %0A    @Resource(name=%22greeting%22)%0A    private String greeting;%0A%0A    @PostConstruct%0A    public void init() %7B%0A        System.out.println(this + %22 PostConstruct%22);%0A    %7D%0A%0A    @PreDestroy%0A    public void destroy() %7B%0A        System.out.println(this + %22 PreDestroy%22);%0A    %7D%0A%0A    public boolean handleMessage(SOAPMessageContext smc) %7B%0A        System.out.println(this + %22 handleMessage(): %22 + greeting);%0A        return true;%0A    %7D%0A       %0A    public boolean handleFault(SOAPMessageContext smc) %7B%0A        System.out.println(this + %22 handleFault()%22);%0A        return true;%0A    %7D%0A    %0A    public void close(MessageContext messageContext) %7B%0A        System.out.println(this + %22 close()%22);%0A    %7D%0A    %0A    public Set%3CQName%3E getHeaders()%7B%0A        return null;%0A    %7D%0A    %0A%7D%0A/**%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements. See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership. The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License. You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing,%0A * software distributed under the License is distributed on an%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied. See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0Apackage org.apache.hello_world_soap_http;%0A%0Aimport java.util.Set;%0Aimport javax.xml.namespace.QName;%0Aimport javax.xml.ws.handler.soap.SOAPHandler;%0Aimport javax.xml.ws.handler.soap.SOAPMessageContext;%0Aimport javax.xml.ws.handler.MessageContext;%0A%0Aimport javax.annotation.Resource;%0Aimport javax.annotation.PreDestroy;%0Aimport javax.annotation.PostConstruct;%0A%0Apublic class GreeterHandler implements SOAPHandler%3CSOAPMessageContext%3E %7B%0A    %0A    @Resource(name=%22greeting%22)%0A    private String greeting;%0A%0A    @PostConstruct%0A    public void init() %7B%0A        System.out.println(this + %22 PostConstruct%22);%0A    %7D%0A%0A    @PreDestroy%0A    public void destroy() %7B%0A        System.out.println(this + %22 PreDestroy%22);%0A    %7D%0A%0A    public boolean handleMessage(SOAPMessageContext smc) %7B%0A        System.out.println(this + %22 handleMessage(): %22 + greeting);%0A        return true;%0A    %7D%0A       %0A    public boolean handleFault(SOAPMessageContext smc) %7B%0A        System.out.println(this + %22 handleFault()%22);%0A        return true;%0A    %7D%0A    %0A    public void close(MessageContext messageContext) %7B%0A        System.out.println(this + %22 close()%22);%0A    %7D%0A    %0A    public Set%3CQName%3E getHeaders()%7B%0A        return null;%0A    %7D%0A    %0A%7D%0A

remove duplicate code