Created
February 3, 2011 14:34
-
-
Save zubairov/809533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.talend.test; | |
import javax.xml.soap.SOAPMessage; | |
import javax.xml.ws.Provider; | |
import org.apache.cxf.frontend.ServerFactoryBean; | |
import org.sopera.talend.provider.QueuedProvider; | |
import org.sopera.talend.provider.QueuedRequest; | |
public class ProviderTest { | |
/** | |
* @param args | |
* @throws Exception | |
*/ | |
public static void main(String[] args) throws Exception { | |
ServerFactoryBean sf = new ServerFactoryBean(); | |
QueuedProvider<SOAPMessage> handler = new QueuedProvider<SOAPMessage>(); | |
sf.setServiceClass(Provider.class); | |
sf.setServiceBean(handler); | |
sf.setAddress("http://localhost:8080/MyService"); | |
sf.create(); | |
QueuedRequest<SOAPMessage> next = null; | |
int i = 0; | |
while (i < 10) { | |
next = handler.next(); | |
SOAPMessage message = next.getMessage(); | |
System.err.println("Got it!!! " + ++i); | |
next.release(); | |
} | |
System.exit(0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment