Hi,
I am new to webservices development and am attempting to write a plugin for openfire that will allow openfire to call a SOAP webservice. I started off by creating a test SOAP webservice and client. Then I wrote the same client code in my openfire plugin. I wrote the code in a SessionEventListner method to test it when a client logs into openfire. I have listed the code below.
URL url = new URL(“http://localhost:9876/ch01?wsdl”);
-
// Qualified name of the service:*
-
// 1st arg is the service URI*
-
// 2nd is the service name published in the WSDL*
-
QName qname = new QName("[http://ch01/](http://ch01/)", "TimeServerImplService");*
-
// Create, in effect, a factory for the service.*
-
Service service = Service.create(url, qname);*
-
// Extract the endpoint interface, the service "port".*
-
TimeServer eif = service.getPort(TimeServer.class);*
-
System.out.println(eif.getTimeAsString());*
-
System.out.println(eif.getTimeAsElapsed());*
The problem I have is I get the error ‘No corresponding port found for the service interface org.jivesoftware.openfire.plugin.TimeServer in http://localhost:9876/ch01?wsdl’ (pls see below). Is this because I am missing some openfire server settings? Or I am doing something wrong here?
Greatly appreciate any help/advice.
Tnx
No corresponding port found for the service interface org.jivesoftware.openfire.plugin.TimeServer in http://localhost:9876/ch01?wsdl
at com.sun.xml.internal.ws.client.ServiceContextBuilder.processAnnotations(Unknown Source)
at com.sun.xml.internal.ws.client.ServiceContextBuilder.completeServiceContext(Unk nown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.processServiceContext(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(Unkn own Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Source)
at javax.xml.ws.Service.getPort(Unknown Source)
at org.jivesoftware.openfire.plugin.MotDPlugin$MotDSessionEventListener.sessionCre ated(MotDPlugin.java:213)
at org.jivesoftware.openfire.event.SessionEventDispatcher.dispatchEvent(SessionEve ntDispatcher.java:63)
at org.jivesoftware.openfire.SessionManager.addSession(SessionManager.java:528)
at org.jivesoftware.openfire.session.LocalClientSession.setAuthToken(LocalClientSe ssion.java:589)
at org.jivesoftware.openfire.handler.IQBindHandler.handleIQ(IQBindHandler.java:141 )
at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:49)
at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:351)
at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:101)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:68)
at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:319)
at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler .java:79)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:284)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:176)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:133)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageTReceiv ed(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.mina.util.imeServer not created
NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Unknown Source)