[ 
https://issues.apache.org/jira/browse/AXIS2-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485564#comment-13485564
 ] 

Shameera Rathnayaka commented on AXIS2-5440:
--------------------------------------------

Hi Ladislav,

I checked this with axis2-1.6.2, seems your client sends a wrong request. It is 
not sending GET request it sends OPTION request(I check this with tcpmon) so 
Axis2Servelt doesn't has a method to handle OPTION requests. And also see the 
http request send by your client 

OPTIONS /axis2/services/ConsoleServer/listAgents HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: Mozilla/5.0 xxxx
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Origin: null
Access-Control-Request-Method: GET
Access-Control-Request-Headers: content-type

It doesn't accept application/json or application/javascript or text/javascript 
or application/json/badgerfish content types which you have map to 
JSONxxxFomatter/Builder, as content type 

BTW if you type 
http://localhost:8080/axis2/services/ConsoleServer/getAgent?agent=1  or 
http://localhost:8080/axis2/services/ConsoleServer/listAgents in your browser 
you will get the correct request but in xml format.

                
> Tomcat using 100% CPU when application/json (JSONMessageFormatter) is used
> --------------------------------------------------------------------------
>
>                 Key: AXIS2-5440
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5440
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 1.6.2
>         Environment: Apache Tomcat/6.0.35     1.6.0_21-b07    Sun 
> Microsystems Inc.   Windows 7       6.1     x86
>            Reporter: Ladislav Lencucha
>              Labels: JSON
>         Attachments: axis2.xml, ConsoleServer.aar, ws.zip
>
>
> I am trying to connect to my webservice using GET + JSON.
> I've added JSONMessageFormatter and JSONOMBuilder for "application/json" 
> content type.
> When I try to call the webservice using jQuery and HTTP GET with content type 
> "application/xml" I receive the response almost immediately (note that there 
> is a jQuery error raised afterwards, because Xml cannot be parsed as JSON).
> When I try to call the webservice using the same code but with content type 
> "application/json" there is no response and Tomcat uses 100% of CPU (there 
> are also some messages in log file mentioning that it should have ended).
> See my aar file and jQuery example attached. Also see my axis2.xml 
> configuration.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to