[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to perform the following Request-Response Messaging
Juan Carlos Coruña wrote:
>
> Hello all,
>
> I'm testing xmlBlaster to integrate it with Zope (http://www.zope.org). I'm developing a Zope Product to interface with xmlBlaster.
>
> My question is the following:
>
> A customer logged in the web. And he request a product web page. To display the price the web must ask Navision (ERP) the price. The "web" sends a message to Navision through xmlBlaster asking for the price of the product. Then Navision responds to the web with a message containing the price.
>
> I will try it the following way:
> web sends a message to the oid key "Navision.Request" with the content:
>
> <request sender='customer-28456'>
> <question type='Product.Price'>
> GS-34M
> </question>
> </request>
>
> customer-28456 = loginName of the customer logged in the web
> GS-34M = product reference
>
> Navision reads the message with the asyncronous method get. And then Navision responds with:
>
> <response>
> <result type='Product.Price'>
> 1900
> </result>
> </response>
>
> <qos>
> <destination queryType='EXACT'>
> customer-28456
> <ForceQueuing />
> </destination>
> </qos>
>
> Navision obtains the requester from the attribute "sender" of the tag "request" and use it for the destination tag.
>
> Anybody knows a better way to accomplish this?
>
> Juan Carlos Coruña
> jcoruna at ibdosnorte.com
What you describe is possible.
But why don't you try this:
+------+ PtP +------+
| Cust | -------> | ERP |
+------+ Question +------+
+------+ PtP +------+
| Cust | <------- | ERP |
+------+ Response +------+
Customer and ERP both have a Callback
server running, allowing instant delivery
of messages.
You don't use publish/subscribe, but only
Point-to-Point (PtP) messages (since others
are not interested in this communication).
The sender of a message is available
automatically in the <qos>, so
you don't need to pass it in the content.
For an example of this scenario see
xmlBlaster/testsuite/org/xmlBlaster/TestPtD.java
and especially updateQoS.getSender();
regards,
Marcel
--
Marcel Ruff
mailto:ruff at swand.lake.de
http://www.lake.de/home/lake/swand/
http://www.xmlBlaster.org