Thank you very much Saminda. I've examined the lines you addressed.
I've found followings:

- After execution, SOAPOverHTTPSender dispatches the response according
to the HTTP status code. 
- In my case(HTTP 500), it calls AbstractHTTPSender's processResponse()
method.
- A reference to the input stream extracted from response body is set
to operation context as following:
 
  if(msgContext.getOperationContext() != null) {
       msgContext.getOperationContext()
               .setProperty(MessageContext.TRANSPORT_IN, in);
  }

What is the purpose of this? Can I reach this property and receive the
input stream within the class that I call the stub? If yes, could you
please tell me how?

Also, I examined PingClient sample a little. I changed
ClientUtil.getPingOMElement() to be able to call pingF service which
throws an AxisFault when it is called. After I had called it, there was
no AxisFault at either the client or server side althought HTTP stream
says "HTTP 500". This might be because of fireAndForget () whose
javadoc says "That is, there is no opportunity to get an error from the
service via this API; one may still get client-side errors, such as
host unknown etc.". But, generated stub does not call fireAndForget().
Anyway, should I expect them both behave the same?

Thanks again.

Ali Sadik Kumlali

--- Saminda Abeyruwan <[EMAIL PROTECTED]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ali Sadik Kumlali wrote:
> > Hi again,
> > 
> > I've found that org.apache.axis2.transport.http.AbstractHTTPSender
> > really doesn't care about the HTTP status code returned by the
> service.
> > Here is the code:
> > 
> > -----------------------------------------------------------------
> > // org.apache.axis2.transport.http.AbstractHTTPSender
> > protected void executeMethod(...) throws IOException {
> >     HostConfiguration config = this.getHostConfiguration(...);
> >     msgContext.setProperty(HTTPConstants.HTTP_METHOD, method);
> > 
> >     ...
> > 
> >     // -----------------------------------------------
> >     // executeMethod returns back 202, 500, etc. but
> >     // it is not handled!
> >     // -----------------------------------------------
> >     httpClient.executeMethod(config, method);
> > }
> > -----------------------------------------------------------------
> > 
> > Is it on purpose? If yes, could you please answer my previous
> > questions?
> > 
> > Thanks a lot.
> > 
> > Ali Sadik Kumlali
> > 
> > 
> > --- Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>Hi all,
> >>
> >>The subject may seem contradictory, as it has both "input only" and
> >>"return" words together :)
> >>
> >>Here is the scenario:
> >>- In my WSDL, all the operations have input message only.
> Therefore,
> >>I
> >>assume that I have "input only" services. 
> >>- WSDL2Java generates *MessageReceiverInOnly as expected.
> Therefore,
> >>I
> >>beleive, my first assumption is confirmed.
> >>- I add InflowSecurity in service.xml. Therefore, my service
> requires
> >>security headers.
> >>- I don't add OutflowSecurity in the axis2.xml at the client side.
> >>(This is made deliberately to cause the server throwing "missing
> >>security headers" exception.)
> >>- I send request by calling generated test code.
> >>- All the messages goes through TCP/IP Monitor.
> >>- Request doesn't have security headers as expected.
> >>- Server sends a SOAPFault back to the client. (HTTP header says
> >>HTTP/1.1 500 Internal Server Error)
> >>- However, client doesn't do anything with this exception, although
> >>it
> >>successfully receives the whole message.
> >>
> >>Here are the questions:
> >>- Is this expected behavior?
> >>  - If yes, why the server send soap fault for the in-only message?
> >>- Does the client only wait for *any* HTTP response without
> actually
> >>caring about what the header is? Or, does it behave differently but
> >>not
> >>for HTTP 500?
> >>- I saw the ReplyTo header in the request. Spec says ReplyTo is
> >>optional for in-only messages. What purposes Axis2 set it for?
> >>
> >>
> >>Thanks for your reading efforts :)
> >>
> >>Ali Sadik Kumlali
> >>
> >>__________________________________________________
> >>Do You Yahoo!?
> >>Tired of spam?  Yahoo! Mail has the best spam protection around 
> >>http://mail.yahoo.com 
> >>
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> > 
> Hi,
> 
> org.apache.axis2.transport.http.AbstractHTTPSender does care about
> response http status code.
> 
> for a soap request, CommonsHttpTransportSender creates
> 
> org.apache.axis2.transport.http.SOAPOverHTTPSender which extends
> org.apache.axis2.transport.http.AbstractHTTPSender  and if you
> observe
> the code in lines 103 to 121, response will be handle according to
> the
> http status code. Currently axis2 support 200,202 and 500.
> 
> Thank you
> 
> Saminda
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFEYGf0YmklbLuW6wYRAl7FAJ9CjyfxNL/E8u90i8wcBRPalI3AuQCgwZEg
> mnq77GrPynQ8awsui8gWbQo=
> =ACXR
> -----END PGP SIGNATURE-----
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to