|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Feature Java & .NET: SOAP Over JMS Interoperability
Exposing a Java Web Service via JMS using Apache Axis 1.4 and consuming it from both Java and .NET clients
Mar. 3, 2008 06:00 AM
Next, we attach the SOAP as a byte array to a message and send it to the queue/topic.
IBytesMessage message = session.CreateBytesMessage(); Now we wait for a response. We set a timeout (as a TimeSpan). Here it's a fixed value of 10 seconds for illustration, but it could easily come from a config file or passed as a property in the ActiveMqWebRequestCreate.
IBytesMessage response = (IBytesMessage) Here we set the stream to our own.
resp.SetDownloadStream(stream); Our ActiveMqWebResponse class inherits System.Net.WebResponse and does little more than provide a setter and override the getter on the response stream, since the stream in the built-in WebResponse is read-only.
public class ActiveMqQueueWebResponse : WebResponse
ActiveMqWebRequestCreate
public class ActiveMqQueueWebRequestCreate : IWebRequestCreate This has the same properties that are on the ActiveMqWebRequest so it can set them when it instantiates the requests.
... Reader Feedback: Page 1 of 1
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||