javaee / metro-jax-ws

https://javaee.github.io/metro-jax-ws/
Other
132 stars 68 forks source link

Unable to set MIME headers through SAAJ API #457

Open glassfishrobot opened 17 years ago

glassfishrobot commented 17 years ago

Using the SAAJ 1.3 implementation, i am trying to set a MIME header from a handler:

SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage(); MimeHeaders mimeHeaders = soapMessage.getMimeHeaders(); mimeHeaders.setHeader("Cookie", "client-cookie=true");

However the wireformat doesn't contain it:

POST /jaxws-samples-handlerchain HTTP/1.1 SOAPAction: "" Content-Type: text/xml; charset=utf-8 Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, /; q=.2 User-Agent: Java/1.5.0_11 Host: localhost:8080 Connection: keep-alive Content-Length: 539

<?xml version="1.0" ?> [...]</S:Envelope>

The same code works with a different SAAJ implementation

Environment

Operating System: All Platform: All

Affected Versions

[2.1]

glassfishrobot commented 17 years ago

Reported by heiko_braun@java.net

glassfishrobot commented 17 years ago

heiko_braun@java.net said: Cross reference: http://jira.jboss.com/jira/browse/JBWS-1671

glassfishrobot commented 17 years ago

jitu@java.net said: Assigning to Rama

glassfishrobot commented 17 years ago

ramapulavarthi@java.net said: changing the target milestone to ND.

glassfishrobot commented 16 years ago

ramapulavarthi@java.net said: not a showstopper for as911

glassfishrobot commented 15 years ago

ramapulavarthi@java.net said: Targeting it to 2.2.1 release. The fix involves changing the code at multiple places for it to be correct and applicable in all possible cases beyond this test case covers.

Notes for myself for future evaluation:

Look into Packet.INBOUND_TRANSPORT_HEADERS and Packet.OUTBOUND_TRANSPORT_HEADERS Message.readAsSOAPMessage(Packet packet, boolean inbound)

Wherever we create Packet from SOAPMessage or SOAPMessage from Packet, we need to take of the respective properties. In SOAPMessageDispatch, the above packet proeprties should be taken care of.

Also, While creating the HttpConnection in HttpTransportPipe, Packet.OUTBOUND_TRANSPORT_HEADERS needs to be sent adn Packet.INBOUND_TRANSPORT_HEADERS need to be populatyed for response.

Similarly with Provider implementation.

In Handlers, where user can access/set SOAPMessage.

What about Tubes that can set new Message instance? Should n't Packet properties be already updated when a message is set on packet based on the direction?

glassfishrobot commented 15 years ago

ramapulavarthi@java.net said: See earlier evaluation, Adding keyword metro2.0-waived.

glassfishrobot commented 14 years ago

ramapulavarthi said: Can't make it for this release 2.2.2

glassfishrobot commented 17 years ago

Was assigned to miroslav.kos

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAX_WS-457