Differences between revisions 4 and 5
Revision 4 as of 2005-08-21 17:52:39
Size: 7402
Comment:
Revision 5 as of 2009-09-20 22:48:59
Size: 7402
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

FAQ for Apache Sandesha 1.0


Common Questions

Q1. What is Sandesha ?

Sandesha is a framework for sending and receiving web service messages reliably. Sandesha implements WS-ReliableMessaging specification. So if you use Sandesha you can communicate with any web service that support WS-ReliableMessaging.

Q2. What is Reliable Messaging ?

Reliable Messaging is used to make the message exchage between two SOAP nodes reliable. In reliable messaging the sender sends the same message one or more times to the destination until it gets an acknowledgement. By getting an acknowledgement, the sender can make sure that his message got received.

Q3. What framework(s) does sandesha support ?

Currently Sandesha support Apache Axis 1.x framework. (A version for Apache Axis2 is being developed).

Q4. What other software do I need for using Sandesha ?

You need Apache Addressing to run Sandesha (i.e. You have to have the latest Addressing jar file in your classpath).

Q5. Who shold use Sandesha ?

If you want to communicate reliably with a remote web services and if you are using Apache Axis as the web service client you should use Sandesha. Also if you want to deploy some web services with reliability support and if your web service engine is Apache Axis 1.x you should use Sandesha.

Q6. How can I get Sandesha ?

You can get Sandesha from its web site ( http://ws.apache.org/sandesha ). Download instructions and releases are available there.


Development Questions

Q7. How do I install Sandesha ?

Q8. How do I deploy my web services with reliability ?

  • Install Sandesha (see Q7)
  • Add your web service classes to <WEB_APP>/WEB-INF/classes directory.

  • Create a deploy.wsdd file similar to the following example.

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <service name="RMSampleService" provider="Handler">
        <requestFlow>
            <handler type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler>
            <handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler"></handler>
        </requestFlow>

        <parameter name="handlerClass" value="org.apache.sandesha.ws.rm.providers.RMProvider"/>
        <parameter name="className" value="org.apache.sandesha.samples.RMSampleService"/>
        <parameter name="allowedMethods" value="*"/>
        <parameter name="scope" value="request"/>
    </service>
</deployment>
  • Deploy your web service (see axis 1.x user guide for more details on deploying web services).

Q9. What configurations do I have to perform before using Sandesha client ?

  • Add Sandesha jar file and Apache Addressing jar file to your classpath.
  • Add the client-config.wsdd file given below, to your classpath.

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <globalConfiguration>
  <parameter name="adminPassword" value="admin"/>
  <parameter name="enableNamespacePrefixOptimization" value="true"/>
  <parameter name="disablePrettyXML" value="true"/>
  <parameter name="sendMultiRefs" value="true"/>
  <parameter name="sendXsiTypes" value="true"/>
  <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
  <parameter name="sendXMLDeclaration" value="true"/>
 </globalConfiguration>
 <handler name="RMSender" type="java:org.apache.sandesha.client.RMSender"/>
 <transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/>
 <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
 <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>
 <transport name="RMTransport" pivot="RMSender"/>
</deployment>

Q10. How can I call a reliable web service synchronously ?

  • Do the configurations described in Q9.
  • Write your client code and run (an example is given below)

Service service = new Service();
Call call = (Call) service.createCall();
SandeshaContext ctx = new SandeshaContext(Constants.SYNCHRONOUS);
ctx.initCall(call, targetURL, "urn:wsrm:Ping",Constants.ClientProperties.IN_ONLY);
call.setOperationName(new QName("http://tempuri.org/", "Ping"));
call.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.IN);
call.invoke(new Object[]{"Ping Message Number One"});
call.invoke(new Object[]{"Ping Message Number Two"});
ctx.setLastMessage(call);
call.invoke(new Object[]{"Ping Message Number Three"});
RMReport report = ctx.endSequence();

Q11. How can I call a reliable web service asynchronously ?

  • Do the configurations described in Q9.
  • Write your client code and run (an example is given below)

Service service = new Service();
Call call = (Call) service.createCall();
SandeshaContext ctx = new SandeshaContext();
ctx.setAcksToURL("http://127.0.0.1:" + defaultClientPort + "/axis/services/RMService");
ctx.setReplyToURL("http://127.0.0.1:" + defaultClientPort + "/axis/services/RMService");
ctx.initCall(call, targetURL, "urn:wsrm:ping", Constants.ClientProperties.IN_ONLY);
call.setOperationName(new QName("http://tempuri.org", "Ping"));
call.addParameter("Text", XMLType.XSD_STRING, ParameterMode.IN);
call.invoke(new Object[]{"Ping Message Number One"});
call.invoke(new Object[]{"Ping Message Number Two"});
ctx.setLastMessage(call);
call.invoke(new Object[]{"Ping Message Number Three"});
RMReport report = ctx.endSequence();

Q12. Where can I find some examples for Sandesha ?

Sandesha distributions come with several examples. You can find examples for synchronous and asynchronous client calls in the 'samples' directory. Also you can find examples for interacting with other web service frameworks in the 'interop' directory (this comes only in the source distribution).

Q13. What delivery assurance can I get from Sandesha ?

Sandesha support in-order exactly once delivery assurance. Because of this you can gaurantee that the server will invoke web service messages in the same order you add them in the client. Also the server will invoke them exactly once (No more. No less.)


Troubleshooting

Server side

Client side

Q14. I get the exception " No client transport named 'RMTransport' found!" ?

When running Sandesha client you should have the client-config.wsdd supplied with the Sandesha distribution (see Q9 ) in your classpath. Please add this.

Q15. I get the exception "To perform the operation, ReplyTo address must be specified." ?

According to the way you have written your client code you must specify a ReplyTo address. Please add this to your client code. An example is given below.

ctx.setReplyToURL("http://127.0.0.1:9090/axis/services/RMService");

FrontPage/ws-sandesha/sandesha1/faq (last edited 2009-09-20 22:48:59 by localhost)