无法通过HTTPS使用CXF使用远程Web服务

时间:2014-07-11 15:23:35

标签: web-services cxf soapui wsdl2java

我已经从我的localhost成功使用了某个Web服务客户端,来自SoapUI和我的Web应用程序。

现在,我需要使用使用HTTPS 的给定外部网址来使用相同的网络服务。使用user / pass配置代理,我可以通过我的Web浏览器和SoapUI 访问该服务,但我无法从我的Web应用程序连接。抛出的异常如下:

 org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType.  Incoming portion of HTML stream: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>405: el verbo HTTP usado para obtener acceso a esta p�gina no est� permitido.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Error del servidor</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>405: el verbo HTTP usado para obtener acceso a esta p�gina no est� permitido.</h2>
  <h3>La p�gina que est� buscando no se puede mostrar porque se us� un m�todo no v�lido (verbo HTTP) para intentar el acceso.</h3>
 </fieldset></div>
</div>
</body>
</html>

    at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:79)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:729)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2261)

我正在使用带有Spring和CXF的Eclipse IDE。 Web服务配置为:

<bean id="wsMyWebService" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
        <property name="serviceClass" value="com.ws.services.MyWebServiceClass"/>
        <property name="address" value="https://host:port/myService"/>
</bean>

我还尝试了完整的URL到WSDL,但我仍然收到相同的错误。关于在哪里查看的任何建议?

0 个答案:

没有答案