2 Replies Latest reply on Mar 2, 2011 3:04 AM by Jochen Lauer

    HTTP 415 when calling webservice

    Jochen Lauer Apprentice

      Hello togehter,

       

      I try to call an external webservice with a camel route but I got a

       

      "HTTP operation failed invoking http://www.openligadb.de/Webservices/Sportsdata.asmx with statusCode: 415"

       

      My Route looks like

       

      ";

              return in;

          }

            

      Where can I specify the content type for my request ?

        • 1. Re: HTTP 415 when calling webservice
          Claus Ibsen Master

          You can set it as a header as they will become HTTP headers.

           

          <setHeader headerName="Content-Type">
               <constant>xxxx</constant>
          </setHeader>
          

           

          • 2. Re: HTTP 415 when calling webservice
            Jochen Lauer Apprentice

            Thanks, the solution works !

             

            <route>
                    <from uri="quartz://timerName?cron=0 * * * * ?"></from>
                   <setHeader headerName="Content-Type">
                          <constant>text/xml</constant>
                 </setHeader>  
                    <bean ref="openligaInput" method="addInput"></bean>
                    <to uri="log:LogInput"></to>
                    <to uri="http://www.openligadb.de/Webservices/Sportsdata.asmx"></to>
                    <to uri="log:LogOutput"></to>
                </route>