I have WSDL file which contains:
<wsdl:port name="NotificationConsumerSoapJms"
binding="tns_NotificationConsumer:NotificationConsumerSoapJmsBinding">
<jms:address destinationStyle="topic"
jndiConnectionFactoryName="ConnectionFactory"
jndiDestinationName="dynamicTopics/test.DefaultTopic">
<jms:JMSNamingProperty
name="java.naming.factory.initial"
value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" />
<jms:JMSNamingProperty
name="java.naming.provider.url"
value="tcp://localhost:61616" />
</jms:address>
</wsdl:port>
And here is JMS client which was generated by CXF:
URL wsdlURL = EfaNbiWebService.WSDL_LOCATION;
if (args.length > 0 && args[0] != null && !"".equals(args[0])) {
File wsdlFile = new File(args[0]);
try {
if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURI().toURL();
} else {
wsdlURL = new URL(args[0]);
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
EfaNbiWebService ss = new EfaNbiWebService(wsdlURL, SERVICE_NAME);
NotificationConsumer port = ss.getNotificationConsumerSoapJms();
{
System.out.println("Invoking notify...");
org.tmforum.mtop.fmw.xsd.hdr.v1.Header _notify_mtopHeader = null;
org.tmforum.mtop.fmw.xsd.notmsg.v1.Notify _notify_mtopBody = null;
port.notify(_notify_mtopHeader, _notify_mtopBody);
}
As you see, the topic name is store in WSDL file. So how to change topic
name programmatically?
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-change-JMS-topic-name-programmatically-in-CXF-generated-client-tp5447330p5447330.html
Sent from the cxf-user mailing list archive at Nabble.com.