ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sathwik B P <sathwik...@gmail.com>
Subject Re: Invoke secured webservice using ode bpel
Date Tue, 12 Sep 2017 09:20:02 GMT
What do you mean by custom headers?
Do you want to pass HTTP Basic Auth headers or custom Soap Headers?

On Tue, Sep 12, 2017 at 2:14 PM, Arun Jain <jainarun108@gmail.com> wrote:

> Hi,
>
> I'm using eclipse bpel designer and trying to invoke a external soap
> service which requires custom headers to be passed.
>
> I'm using ode version 1.3.7 and it is deployed on Apache Tomcat Server 9.0
>
> I have followed instructions from "http://ode.apache.org/http-
> authentication.html"
>
> Here is what I have done:
>
> 1. Following schema added to service wsdl
> <xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="urn:ode.apache.org/authentication"
> elementFormDefault="qualified">
>     <xsd:element name="authenticate">
>         <xsd:complexType>
>             <xsd:sequence>
>                 <xsd:element name="username" type="xsd:string"
>  minOccurs="0" maxOccurs="1"/>
>                 <xsd:element name="password" type="xsd:string"
>  minOccurs="0" maxOccurs="1"/>
>             </xsd:sequence>
>         </xsd:complexType>
>     </xsd:element>
>
> </xsd:schema>
>
> 2. Input message updated as below
>     <wsdl:message name="getModules">
>         <wsdl:part element="tns:getModules" name="parameters"/>
>         <wsdl:part name="authenticate" element="auth:authenticate"/>  <!--
> Additional message part-->
>
>     </wsdl:message>
> 3. Authenticate part updated as below in BPEL
>     <bpel:assign validate="no" name="Assign2">
>          <bpel:copy>
>             <bpel:from><bpel:literal><authenticate xmlns="urn:
> ode.apache.org/authentication" xmlns:xsi="http://www.w3.org/
> 2001/XMLSchema-instance">
>              <username>system</username><password>admin</password></
> authenticate></bpel:literal></bpel:from>
>             <bpel:to variable="TririgaPLRequest"
> part="authenticate"></bpel:to>
>         </bpel:copy>
>
>     </bpel:assign>
>
> 4. The request message is updated with additional message part as follows
> after invoke
> <message>
> <parameters>
> <getModules xmlns="http://xyz.com" xmlns:tns="http://xyz.com" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"/>
> </parameters>
> <authenticate>
> <authenticate xmlns="urn:ode.apache.org/authentication" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
>                 <username>system</username>
> <password>admin</password>
> </authenticate>
> </authenticate>
>
> </message>
> 5.  Getting the following response from service
>
>         Error sending message (mex={PartnerRoleMex#hqejbhcnphrclmbblfgmjg
> [PID {http://getModules <http://getmodules/>}GetModulesP-2312]
>
> calling org.apache.ode.bpel.epr.WSAEndpoint@1090849.getModules(...) Status
> ASYNC}): Transport error: 401 Error: Unauthorized
>
>
> Thanks,
>
> Arun
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message