You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by pablo caballero <pd...@gmail.com> on 2010/02/04 21:01:57 UTC

How to allow an GET http request against an SOAP ws.

I have an app with a lot of methods (invoked by POST request). I need
to add another method and call it via GET request. If a try to call
the method from the browser
(http://localhost:8080/SFAS/SFAService?_method=sonda) I get the
following error:

<soap:Envelope>
  <soap:Body>
    <soap:Fault>
        <faultcode>soap:Server</faultcode>
        <faultstring>No such operation:  (HTTP GET PATH_INFO:
/SFAS/SFAService)</faultstring>
    </soap:Fault>
   </soap:Body>
</soap:Envelope>

I'm using Spring.

Cfg:
    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <jaxws:endpoint id="sfaServiceEndPoint" implementor="#sfaService"
address="/SFAService" />


Interface:
@WebService
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL,parameterStyle=ParameterStyle.BARE)
public interface SFAService {
..........

Class:
@WebService(endpointInterface="ar.com.link.sfaservices.wss.services.SFAService")
public class SFAServicesImpl implements SFAService{
..........





Can't someone help me?

Thank you very much.

Best regards

Re: How to allow an GET http request against an SOAP ws.

Posted by pablo caballero <pd...@gmail.com>.
Daniel, it works great.

Thank you very much!

Best regards-

On Thu, Feb 4, 2010 at 6:50 PM, Daniel Kulp <dk...@apache.org> wrote:
>
> Well, NORMALLY you cannot, but with CXF, we do allow very simple soap
> operations to be done via a GET.
>
> It would be something like:
>
> http://localhost:8080/SFAS/SFAService/sonda?arg0=foo
>
> Dan
>
>
> On Thu February 4 2010 3:01:57 pm pablo caballero wrote:
>> I have an app with a lot of methods (invoked by POST request). I need
>> to add another method and call it via GET request. If a try to call
>> the method from the browser
>> (http://localhost:8080/SFAS/SFAService?_method=sonda) I get the
>> following error:
>>
>> <soap:Envelope>
>>   <soap:Body>
>>     <soap:Fault>
>>         <faultcode>soap:Server</faultcode>
>>         <faultstring>No such operation:  (HTTP GET PATH_INFO:
>> /SFAS/SFAService)</faultstring>
>>     </soap:Fault>
>>    </soap:Body>
>> </soap:Envelope>
>>
>> I'm using Spring.
>>
>> Cfg:
>>     <import resource="classpath:META-INF/cxf/cxf.xml" />
>>     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>
>>     <jaxws:endpoint id="sfaServiceEndPoint" implementor="#sfaService"
>> address="/SFAService" />
>>
>>
>> Interface:
>> @WebService
>> @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
>> use=SOAPBinding.Use.LITERAL,parameterStyle=ParameterStyle.BARE)
>> public interface SFAService {
>> ..........
>>
>> Class:
>> @WebService(endpointInterface="ar.com.link.sfaservices.wss.services.SFAServ
>> ice") public class SFAServicesImpl implements SFAService{
>> ..........
>>
>>
>>
>>
>>
>> Can't someone help me?
>>
>> Thank you very much.
>>
>> Best regards
>>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: How to allow an GET http request against an SOAP ws.

Posted by Daniel Kulp <dk...@apache.org>.
Well, NORMALLY you cannot, but with CXF, we do allow very simple soap 
operations to be done via a GET.

It would be something like:

http://localhost:8080/SFAS/SFAService/sonda?arg0=foo

Dan


On Thu February 4 2010 3:01:57 pm pablo caballero wrote:
> I have an app with a lot of methods (invoked by POST request). I need
> to add another method and call it via GET request. If a try to call
> the method from the browser
> (http://localhost:8080/SFAS/SFAService?_method=sonda) I get the
> following error:
> 
> <soap:Envelope>
>   <soap:Body>
>     <soap:Fault>
>         <faultcode>soap:Server</faultcode>
>         <faultstring>No such operation:  (HTTP GET PATH_INFO:
> /SFAS/SFAService)</faultstring>
>     </soap:Fault>
>    </soap:Body>
> </soap:Envelope>
> 
> I'm using Spring.
> 
> Cfg:
>     <import resource="classpath:META-INF/cxf/cxf.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> 
>     <jaxws:endpoint id="sfaServiceEndPoint" implementor="#sfaService"
> address="/SFAService" />
> 
> 
> Interface:
> @WebService
> @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
> use=SOAPBinding.Use.LITERAL,parameterStyle=ParameterStyle.BARE)
> public interface SFAService {
> ..........
> 
> Class:
> @WebService(endpointInterface="ar.com.link.sfaservices.wss.services.SFAServ
> ice") public class SFAServicesImpl implements SFAService{
> ..........
> 
> 
> 
> 
> 
> Can't someone help me?
> 
> Thank you very much.
> 
> Best regards
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog