Thursday, January 17, 2008

Calling (basic) secured Webservices

If a webservice is secured by basic authentication you can call this web service by supplying the basic credentials. This is done at the partner link definition. For BPEL these are the properties in JDeveloper of the partner link. Or you could add them directly in the bpel.xml file in the partner link binding.

<partnerlinkbinding name="YourPartnerLink">
<property name="wsdlLocation">YourPartnerLink.wsdl</property>
<property name="basicHeaders">credentials</property>
<property name="basicUsername">myusername</property>
<property name="basicPassword">thisissecret</property>
</partnerlinkbinding>

Or using the http username password mechanism:

<partnerlinkbinding name="YourPartnerLink">
<property name="wsdlLocation">YourPartnerLink.wsdl</property>
<property name="httpHeaders">credentials</property>
<property name="httpUsername">myusername</property>
<property name="httpPassword">thisissecret</property>
</partnerlinkbinding>

Post a Comment