Forum Discussion

Anonymous's avatar
Anonymous
15 years ago

SoapUI failure parsing mediatype string

Hi,

I am getting "SoapUI failure parsing mediatype string" when trying to send a REST request using Soap UI. Please let me know what I need to do.


 
      <meta content="HTML Tidy, see <!-- w --><a class=" postlink="" />www.w3.org" name="generator"/>
      JBossWeb/2.0.0.GA_CP - Error report
     
 
 
     

HTTP Status 500 -


     

     


        type
        Exception report
     


     


        message
     


     


        description
        The server encountered an internal error () that prevented it from fulfilling this request.
     


     


        exception
     


     
java.lang.IllegalArgumentException: Failure parsing MediaType string: 
    org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.parse(MediaTypeHeaderDelegate.java:39)
    org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.fromString(MediaTypeHeaderDelegate.java:16)
    javax.ws.rs.core.MediaType.valueOf(MediaType.java:173)
    org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractHttpHeaders(ServletUtil.java:89)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:83)
    org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:69)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.intuit.spc.bhp.logging.LoggingFilter.doFilter(LoggingFilter.java:32)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

     

     

     


        note
        The full stack trace of the root cause is available in the JBossWeb/2.0.0.GA_CP logs.
     


     

     

JBossWeb/2.0.0.GA_CP


 


Thanks,
Anand

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    the error seems to occur on the server, what kind of request are you sending? What mediaType is the server expecting?

    regards,

    /Ole
    eviware.com
  • Anonymous's avatar
    Anonymous
    I was sending a XML request, the server is expecting a XML request as well. The response i have pasted above was when media type was application/XML. When I changed the media type to text/XML i am getting the response below. I am doing a POST


     
          <meta content="HTML Tidy, see <!-- w --><a class=" postlink="" />www.w3.org" name="generator"/>
          JBossWeb/2.0.0.GA_CP - Error report
         
     
     
         

    HTTP Status 415 - Cannot consume content type


         

         


            type
            Status report
         


         


            message
            Cannot consume content type
         


         


            description
            The server refused this request because the request entity is in a format not supported by the requested resource for the requested method (Cannot consume content type).
         


         

         

    JBossWeb/2.0.0.GA_CP


     
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    well, I'm not sure what your server is expecting.. maybe "text/xml" or "application/xml"?

    regards,

    /Ole
    eviware.com