I think I actually figured it out myself after I had sent the email. Not
sure if the approach I took was the same, but basically what I did was to
use a Groovy script to create the value that needs to be used for the HTTP
authorization, set it in a property, then used a property setting within the
synapse.xml such as:
<property name="Authorization" expression="get-property('basicAuth')"
scope="transport"/>
Which appeared to have the desired affect, as it generated an HTTP header. I
will be testing it today, but I think this should work. I'll also take a
look at the link you sent, as there is probably a better way of
accomplishing this.
Thanks for the timely suggestions, btw!
jeff
On 3/8/08, Asankha C. Perera <[EMAIL PROTECTED]> wrote:
>
> Jeff
>
> Let us know if the link helps.. I think we should create a
> BasicAuthentication mediator, or maybe add it to to the endpoint
> definitions?
>
>
> asankha
>
>
> Upul Godage wrote:
> > Hi,
> >
> > This thread may help you. It shows you a way to add basic authentication
> > using the scripting mediator.
> >
> >
> http://www.nabble.com/how-to-use-groovy-script-to-mediate-in-synapse-to15066002.html#a15184531
> > Upul
> >
> >
> > On Sat, Mar 8, 2008 at 9:58 AM, Jeff Davis <[EMAIL PROTECTED]> wrote:
> >
> >
> >> Hi,
> >>
> >> I have a web service that uses HTTP Basic Authentication, and I can't,
> for
> >> the life of me, figure out how that's supported within Synapse.
> Basically,
> >> I
> >> was just hoping to use Synapse as a proxy (or redirector) so that it
> would
> >> add the credentials to the outbound web serivce call. I saw an example
> of
> >> how Synapse can be configured, via a mediator, to check inbound
> messages
> >> for
> >> HTTP credentails, but not how to add them to outbound. I presume I can
> use
> >> the Axis2MessageContext to do this, but I was trying to do it through
> >> script, and I can't get seem to get at that object within the script (I
> >> don't seem to have visibility to it). This seems like a common
> >> requirement,
> >> so maybe I'm just missing something.
> >>
> >> Thanks!
> >>
> >> jeff
> >>
> >>
> >
> >
>
--
Jeff Davis
Senior Architect
Idalica Corporation
MSN: [EMAIL PROTECTED]
Skype: jeffdavis_ca
Phone: 719-287-8656
Enabling Business Through Open Source Technologies
www.idalica.com
IMPORTANT: This electronic message is for exclusive use by the person(s) to
whom it is addressed, and may contain information that is confidential or
privileged and exempt from disclosure under applicable law. If you are not
an intended recipient, please be aware that any disclosure, dissemination,
distribution or copying of this communication, or the use of its contents,
is prohibited. If you have received this message in error, please
immediately notify the sender of your inadvertent receipt and delete this
message from all data storage systems.