cancel
Showing results for 
Search instead for 
Did you mean: 

Axis Receiver SOAP Adapter unable to fill nested header

Former Member
0 Kudos

Hi,

I have requirement where my strucutre is as below.

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://www.webservices.nl/soap/">

 

   <soapenv:Header>

          <HeaderLogin xsi:type="soap:HeaderLogin">

         <!--You may enter the following 2 items in any order-->

         <username xsi:type="xsd:string">?</username>

         <password xsi:type="xsd:string">?</password>

      </HeaderLogin>

   </soapenv:Header>

   <soapenv:Body>

      <soap:carRDWCarDataV3 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <license_plate xsi:type="xsd:string">34SFS9</license_plate>

      </soap:carRDWCarDataV3>

   </soapenv:Body>

</soapenv:Envelope>

But through PI I am able to generate only body of the message..

To fill out the user ID and password I am using Axis adapter, but due the nested header it is filling header properly.

Can you please suggest how to go for this.

1. Axis Header insertion with nested hierarchy

2. Use something in Mapping to read comm channel user id and password using Directory API.

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member184789
Active Contributor
0 Kudos

To avoid the password issue try as :

Former Member
0 Kudos

Hi ,,

Thanks .

I have already visited this,this is not working.

Also I am not using WSSEC.

I need to add only simple header.

Regards,

Akshay

former_member184789
Active Contributor
0 Kudos

Hi,

Then did you try with insertion handler, just above my last post, in which you have to just paste the header in parameter value.1

former_member184789
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

Is anyone aware that If I can use Nested headers in Axis adapter HeaderInsertionhandler...

I need some example as documentation does not have any clue for the same.

Regards,

Akshay

former_member184789
Active Contributor
0 Kudos

Hi,

Do it with the SOAP insertion handler as below. In the parameter value.1 give the content inside SOAP header i.e

<HeaderLogin xsi:type="soap:HeaderLogin">

         <!--You may enter the following 2 items in any order-->

         <username xsi:type="xsd:string">?</username>

         <password xsi:type="xsd:string">?</password>

      </HeaderLogin>

former_member184789
Active Contributor
0 Kudos

A sample for the XSL:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:XXXX="XXXXX">

  <soapenv:Header><XXXX:Security xmlns:XXXX="Webservice URL"><XXXX:UsernameToken><XXXX:Username>XXXXX</XXXX:Username><XXXX:Password Type="XXXX:PasswordText">XXXXX</XXXX:Password></XXXX:UsernameToken></XXXX:Security></soapenv:Header>

<soapenv:Body>

<xsl:copy-of select="*"/>

</soapenv:Body> </soapenv:Envelope>

</xsl:template>

</xsl:stylesheet>

you need to edit this with your webservice URL & User ID/pwd..Ok??

Former Member
0 Kudos

Hey..

thanks for your suggestion,

At receiver side, Password type is String.

So have to tackle it at some other place at runtime..

as password would be visible in Payload as suggested by you.

Regards,

Akshay.

udo_martens
Active Contributor
0 Kudos

Hi,

the easiest way to control the soap enveloap is a xsl mapping. Use only xsl or together with a Message Mapping (excute first MM, put the result into xsl with xsl:copy-of). You can copy an paste the envelope, only username/password are mapped dynamically.

Regards,

Udo

Former Member
0 Kudos

Thanks Udo,

But I see issue reading username and password there,which can be static...

Can we hide the passowrd which we are putting into soap envelope.    

Regards,

Akshay

Former Member
0 Kudos

Hi Udo,

Also do you have any idea if Axis Soap Nested handler is supported in PI 7.31.

If you can provide me some examples for the same.

Regards,

Akshay

udo_martens
Active Contributor
0 Kudos

Hi Akshay,

Can we hide the passowrd which we are putting into soap envelope.

No, but this is like the service is working. Latestly when you message leaves PI the password would be in clear text. It is of course a security lack and the service provider should change it. From you side nothing can be changed. If you temporary encrypt the password nothing is won, because the risc for any attack is only high AFTER processing in PI.

/Udo

Former Member
0 Kudos

Hi All,

Can you please suggest me Nested Header example in Axis Soap Adapter.

Regards,

Akshay