You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by emengy <em...@hotmail.com> on 2010/03/25 11:00:21 UTC

How to call axis2 service from none axis2 client

Hi,

I have a axis2 1.5 service which I currently call from axis2 Non-Blocking
Invocation client i.e.
The client contain the lines:
engageModule("addressing");
setUseSeparateListener(true);

Is it possible to call the same service in Non-Blocking fashion from none
axis2 client?
How should I set the request so the axis server will know this that this
request is asynchronous call?
Also is it possible to call engageModule("addressing") with other address
than the calling client?

Thanks
-- 
View this message in context: http://old.nabble.com/How-to-call-axis2-service-from-none-axis2-client-tp28026718p28026718.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


AW: How to call axis2 service from none axis2 client

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Given the case nobody has answered this, I will explain how I did it, and I am sure there are some others out there with greater stories about that, but so far I did not read about it.

1.	Install/Run TCP Monitor on your PC
2.	Track the message exchange SOAP/XML over HTTP between your axis2 client and your axis2 server –and learn.
3.	Learn what the message exchange on the wire looks like between an axis2 client calling an axis2 service SYNCHRONOUS
4.	Keep this xml records for later reference
5.	Change the axis2 client to send an Asynchronous request
6.	Keep the request and response XML as Reference for later
7.	Study the difference between the two.
8.	No take a coffee-break
9.	After the break (you did not say us what your other non AXIS2 client side environment will be) 
      Take your Visual Studio 2008, 2010 and create / generate a simple web service server (CMD line apps)
10.	Get into literature of VS WCF, with the VS tool catch the web service reference of your running WCF server, 
11.	generated the client side stub, 
12.	build client the stub, 
13.	invoke the client stub from your code calling synchronously
14.	Off course your monitoring that all using TCP MONITOR; so you learn a lot how Microsoft WCF 3.5 or 4.0 is doing that.
15.	Keep records for references
16.	Then take literature of MS and go for asynchronous calls
17.	Maybe you have to change the WCF server to; I don’t know because we drive synchronous only
18.	Study the difference how a WCF Client deals with a WCF server, in synchronous mode and in asynchronous mode
19.	Study the two different requestors – you have the single goal – WORK WITH TCP MONITOR - to make your axis2 server think “through all the layers” that it deals with an axis2 client 
20.	What you have to do is; Your WCF Client must be massaged until it is able to simulate to the axis2 service an axis2 web service client! 
	THIS IS THE CRUICAL POINT
21.	This does not end with simple generated code, at least not with VS 2008 (we have only that), you have to have your CUSTOM BINDING created
22.	ALWAYS REMEMEBER: Interoperability between MS and APACHE “is a mess” “is a mess” “is a mess” except for simple school book examples; 
23.	Maybe that has changed meanwhile, in the past 2009 until today, if yes - please drop me a pointer 
24.	As you have your references from your asynchronous calling axis2 client – 
	massage your VS WCF Client to send exactly the same to the wire and you will be glad it works.
25.	BUT ONLY if you do not forget that SOAP XML is one level and HTMP is a different layer, 
	and unless also on the HTMP level the tow are exchanging the same information, 
26.	only then your axis2 server be leaves that it really talks to an deals with an axis2 client which is in fact an WCF Client simulating an axis2 client.
27.	And if you go for long lasting sessions – scope=”soapsession” in service.xml, you will have to learn how to intercept outgoing requests and responses on the client and the server and massage your soap-headers adding a “ServiceGroupID”


I hope this gives you as idea about how well interoperability between the two worlds work – Microsoft and Apache. 
And I am always glad to know if you make a greater better experience than we have from the same enterprise.

Josef. Stadelmann
@axa-winterthur.ch



-----Ursprüngliche Nachricht-----
Von: emengy [mailto:emengy@hotmail.com] 
Gesendet: Donnerstag, 25. März 2010 11:00
An: axis-user@ws.apache.org
Betreff: How to call axis2 service from none axis2 client


Hi,

I have a axis2 1.5 service which I currently call from axis2 Non-Blocking
Invocation client i.e.
The client contain the lines:
engageModule("addressing");
setUseSeparateListener(true);

Is it possible to call the same service in Non-Blocking fashion from none
axis2 client?
How should I set the request so the axis server will know this that this
request is asynchronous call?
Also is it possible to call engageModule("addressing") with other address
than the calling client?

Thanks
-- 
View this message in context: http://old.nabble.com/How-to-call-axis2-service-from-none-axis2-client-tp28026718p28026718.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: How to call axis2 service from none axis2 client

Posted by Amila Suriarachchi <am...@gmail.com>.
On Thu, Mar 25, 2010 at 3:30 PM, emengy <em...@hotmail.com> wrote:

>
> Hi,
>
> I have a axis2 1.5 service which I currently call from axis2 Non-Blocking
> Invocation client i.e.
> The client contain the lines:
> engageModule("addressing");
> setUseSeparateListener(true);
>
> Is it possible to call the same service in Non-Blocking fashion from none
> axis2 client?
>
yes. the request message should have an addressing reply to filed. Try to
send the messages through a tcpmon
and see.

> How should I set the request so the axis server will know this that this
> request is asynchronous call?
>

using the Addressing reply to header.


> Also is it possible to call engageModule("addressing") with other address
> than the calling client?
>
I am not clear about your question. engageModule is a axis2 specific
function.

thanks,
Amila.

>
> Thanks
> --
> View this message in context:
> http://old.nabble.com/How-to-call-axis2-service-from-none-axis2-client-tp28026718p28026718.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/