JAX-WS - Adding SOAP Headers

后端 未结 10 2243
鱼传尺愫
鱼传尺愫 2020-12-05 02:11

I am trying to create a standalone client to consume some web services. I must add my username and password to the SOAP Header. I tried adding the credentials as follows:

10条回答
  •  失恋的感觉
    2020-12-05 03:09

    Also, if you're using Maven to build your project, you'll need to add the following dependency:

        
            com.sun.xml.ws
            jaxws-rt
            {currentversion}/version>
        
    

    This provides you with the class com.sun.xml.ws.developer.WSBindingProvider.

    Link: https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt

提交回复
热议问题