You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by JanReynaerts <ja...@urbidata.nl> on 2008/03/11 12:05:03 UTC
Configuring http component with encoding property
Hello,
I think I have a problem with the http-component.
I have 2 http components, one is configured as a consumer and one is
configured as a provider. The locationURI of the provider is a secured one,
so I also had to configure sslparameters for this http component.
The consumer sends messages directly to the provider, who sends them to the
webservice of the secured locationURI.
Now when I send a message from SOAPUI through the 2 http components, the
other webservice complaints that the encoding is not encoded UTF-8.
When I send the same message with SOAPUI directly to the other webservice,
there's no problem.
I noticed that SOAPUI has a property, called "encoding", that allows me to
set the encoding of the message to "UTF-8". When I change this to something
else and I once again send the message directly to the other webservice, I
get the same error as when I send the message via 2 http components to the
webservice.
My question is: Is it possible to configure the http component (provider) in
the same way as I can with the SOAPUI property "encoding"?
Regards,
Jan Reynaerts
--
View this message in context: http://www.nabble.com/Configuring-http-component-with-encoding-property-tp15975974s12049p15975974.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Configuring http component with encoding property
Posted by JanReynaerts <ja...@urbidata.nl>.
The problem is that I don't have a messageexchange in my program. I just get
the message as an object, make some updates in it, and then pass it as a
parameter to a proxy function. Someway or another this function passes it to
the http-provider component and also takes care of the response. My program
is generated by XFIRE from a wsdl. Maybe it 's possible to configure the
generation by XFire in such a way, that the content-type will be saved or
can be set again to the right value, but I don't know how?
Regards, Jan Reynaerts
tterm wrote:
>
> You grab all properties from the incoming exchange and set it to the
> outgoing exchange(which one you create) which should get exactly this
> property. There might be a copy method or something but I can't remember
> at the moment. Maybe gnodet knows it. :-)
>
> yourcomponent-> gets exchange from http consumer
> yourcomponent-> creates a new excahnge to the provider
> yourcomponent -> copy all porperties
>
> That's it I guess.
>
> Thomas
>
> JanReynaerts wrote:
>> Is this something that has to be done in the POJO? The only object that's
>> available there, is the message, that I received from the http consumer
>> component. It is in one way or another generated by XFIRE, so i can
>> access
>> every element of the message seperately. But there's no function
>> available
>> to copy the exchange properties. Or can I do this in an xbean.xml?
>> Regards, Jan Reynaerts
>>
>>
>> tterm wrote:
>>
>>>Again not sure but did you forget to copy the exchange properties?
>>>
>>>Thomas
>>>
>>>JanReynaerts wrote:
>>>
>>>>Thanks, setting this parameter works, although I also had to set the
>>>>parameter "wantHeadersFromHttpIntoExchange=true" in the file
>>>>component.properties of servicemix.
>>>>
>>>>However, when I put a POJO of JSR181 between the 2 http components, it
>>>>still
>>>>gives the same error. In this POJO, I pass the message comming from the
>>>>http
>>>>consumer component to a proxy. This proxy is the http provider
>>>>component.
>>>>
>>>>Any ideas how to tackle this problem? A bypass could be to defaultly set
>>>>the
>>>>CONTENT-TYPE to "UTF-8", but I don't know if this is possible either.
>>>>
>>>>Regards,
>>>>Jan Reynaerts
>>>>
>>>>
>>>
>>>
>>>--
>>>Thomas Termin
>>>_______________________________
>>>blue elephant systems GmbH
>>>Wollgrasweg 49
>>>D-70599 Stuttgart
>>>
>>>Tel : (+49) 0711 - 45 10 17 676
>>>Fax : (+49) 0711 - 45 10 17 573
>>>WWW : http://www.blue-elephant-systems.com
>>>Email : Thomas.Termin@blue-elephant-systems.com
>>>
>>>blue elephant systems GmbH
>>>Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>
>>>
>>>
>>
>>
>
>
> --
> Thomas Termin
> _______________________________
> blue elephant systems GmbH
> Wollgrasweg 49
> D-70599 Stuttgart
>
> Tel : (+49) 0711 - 45 10 17 676
> Fax : (+49) 0711 - 45 10 17 573
> WWW : http://www.blue-elephant-systems.com
> Email : Thomas.Termin@blue-elephant-systems.com
>
> blue elephant systems GmbH
> Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
> Registergericht : Amtsgericht Stuttgart, HRB 24106
> Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>
>
>
--
View this message in context: http://www.nabble.com/Configuring-http-component-with-encoding-property-tp15975974s12049p16024118.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Configuring http component with encoding property
Posted by JanReynaerts <ja...@urbidata.nl>.
The problem is that I don't have a messageexchange in my program. I just get
the message as an object, make some updates in it, and then pass it as a
parameter to a proxy function. Someway or another this function passes it to
the http-provider component and also takes care of the response. My program
is generated by XFIRE from a wsdl. Maybe it 's possible to configure the
generation by XFire in such a way, that the content-type will be saved or
can be set again to the right value, but I don't know how?
Regards, Jan Reynaerts
tterm wrote:
>
> You grab all properties from the incoming exchange and set it to the
> outgoing exchange(which one you create) which should get exactly this
> property. There might be a copy method or something but I can't remember
> at the moment. Maybe gnodet knows it. :-)
>
> yourcomponent-> gets exchange from http consumer
> yourcomponent-> creates a new excahnge to the provider
> yourcomponent -> copy all porperties
>
> That's it I guess.
>
> Thomas
>
> JanReynaerts wrote:
>> Is this something that has to be done in the POJO? The only object that's
>> available there, is the message, that I received from the http consumer
>> component. It is in one way or another generated by XFIRE, so i can
>> access
>> every element of the message seperately. But there's no function
>> available
>> to copy the exchange properties. Or can I do this in an xbean.xml?
>> Regards, Jan Reynaerts
>>
>>
>> tterm wrote:
>>
>>>Again not sure but did you forget to copy the exchange properties?
>>>
>>>Thomas
>>>
>>>JanReynaerts wrote:
>>>
>>>>Thanks, setting this parameter works, although I also had to set the
>>>>parameter "wantHeadersFromHttpIntoExchange=true" in the file
>>>>component.properties of servicemix.
>>>>
>>>>However, when I put a POJO of JSR181 between the 2 http components, it
>>>>still
>>>>gives the same error. In this POJO, I pass the message comming from the
>>>>http
>>>>consumer component to a proxy. This proxy is the http provider
>>>>component.
>>>>
>>>>Any ideas how to tackle this problem? A bypass could be to defaultly set
>>>>the
>>>>CONTENT-TYPE to "UTF-8", but I don't know if this is possible either.
>>>>
>>>>Regards,
>>>>Jan Reynaerts
>>>>
>>>>
>>>
>>>
>>>--
>>>Thomas Termin
>>>_______________________________
>>>blue elephant systems GmbH
>>>Wollgrasweg 49
>>>D-70599 Stuttgart
>>>
>>>Tel : (+49) 0711 - 45 10 17 676
>>>Fax : (+49) 0711 - 45 10 17 573
>>>WWW : http://www.blue-elephant-systems.com
>>>Email : Thomas.Termin@blue-elephant-systems.com
>>>
>>>blue elephant systems GmbH
>>>Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>
>>>
>>>
>>
>>
>
>
> --
> Thomas Termin
> _______________________________
> blue elephant systems GmbH
> Wollgrasweg 49
> D-70599 Stuttgart
>
> Tel : (+49) 0711 - 45 10 17 676
> Fax : (+49) 0711 - 45 10 17 573
> WWW : http://www.blue-elephant-systems.com
> Email : Thomas.Termin@blue-elephant-systems.com
>
> blue elephant systems GmbH
> Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
> Registergericht : Amtsgericht Stuttgart, HRB 24106
> Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>
>
>
--
View this message in context: http://www.nabble.com/Configuring-http-component-with-encoding-property-tp15975974s12049p16024118.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Configuring http component with encoding property
Posted by Thomas Termin <tt...@blue-elephant-systems.com>.
You grab all properties from the incoming exchange and set it to the
outgoing exchange(which one you create) which should get exactly this
property. There might be a copy method or something but I can't remember
at the moment. Maybe gnodet knows it. :-)
yourcomponent-> gets exchange from http consumer
yourcomponent-> creates a new excahnge to the provider
yourcomponent -> copy all porperties
That's it I guess.
Thomas
JanReynaerts wrote:
> Is this something that has to be done in the POJO? The only object that's
> available there, is the message, that I received from the http consumer
> component. It is in one way or another generated by XFIRE, so i can access
> every element of the message seperately. But there's no function available
> to copy the exchange properties. Or can I do this in an xbean.xml?
> Regards, Jan Reynaerts
>
>
> tterm wrote:
>
>>Again not sure but did you forget to copy the exchange properties?
>>
>>Thomas
>>
>>JanReynaerts wrote:
>>
>>>Thanks, setting this parameter works, although I also had to set the
>>>parameter "wantHeadersFromHttpIntoExchange=true" in the file
>>>component.properties of servicemix.
>>>
>>>However, when I put a POJO of JSR181 between the 2 http components, it
>>>still
>>>gives the same error. In this POJO, I pass the message comming from the
>>>http
>>>consumer component to a proxy. This proxy is the http provider
>>>component.
>>>
>>>Any ideas how to tackle this problem? A bypass could be to defaultly set
>>>the
>>>CONTENT-TYPE to "UTF-8", but I don't know if this is possible either.
>>>
>>>Regards,
>>>Jan Reynaerts
>>>
>>>
>>
>>
>>--
>>Thomas Termin
>>_______________________________
>>blue elephant systems GmbH
>>Wollgrasweg 49
>>D-70599 Stuttgart
>>
>>Tel : (+49) 0711 - 45 10 17 676
>>Fax : (+49) 0711 - 45 10 17 573
>>WWW : http://www.blue-elephant-systems.com
>>Email : Thomas.Termin@blue-elephant-systems.com
>>
>>blue elephant systems GmbH
>>Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>
>>
>>
>
>
--
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart
Tel : (+49) 0711 - 45 10 17 676
Fax : (+49) 0711 - 45 10 17 573
WWW : http://www.blue-elephant-systems.com
Email : Thomas.Termin@blue-elephant-systems.com
blue elephant systems GmbH
Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
Re: Configuring http component with encoding property
Posted by JanReynaerts <ja...@urbidata.nl>.
Is this something that has to be done in the POJO? The only object that's
available there, is the message, that I received from the http consumer
component. It is in one way or another generated by XFIRE, so i can access
every element of the message seperately. But there's no function available
to copy the exchange properties. Or can I do this in an xbean.xml?
Regards, Jan Reynaerts
tterm wrote:
>
> Again not sure but did you forget to copy the exchange properties?
>
> Thomas
>
> JanReynaerts wrote:
>> Thanks, setting this parameter works, although I also had to set the
>> parameter "wantHeadersFromHttpIntoExchange=true" in the file
>> component.properties of servicemix.
>>
>> However, when I put a POJO of JSR181 between the 2 http components, it
>> still
>> gives the same error. In this POJO, I pass the message comming from the
>> http
>> consumer component to a proxy. This proxy is the http provider
>> component.
>>
>> Any ideas how to tackle this problem? A bypass could be to defaultly set
>> the
>> CONTENT-TYPE to "UTF-8", but I don't know if this is possible either.
>>
>> Regards,
>> Jan Reynaerts
>>
>>
>
>
> --
> Thomas Termin
> _______________________________
> blue elephant systems GmbH
> Wollgrasweg 49
> D-70599 Stuttgart
>
> Tel : (+49) 0711 - 45 10 17 676
> Fax : (+49) 0711 - 45 10 17 573
> WWW : http://www.blue-elephant-systems.com
> Email : Thomas.Termin@blue-elephant-systems.com
>
> blue elephant systems GmbH
> Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
> Registergericht : Amtsgericht Stuttgart, HRB 24106
> Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>
>
>
--
View this message in context: http://www.nabble.com/Configuring-http-component-with-encoding-property-tp15975974s12049p16006447.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Configuring http component with encoding property
Posted by Thomas Termin <tt...@blue-elephant-systems.com>.
Again not sure but did you forget to copy the exchange properties?
Thomas
JanReynaerts wrote:
> Thanks, setting this parameter works, although I also had to set the
> parameter "wantHeadersFromHttpIntoExchange=true" in the file
> component.properties of servicemix.
>
> However, when I put a POJO of JSR181 between the 2 http components, it still
> gives the same error. In this POJO, I pass the message comming from the http
> consumer component to a proxy. This proxy is the http provider component.
>
> Any ideas how to tackle this problem? A bypass could be to defaultly set the
> CONTENT-TYPE to "UTF-8", but I don't know if this is possible either.
>
> Regards,
> Jan Reynaerts
>
>
--
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart
Tel : (+49) 0711 - 45 10 17 676
Fax : (+49) 0711 - 45 10 17 573
WWW : http://www.blue-elephant-systems.com
Email : Thomas.Termin@blue-elephant-systems.com
blue elephant systems GmbH
Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
Re: Configuring http component with encoding property
Posted by JanReynaerts <ja...@urbidata.nl>.
Thanks, setting this parameter works, although I also had to set the
parameter "wantHeadersFromHttpIntoExchange=true" in the file
component.properties of servicemix.
However, when I put a POJO of JSR181 between the 2 http components, it still
gives the same error. In this POJO, I pass the message comming from the http
consumer component to a proxy. This proxy is the http provider component.
Any ideas how to tackle this problem? A bypass could be to defaultly set the
CONTENT-TYPE to "UTF-8", but I don't know if this is possible either.
Regards,
Jan Reynaerts
--
View this message in context: http://www.nabble.com/Configuring-http-component-with-encoding-property-tp15975974s12049p16002425.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Configuring http component with encoding property
Posted by JanReynaerts <ja...@urbidata.nl>.
Thanks, setting this parameter works, although I also had to set the
parameter "wantHeadersFromHttpIntoExchange=true" in the file
component.properties of servicemix.
However, when I put a POJO of JSR181 between the 2 http components, it still
gives the same error. In this POJO, I pass the message comming from the http
consumer component to a proxy. This proxy is the http provider component.
Any ideas how to tackle this problem? A bypass could be to defaultly set the
CONTENT-TYPE to "UTF-8", but I don't know if this is possible either.
Regards,
Jan Reynaerts
--
View this message in context: http://www.nabble.com/Configuring-http-component-with-encoding-property-tp15975974s12049p16002425.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Configuring http component with encoding property
Posted by Thomas Termin <tt...@blue-elephant-systems.com>.
In your xbean configuration for provider you can use:
wantContentTypeHeaderFromExchangeIntoHttpRequest="true"
Is it that what you mean?
Cheers
Thomas
JanReynaerts wrote:
> Hello,
>
> I think I have a problem with the http-component.
>
> I have 2 http components, one is configured as a consumer and one is
> configured as a provider. The locationURI of the provider is a secured one,
> so I also had to configure sslparameters for this http component.
> The consumer sends messages directly to the provider, who sends them to the
> webservice of the secured locationURI.
>
> Now when I send a message from SOAPUI through the 2 http components, the
> other webservice complaints that the encoding is not encoded UTF-8.
> When I send the same message with SOAPUI directly to the other webservice,
> there's no problem.
>
> I noticed that SOAPUI has a property, called "encoding", that allows me to
> set the encoding of the message to "UTF-8". When I change this to something
> else and I once again send the message directly to the other webservice, I
> get the same error as when I send the message via 2 http components to the
> webservice.
>
> My question is: Is it possible to configure the http component (provider) in
> the same way as I can with the SOAPUI property "encoding"?
>
> Regards,
> Jan Reynaerts
--
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart
Tel : (+49) 0711 - 45 10 17 676
Fax : (+49) 0711 - 45 10 17 573
WWW : http://www.blue-elephant-systems.com
Email : Thomas.Termin@blue-elephant-systems.com
blue elephant systems GmbH
Firmensitz : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle