static setter method injection in Spring

Posted by vishnu on Stack Overflow See other posts from Stack Overflow or by vishnu
Published on 2011-01-07T20:47:08Z Indexed on 2011/01/07 21:53 UTC
Read the original article Hit count: 251

Filed under:
|
|

Hi, I have following requirement I wanted to pass http:\\localhost:9080\testws.cls value as setter injection through spring configuration file. How can i do this static variable setter injection for WSDL_LOCATION

public class Code1
    extends javax.xml.ws.Service
{

    private final static URL CODE1_WSDL_LOCATION;

    static {
        URL url = null;
        try {
            url = new URL("http:\\localhost:9080\testws.cls");
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        CODE1_WSDL_LOCATION = url;
    }

    public Code1(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public Code1() {
        super(CODE1_WSDL_LOCATION, new QName("http://tempuri.org", "Code1"));
    }

    /**
     * 
     * @return
     *     returns Code1Soap
     */
    @WebEndpoint(name = "Code1Soap")
    public Code1Soap getCode1Soap() {
        return (Code1Soap)super.getPort(new QName("http://tempuri.org", "Code1Soap"), Code1Soap.class);
    }

}

Please help me out.

© Stack Overflow or respective owner

Related posts about java

Related posts about spring