Yes there is the problem with the default builder as well. Ideally we
should be able to configure this in the axis2.xml's messageBuilders
configuration. How about having a defaultBuilder configuration
attribute for the message builders in the axis2.xml? We can put this
to the messageFormatters as well.

Regarding the Roberto's problem, there was a real issue with the GET
requests and message relay. We've fixed this in the 3.0.0 release.

Thanks,
Supun..

On Fri, Mar 19, 2010 at 9:37 AM, Sanjiva Weerawarana <[email protected]> wrote:
> Supun, first of all, s/Cappa/Roberto/ :-). My fault for starting to call
> Roberto wrong! Apologies :-(.
>
> Second the issue here is the default builder - Roberto's GET doesn't have a
> content type .. and I guess we default to XML builder in that case? What we
> need to do is to say to use the BinaryRelayBuilder as the default builder.
> Sanjiva.
> On Fri, Mar 19, 2010 at 9:32 AM, Supun Kamburugamuva <[email protected]> wrote:
>>
>> Hi Cappa,
>>
>> Handling application/x-www-form-urlencoded was not supported with the
>> message relay in 2.1.3 release. It is supported with the upcoming
>> 3.0.0 release.
>>
>> Thanks,
>> Supun..
>>
>> On Thu, Mar 18, 2010 at 4:33 PM, Cappa Roberto
>> <[email protected]> wrote:
>> > Now, POST works but GET doesn't work anymore...
>> >
>> > I've changed the messagebuilder for incoming x-www-form-urlencoded
>> > requests (POST):
>> >
>> > <messageBuilder contentType="application/x-www-form-urlencoded"
>> >
>> >  class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
>> >
>> > now, POST parameters are correctly encoded and used in my custom logic
>> > after based-64 decoding.
>> >
>> > I've also changed the corresponding messageFormatter:
>> >
>> >        <messageFormatter contentType="application/x-www-form-urlencoded"
>> >
>> >  class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
>> >
>> > When I try for GET requests, in SOAP monitor the incoming message is
>> > shown as:
>> >
>> > "Error occurred while pretty printing message.
>> > org.apache.axiom.om.OMException: Cannot get InputStream from
>> > DataHandler.java.io.IOException: Input stream has being already consumed "
>> >
>> > My question is: since GET requests don't have a Content-Type, which
>> > message builder is chosen? Why changing the
>> > application/x-www-form-urlencoded message builder affects also GET 
>> > requests?
>> >
>> > ________________________________________
>> > Da: [email protected] [[email protected]] per conto
>> > di Ruwan Linton [[email protected]]
>> > Inviato: mercoledì 17 marzo 2010 20.00
>> > A: [email protected]
>> > Oggetto: Re: [Carbon-dev] R: R: R: R: R: WSO2 component to deploy a
>> > simple servlet?
>> >
>> > Hi Roberto,
>> >
>> > So the log mediator tries to extract the content type header, whcih
>> > could be different from the actual content type that is going out, just
>> > try using the following get-property instead;
>> >
>> > get-property('axis2', 'ContentType')
>> >
>> > Except for that are there any issues in the REST invocation?
>> >
>> > Thanks,
>> > Ruwan
>> >
>> > Cappa Roberto wrote:
>> >> Hi, we are trying the BinaryRelay solution. We have a problem. In proxy
>> >> like this:
>> >>
>> >> <syn:proxy xmlns:syn="http://ws.apache.org/ns/synapse"; name="RestTest"
>> >> transports="https,http" statistics="disable" trace="disable"
>> >> startOnLoad="true">
>> >>    <syn:target>
>> >>       <syn:inSequence>
>> >>          <syn:property name="RESPONSE" value="true" />
>> >>          <syn:class
>> >> name="it.telecomitalia.ictlab.rest.identity.ip2cli.mediator.Ip2CliIdentityMediator"/>
>> >>          <syn:header name="To" expression="get-property('ReplyTo')" />
>> >>          <syn:log level="full">
>> >>             <syn:property name="CONTENT-TYPE"
>> >> expression="get-property('transport','Content-Type')" />
>> >>          </syn:log>
>> >>          <syn:send />
>> >>       </syn:inSequence>
>> >>    </syn:target>
>> >> </syn:proxy>
>> >>
>> >> The log prints: CONTENT-TYPE=application/xml but the returned packet to
>> >> client is application/x-www-form-urlencoded. Does the content-type is
>> >> altered during call <send/>?  For what reason?
>> >>
>> >> Thanks.
>> >>
>> >>
>> >> ________________________________________
>> >> Da: [email protected] [[email protected]] per conto
>> >> di Ruwan Linton [[email protected]]
>> >> Inviato: mercoledì 17 marzo 2010 13.01
>> >> A: [email protected]
>> >> Oggetto: Re: [Carbon-dev] R: R: R: R: WSO2 component to deploy a simple
>> >> servlet?
>> >>
>> >> Yes basically what you need to do is, to add the following builder and
>> >> formatter declarations to the axis2.xml and try.
>> >>
>> >> <messageBuilder contentType="text/html"
>> >> class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
>> >> <messageFormatter contentType="text/html"
>> >> class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
>> >>
>> >> Please note that, if you need to do any transformations touching the
>> >> payload, you need to use a <build/> mediator.
>> >>
>> >> Thanks,
>> >> Ruwan
>> >>
>> >> Cappa Roberto wrote:
>> >>
>> >>> The second one, we need to mediate requests going into RESTfull
>> >>> service, obviously incoming requests in ESB are also generic HTTP 
>> >>> GET/POST,
>> >>> not SOAP. Thanks for the advice, we will analyze the relay solution you 
>> >>> have
>> >>> suggested. Is that a good article to start with?
>> >>> http://wso2.org/library/articles/binary-relay-efficient-way-pass-both-xml-non-xml-content-through-apache-synapse
>> >>> ________________________________________
>> >>> Da: [email protected] [[email protected]] per
>> >>> conto di Ruwan Linton [[email protected]]
>> >>> Inviato: mercoledì 17 marzo 2010 12.24
>> >>> A: [email protected]
>> >>> Oggetto: Re: [Carbon-dev] R: R: R: WSO2 component to deploy a simple
>> >>> servlet?
>> >>>
>> >>> Cappa Roberto wrote:
>> >>>
>> >>>
>> >>>> You are absolutely right, but our time-to-market needs a temporary
>> >>>> solution, because in current conditions we cannot offer a working 
>> >>>> solution
>> >>>> for our REST services based only on ESB.
>> >>>>
>> >>>>
>> >>>>
>> >>> Hi Roberto,
>> >>>
>> >>> So, do you want to host RESTfull services on ESB or do you want to
>> >>> mediate the requests going into a RESTfull service??
>> >>>
>> >>> If it is the later, you could use the message relay and pass the
>> >>> messages using a binary stream to the actual service.
>> >>>
>> >>> Thanks,
>> >>> Ruwan
>> >>>
>> >>>
>> >>>> ________________________________________
>> >>>> Da: [email protected] [[email protected]] per
>> >>>> conto di Sanjiva Weerawarana [[email protected]]
>> >>>> Inviato: mercoledì 17 marzo 2010 10.29
>> >>>> A: carbon-dev
>> >>>> Oggetto: Re: [Carbon-dev] R: R: WSO2 component to deploy a simple
>> >>>> servlet?
>> >>>>
>> >>>> Cappa, we're going to fix the issues in the REST routing stuff - that
>> >>>> stuff needs to work perfectly. If its an option it'll be great to have 
>> >>>> you
>> >>>> keep pushing us to get that part right instead of taking over and 
>> >>>> writing
>> >>>> your servlet!
>> >>>>
>> >>>> Sanjiva.
>> >>>>
>> >>>> On Wed, Mar 17, 2010 at 2:47 PM, Cappa Roberto
>> >>>> <[email protected]<mailto:[email protected]>>
>> >>>> wrote:
>> >>>> No, we are talking about the possibility to deploy an external
>> >>>> non-SOAP service, like a simple servlet (my original mail
>> >>>> http://wso2.org/mailarchive/carbon-dev/2010-March/040154.html).
>> >>>>
>> >>>> Thanks
>> >>>> ________________________________________
>> >>>> Da: [email protected]<mailto:[email protected]>
>> >>>> [[email protected]<mailto:[email protected]>] per 
>> >>>> conto
>> >>>> di Paul Fremantle [[email protected]<mailto:[email protected]>]
>> >>>> Inviato: mercoledì 17 marzo 2010 9.55
>> >>>> A: carbon-dev
>> >>>> Oggetto: Re: [Carbon-dev] R: WSO2 component to deploy a simple
>> >>>> servlet?
>> >>>>
>> >>>> Roberto
>> >>>>
>> >>>> Are you asking if you can deploy WSAS services in the ESB? The answer
>> >>>> is most definitely yes. You can use p2 to install the Service Hosting
>> >>>> feature and  then you have all the WSAS service types (POJO, AAR, JAXWS 
>> >>>> etc)
>> >>>> available to deploy in the ESB.
>> >>>>
>> >>>> Paul
>> >>>>
>> >>>> 2010/3/17 Cappa Roberto
>> >>>> <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
>> >>>> It could be a solution, the problem in this case is that we cannot
>> >>>> visualize the component in any way in the admin console and we have to
>> >>>> develop an administration page from scratch. This can be quite simple 
>> >>>> for a
>> >>>> simple services list visualizator, more complex if we want have at least
>> >>>> "deploy" and "undeploy" functions. For this reason we asked for the
>> >>>> possibility to use an existing carbon component from other products.
>> >>>>
>> >>>> In relation to your proposal, what is the difference between
>> >>>> deploying a .war file and a OSGi bundle? Is there an example where is
>> >>>> explained how to create a simple web bundle and how to install it in 
>> >>>> carbon?
>> >>>>
>> >>>> Thanks
>> >>>>
>> >>>> ________________________________________
>> >>>> Da:
>> >>>> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
>> >>>> [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
>> >>>> per conto di Afkham Azeez
>> >>>> [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
>> >>>> Inviato: mercoledì 17 marzo 2010 6.11
>> >>>> A:
>> >>>> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
>> >>>> Oggetto: Re: [Carbon-dev] WSO2 component to deploy a simple servlet?
>> >>>>
>> >>>> You could deploy normal webapps on the ESB. Just drop the .war file
>> >>>> into the webapps directory. If that approach doesn't work for you, you 
>> >>>> could
>> >>>> even create an OSGi bundle which registers your servlet with the OSGi
>> >>>> framework.
>> >>>>
>> >>>> Thanks
>> >>>> Azeez
>> >>>>
>> >>>> _______________________________________________
>> >>>> Carbon-dev mailing list
>> >>>>
>> >>>> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
>> >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Paul Fremantle
>> >>>> CTO and Co-Founder, WSO2
>> >>>> OASIS WS-RX TC Co-chair, VP, Apache Synapse
>> >>>>
>> >>>> Office: +44 844 484 8143
>> >>>> Cell: +44 798 447 4618
>> >>>>
>> >>>> blog: http://pzf.fremantle.org
>> >>>>
>> >>>> twitter.com/pzfreo<http://twitter.com/pzfreo><http://twitter.com/pzfreo>
>> >>>>
>> >>>> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
>> >>>>
>> >>>> wso2.com<http://wso2.com><http://wso2.com> Lean Enterprise Middleware
>> >>>>
>> >>>> _______________________________________________
>> >>>> Carbon-dev mailing list
>> >>>> [email protected]<mailto:[email protected]>
>> >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Sanjiva Weerawarana, Ph.D.
>> >>>> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>> >>>> email: [email protected]<mailto:[email protected]>; phone: +1 408 754
>> >>>> 7388 x51726; cell: +94 77 787 6880
>> >>>> blog: http://sanjiva.weerawarana.org/
>> >>>>
>> >>>> Lean . Enterprise . Middleware
>> >>>>
>> >>>> _______________________________________________
>> >>>> Carbon-dev mailing list
>> >>>> [email protected]
>> >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>> --
>> >>> Ruwan Linton
>> >>> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
>> >>> WSO2 Inc.; http://wso2.org
>> >>> phone: +1 408 754 7388 ext 51789
>> >>> email: [email protected]; cell: +94 77 341 3097
>> >>> blog: http://blog.ruwan.org
>> >>>
>> >>> Lean . Enterprise . Middleware
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> Carbon-dev mailing list
>> >>> [email protected]
>> >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>>
>> >>> _______________________________________________
>> >>> Carbon-dev mailing list
>> >>> [email protected]
>> >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Ruwan Linton
>> >> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
>> >> WSO2 Inc.; http://wso2.org
>> >> phone: +1 408 754 7388 ext 51789
>> >> email: [email protected]; cell: +94 77 341 3097
>> >> blog: http://blog.ruwan.org
>> >>
>> >> Lean . Enterprise . Middleware
>> >>
>> >>
>> >> _______________________________________________
>> >> Carbon-dev mailing list
>> >> [email protected]
>> >> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>
>> >> _______________________________________________
>> >> Carbon-dev mailing list
>> >> [email protected]
>> >> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>
>> >>
>> >
>> >
>> > --
>> > Ruwan Linton
>> > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
>> > WSO2 Inc.; http://wso2.org
>> > phone: +1 408 754 7388 ext 51789
>> > email: [email protected]; cell: +94 77 341 3097
>> > blog: http://blog.ruwan.org
>> >
>> > Lean . Enterprise . Middleware
>> >
>> >
>> > _______________________________________________
>> > Carbon-dev mailing list
>> > [email protected]
>> > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >
>> > _______________________________________________
>> > Carbon-dev mailing list
>> > [email protected]
>> > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
> email: [email protected]; phone: +1 408 754 7388 x51726; cell: +94 77 787
> 6880
> blog: http://sanjiva.weerawarana.org/
>
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>

_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to