我正在研究Java Web服务我创建了该服务并托管在jelastic cloud上。我可以通过浏览器打开它来访问wsdl,例如http:\“jel environment”\ wsdl \“wsdl-name”,我从这个url创建了客户端,我试图用client访问。我收到了这个错误
Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:147)
at com.sun.proxy.$Proxy26.test(Unknown Source)
at comm.ServPortType_ServPort_Client.main(ServPortType_ServPort_Client.java:53)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://env-5147795.ind-cloud.everdata.com/testservice/services/servPort
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1563)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1515)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1318)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)
... 2 more
就像我说的那样,我自己使用肥皂地址创建了服务localhost
我将其更改为http:\\environment jelastic\services\port\
并更改了客户端中的所有内容以调用相应的wsdl。任何人都可以帮忙吗?
答案 0 :(得分:1)
您是否要连接到环境中与80,8080不同的特定端口? 如果是这样 - 您的环境中应该有一个外部IP地址(公共IPv4)。