You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by MrRothstein <mr...@gmail.com> on 2007/11/05 21:59:48 UTC

SM-580

I would like to take a crack at SM-580. The patch attached seems to apply to
the HttpEndpoint. I would like to do make the fix for HttpProviderEndpoint.

It seems easy enough:
 Add property to endpoint
 Set property to marshaller in endpoint init
 Have the marshaller look up property (same as contentType/locationUri)
prior to formatting http request

Is that about right?

My only issue with this is figuring out what to do if the contentType does
not evaluate to post, should the existence of a post parameter override
content type or an exception raised?

Thanks
-- 
View this message in context: http://www.nabble.com/SM-580-tf4754351s12049.html#a13595419
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: SM-580

Posted by Guillaume Nodet <gn...@gmail.com>.
If you want to create a servlet, you can do that using jetty.
It is very easy to embed.  Another way would be to use servicemix by using a
consumer endpoint with a custom marshaler...

On 11/7/07, MrRothstein <mr...@gmail.com> wrote:
>
>
> Here is what I have so far:
> A new provider marshaler specifically for handling post parameters.
> The marshaler can be configured with postParameters.
> A PostParameter contains a name and an xpath expression for the value
> (multiple parameters can be specified).
> Is there anything available to set up a servlet inside a test case, so I
> can
> verify the request as it is seen by the client?
> http://www.nabble.com/file/p13618903/PostProviderMarshaler.diff
> PostProviderMarshaler.diff
>
> gnodet wrote:
> >
> > Another way would be to write another marshaler that will specifially
> > handle
> > post requests and configure it on the endpoint. I'd like to keep the
> > endpoint free of properties that are not generic.
> > In addition to the marshaler, we could add another endpoint if needed,
> so
> > that you can configure the properties on a HttpPostProviderEndpoint
> (which
> > would use the post marshaler by default).
> >
> > On 11/5/07, MrRothstein <mr...@gmail.com> wrote:
> >>
> >>
> >> I would like to take a crack at SM-580. The patch attached seems to
> apply
> >> to
> >> the HttpEndpoint. I would like to do make the fix for
> >> HttpProviderEndpoint.
> >>
> >> It seems easy enough:
> >> Add property to endpoint
> >> Set property to marshaller in endpoint init
> >> Have the marshaller look up property (same as contentType/locationUri)
> >> prior to formatting http request
> >>
> >> Is that about right?
> >>
> >> My only issue with this is figuring out what to do if the contentType
> >> does
> >> not evaluate to post, should the existence of a post parameter override
> >> content type or an exception raised?
> >>
> >> Thanks
> >> --
> >> View this message in context:
> >> http://www.nabble.com/SM-580-tf4754351s12049.html#a13595419
> >> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/SM-580-tf4754351s12049.html#a13618903
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: SM-580

Posted by MrRothstein <mr...@gmail.com>.
Here is what I have so far:
A new provider marshaler specifically for handling post parameters.
The marshaler can be configured with postParameters.
A PostParameter contains a name and an xpath expression for the value
(multiple parameters can be specified).
Is there anything available to set up a servlet inside a test case, so I can
verify the request as it is seen by the client?
http://www.nabble.com/file/p13618903/PostProviderMarshaler.diff
PostProviderMarshaler.diff 

gnodet wrote:
> 
> Another way would be to write another marshaler that will specifially
> handle
> post requests and configure it on the endpoint. I'd like to keep the
> endpoint free of properties that are not generic.
> In addition to the marshaler, we could add another endpoint if needed, so
> that you can configure the properties on a HttpPostProviderEndpoint (which
> would use the post marshaler by default).
> 
> On 11/5/07, MrRothstein <mr...@gmail.com> wrote:
>>
>>
>> I would like to take a crack at SM-580. The patch attached seems to apply
>> to
>> the HttpEndpoint. I would like to do make the fix for
>> HttpProviderEndpoint.
>>
>> It seems easy enough:
>> Add property to endpoint
>> Set property to marshaller in endpoint init
>> Have the marshaller look up property (same as contentType/locationUri)
>> prior to formatting http request
>>
>> Is that about right?
>>
>> My only issue with this is figuring out what to do if the contentType
>> does
>> not evaluate to post, should the existence of a post parameter override
>> content type or an exception raised?
>>
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/SM-580-tf4754351s12049.html#a13595419
>> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/SM-580-tf4754351s12049.html#a13618903
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: SM-580

Posted by Guillaume Nodet <gn...@gmail.com>.
Another way would be to write another marshaler that will specifially handle
post requests and configure it on the endpoint. I'd like to keep the
endpoint free of properties that are not generic.
In addition to the marshaler, we could add another endpoint if needed, so
that you can configure the properties on a HttpPostProviderEndpoint (which
would use the post marshaler by default).

On 11/5/07, MrRothstein <mr...@gmail.com> wrote:
>
>
> I would like to take a crack at SM-580. The patch attached seems to apply
> to
> the HttpEndpoint. I would like to do make the fix for
> HttpProviderEndpoint.
>
> It seems easy enough:
> Add property to endpoint
> Set property to marshaller in endpoint init
> Have the marshaller look up property (same as contentType/locationUri)
> prior to formatting http request
>
> Is that about right?
>
> My only issue with this is figuring out what to do if the contentType does
> not evaluate to post, should the existence of a post parameter override
> content type or an exception raised?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/SM-580-tf4754351s12049.html#a13595419
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/