eclipse-ee4j / metro-jax-ws

metro-jax-ws
https://eclipse-ee4j.github.io/metro-jax-ws/
BSD 3-Clause "New" or "Revised" License
72 stars 40 forks source link

[jaxws-rt]: 4.0.1 the content of bindingProviger.requestContext is not copy to packet.invocationProperties #658

Closed vitalijr2 closed 1 year ago

vitalijr2 commented 1 year ago

I put values to the request context but when HttpTransportPipe process the packet - the packet.invocationProperties is empty.

I use jaxws-rt 4.0.1.

The sample: --- I create a client ---

    var helloEndpoint = service.getHelloEndpointPort();
    var bindingProvider = ((BindingProvider) helloEndpoint);
    var requestContext = bindingProvider.getRequestContext();

    requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "https://qwerty/test");
    requestContext.put(BindingProvider.USERNAME_PROPERTY, "contextUsername");
    requestContext.put(BindingProvider.PASSWORD_PROPERTY, "contextPassword");

    var headers = new HashMap<String, List<String>>();
    headers.put("Username", Collections.singletonList("headerUsername"));
    headers.put("Password", Collections.singletonList("headerPassword"));
    requestContext.put(MessageContext.HTTP_REQUEST_HEADERS, headers);

    return service.getHelloEndpointPort();

Then I check the invocationProperties on https://github.com/eclipse-ee4j/metro-jax-ws/blob/08bad630bd8159ef5688c3c1eedd5cc26e72bc2e/jaxws-ri/runtime/rt/src/main/java/com/sun/xml/ws/transport/http/client/HttpTransportPipe.java#L150 and it is empty.

vitalijr2 commented 1 year ago

Request context request context

InvocationProperties invocationProperties