• Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis and HTTPSender  RSS feed

 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
It sounds like Axis has implemented its own class to send http to a target host : the HTTPSender.class
This class open a socket, writes data to it and then reads the response from this socket. Cool stuff if my Axis client is a standalone application, huh ?
But if my Axis client is within a web application (thus linked to a HTTP server), my understanding is that my Axis will not use the HTTP server to send the HTTP request but will use its own HTTPSender instead.
Conclusion : any configuration of my Apache HTTP Server will be ignored when I send a request, as Axis perform the request through its HTTPSender class.

Am I right ? Is there any workaround to this Axis behavior ?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of configurations you'd like to do?
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Lasse, aren't you in Finland ?
It's almost time to go to bed for you, no ??

Compression (Deflate defined by my Apache HTTP server)
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Lasse, aren't you in Finland ?
It's almost time to go to bed for you, no ??
Yes. No.
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure whether this matches my query. But my situation is like that in my companies recent project, we are implementing Axis for enabling the servlet-based testing tool web service enabled. I tested it using a simple java class that accesses our product's API, executes a simple method and returns a heppy string.
Now the question is my service is a simple java class (as generally it is) but both my web service client and web service providers are two separate servlets in tow separate machines. I would like the following flow to be justified by you and help me in making a decision.

Tester(Web Browser)-->Tomcat's WebApp(URL)-->Front Controller Servlet(Service Client)-->Service Class(Axis packed into my webapp)-->Application Logic Processor Servlet ......and the reverse chain to display the result to user.

Now look at the service class and the following queries.
1. May I make it a servlet as well? A servlet is also a class, right?
2. If answer to #1 is yes, may I make one servlet that itself acts as a web service as well as the Application Logic Processor Servlet?
3. If I use a simple class (instead of making it a servlet), should I call the service provider servlet through URLConnector? What is the standard practice?
Am IU missing something basic or the queries make some sense?
Regards,
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. May I make it a servlet as well? A servlet is also a class, right?
2. If answer to #1 is yes, may I make one servlet that itself acts as a web service as well as the Application Logic Processor Servlet?
3. If I use a simple class (instead of making it a servlet), should I call the service provider servlet through URLConnector? What is the standard practice?
1. No, you shouldn't make it a servlet. Axis implements the HttpServlet that receives incoming SOAP requests so there is no reason to make the service implementation class a servlet.
2. I'll answer this even though the answer to #1 was "no"... You could implement a servlet that parses the incoming SOAP envelope, figures out what the client is trying to do, and act accordingly, finally producing a response SOAP envelope. However, there's no point in doing this if you can use Axis or some other web service engine that does it for you.
3. Yes, you can say "URL.openConnection()" and so on. Another option would be to use the relevant classes from HttpUnit or the Jakarta Commons HttpClient project, which handle the HTTP protocol for you and let you focus on the actual message payload instead of the networking stuff.
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Lasse,
Thank you very much for your insights. I got what I missed.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hum, hum....
Please don't forget my former question.
Is there a way to use the HTTP server configuration when sending request from an Axis web service deployed onto a web app ( for instance, deflate mode for compression) ?
Or does the HTTPSender implemented by the Axis team prevent us from relying on any HTTP Server configuration ??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!