I am new to java web service and apache axis2.Every time i run my client i get an error that the input stream for an incoming message is null. What could the the issues? I have attached my log 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)
.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I managed to solve the error by adding the settings below in my options object
options.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_APPLICATION_ECHO_XML); options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
回答2:
Adding the following statement
options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
resolved the issue in my scenario.