ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun Jain <jainarun...@gmail.com>
Subject Re: Invoke secured webservice using ode bpel
Date Tue, 12 Sep 2017 10:22:54 GMT
Below is the list of headers that should go with the request

"POST /tririga/ws/TririgaWS HTTP/1.1[\r][\n]"
"Accept-Encoding: gzip,deflate[\r][\n]"
"Content-Type: application/soap+xml;charset=UTF-8[\r][\n]"
"REMOTE_USER: system[\r][\n]"
"Content-Length: 549[\r][\n]"
"Host: 10.73.45.87:7002[\r][\n]"
"Connection: Keep-Alive[\r][\n]"
"User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"

All the above headers except REMOTE_USER goes by default. I need to be able
to set the REMOTE_USER and send it with other headers. You will find in my
first mail I used username and password from authenticate schema as setting
username and password header instead of REMOTE_USER header also works for
me, but I want to use REMOTE_USER and not username and password header.

Thanks,
Arun

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

> Hi Sathwik,
>
> I want to pass custom http header
>
> Thanks,
> Arun
>
> On Sep 12, 2017 14:50, "Sathwik B P" <sathwik.bp@gmail.com> wrote:
>
>> 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#hqejbhcnp
>> hrclmbblfgmjg
>> > [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