GUJ Discussões   :   últimos tópicos   |   categorias   |   GUJ Respostas

Erro com WSDL

programação
Tags: #<Tag:0x00007f18622298f0>

#1

Boa tarde Pessoal,

Estou com problemas ao usar um WSDL. "Importei " as classes no eclipse mas ao rodar dar erro de converter. Mas é implícita essa conversão. Não tinha trabalhado com WebService ainda. Alguém pode me ajudar?

Segue o Erro.

2018-12-18 11:25:51,330 [main] ERROR org.apache.axis.encoding.ser.BeanPropertyTarget - Could not convert [Lbr.jus.cnj.www.intercomunicacao_2_2_2.TipoParte; to bean field 'polo', type [Lbr.jus.cnj.www.intercomunicacao_2_2_2.TipoParte;
2018-12-18 11:25:51,344 [main] ERROR org.apache.axis.client.Call - Exception:
org.xml.sax.SAXException: argument type mismatch
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.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583)
	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 br.jus.cnj.www.servico_intercomunicacao_2_2_2.ServicoIntercomunicacao222SOAPStub.consultarProcesso(ServicoIntercomunicacao222SOAPStub.java:749)
	at br.jus.cnj.www.servico_intercomunicacao_2_2_2.ServicoIntercomunicacao222Proxy.consultarProcesso(ServicoIntercomunicacao222Proxy.java:62)
	at br.com.datasind.teste.TesteWebServices.main(TesteWebServices.java:42)
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:100)
	... 14 more
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: argument type mismatch
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.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583)
	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 br.jus.cnj.www.servico_intercomunicacao_2_2_2.ServicoIntercomunicacao222SOAPStub.consultarProcesso(ServicoIntercomunicacao222SOAPStub.java:749)
	at br.jus.cnj.www.servico_intercomunicacao_2_2_2.ServicoIntercomunicacao222Proxy.consultarProcesso(ServicoIntercomunicacao222Proxy.java:62)
	at br.com.datasind.teste.TesteWebServices.main(TesteWebServices.java:42)
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:100)
	... 14 more

	{http://xml.apache.org/axis/}hostname:osmar-tencotins

org.xml.sax.SAXException: argument type mismatch
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 br.jus.cnj.www.servico_intercomunicacao_2_2_2.ServicoIntercomunicacao222SOAPStub.consultarProcesso(ServicoIntercomunicacao222SOAPStub.java:749)
	at br.jus.cnj.www.servico_intercomunicacao_2_2_2.ServicoIntercomunicacao222Proxy.consultarProcesso(ServicoIntercomunicacao222Proxy.java:62)
	at br.com.datasind.teste.TesteWebServices.main(TesteWebServices.java:42)
Caused by: org.xml.sax.SAXException: argument type mismatch
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.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583)
	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)
	... 5 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:100)
	... 14 more

#2

Olá!

Se você estiver gerando as classes WS pelo SoapUI, confira se a versão do Axis do SoapUI é a mesma da sua biblioteca Axis no projeto. Talvez seja este o problema de incompatibilidade.

Espero ter ajudado. Boa sorte!


#3

Boa tarde,

Estou gerando as classes client pelo eclipse.


#4

Deu o mesmo erro gerando com o SoapUI Axis 1.4… não aceitou usar o 2.x.


#5

Alguém pode me dar um help… voltei de férias e ainda não estou conseguindo.