wso2 esb不支持的媒体类型 [英] wso2 esb Unsupported Media Type

查看:79
本文介绍了wso2 esb不支持的媒体类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的公司使用Wso2ESB,但是我只有两天的时间说服他们,并且代理的创建不起作用!

I would like my company to use the Wso2ESB, but I have only two days left to convince them, and the creation of Proxy does not work!

我迫切希望为自己的问题提供真正的帮助:我创建的每个代理似乎都可以产生

I am desperate for a real help for my problem: every proxy that I create seem to produce

HTTPSender Unable to sendViaPost to...

(为什么无法发送?)

Transport error: 415 Error: Unsupported Media Type

(是由于无法发送的结果吗?还是配置有问题?)

(is it a consequence of the fact that it could not send? or a problem in the configuration?)

我全新安装的WSO2 ESB 4.5无法与我尝试过的任何Web服务一起使用:JAXWS和C#.我总是收到以下消息LOG:

My fresh installation of WSO2 ESB 4.5 is not working with any web service I have tried: JAXWS and C#. I always have the following message LOG:

[2012-05-09 08:42:19,381]  INFO - LogMediator To: /services/NET.NETHttpSoap12Endpoint, WSAction: http://tempuri.org/Iuser/CheckUserExistsSimple, SOAPAction: http://tempuri.org/Iuser/CheckUserExistsSimple, MessageID: urn:uuid:6e46c985-3646-4441-ba8d-0c366c063c4b, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:CheckUserExistsSimple xmlns:p="http://tempuri.org/"><!--0 to 1 occurrence--><p:User>-</p:User></p:CheckUserExistsSimple></soapenv:Body></soapenv:Envelope>
[2012-05-09 08:42:19,437]  INFO - HTTPSender Unable to sendViaPost to url[http://192.168.10.177:8280/services/NET.NETHttpSoap12Endpoint]
org.apache.axis2.AxisFault: Transport error: 415 Error: Unsupported Media Type
        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:308)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:450)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:277)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
        at org.apache.jsp.admin.jsp.WSRequestXSSproxy_005fajaxprocessor_jsp._jspService(WSRequestXSSproxy_005fajaxprocessor_jsp.java:272)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:161)
        at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:36)
        at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:179)
        at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:49)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Unsupported Media Type[2012-05-09 08:44:32,644]  WARN - ClientHandler I/O error : Connection reset by peer For : 192.168.10.71:80

这是代理定义:

<proxy xmlns="http://ws.apache.org/ns/synapse" name="NET" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="useOriginalwsdl" value="true" scope="default" type="STRING"/>
         <log level="full"/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
      <endpoint>
         <address uri="omitted"/>
      </endpoint>
   </target>
   <publishWSDL uri="omitted?wsdl"/>
   <description></description>
</proxy>

当我尝试使用soapUI调用代理服务时,我收到以下消息:

when I try to use soapUI to call the proxy service I get this message:

Error loading [NET?xsd=...?xsd=xsd0]: java.io.IOException: Attempted read from closed

但是如果我直接在Glassfish/IIS上调用真实服务,它将起作用.

but if I call the real service directly on Glassfish/IIS, it works.

推荐答案

这是因为您在请求中发送了不受支持的消息类型,并且与任何ESB消息类型都不兼容.

This is because you are sending an unsupported message type in your request and it is incompatible with whatever the ESB's message type..

您可以在客户端和ESB之间放置TCPmon并捕获整个消息并检查实际发送给ESB的消息吗?

Can you place the TCPmon between your client and ESB and capture the whole message and check what you are actually sending to ESB?

您的wsdl会导入任何模式吗?.如果使用publish wsdl选项,则应提供所有模式.

And does your wsdl imports any schemas?..You should provide all schemas if you use publish wsdl option..

首先最好不要使用pubs wsld,选项,并且首先尝试将消息发送到代理并查看服务是否正在接收

First better dont use the publish wsld, option and first try to send message to proxy and see the service is receiving or not

这篇关于wso2 esb不支持的媒体类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆