function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to set the password and its type in the header (WS-Security) when making a soap request

I am facing the exact problem being described here.


My header looks like this:


<Security xmlns="">
<Password Type="" />
<TimeStamp />


This is when the class is :

public class Password_element {
public String Type_x;
private String[] Type_x_att_info = new String[]{'Type'};
private String[] apex_schema_type_info = new String[]{'','true','false'};
private String[] field_order_type_info = new String[]{};

public Password_element(String typeOfpwd)
this.Type_x = typeOfpwd;


If I add an extra element in the class: Like: 

 public String Password;

 private String[] Password_type_info = new String[]{'Password','','string','0','1','false'};


Then the header looks like :

<Password Type="" > <Password> Password </Password></Password>


How do I set the password without adding an additional tag?




Muni ManjunathMuni Manjunath
Need help in resolving  this issue. Is there any solution exist currently to set the passwordtype ?