Skip to content

Instantly share code, notes, and snippets.

@zubairov
Created February 3, 2011 13:38
Show Gist options
  • Save zubairov/809471 to your computer and use it in GitHub Desktop.
Save zubairov/809471 to your computer and use it in GitHub Desktop.
package org.talend.test;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.Provider;
import org.apache.cxf.frontend.ServerFactoryBean;
public class ProviderTest implements Provider<SOAPMessage> {
/**
* @param args
* @throws InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
ServerFactoryBean sf = new ServerFactoryBean();
sf.setServiceClass(ProviderTest.class);
sf.setServiceBean(new ProviderTest());
sf.setAddress("http://localhost:8080/MyService");
sf.create();
Thread.sleep(5 * 60 * 1000);
System.out.println("Server exiting");
System.exit(0);
}
public SOAPMessage invoke(SOAPMessage arg0) {
System.err.println("Got it!!!");
return null;
}
}
@zubairov
Copy link
Author

zubairov commented Feb 3, 2011

Feel free to comment (you can leave line comments) or fork + improve this code example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment