axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tammy Dugan <tdu...@regenstrief.org>
Subject Re: [axis2]HTTP Status code
Date Thu, 15 Mar 2007 20:18:05 GMT
I downloaded the nightly build and built it. I expanded the war file and 
went to http://localhost:8080/axis2 and clicked on validate. The 
validation seemed to work fine. When I clicked on the validation, I got 
the following error in the tomcat console:

org.apache.axis2.transport.http.AxisServlet doPost
SEVERE: java.lang.NoSuchMethodError: 
org.apache.axis2.context.MessageContext.getLogIDString()Ljava/lang/String:
null

Is there a different build I can get that will not throw this error?

Tammy

Punnoose, Roshan wrote:
> Yes, the latest Axis2 has fixed that issue.
>
> Roshan Punnoose
> Phone: 301-497-6039
>
> -----Original Message-----
> From: Tammy Dugan [mailto:tdugan@regenstrief.org] 
> Sent: Thursday, March 15, 2007 12:10 PM
> To: axis-user@ws.apache.org
> Subject: Re: [axis2]HTTP Status code
>
> I tried this and the resp variable is always null. Do I need to pull a 
> different version of axis2 down from the repository to get this to work?
>
> I am running the 1.1.1 release. I tried the following code in my service
>
> implementation class:
>
> HttpServletResponse response = (HttpServletResponse) 
> MessageContext.getCurrentMessageContext().
>             getProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE);
>
> and response is null. I need to manipulate the mime headers so if there 
> is another way I should do it I will.
>
> Tammy
>
> Punnoose, Roshan wrote:
>   
>> MessageContext.getCurrentMessageContext() is returning most likely the
>> Message_In MessageContext. That holds the HttpServletResponse going
>> back, all I had to do was change the status code on this class.
>>
>> Code:
>>
>> 	HttpServletResponse resp = (HttpServletResponse)
>> getCurrentMessageContext()
>>                 .getProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE);
>>         if (resp != null) {
>>             resp.setStatus(status);
>>         }
>>
>> Roshan Punnoose
>> Phone: 301-497-6039
>>
>> -----Original Message-----
>> From: Tammy Dugan [mailto:tdugan@regenstrief.org] 
>> Sent: Wednesday, March 14, 2007 1:04 PM
>> To: axis-user@ws.apache.org
>> Subject: Re: [axis2]HTTP Status code
>>
>> How did you get access to the MessageContext that got returned?
>>
>> Tammy
>>
>> Punnoose, Roshan wrote:
>>   
>>     
>>> Sorry, I got this to work. I actually got the ServletResponse from
>>>       
> the
>   
>>> MessageContext and then changed the status code. Pretty simple :)
>>>
>>> Roshan Punnoose
>>> Phone: 301-497-6039
>>>
>>> -----Original Message-----
>>> From: Punnoose, Roshan [mailto:punnooser@bah-systems.com] 
>>> Sent: Wednesday, March 14, 2007 12:58 PM
>>> To: axis-user@ws.apache.org
>>> Subject: [axis2]HTTP Status code
>>>
>>> Is there anyway to change the status code of the return? I have a web
>>> service that returns custom SOAP faults, but it always returns it
>>>       
> with
>   
>>> the status code of 200, I want to change that to 500? Any way?
>>>
>>> Roshan Punnoose
>>> Phone: 301-497-6039
>>>
>>> -----Original Message-----
>>> From: Punnoose, Roshan [mailto:punnooser@bah-systems.com] 
>>> Sent: Wednesday, March 14, 2007 11:30 AM
>>> To: axis-user@ws.apache.org
>>> Subject: RE: [axis2]REST requests failing
>>>
>>> Looks like the RESTUtil is sending the inputStream as null in the
>>> processURLRequest, which will break the TransportUtils class either
>>>     
>>>       
>> way.
>>   
>>     
>>> What can we do?
>>>
>>> Roshan Punnoose
>>> Phone: 301-497-6039
>>>
>>> -----Original Message-----
>>> From: Punnoose, Roshan [mailto:punnooser@bah-systems.com] 
>>> Sent: Wednesday, March 14, 2007 11:24 AM
>>> To: axis-user@ws.apache.org
>>> Subject: [axis2]REST requests failing
>>>
>>> I have a REST GET request, and I keep getting this error:
>>>
>>> java.lang.NullPointerException.
>>> java.lang.NullPointerException
>>>         at java.io.Reader.<init>(Reader.java:61)
>>>         at
>>>       
> java.io.InputStreamReader.<init>(InputStreamReader.java:80)
>   
>>>         at
>>>
>>>     
>>>       
> org.apache.axis2.builder.XFormURLEncodedBuilder.extractParametersFromReq
>   
>>   
>>     
>>> uest(XFormURLEncodedBuilder.java:123)
>>>         at
>>>
>>>     
>>>       
> org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURL
>   
>>   
>>     
>>> EncodedBuilder.java:77)
>>>         at
>>>
>>>     
>>>       
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
>   
>>   
>>     
>>> ls.java:120)
>>>         at
>>>
>>>     
>>>       
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil
>   
>>   
>>     
>>> .java:98)
>>>         at
>>>
>>>     
>>>       
> org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processUR
>   
>>   
>>     
>>> LRequest(AxisServlet.java:767)
>>>         at
>>>
>>>     
>>>       
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:236)
>   
>>   
>>     
>>> Any ideas?
>>>
>>> Roshan Punnoose
>>> Phone: 301-497-6039
>>>
>>>   
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>     
>>>       
>>   
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>     
>
>   
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

-- 
Tammy Dugan
Computer Programmer

Regenstrief Institute, Inc.
1050 Wishard Blvd., RG5
Indianapolis, IN 46202

(317) 630 - 7346

Confidentiality Notice: The contents of this message and any files transmitted with it may
contain confidential and/or privileged information and are intended solely for the use of
the named addressee(s). Additionally, the information contained herein may have been disclosed
to you from medical records with confidentiality protected by federal and state laws. Federal
regulations and State laws prohibit you from making further disclosure of such information
without the specific written consent of the person to whom the information pertains or as
otherwise permitted by such regulations. A general authorization for the release of medical
or other information is not sufficient for this purpose.
 
If you have received this message in error, please notify the sender by return e-mail and
delete the original message. Any retention, disclosure, copying, distribution or use of this
information by anyone other than the intended recipient is strictly prohibited.



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


Mime
View raw message