xml-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JM...@genam.com
Subject RE: Routing to Message Service
Date Wed, 26 Jun 2002 15:16:44 GMT

Yes; the following quick hack to the MessageRouterServlet.doPost() "works".
The deployment description for our "urn:txlife-processor" is found and my
provider is invoked.
Could this SOAPAction lookup make sense as a desired behavior for the stock
Message Router?

        String targetID = e.getNamespaceURI ();
        if (targetID == null) {
         // Check the SOAPAction for targetID (e.g., "urn:txlife-processor").
         targetID = req.getHeader("SOAPAction");
         targetID = targetID.substring(1, targetID.length()-1);
        String messageName = e.getLocalName ();

        // is this a valid message?
        dd = serviceManager.query (targetID);

"Daniel P Allen" <dallen@nist.gov> on 06/26/2002 08:23:59 AM

Please respond to soap-user@xml.apache.org

To:   <soap-user@xml.apache.org>, <webmaster@laconiadatasystems.com>
cc:   <JMaus@genam.com>

Subject:  RE: Routing to Message Service

   The point is the Apache MessageRouter uses the first namespace
declaration in  the Body to find the service
  and Jim wants it to use SOAPAction  instead.  No can do with the stock
MessageRouter.  The code  for
  message router is not long and is simple to  understand,  A quick hack to
change where it looks is  almost
  trivial. A bit more difficult but still  relatively simple would be to
check SOAPAction against the  deployed
  services database and dispatch if a match  is found.  If no match then
proceed with the stock  behavior.
  This would eliminate the need for running  two different servlets if you
are servicing "standard"  Apache
  applications along with the ones Jim's  folks are deploying.  BTW - the
ebXML MessageService
   Specification also requires a different lookup mechanism.  They have
added  Service and Action
   elements to the header for this purpose but do not preclude use of


-----Original Message-----
From: Martin Gainty  [mailto:mgainty@hotmail.com]
Sent: Tuesday, June 25, 2002 6:25  PM
To: soap-user@xml.apache.org
Cc:  JMaus@genam.com
Subject: Re: Routing to Message  Service

Take a look at http://xml.apache.org/soap/docs/guide/rpcclient.html for
step by step building a RPC Client:

Specifically Step 4

   Set the target URI into the Call object using the  setTargetObjectURI
   Pass in the URN that the service used  to identify itself in its
   deployment  descriptor.

   (For Deployment Descriptors) Check out

Standard Java Class Deployment Descriptor

A deployment descriptor which exposes a service which is implemented via a
standard Java class (including a normal Java Bean) looks like the

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
             id="urn:service-urn" [type="message"] [checkMustUnderstands
<isd:provider type="java"
scope="Request | Session | Application"
<isd:java class="implementing-class" [static="true|false"]/>

Where service-urn is the URN that you want to give  to a service,
exposed-methods is a space separated  list of methods which you wish to
expose, and  implementing-class is fully qualified class name (i.e.
packagename.classname) that provides the methods which are being  exposed

I didnt see anything about SOAPAction here...
Anyone  else??

Martin  Gainty
>I have written a Message Services to pass a "TXLife" XML  document called
"txlife-processor", deployed it, and have it working. But, the  team
>the client would like to use the SOAPAction to specify my
"txlife-processor" messaging service (not xlmns="urn:txlife-processor").
>Is there a way to configure the SOAP Message Router to use the  SOAPAction
(and not require xmlns="urn:txlife-processor" attribute on my XML
>to route the TXLife to my txlife-processor?
>If SOAPAction is not appropriate, is there an alternative to  requiring
xmlns="urn:txlife-processor" attribute on my TXLife element ?
>Following does not work:
>SOAPAction: "urn:txlife-processor"
>Following does work:
>SOAPAction: ""
>Thank you for your assistance.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Chat with friends online, try MSN Messenger: Click Here
-- To  unsubscribe, e-mail: For  additional commands, e-mail:

To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>

View raw message