1

I'm new with WSO2,I'm trying to add header in the request to my backend, so i done to add it using the calssic method or the xml method as here so now I wanna add it using java method, could you please help me how can make it

Thanks

Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
Ali Mejri
  • 39
  • 6

1 Answers1

0

Within your class mediator, try to get transport header map from axis2 context and add the new one like this.

Map<String, String> headers = (Map) axis2MC.getProperty(
                       org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);

headers.put("NewHeader", "Value");
Bee
  • 12,251
  • 11
  • 46
  • 73