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

Jax-Ws Issue #561

Open Tomas-Kraus opened 2 years ago

Tomas-Kraus commented 2 years ago

Hi Team

Good Day!!

We faced an issue in JAX-WS and want to bring the information to your notice. I had generated client classes from WSDL using JAX-WS (WSImport) and invoked the service. We have logged HTTP Dump and are able to see the request XML packets sent to the server as well as Response XML packets received from the server successfully (PFB Log snippets). How ever when framework is trying to unmarshall the response XML packets (converting from XML to Java Object), we are getting “UnSupportedMediaException”. Please see below log snippets. Server is sending us Content-Type in the Response Header as “TEXT/XML” (in Upper Case) where as JAX-WS is expecting the content-type as “text/xml” (in Lower Case) as per below snap shot. Can you please let us know if there is any way on how to handle this issue on client side for changing the upper case content-type to lower case so that un-marshalling can happen after getting the response from Server or is this an issue in JAX-WS framework itself. We have googled on this issue but didn’t get any clear leads on how to handle this issue.

HTTP/1.1 200 OK X-csg-0x019e: MzAwOjA= Cache-control: no-cache Content-type: TEXT/XML Content-length: 1049 X-csg-0x0154: Imh0dHA6Ly93d3cuY3Nnc3lzdGVtcy5jb20vc2xib3MvUmV0cmlldmVPcmRlckxpc3 RPcGVyYXRpb24i X-csg-0x0158: Mjoy Server: eiahttpsrv.15.1.0.3 X-csg-0x019d: V0NG X-csg-0x021d: AFoAGDA1ZjkxYjA2LWU5YWItMzFlNC04MDAwLTI5ZDYyMmI2NjhlZgAAAUzmA7/2AA BJ/wAAABMASFMYAAAAAExvYWRCYWwoMTg5NDMpOkVJUENMSV9TT0FQ Date: Mon, 27 Apr 2015 09:55:35 GMT Set-cookie: BIGipServerp-iface-slbos-cert-soap=3915388426.57875.0000; path=/ X-csg-0x011d: U0xCU1BSREE= <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <Retriev eOrderListResponse xmlns="http://www.csgsystems.com/slbos">WvWAKir kland8084PC0AIVR</S ource>CCS2.25TST</Operat or>be40a556-5000-8a2c-8a49-1e4ecc38c07d OTTSTSLBWCF010000</Response

1PC0A< Account>808435011000007394403000033038110652260430994403 000033038CARI VIDEOTEST4029639999 -------------------- com.sun.xml.internal.ws.server.UnsupportedMediaException: Unsupported Content-Ty pe: TEXT/XML Supported ones are: [text/xml] at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(Unknown Sourc e) at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(Unknown Sourc e) at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(Unknown Sour ce) at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.proce ss(Unknown Source) at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.proce ssRequest(Unknown Source) at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processReques t(Unknown Source)

Appreciate your update at earliest. Thanks in Advance.

Thanks, Govindarajan G.

Source: https://github.com/javaee/metro-jax-ws/issues/1173 Author: glassfishrobot