Ted

I'm sorry... I saw another post of yours and I (mis)read it as meaning
you'd found the problem.

I did play around with your code and I was a little confused at how
complicated you'd made it! I'm not really sure what you are doing.

Can I suggest you start afresh and work from there.



1) Take the version.aar file from the Axis2 distribution and add
<module ref="sandesha2"/> into the module.xml
You can either do it by hand or by go edit the build in samples\version
I use 7-Zip file manager, which updates MAR and AAR files with any
edits I make in-place which is great

2) Edit Axis2.xml to add
       <phase name="RMPhase"/>
Just between OperationIn/Out/InFault/OutFaultPhases and SoapMonitorPhase

e.g.
       <phase name="OperationInFaultPhase"/>
       <phase name="RMPhase"/>
        <phase name="soapmonitorPhase"/>

3) Deploy sandesha2.mar into repository/modules

4) Start Axis2 and verify that the RM operations are listed when you
look at the version service via the browser
http://localhost:8080/axis2/services/

5) Build a client for the service using WSDL2Java:
\axis2-1.2\bin\wsdl2java.bat -uw -uri http://localhost:8080/axis2/service
s/Version?wsdl -o client

This will put the client code in client\

6) Now go to client\src and add this Java class TestRM.java

import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties;

import sample.axisversion.VersionVersionSOAP12Port_httpStub;

public class TestRM {
        public static void main(String[] args) throws Exception {
                
                // use a config context to ensure I have the right Axis2.xml and
Sandesha2 module
                ConfigurationContext cc =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("c:/axis2-1.2/repository","c:/axis2-1.2/conf/axis2.xml");
                
                // Use the generated Stub with the config Context
                VersionVersionSOAP12Port_httpStub stub = new
VersionVersionSOAP12Port_httpStub(cc,
"http://localhost:8080/axis2/services/Version";);
                
                // WSRM prereqs Addressing
                stub._getServiceClient().engageModule("addressing");
                
                // Sandesha2 provides WSRM support
                stub._getServiceClient().engageModule("sandesha2");
                
                // go through a proxy so I can see what is happening
                // dont forget to startup TCPMON
                ProxyProperties pp = new ProxyProperties();
                pp.setProxyName("localhost"); pp.setProxyPort(8001);
                
stub._getServiceClient().getOptions().setProperty(HTTPConstants.PROXY,          
  pp);
                
                // This is the first message, so it will automatically kick off 
a
CreateSequence
                System.out.println(stub.getVersion());
                
                // now mark the second message as the last
                
stub._getServiceClient().getOptions().setProperty("Sandesha2LastMessage",
"true");
                
                // after the last message is sent, we should send a Terminate
Sequence automatically
                System.out.println(stub.getVersion());
                
                // give enough time for it to work
                Thread.sleep(1000);
                
                // System exit because there will be Sandesha threads otherwise 
running
                System.exit(0);
        }
}

7) Build everything (ant in client\ should work). I use Eclipse and I
started out with the build file

8) Remember to start TCPMON up. It needs to be running in PROXY mode
on port 8001.
You can do this by typing
tcpmon 8001

9) If you used Ant to build the file then you can call the class like this:
java -Djava.ext.dirs=\axis2-1.2\lib;\code\client\build\lib\ TestRM

Obviously this only works if your axis2 is in \axis2-1.2 and you built
the client in the \code directory, but you get the idea and can switch
it to work.

10) You should see something like:
May 21, 2007 5:45:21 PM org.apache.axis2.deployment.ModuleDeployer deploy
INFO: Deploying module: addressing-1.2
May 21, 2007 5:45:22 PM org.apache.axis2.deployment.ModuleDeployer deploy
INFO: Deploying module: sandesha2
May 21, 2007 5:45:22 PM org.apache.axis2.deployment.ModuleDeployer deploy
INFO: Deploying module: soapmonitor-1.2
May 21, 2007 5:45:22 PM org.apache.sandesha2.SandeshaModule init
WARNING: Could not load module policies. Using default values.
May 21, 2007 5:45:22 PM org.apache.axis2.deployment.ServiceDeployer deploy
INFO: Deploying Web service: version.aar
Hello I am Axis2 version service , My version is 1.2
Hello I am Axis2 version service , My version is 1.2

11) If you look at the TCPMON Trace you should see 4 message interactions:
CreateSequence/CSR
Request 1
Request 2/LastMessage
TerminateSequence.

Paul


On 5/21/07, Ted Jones <[EMAIL PROTECTED]> wrote:
Sorry to repost, but I just figured the more eyes the better. I would
really appreciate any WS-RM/Sandesha2 experts that could take a look at
this. Here is a link to the service aar, wsdl, test client, and the
client
and server config files. http://jonested.tripod.com/

The behavior I'm seeing is the onComplete() method of my callback is
never getting executed (and neither is my web service). The service is a
simple "echo" service (nothing to fancy).

TIA,
Ted


-----Original Message-----
From: Paul Fremantle [mailto:[EMAIL PROTECTED]
Sent: Friday, May 11, 2007 11:24 AM
To: [email protected]
Subject: Re: [Axis2] WS-RM and Axis2 Asynch Client not Returning

Ted

My machine has gone haywire and I'm just rebuilding it (well actually
just backing everything up before rebuilding it). I'll debug this as
soon as I get running.

Paul

On 5/11/07, Ted Jones <[EMAIL PROTECTED]> wrote:
>
>
> In case you have problems accessing the files via these links, you can

> get to them here: http://jonested.tripod.com/ and use 'Save As" to
> download them.
>
> Thanks,
> Ted
>
>
>  ________________________________
>  From: Ted Jones [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 11, 2007 7:17 AM
>
> To: [email protected]
> Subject: RE: [Axis2] WS-RM and Axis2 Asynch Client not Returning
>
>
>
> Martin, Paul, Amila, anybody I missed,
>
> Here are links to the service aar, wsdl, test client, and the client
> and server config files. Hopefully there is some glaring mistake I
have made.
> ;-)
>
> http://jonested.tripod.com/echoClient.java
> http://jonested.tripod.com/client_axis2.xml
> http://jonested.tripod.com/server_axis2.xml
> http://jonested.tripod.com/echo.wsdl
> http://jonested.tripod.com/echo.aar
>
> I am running the client and server on the same machine. For what it's
> worth, in debug I am seeing multiple threads continually being spawned

> for the client's http simple server (port 6062).
>
> Please let me know if you need more from me.
>
> Thanks,
> Ted
>
>  ________________________________
>  From: Ted Jones [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 10, 2007 9:37 AM
> To: [email protected]
> Subject: RE: [Axis2] WS-RM and Axis2 Asynch Client not Returning
>
>
>
> Thanks Amila. I appreciate the input. I am using Dual channel since it

> appeared to be required per this thread:
> http://mail-archives.apache.org/mod_mbox/ws-sandesha-dev/200703.mbox/%
> [EMAIL PROTECTED]
> Is this the case? I am using Sandesha2 1.1 with Axis2 1.1.1.
>
> I have verified your points outlined below. Everything appears
correct.
>
> Martin - I will put together a reproducible test case and post ASAP.
>
> Thanks for your assistance.
> Ted
>
>
>  ________________________________
>
> From: Amila Suriarachchi [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 10, 2007 12:25 AM
> To: [email protected]; Martin Gainty
> Subject: Re: [Axis2] WS-RM and Axis2 Asynch Client not Returning
>
>
> Are you using the Dual chanel mode or single chanel?
>
> if you set the setUseSeparateListener your request comes in a
> different http chanel than you send the request. Otherwise it comes in
the same chanel.
>
> In the dual chanel model, What happens is your client starts a simple
> http server on your machine and set the ReplyTo addressing header to
> point to the stated server.
>
> So you have to make sure these things.
> 1. you must have engage the Addressing. (otherwise server won't be
> able to find the reply location) 2. client uses the port and the host
> name you have specified in the axis2.xml to start its simple http
> server and set this address to replyTo filed. So you have to use two
> seperate axis2.xml files for client and the server with different port

> numbers if you run them both in one machine.
>
> 3. if your server is in out side your firewall, the host name you
> specify in the client axis2.xml should be able to access from the out
> side the firewall.
>
>
>
> On 5/10/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > Good Evening
> >
> > if you publish your wsdl we can run the client code
> >
> > Thanks
> > Martin--
> > This email message and any files transmitted with it contain
> > confidential information intended only for the person(s) to whom
> > this email message is addressed.  If you have received this email
> > message in error, please
> notify
> > the sender immediately by telephone or email and destroy the
> > original message without making a copy.  Thank you.
> >
> > ----- Original Message -----
> > From: "Ted Jones" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Wednesday, May 09, 2007 7:10 PM
> > Subject: RE: [Axis2] WS-RM and Axis2 Asynch Client not Returning
> >
> >
> > So, I'm guessing that the message is never reaching the server.
> > Which may explain why there is no logging? I can see in debug where
> > the
> > Sandesha2 logic is hit and the message is sent but I never see any
> > sequences or other message traffic and my client is left polling
> > forever waiting for the callback to complete.
> >
> > Any other thoughts on what might be happening here or where else I
> > can look?
> >
> > Thanks,
> > Ted
> >
> > -----Original Message-----
> > From: Ted Jones [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 09, 2007 10:27 AM
> > To: [email protected]
> > Subject: RE: [Axis2] WS-RM and Axis2 Asynch Client not Returning
> >
> > Thanks for all the responses. This is a great mailing list.
> >
> > I am not seeing any messages in TCPMON or in the logs. :-(
> >
> > Question: How can you configure TCPMON to capture messages sent to
> > SimpleHTTPServer? I get a port bind exception.
> >
> > Also, I cannot seems to get logging working with Sandesha2. If
> > anyone has it working, I would really appreciate a peek at their
> > log4j.properties.
> >
> > Thanks!
> > Ted
> >
> > -----Original Message-----
> > From: Samisa Abeysinghe [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, May 08, 2007 11:12 PM
> > To: [email protected]
> > Subject: Re: [Axis2] WS-RM and Axis2 Asynch Client not Returning
> >
> > Ted Jones wrote:
> >
> > > I am using Sandesha2 with an asynch Axis2 client. Using the
> > > example that comes with Sandesha2 (the asynch echo client), the
> > > onComplete() method of my callback is never hit. It appears the
> > > response is not returning.
> > >
> > > Any ideas?
> >
> > Did you try capturing message sequences with TCPMON and chek the
> > message sequence?
> >
> > Also, have a look into the server and client logs.
> >
> > Samisa...
> >
> >
> >
> ---------------------------------------------------------------------
> > 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]
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
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]




--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties;

import sample.axisversion.VersionVersionSOAP12Port_httpStub;

public class TestRM {
	public static void main(String[] args) throws Exception {
		
		// use a config context to ensure I have the right Axis2.xml and Sandesha2 module
		ConfigurationContext cc = ConfigurationContextFactory.createConfigurationContextFromFileSystem("c:/axis2-1.2/repository","c:/axis2-1.2/conf/axis2.xml");
		
		// Use the generated Stub with the config Context
		VersionVersionSOAP12Port_httpStub stub = new VersionVersionSOAP12Port_httpStub(cc, "http://localhost:8080/axis2/services/Version";);
		
		// WSRM prereqs Addressing
		stub._getServiceClient().engageModule("addressing");
		
		// Sandesha2 provides WSRM support
		stub._getServiceClient().engageModule("sandesha2");
		
		// go through a proxy so I can see what is happening
		// dont forget to startup TCPMON
		ProxyProperties pp = new ProxyProperties();
		pp.setProxyName("localhost"); pp.setProxyPort(8001);
		stub._getServiceClient().getOptions().setProperty(HTTPConstants.PROXY,		  pp);
		  
		// This is the first message, so it will automatically kick off a CreateSequence
		System.out.println(stub.getVersion());
		
		// now mark the second message as the last
		stub._getServiceClient().getOptions().setProperty("Sandesha2LastMessage", "true");
		
		// after the last message is sent, we should send a Terminate Sequence automatically
		System.out.println(stub.getVersion());
		
		// give enough time for it to work
		Thread.sleep(1000);
		
		// System exit because there will be Sandesha threads otherwise running
		System.exit(0);
	}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to