java web service client, adding http headers

后端 未结 5 1433
闹比i
闹比i 2020-12-14 02:43

Having created a java web service client using wsimport on a wsdl, I need to set the Authorization header for each soap message embedded in an http request. Having generated

5条回答
  •  一向
    一向 (楼主)
    2020-12-14 03:27

    You can pass a map with custom headers to the BindingProvider (I believe you can set the MessageContext.HTTP_REQUEST_HEADERS property). Try creating an Authorization header and passing it in.

提交回复
热议问题