Hello,
I'm a SMX newbie and try to play around a little bit. For learning to
develop on SMX I built up restaurant odering case with ServiceMix, CXF and
JMS and urgently need some architectural help for my scenario.
My idea is to have a CXF based Webservice that supports two operations:
1. orderCalcTotal
Request: contains quantities and prices
Respose: is the totalResult
2. placeOrder
only a Request that places serval items (also said: an order)
My intended Message flow is.
SoapRequest "orderCalcTotal" --> CXF BC --> CXF SE with a Bean that performs
the calcTotal logic and returns a result --> Response to the SOAPClient
This scenario is already working.
The placeOrder request has to be processed differently since I wanna place
Order into the NMR, validate and split it in order to send it to different
clients (as an example: Kichten and Bar for food and drink orders).
My idea of the flow is kind of this that the:
1. SoapRequest "placeOrder" to the CXF BC/SE
2. The CXF XX processes the orders (as XML/SOAP or JBI Normalized Message)
3. to a JMS Provider --->ActiveMQ --->JMS Consumer and the messge gets
further processed (this is already working )
Do you have an hints how to configure CXF to dispach "placeOrder" Request to
the JMS Provider and on the other hand side still have the "orderCalcTotal"
request that returns a SOAP response to the client? Or do I have
programmatically create the placeOrder message in my CXF-SE client and put
in on JMS or ActiveMQ
Thank you very much for your help.
Here my configuration Files:
---------WSDL Snippet!!!
------------------------------------------------------------
<!-- input message with all the orders -->
<wsdl:message name="orderCalcTotalRequest">
<wsdl:part element="osesb:calcTotal" name="parameters" />
</wsdl:message>
<!-- order confirmation message -->
<wsdl:message name="orderCalcTotalResponse">
<wsdl:part element="osesb:orderCofirmation" name="parameters" />
</wsdl:message>
<!-- order Message for further processing in the ESB -->
<wsdl:message name="placeOrderRequest">
<wsdl:part element="osesb:order" name="parameters" />
</wsdl:message>
<wsdl:portType name="COSPortType">
<wsdl:operation name="orderCalcTotal">
<wsdl:input message="osesb:orderCalcTotalRequest"/>
<wsdl:output message="osesb:orderCalcTotalResponse"/>
</wsdl:operation>
<wsdl:operation name="placeOrder">
<wsdl:input message="osesb:placeOrderRequest"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="COSSoapBinding" type="osesb:COSPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="orderCalcTotal">
<soap:operation
soapAction="http://ps.com/COS/orderCalcTotal" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="placeOrder">
<soap:operation
soapAction="http://ps.com/COS/placeOrder"/>
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="COSService">
<wsdl:port binding="osesb:COSSoapBinding" name="COSSoap">
<soap:address
location="http://localhost:8080/services/cos" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------WSDL END--------------------------------------------------
---------cxf-bc configuraton xbean
snippet--------------------------------------------------
<cxfbc:consumer wsdl="classpath:COS.wsdl"
service="cos:COSService"
interfaceName="cos:COSPortType"
targetEndpoint="COSSoap"
targetService="cos:COSService"
targetInterface="cos:COSPortType" />
---------cxf-bc configuraton xbean
END--------------------------------------------------
---------cxf-se configuraton xbean snippet
--------------------------------------------------
ยด
<bean id="COSServiceImpl"
class="com.ps.component.CustomerOrderServiceImpl" init-method="init"/>
<classpath>
<location>.</location>
</classpath>
<cxfse:endpoint>
<cxfse:pojo>
<bean class="com.ps.cos.COSPortTypeImpl">
<property name="delegate" ref="COSServiceImpl"/>
</bean>
</cxfse:pojo>
</cxfse:endpoint>
---------cxf-se configuraton xbean
END--------------------------------------------------
---------Jms configuraton xbean snippet
--------------------------------------------------
<jms:provider service="cos:COSServiceProvider"
endpoint="COSServiceProvider"
destinationName="order.input"
connectionFactory="#connectionFactory" />
<jms:consumer service="esb:simpleConsumer" endpoint="simpleEndpoint"
targetService="esb:errorHandler" destinationName="order.input"
connectionFactory="#connectionFactory" />
<bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616" />
</bean>
---------Jms configuraton xbean snippet
--------------------------------------------------
--
View this message in context:
http://www.nabble.com/CXF---%3E-JMS-tp21608439p21608439.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.