xfier接口调用报错求大神?
Stringurl="http://localhost:8080/services/AccessService";Servicese=newObjectServiceFa...
String url = "http://localhost:8080/services/AccessService";
Service se = new ObjectServiceFactory().create(AccessInterfaceService.class);
XFireProxyFactory xf = new XFireProxyFactory(XFireFactory
.newInstance().getXFire());
AccessInterfaceService service = (AccessInterfaceService) xf.create(se, url);
List<EmpDatailedAccessBean> result = service.saveAccessBean(list);
for (int i = 0; i < result.size(); i++) {
System.out.println(result.get(i));
}
System.out.println(result);
在网页显示输入路径的话 显示
但是一运行main方法 就报如下错误:
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at com.hxt.client.Test.main(Test.java:82)
在控制台也会出现错误信息:
13:38:04,500 ERROR DefaultFaultHandler: Fault occurred!
org.codehaus.xfire.XFireRuntimeException: Could not read XML stream.. Nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getElementText(XMLStreamReaderImpl.java:839)
at org.codehaus.xfire.util.stax.DepthXMLStreamReader.getElementText(DepthXMLStreamReader.java:86)
at
求解啊 全部错误信息都在这了。。。 展开
Service se = new ObjectServiceFactory().create(AccessInterfaceService.class);
XFireProxyFactory xf = new XFireProxyFactory(XFireFactory
.newInstance().getXFire());
AccessInterfaceService service = (AccessInterfaceService) xf.create(se, url);
List<EmpDatailedAccessBean> result = service.saveAccessBean(list);
for (int i = 0; i < result.size(); i++) {
System.out.println(result.get(i));
}
System.out.println(result);
在网页显示输入路径的话 显示
但是一运行main方法 就报如下错误:
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at com.hxt.client.Test.main(Test.java:82)
在控制台也会出现错误信息:
13:38:04,500 ERROR DefaultFaultHandler: Fault occurred!
org.codehaus.xfire.XFireRuntimeException: Could not read XML stream.. Nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,365]
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getElementText(XMLStreamReaderImpl.java:839)
at org.codehaus.xfire.util.stax.DepthXMLStreamReader.getElementText(DepthXMLStreamReader.java:86)
at
求解啊 全部错误信息都在这了。。。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询