Hi
You can do it as follows.
Service service = new Service();
Call call = (Call) service.createCall();
Call call2 = (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.setSendOffer(true);
ctx.initCall(call, targetURL, "urn:wsrm:echoString",
Constants.ClientProperties.IN_OUT);
call.setOperationName(new QName("http://tempuri.org/",
"echoString"));
call.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("arg2", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
ctx.initCall(call2, targetURL, "urn:wsrm:ping",
Constants.ClientProperties.IN_OUT);
call2.setOperationName(new QName("http://tempuri.org/", "Ping"));
call2.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.IN);
call2.invoke(new Object[]{" Echo 1 ", str});
ctx.setLastMessage(call);
String ret = (String) call.invoke(new Object[]{" Echo 2 ", str});
System.out.println(" The Response for Second Messsage is
:" + ret);
RMReport report = ctx.endSequence();
Thanks,
Jaliya
----- Original Message -----
From: "Benjamin Schmeling" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[email protected]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, December 12, 2005 3:14 PM
Subject: Re: Oneway ws and reliability
> This example does not show what I mean. There are two Webservices but
> they are not on the same sequence because there are two
> SandeshaContexts. They will arrive in the given order, but there are
> created two sequences. Does this mean that you can not take place two
> different webservices at the same location on one WS Reliable Messaging
> sequence?
>
> Thanks,
>
> Benjamin
>
>>Hi,
>>
>>I am sorry that I have misunderstood your question :(
>>When there are multiple web services in a single machine, and if they all
>>in a single container and use one RM-EndpointManager, we can put all these
>>messages under one sequence from a given client.
>>
>>Please see the testEchoPing() method in the TCScenarioTest class under
>>test folder.
>>This test, send several messages to two services using the same sequence
>>and they get invoked with the respective orders in the server side.
>>
>>Thanks,
>>
>>Jaliya
>>
>>
>>----- Original Message -----
>>From: <[EMAIL PROTECTED]>
>>To: "Benjamin Schmeling" <[EMAIL PROTECTED]>
>>Cc: <[email protected]>
>>Sent: Thursday, December 01, 2005 9:50 PM
>>Subject: Re: Oneway ws and reliability
>>
>>
>>
>>
>>>Hi,
>>>
>>>WS-RM guarantees delivery of messages from one endpoint to the other.
>>>
>>>
>>Mainly
>>
>>
>>>between endpoint managers. So there is no way that we can put messages
>>>
>>>
>>going
>>
>>
>>>to different endpoints into a single sequence. This is not what WS-RM for
>>>and rather is useful when we have many massages to the same endpoint
>>>
>>>Thanks,
>>>
>>>Jaliya
>>>
>>>----- Original Message -----
>>>From: "Benjamin Schmeling" <[EMAIL PROTECTED]>
>>>Cc: <[email protected]>
>>>Sent: Thursday, December 01, 2005 4:39 PM
>>>Subject: Re: Oneway ws and reliability
>>>
>>>
>>>
>>>
>>>>Hi,
>>>>concerning different endpoint it is not possible to put them in one
>>>>sequence. But what is when you have calls on different web services on
one
>>>>maschine. Is it possible to put them all in one sequence and how is it
>>>>done in sandesha? I tried it out but got an ERROR: MESSAGE IS NULL IN
>>>>ResponseSeqHash.
>>>>
>>>>Thanks,
>>>>
>>>>Benjamin
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>> IMHO it is not a feature that should be covered by WS-RM, it should
be a
>>>>>feature of the underlying SOAP engine.
>>>>>For RM all these messages are different sequence if they are going to
>>>>>different endpoints. So if we need to send one message to 2000 stores
>>>>>then it will be a 2000 sequence and lot of additional messages. We can
>>>>>use RM but there is are additional overhead involve in it. However it
the
>>>>>scenario is such that we need to send 2000 messages to same recipient,
>>>>>then RM is for that and will serve well.
>>>>> Thanks,
>>>>> Jaliya
>>>>>
>>>>> ----- Original Message -----
>>>>> *From:* IVO <mailto:[EMAIL PROTECTED]>
>>>>> *To:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>>>> *Sent:* Wednesday, November 30, 2005 3:04 AM
>>>>> *Subject:* Re: Oneway ws and reliability
>>>>>
>>>>> Hi,
>>>>> Thx for the response. However i think the Spec of WS-RM had to
>>>>> think about reliably talking to many WS with same message without
>>>>> any interation of sequences. I tried to loop 2000 times for 2000
>>>>> stores and for each store i had just to change the URL but same
>>>>> message. Not a a good approach....
>>>>>
>>>>> */[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>/* wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Hm.. interesting scenario..Please see my comments below.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jaliya
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message -----
>>>>> From: IVO
>>>>> To: Benjamin Schmeling ; [email protected]
>>>>> Sent: Tuesday, November 29, 2005 2:50 PM
>>>>> Subject: Re: Oneway ws and reliability
>>>>>
>>>>>
>>>>> Hi,
>>>>> i have a project that requires the use of either a message
>>>>> broker or web
>>>>> services.
>>>>> HINT: Intend to transfer all daily sales of burger king
stores to
>>>>> headquarter. this implies an average of 2000 sto res connect
>>>>> to headquarter
>>>>> with 2hours window of transaction. also the possibility of
>>>>> burger-king
>>>>> headquarter to broadcast price changes to all stores. With
>>>>> message brokers
>>>>> this is possible like JMS or propriatory ones using publishing
>>>>>and
>>>>> subscription.
>>>>> Have made studies on WS-RM, WS-Security, WS-Conversation,
>>>>> WS-Callback, and
>>>>> WS-Policy and thought web services with their interop.. they
>>>>> are better
>>>>> than JMS and other MOM. I have had a look on Sandesha as
>>>>> regards to WS-RM.
>>>>> It was quite interesting. My qeuestions after reading this
>>>>> mail of using
>>>>> sequences in talking to three WS:
>>>>> 1. Having the same messages for web service A, B, and C is
>>>>> there a means
>>>>> to braodcast the messages without any interation in
>>>>> application level but
>>>>> by sim ply listing the endpoints?
>>>>>
>>>>> Sandesha does not have a message broadcasting machanism at the
>>>>> transport
>>>>> level and it is not a requirement of the WS-RM specs. For this
>>>>> functionality you have to use some mediation service. Apache
>>>>> Synapse will
>>>>> do this soon :)
>>>>>
>>>>> 2. Has Sandesha some implementations of load balance? BEA uses
>>>>> Buffers.
>>>>> Say 2000 stores all talk simultaneously to one WS.
>>>>>
>>>>> Sandesha does not have a built in load balancing mechanism.
>>>>> But it may be
>>>>> able to handle the load as long as Servlet container and Axis
>>>>> is handling
>>>>> the load.
>>>>>
>>>>> 3. Has Sandesha in built tools for monitoring the flow of
>>>>> information at
>>>>> transport level or do i have define my handlers for that?
>>>>>
>>>>> You can add handler to both request and response flows to
>>>>> monitor the
>>>>> message flow.
>>>>>
>>>>> 4. What about WS-Conversation and Callback?
>>>>> Implementation of WS-SecCon is still not complete
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>> Benjamin Schmeling wrote:
>>>>> Hi,
>>>>>
>>>>> imagine the scenario, described in the reliable messaging
>>>>> specification.
>>>>> Now lets assume the webservices are all oneway and the second
>>>>> message
>>>>> goes to a third endpoint. I know the specification suppor ts
>>>>> only two
>>>>> endpoints, but is there a possibility to do the following:
>>>>>
>>>>> 1.) call webservice A (at http:/abc.org)
>>>>> 2.) call webservice B (at http:/cde.org)
>>>>> 3.) call webservice C (at http:/abc.org)
>>>>>
>>>>> I could do this with 3 separate sequences. At every end of one
>>>>> sequence
>>>>> endSequence() is called in Sandesha. Can I make the conclusion
>>>>> that
>>>>> after calling endSequence() the message to all webservices in
the
>>>>> sequence are already successfully delivered?
>>>>>
>>>>> For example:
>>>>> new SandeshaContext()
>>>>> call webservice A (at http:/abc.org)
>>>>> endSequence()
>>>>> // /message to A has been delivered already at this point of
>>>>> code?/
>>>>> new SandeshaContext()
>>>>> call webservice B (at http:/cde.org)
>>>>> ....
>>>>> ...
>>>>> ..
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Benjamin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> Yahoo! Music Unlimited - Access over 1 million songs. Try it
>>>>>free.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> SUMELONG IVO
>>>>> UNIVERSITY OF DUISBURG-ESSN
>>>>> DEPARTMENT OF COMPUTER SCIENCE AND
>>>>> COMMUNICATION ENGINEERING
>>>>> SCHEMKESWEG 41
>>>>> 47057 DUISBURG
>>>>> Germany
>>>>> HOME.: 00492033948762
>>>>> MOBILE.00491797751042
>>>>> EMAIL.: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>> Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
>>>>>
>>>>><http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/>
>>>>>
>>>>>
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]