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

Reply via email to