faultString: java.lang.IllegalArgumentException: argument type mismatch
Solution 1
The Problem was the local WSDL was not updated so I first updated the local WSDL and then genrated the classes once again .
:)
Solution 2
one more way to generate file as in my case axis 1.4 was not working because of compatibility issue(not sure what it is). we can use wsimport.exe inbuilt in jdk to generate stub go to your jdk bin folder and run command wsimport -s destinationPath WSDL path as:
C:\Program Files\Java\jdk1.6.0\bin>wsimport -s C:\sid\ http://?WSDL
after that copy paste generated folder structure and classes
Zuned Ahmed
Updated on June 04, 2022Comments
-
Zuned Ahmed almost 2 years
I am trying to give web service call using Axis genrated stub.
It is running giving below exception when it tryies to get respons.
and when i view my response message using :
String responseMsg = stub._getCall().getMessageContext().getResponseMessage().getSOAPEnvelope().toString();
System.out.println(responseMsg);
it is giving the correct response in SOAP format. can anybody help me where it is creating issue thanks in Advance.
Zuned
AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.IllegalArgumentException: argument type mismatch faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException: argument type mismatch at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:157) at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249) at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.hps.webservice.SOAPInterfaceBindingStub.getStatus(SOAPInterfaceBindingStub.java:852) at com.hps.ws.HPSStatusManagerJob.getApplicationStatusResponse(HPSStatusManagerJob.java:265) at com.hps.ws.HPSStatusManagerJob.updateStatus(HPSStatusManagerJob.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142) at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:75) ... 22 more {http://xml.apache.org/axis/}hostname:admin-PC java.lang.IllegalArgumentException: argument type mismatch at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.client.Call.invoke(Call.java:2470) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.hps.webservice.SOAPInterfaceBindingStub.getStatus(SOAPInterfaceBindingStub.java:852) at com.hps.ws.HPSStatusManagerJob.getApplicationStatusResponse(HPSStatusManagerJob.java:265) at com.hps.ws.HPSStatusManagerJob.updateStatus(HPSStatusManagerJob.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.lang.IllegalArgumentException: argument type mismatch at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:157) at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249) at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) ... 14 more Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142) at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:75) ... 22 more