UnsupportedMediaException:支持的是[application / soap + xml]错误

时间:2017-05-09 03:18:53

标签: java xml web-services maven soap

你可以告诉我为什么会遇到这个例外。这在项目A中很有效,但我实际上将项目A合并到项目B中,并在调用付款授权肥皂服务时开始注意到此错误。

我错过了任何maven依赖吗?请帮帮我

com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/xml Supported ones are: [application/soap+xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:322)
    at com.sun.xml.ws.encoding.StreamSOAP12Codec.decode(StreamSOAP12Codec.java:107)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:156)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:312)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:272)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:221)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:136)
    at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:110)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1063)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:979)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:950)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:825)
    at com.sun.xml.ws.client.Stub.process(Stub.java:443)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:174)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:102)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:154)
    at com.sun.proxy.$Proxy59.authorize(Unknown Source)
    at com.macys.mkp.Utils.MkpCreateOrderServiceUtil.EPSService(MkpCreateOrderServiceUtil.java:103)
    at com.macys.lib.utils.AuthorizeSteps.sendAuthorizeRequest(AuthorizeSteps.java:102)
    at com.macys.lib.utils.AuthorizeSteps.createAuthorize(AuthorizeSteps.java:82)
    (reflection-invoke)
    at org.jbehave.core.steps.StepCreator$ParametrisedStep.perform(StepCreator.java:599)
    at org.jbehave.core.embedder.PerformableTree$FineSoFar.run(PerformableTree.java:340)

1 个答案:

答案 0 :(得分:0)

您是否在标题中输入了正确的内容类型?