You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by hexaplus <de...@gmail.com> on 2013/07/12 20:32:03 UTC

WSNotification using soap over JMS from a wsdl

I'm exploring creating a web service which will push notification to multiple
clients. 

I'm looking for the "Right" way to proceed and the current state of
WSNotification over JMS. The wsdl and service will be given to several other
contractors and organizations, and used to develop a great deal of
applications over the next several years.

I have a wsdl that wsdl2java appears not to be able to ingest because of the
following:
...
<wsdl:portType name="Stream">
	<wsdl:operation name="EventStream">
		<wsdl:output message="tns:EventStream"/>
	</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EventJMSBinding" type="tns:Stream">
	<soap12:binding style="document"
transport="http://www.w3.org/2010/soapjms/"/>
	<wsdl:operation name="EventStream">
		<soap12:operation soapActionRequired="true"/>
		<wsdl:output>
			<soap12:body use="literal"/>
		</wsdl:output>
	</wsdl:operation>
</wsdl:binding>
...
Generating the following error:
 Invalid WSDL, Operation EventStream in PortType
{http://www.company.com/id/product/service/event/v1}EventStreamPortType not
request-response or one-way

My work around was to basically change the wsdl to be one-way and switch the
role of the server and client:

<wsdl:portType name="Stream">
	<wsdl:operation name="EventStream">
		<wsdl:output message="tns:EventStream"/>
	</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EventJMSBinding" type="tns:Stram">
	<soap12:binding style="document"
transport="http://www.w3.org/2010/soapjms/"/>
	<wsdl:operation name="EventStream">
		<soap12:operation soapActionRequired="true"/>
		<wsdl:output>
			<soap12:body use="literal"/>
		</wsdl:output>
	</wsdl:operation>
</wsdl:binding>

Using the "Java first JMS" sample I modified the "JMSClient.java" and
"JMSServer.java" to use the classes generated from the wsdl and to use a
topic instead of a queue:

private static final String JMS_ENDPOINT_URI =
"jms:topic:test.cxf.jmstransport.topic?timeToLive=1000"
			+ "&jndiConnectionFactoryName=ConnectionFactory"
			+ "&jndiInitialContextFactory"
			+ "=org.apache.activemq.jndi.ActiveMQInitialContextFactory";


Conceptually then JMSClient.java became StreamSender.java and JMSServer.java
became StreamReceiver.java. 
Using this paradigm I launched two StreamReceivers and then launch one
StreamSender, each of the StreamReceivers got the message.

The plan would then be have all of the users of the service ingest the wsdl
as a service. Am I off base here is there a better way to do this?

Side Note:The WSNotification example using JBI is not meet our performance
needs. (wee see aprox. 250 msg/sec.)

My goal is to have an ingestable WSDL which receives unsolicited events from
the code I will be developing.

Thanks for any input!



--
View this message in context: http://cxf.547215.n5.nabble.com/WSNotification-using-soap-over-JMS-from-a-wsdl-tp5730700.html
Sent from the cxf-user mailing list archive at Nabble.com.