我是java web服务和apache axis2的新手。每次运行我的客户端时都会收到一条错误,指出传入消息的输入流为空。问题可能是什么?我附上了我的日志log4j:WARN No appenders could be found for logger (org.apache.axis2.util.Loader).
log4j:WARN Please initialize the log4j system properly.
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:92)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.csapi.www.wsdl.parlayx.sms.notification_manager.v2_3.service.SmsNotificationManagerServiceStub.startSmsNotification(SmsNotificationManagerServiceStub.java:619)
at org.di.custom.Notification.startNotification(Notification.java:142)
at org.di.custom.Notification.main(Notification.java:57)
。
答案 0 :(得分:0)
我设法通过在选项对象
中添加下面的设置来解决错误options.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_APPLICATION_ECHO_XML);
options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
答案 1 :(得分:0)
添加以下声明
options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
在我的方案中解决了这个问题。