cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@gmail.com>
Subject Re: CXF Error:Could not send Message . Help Me!
Date Mon, 24 Jun 2013 12:04:48 GMT
Hi,

The error 
Caused by: java.net.UnknownHostException: neusoft_esb
indicates that this is a network address resolve problem, somehow hostname neusoft_esb isn't
known by DNS server nor by your host.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-6-24, at 下午3:11, snakeam wrote:

> 
> 
> 
> 
> 
> 
> 
> 
> -------- Forwarding messages --------
> From: snakeam <snakeam@163.com>
> Date: 2013-06-24 15:01:16
> To: dev-subscribe@cxf.apache.org
> Subject: CXF Error:Could not send Message . Help Me!
> 
> Hello
>      First of all thank you and your development cxf framework.
> 
> 
>      But when I use Cxf encountered some problems.Can you help me?
> 
> 
>      Development environment:
>           JDK 1.5
>           eclipse
>           cxf2.5
> 
> 
> 
>     ------------------------------------------------------------------------------------
>     --Client Code
>     package DianNeng.Core;
> 
> 
> import javax.xml.namespace.QName;
> 
> 
> //XFire
> //import org.codehaus.xfire.client.Client;
> 
> 
> 
> 
> //CXF
> import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
> import org.apache.cxf.transport.http.HTTPConduit;
> import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
> 
> 
> 
> 
> //axis2
> //import org.apache.axis2.AxisFault;
> //import org.apache.axis2.addressing.EndpointReference;
> //import org.apache.axis2.client.Options;
> //import org.apache.axis2.rpc.client.RPCServiceClient;
> 
> 
> import DianNeng.Core.db.PushVO;
> @SuppressWarnings("unused")
> public class Push_CIM_SuperClass extends Push_Task_SuperClass {
> 
> 
>        //Others to provide the interface address
> private String address = "http://10.215.13.201:7001/LCAM/LCAMPS?wsdl";
> private String qnameSpace = "http://www.sgcc.com.cn/drmt/service/cisWebserviceV1";
> private String method = "cisRequest";
> private  String xmlContents = null;
> //////////////////////////////////////////////////////////////////////////
> //cxf2.5
> //////////////////////////////////////////////////////////////////////////
> @Override
> public boolean Push(PushVO vo) {
> boolean flag = false;
> initData();
> JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
> org.apache.cxf.endpoint.Client client =  dcf.createClient(address);
> Object[] res = null;
> try {
> res =  client.invoke(method, xmlContents);
> System.out.println(res[0].toString());
> } catch (Exception e) {
>  e.printStackTrace();
> }
> return flag;
> }
> //////////////////////////////////////////////////////////////////////////
> // axis2
> //////////////////////////////////////////////////////////////////////////
> //@Override
> //public boolean Push(PushVO vo) {
> //initData();
> //boolean falg = false;
> //String res = null;
> //RPCServiceClient client = null;
> //try {
> //client = new RPCServiceClient();
> //} catch (AxisFault e) {
> //e.printStackTrace();
> //}
> //Options options = client.getOptions();
> //
> //
> ////no realize check address is valid ?
> //
> //EndpointReference targetEPR =  new EndpointReference(
> //"http://10.215.13.201:7001/LCAM/LCAMPS?wsdl");
> //options.setTo(targetEPR);
> //Object[] args = new Object[]{xmlContents};
> //Class[] classes = new Class[] {String.class}; 
> //        QName opAddEntry = new QName("http://www.sgcc.com.cn/drmt/service/cisWebserviceV1",
"cisRequest"); 
> //        try {
> //        res =(String) client.invokeBlocking(opAddEntry, args, classes)[0];
> //        
> //        System.out.println(res);
> //        msg.append("<br/>成功向CIM推送数据");
> //        if(res.contains("成功")){
> //    falg = true;
> //    
> //    
> //    //shecma is single so T_count is 1
> //    log.setT_count("1");
> //    msg.append("<br/>CIM成功接受数据");
> //    //System.out.println("\t\t操作成功");
> //    }
> //} catch (AxisFault e) {
> //msg.append("<br/>向CIM推送数据失败");
> //e.printStackTrace();
> //}finally{
> //String temp = log.getStatusNode();
> //log.setStatusNode(temp+msg.toString());
> //}
> //
> //return falg;
> //}
> public String getXmlContents() {
> return xmlContents;
> }
> 
> 
> public void setXmlContents(String xmlContents) {
> this.xmlContents = xmlContents;
> }
> 
> 
> public void initData(){
> }
> }
> 
> 
> ----------------------------------------------------------------------------------------------
> error code:
> 2013-6-24 14:29:53 org.apache.cxf.jaxb.JAXBUtils logGeneratedClassNames
> 信息: Created classes: cn.com.sgcc.drmt.service.ciswebservicev1.CisRequest, cn.com.sgcc.drmt.service.ciswebservicev1.CisRequestResponse,
cn.com.sgcc.drmt.service.ciswebservicev1.ObjectFactory
> 2013-6-24 14:29:57 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
> 警告: Interceptor for {http://www.sgcc.com.cn/drmt/service/cisWebserviceV1}CisWebService#{http://www.sgcc.com.cn/drmt/service/cisWebserviceV1}cisRequest
has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:462)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:365)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:318)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:338)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
> at DianNeng.Core.Push_CIM_SuperClass.Push(Push_CIM_SuperClass.java:58)
> at DianNeng.Core.Push_Task_SuperClass.run(Push_Task_SuperClass.java:40)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.net.UnknownHostException: UnknownHostException invoking http://neusoft_esb:7001/LCAM/LCAMPS:
neusoft_esb
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1446)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1431)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:650)
> at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> ... 10 more
> Caused by: java.net.UnknownHostException: neusoft_esb
> at java.net.PlainSocketImpl.connect(Unknown Source)
> at java.net.SocksSocketImpl.connect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at sun.net.NetworkClient.doConnect(Unknown Source)
> at sun.net.www.http.HttpClient.openServer(Unknown Source)
> at sun.net.www.http.HttpClient.openServer(Unknown Source)
> at sun.net.www.http.HttpClient.<init>(Unknown Source)
> at sun.net.www.http.HttpClient.New(Unknown Source)
> at sun.net.www.http.HttpClient.New(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1383)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1324)
> at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
> at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1403)
> ... 13 more
> org.apache.cxf.interceptor.Fault: Could not send Message.
> at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:462)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:365)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:318)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:338)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
> at DianNeng.Core.Push_CIM_SuperClass.Push(Push_CIM_SuperClass.java:58)
> at DianNeng.Core.Push_Task_SuperClass.run(Push_Task_SuperClass.java:40)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.net.UnknownHostException: UnknownHostException invoking http://neusoft_esb:7001/LCAM/LCAMPS:
neusoft_esb
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1446)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1431)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:650)
> at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> ... 10 more
> Caused by: java.net.UnknownHostException: neusoft_esb
> at java.net.PlainSocketImpl.connect(Unknown Source)
> at java.net.SocksSocketImpl.connect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at sun.net.NetworkClient.doConnect(Unknown Source)
> at sun.net.www.http.HttpClient.openServer(Unknown Source)
> at sun.net.www.http.HttpClient.openServer(Unknown Source)
> at sun.net.www.http.HttpClient.<init>(Unknown Source)
> at sun.net.www.http.HttpClient.New(Unknown Source)
> at sun.net.www.http.HttpClient.New(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
> at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1383)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1324)
> at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
> at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1403)
> ... 13 more
> 
> 
> 
> 
> 
> 
>   help me. thanks !
> 
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message