Receive SOAP Calls with Seaside

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Receive SOAP Calls with Seaside

Kai-Uwe Pielka
Hello,

I created a Seaside (Pharo One-Click Image) Web Application (http://etumma.de) and like the Framework very much. Now I want to add a small SOAP service to the same image.

Seaside receives the call but I don't know how to get access to the payload. I tried the following to read the body of the call:

Transcript show: self requestContext request bodyDecoded; cr.
And also:
Transcript show: self requestContext request rawBody; cr.

In both cases the Transcript window shows only blanks.

Then I tried to load the SoapOpera package but it does not play well together with the Pharo One-Click image. It brings a lot of syntax errors.

Anyway I prefer to receive the Soap calls with Seaside and don't want to load (and learn) SoapOpera in additon.

Is there a way to receive the Soap Call header and payload with Seaside?

Thanks,
Kai-Uwe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Receive SOAP Calls with Seaside

Philippe Marschall
2011/1/27  <[hidden email]>:
> Hello,
>
> I created a Seaside (Pharo One-Click Image) Web Application (http://etumma.de) and like the Framework very much. Now I want to add a small SOAP service to the same image.
>
> Seaside receives the call but I don't know how to get access to the payload. I tried the following to read the body of the call:
>
> Transcript show: self requestContext request bodyDecoded; cr.
> And also:
> Transcript show: self requestContext request rawBody; cr.

That should actually work if the request has a body. That means it has
to be a PUT or POST request, simply typing the URL in your browser
won't work. soapUI [1] is an easy way for making SOAP requests. For
such things it's generally best to subclass WARequestHandler and
implement #handeFiltered:.

> In both cases the Transcript window shows only blanks.
>
> Then I tried to load the SoapOpera package but it does not play well together with the Pharo One-Click image. It brings a lot of syntax errors.
>
> Anyway I prefer to receive the Soap calls with Seaside and don't want to load (and learn) SoapOpera in additon.

That means you will have to do the whole SOAP request decoding
yourself and come up with a SOAP response as well.

 [1] http://www.soapui.org/

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Receive SOAP Calls with Seaside

Kai-Uwe Pielka
Hi Philippe,

thanks for the answer. I did the test call with soapUI and verified that it was a POST request.
Maybe I need to load another example with other data to receive a payload.
Another problem I could imagine is the MIME type that is different or I have to adapt the encoding.
Do I have to configure my Seaside application to accept this MIME type?
Anyway it helps to know that it should work basically.

I'm already using a XML parser in my Seaside application and only need a small part of the Soap message.
The response can be hard coded. So, hopefully I don't need SoapOpera.
 
Thanks,
Kai-Uwe


Am 27.01.2011 um 17:28 schrieb Philippe Marschall:

> 2011/1/27  <[hidden email]>:
>> Hello,
>>
>> I created a Seaside (Pharo One-Click Image) Web Application (http://etumma.de) and like the Framework very much. Now I want to add a small SOAP service to the same image.
>>
>> Seaside receives the call but I don't know how to get access to the payload. I tried the following to read the body of the call:
>>
>> Transcript show: self requestContext request bodyDecoded; cr.
>> And also:
>> Transcript show: self requestContext request rawBody; cr.
>
> That should actually work if the request has a body. That means it has
> to be a PUT or POST request, simply typing the URL in your browser
> won't work. soapUI [1] is an easy way for making SOAP requests. For
> such things it's generally best to subclass WARequestHandler and
> implement #handeFiltered:.
>
>> In both cases the Transcript window shows only blanks.
>>
>> Then I tried to load the SoapOpera package but it does not play well together with the Pharo One-Click image. It brings a lot of syntax errors.
>>
>> Anyway I prefer to receive the Soap calls with Seaside and don't want to load (and learn) SoapOpera in additon.
>
> That means you will have to do the whole SOAP request decoding
> yourself and come up with a SOAP response as well.
>
> [1] http://www.soapui.org/
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Receive SOAP Calls with Seaside

Philippe Marschall
2011/1/27 Kai-Uwe Pielka <[hidden email]>:
> Hi Philippe,
>
> thanks for the answer. I did the test call with soapUI and verified that it was a POST request.
> Maybe I need to load another example with other data to receive a payload.
> Another problem I could imagine is the MIME type that is different or I have to adapt the encoding.

No, that should be the issue.

> Do I have to configure my Seaside application to accept this MIME type?

No.

> Anyway it helps to know that it should work basically.


You can set a break point in #requestBodyFor: of your sever adaptor
and see what happens.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside