You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by MrNinni <mm...@sardegnait.it> on 2009/03/20 11:52:03 UTC

Method Not Allowed

Hi,
I made a simple application with one http-consumer, one ODE process and one
http-provider.
The client sends at the servicemix a username and password, the ode process
turns this request at the provider that calls the service.


This is the request:

POST / HTTP/1.1
Content-Type: text/xml;charset=UTF-8
Content-Length: 375
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3
56.10:8657

<?xml version='1.0' encoding='UTF-8'?>
   <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Body>
         <GetLoginInfo xmlns="http://tempuri.org/">                                    
            <LoginId>USERNAME</LoginId>                                    
            <Password>PASSWORD</Password>                                    
         </GetLoginInfo>
      </env:Body>
   </env:Envelope>


This is the response:

HTTP/1.1 405 Method Not Allowed			<<<---
Allow: OPTIONS, TRACE, GET, HEAD
Content-Length: 1739
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Fri, 20 Mar 2009 09:18:24 GMT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
   <HTML>
      <HEAD>
         <TITLE>Impossibile visualizzare la pagina</TITLE>
         <META HTTP-EQUIV="Content-Type" Content="text/html;
charset=windows-1252">
         </HEAD>
         <BODY>
		...
         </BODY>
     </HTML>


I think that the problem is the POST Method not allowed. Can I modify the
HTTP method from the http-provider?
-- 
View this message in context: http://www.nabble.com/Method-Not-Allowed-tp22618056p22618056.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Method Not Allowed

Posted by MrNinni <mm...@sardegnait.it>.
ok, thank you very much!

Gert Vanthienen wrote:
> 
> L.S.,
> 
> The DefaultHttpProviderMarshaler used by the HTTP provider endpoint
> can be configured to use HTTP GET instead of HTTP POST.  I
> 
> Something like this
> <http:provider marshaler="#GetMarshaler"/>
> 
> <bean name="GetMarshaler"
> class="org.apache.servicemix.http.endpoints.DefaultHttpProviderMarshaler">
>   <property name="method" value="GET"/>
> </bean>
> 
> (disclaimer: haven't tested this snippper, just an example ;) )
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/3/20 MrNinni <mm...@sardegnait.it>:
>>
>> Hi,
>> I made a simple application with one http-consumer, one ODE process and
>> one
>> http-provider.
>> The client sends at the servicemix a username and password, the ode
>> process
>> turns this request at the provider that calls the service.
>>
>>
>> This is the request:
>>
>> POST / HTTP/1.1
>> Content-Type: text/xml;charset=UTF-8
>> Content-Length: 375
>> SOAPAction: ""
>> User-Agent: Jakarta Commons-HttpClient/3
>> 56.10:8657
>>
>> <?xml version='1.0' encoding='UTF-8'?>
>>   <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
>>      <env:Body>
>>         <GetLoginInfo xmlns="http://tempuri.org/">
>>            <LoginId>USERNAME</LoginId>
>>            <Password>PASSWORD</Password>
>>         </GetLoginInfo>
>>      </env:Body>
>>   </env:Envelope>
>>
>>
>> This is the response:
>>
>> HTTP/1.1 405 Method Not Allowed                 <<<---
>> Allow: OPTIONS, TRACE, GET, HEAD
>> Content-Length: 1739
>> Content-Type: text/html
>> Server: Microsoft-IIS/6.0
>> X-Powered-By: ASP.NET
>> Date: Fri, 20 Mar 2009 09:18:24 GMT
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> "http://www.w3.org/TR/html4/strict.dtd">
>>   <HTML>
>>      <HEAD>
>>         <TITLE>Impossibile visualizzare la pagina</TITLE>
>>         <META HTTP-EQUIV="Content-Type" Content="text/html;
>> charset=windows-1252">
>>         </HEAD>
>>         <BODY>
>>                ...
>>         </BODY>
>>     </HTML>
>>
>>
>> I think that the problem is the POST Method not allowed. Can I modify the
>> HTTP method from the http-provider?
>> --
>> View this message in context:
>> http://www.nabble.com/Method-Not-Allowed-tp22618056p22618056.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: http://www.nabble.com/Method-Not-Allowed-tp22618056p22677244.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Method Not Allowed

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

The DefaultHttpProviderMarshaler used by the HTTP provider endpoint
can be configured to use HTTP GET instead of HTTP POST.  I

Something like this
<http:provider marshaler="#GetMarshaler"/>

<bean name="GetMarshaler"
class="org.apache.servicemix.http.endpoints.DefaultHttpProviderMarshaler">
  <property name="method" value="GET"/>
</bean>

(disclaimer: haven't tested this snippper, just an example ;) )

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/3/20 MrNinni <mm...@sardegnait.it>:
>
> Hi,
> I made a simple application with one http-consumer, one ODE process and one
> http-provider.
> The client sends at the servicemix a username and password, the ode process
> turns this request at the provider that calls the service.
>
>
> This is the request:
>
> POST / HTTP/1.1
> Content-Type: text/xml;charset=UTF-8
> Content-Length: 375
> SOAPAction: ""
> User-Agent: Jakarta Commons-HttpClient/3
> 56.10:8657
>
> <?xml version='1.0' encoding='UTF-8'?>
>   <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
>      <env:Body>
>         <GetLoginInfo xmlns="http://tempuri.org/">
>            <LoginId>USERNAME</LoginId>
>            <Password>PASSWORD</Password>
>         </GetLoginInfo>
>      </env:Body>
>   </env:Envelope>
>
>
> This is the response:
>
> HTTP/1.1 405 Method Not Allowed                 <<<---
> Allow: OPTIONS, TRACE, GET, HEAD
> Content-Length: 1739
> Content-Type: text/html
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> Date: Fri, 20 Mar 2009 09:18:24 GMT
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>   <HTML>
>      <HEAD>
>         <TITLE>Impossibile visualizzare la pagina</TITLE>
>         <META HTTP-EQUIV="Content-Type" Content="text/html;
> charset=windows-1252">
>         </HEAD>
>         <BODY>
>                ...
>         </BODY>
>     </HTML>
>
>
> I think that the problem is the POST Method not allowed. Can I modify the
> HTTP method from the http-provider?
> --
> View this message in context: http://www.nabble.com/Method-Not-Allowed-tp22618056p22618056.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>