问题描述
我使用Glassfish上的JAX-WS在WSO2ESB中创建Pass Through Proxy。
$ b 问题是代理不起作用,它发生在 EVERY PROXY 我在ESB中创建了指向Glassfish上的每个 Java Web服务的控制台:控制台出现此错误[1]。
$ b 1)我尝试使用 ESB tryit工具来使用服务我有以下回应:
< TryitProxyError h:status =SOAP信封错误xmlns:h =http: //wso2.org/ns/TryitProxy\">org.apache.axis2.AxisFault:传输错误:415错误:不支持的媒体类型< / TryitProxyError>
改为 soapUI ,它给了我这个信息:
加载[ClientProxy?xsd = http://192.168.10.176:8080 / ESBAdminWebapp_SERVER / ClientProxy?xsd = 1]时出错:java.io. IOException:尝试从封闭流中读取
其中 192.168.10.176:8080
是Glassfish服务器。但是,如果我打电话给真正的WSDL,它就会起作用... ...
我已经尝试过全新安装WSO2-ESB和新鲜的Glassfish服务器:
WSO2 ESB,Glassfish和IIS现已安装在本地以尝试发现问题。
请帮忙!
[1]完整日志:
TID:[] [WSO2 ESB] [2012 -09-24 11:31:11,689] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To:/services/test.testHttpSoap12Endpoint,WSAction:http:// my / Hello / helloRequest,SOAPAction:http: // my / Hello / helloRequest,MessageID:urn:uuid:754dfcb5-1008-47ed-9c25-15327370ee11,方向:请求,信封:? {org.apache.synapse.mediators.builtin.LogMediator
[2012-09-24 11:31:11,689] INFO - LogMediator To:/services/test.testHttpSoap12E
ndpoint,WSAction:http:/ / my / Hello / helloRequest,SOAPAction:http:// my / Hello / hel
loRequest,MessageID:urn:uuid:754dfcb5-1008-47ed-9c25-15327370ee11,方向:
请求,Envelope: <?xml version ='1.0'encoding ='utf-8'?>< soapenv:Envelope xmlns
:soapenv =http://www.w3.org/2003/05/soap-envelope >< soapenv:Body>< p:hello xmlns:
p =http:// my /><! - 0 to 1 occurrence - >< name>?<<< ; /名称>< / p:hello>< / soapenv:Body>< /
soapenv:Envelope>
[2012-09-24 11:31:11,694] INFO - LogMediator要:http://www.w3.org/2005/08/addr
essing / anonymous,WSAction:,SOAPAction:, MessageID:urn:uuid:e9b224e8-2754-41
1f-8640-5922f1797202,Direction:response,Envelope:<?xml version ='1.0'encodin
g ='utf-8'?> < soapenv:Envelope xmlns:soapenv =http://www.w3.org/2003/05/soap-envel
ope>< soapenv:Body>< axis2ns7:binary xmlns:axis2ns7 = http://ws.apache.org/commons
/ ns / payload>< / axis2ns7:binary>< / soapenv:Body>< / soapenv:Envelope>
[2012-09-24 11:31:11,697]信息 - HTTPSender无法发送ViaPost到URL [http:/
/localhost:8280/services/test.testHttpSoap12Endpoint]
org.apache .axis2.AxisFault:传输错误:415错误:不支持的介质类型
位于org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender。
java:308)
。 apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.jav
a:194)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)$ b $在org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke b。在org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessa
geWithCommons(CommonsHTTPTransportSender.java:449)
(比较
monsHTTPTransportSender.java:276)
在org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
在org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisO
peration.java:406)
在org.apache.axis2.d escription.OutInAxisOperationClient.executeImpl(出
InAxisOperation.java:229)
在org.apache.axis2.client.OperationClient.execute(OperationClient.java:
165)在
组织.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
555)
在org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
531)$ b在org.apache.jsp.admin.jsp.WSRequestXSSproxy_005fajaxprocessor_jsp._jsp
$服务b(WSRequestXSSproxy_005fajaxprocessor_jsp.java:272)
在org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97在org.apache.jasper.servlet.JspServletWrapper.service在javax.servlet.http.HttpServlet.service)
(HttpServlet.java:722)
(JspServletWrapper
的.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
14)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
在javax.servlet.http.HttpSe rvlet.service(HttpServlet.java:722)
在org.wso2.carbon.ui.JspServlet.service(JspServlet.java:161)
在org.wso2.carbon.ui.TilesJspServlet.service( TilesJspServlet.java:80)在javax.servlet.http.HttpServlet.service
(HttpServlet.java:722)在org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service
(节能
)使用org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleR
equest(ServletRegistration.java:90)
获得org.eclipse.equinox的
。 http.servlet.internal.ProxyServlet.processAlias(P
roxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyS
ervlet.java :67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
在javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
在org .apache.catalina.core.ApplicationFilterChain.internalDoFilter(应用
icationFilterChain.java:304)
在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:240)
在org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
at org.apache.catalina.core.StandardHostValve.invoke($ true $)$ b $ (StandardHostValve.j
ava:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:100)
at org.wso2.carbon .server.CarbonStuckThreadDetectionValve.invoke(碳
tuckThreadDetectionValve.java:154)
处org.apache org.wso2.carbon.server.TomcatServer $ 1.invoke(TomcatServer.java:254)
.catalina.valves.AccessLogValv e.invoke(AccessLogValve.java:
563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:118)
at org.apache .catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
A:399)
在org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcesso
r.java:396)
。在org.apache.coyote.http11.Http11NioProtocol $ Http11ConnectionHandler.pr
ocess(Http11NioProtocol.java:356)
在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoin
t.java:1534)
at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
异常表示Glassfish响应出现以下HTTP错误:
415错误:不支持的媒体类型
这可能意味着由代理发送的 Content-Type
头部的值不是Glassfish预期的值。
I am creating "Pass Through Proxy" in WSO2ESB using JAX-WS hosted on Glassfish.
The problem is that the proxy does not work and it happens with EVERY PROXY I create in the ESB that are pointing to every Java Web Services on Glassfish: the console gives this error [1]. The thing is that Proxies to .Net Services instead, works fine.
1) I have tried with the ESB tryit tool to consume the service and I have the following response:
<TryitProxyError h:status="SOAP envelope error" xmlns:h="http://wso2.org/ns/TryitProxy">org.apache.axis2.AxisFault: Transport error: 415 Error: Unsupported Media Type</TryitProxyError>
2) Instead soapUI which gives me this message:
Error loading [ClientProxy?xsd=http://192.168.10.176:8080/ESBAdminWebapp_SERVER/ClientProxy?xsd=1]: java.io.IOException: Attempted read from closed stream
where 192.168.10.176:8080
is the Glassfish server. But if I call the real WSDL it works...
I have tried with a fresh installation of WSO2-ESB and fresh Glassfish server as well:
WSO2 ESB, Glassfish and IIS are now installed LOCALLY to try to spot the problem.
Please help!
[1] FULL LOG:
TID: [] [WSO2 ESB] [2012-09-24 11:31:11,689] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/test.testHttpSoap12Endpoint, WSAction: http://my/Hello/helloRequest, SOAPAction: http://my/Hello/helloRequest, MessageID: urn:uuid:754dfcb5-1008-47ed-9c25-15327370ee11, Direction: request, Envelope: ? {org.apache.synapse.mediators.builtin.LogMediator
[2012-09-24 11:31:11,689] INFO - LogMediator To: /services/test.testHttpSoap12E
ndpoint, WSAction: http://my/Hello/helloRequest, SOAPAction: http://my/Hello/hel
loRequest, MessageID: urn:uuid:754dfcb5-1008-47ed-9c25-15327370ee11, 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:hello xmlns:
p="http://my/"><!--0 to 1 occurrence--><name>?</name></p:hello></soapenv:Body></
soapenv:Envelope>
[2012-09-24 11:31:11,694] INFO - LogMediator To: http://www.w3.org/2005/08/addr
essing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:e9b224e8-2754-41
1f-8640-5922f1797202, Direction: response, Envelope: <?xml version='1.0' encodin
g='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envel
ope"><soapenv:Body><axis2ns7:binary xmlns:axis2ns7="http://ws.apache.org/commons
/ns/payload"></axis2ns7:binary></soapenv:Body></soapenv:Envelope>
[2012-09-24 11:31:11,697] INFO - HTTPSender Unable to sendViaPost to url[http:/
/localhost:8280/services/test.testHttpSoap12Endpoint]
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.jav
a:194)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessa
geWithCommons(CommonsHTTPTransportSender.java:449)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Com
monsHTTPTransportSender.java:276)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisO
peration.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out
InAxisOperation.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._jsp
Service(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:3
14)
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(Con
textPathServletAdaptor.java:36)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleR
equest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(P
roxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyS
ervlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:100)
at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonS
tuckThreadDetectionValve.java:154)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:254)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:399)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcesso
r.java:396)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.pr
ocess(Http11NioProtocol.java:356)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoin
t.java:1534)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
The exception indicates that Glassfish response with the following HTTP error:
415 Error: Unsupported Media Type
This likely means that the Content-Type
header send by the proxy has a value that is not expected by Glassfish.
这篇关于GlassFish + WSO2 ESB 415不支持的媒体类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!