Javafree
Página Inicial do Fórum > JEE / EJB

Problema para consumir Webservice



Criar novo tópico   Responder tópico


  1. dsoares
    Posts:1


    Comment Arrow

    Publicado em: 18/12/2014 09:12:04

    Bom dia.

    Estou a alguns dias tentando resolver um problema que eu estou tendo ao tentar consumir um Webservice.
    Criei o Webservice usando o Zend Soap Server com alguns métodos, mais na hora de consumir um método que retorna um array da um erro.

    Quando chamo um método que retorna uma String ele funciona normalmente, fiz também um teste com PHP o retorno do array funciona normalmente mais pode ser pelo fato de esta utilizando a biblioteca do Zend para consumir.

    Segue erro:

    GRAVE: Exception:
    org.xml.sax.SAXException: No deserializer defined for array type {http://schemas.xmlsoap.org/soap/encoding/}Struct
    at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:276)
    at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:104
    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
    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 _1._0._0._127.webservice.typeservicesoap_php.TypeClassBindingStub.listar_todos(TypeClassBindingStub.java:249)
    at _1._0._0._127.webservice.typeservicesoap_php.TypeClassPortProxy.listar_todos(TypeClassPortProxy.java:6
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.loadComboBox(Form_CadastroEquipamento.java:141)
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.<init>(Form_CadastroEquipamento.java:131)
    at br.com.tcc_manutencao.presentation.Appl_Principal.CadastroEquipamentoActionPerformed(Appl_Principal.java:101)
    at br.com.tcc_manutencao.presentation.Appl_Principal$3.actionPerformed(Appl_Principal.java:60)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$400(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: org.xml.sax.SAXException: No deserializer defined for array type {http://schemas.xmlsoap.org/soap/encoding/}Struct
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}stackTracerg.xml.sax.SAXException: No deserializer defined for array type {http://schemas.xmlsoap.org/soap/encoding/}Struct
    at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:276)
    at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:104
    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
    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 _1._0._0._127.webservice.typeservicesoap_php.TypeClassBindingStub.listar_todos(TypeClassBindingStub.java:249)
    at _1._0._0._127.webservice.typeservicesoap_php.TypeClassPortProxy.listar_todos(TypeClassPortProxy.java:6
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.loadComboBox(Form_CadastroEquipamento.java:141)
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.&lt;init&gt;(Form_CadastroEquipamento.java:131)
    at br.com.tcc_manutencao.presentation.Appl_Principal.CadastroEquipamentoActionPerformed(Appl_Principal.java:101)
    at br.com.tcc_manutencao.presentation.Appl_Principal$3.actionPerformed(Appl_Principal.java:60)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$400(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    {http://xml.apache.org/axis/}hostname:HelpDesk-01

    org.xml.sax.SAXException: No deserializer defined for array type {http://schemas.xmlsoap.org/soap/encoding/}Struct
    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 _1._0._0._127.webservice.typeservicesoap_php.TypeClassBindingStub.listar_todos(TypeClassBindingStub.java:249)
    at _1._0._0._127.webservice.typeservicesoap_php.TypeClassPortProxy.listar_todos(TypeClassPortProxy.java:6
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.loadComboBox(Form_CadastroEquipamento.java:141)
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.<init>(Form_CadastroEquipamento.java:131)
    at br.com.tcc_manutencao.presentation.Appl_Principal.CadastroEquipamentoActionPerformed(Appl_Principal.java:101)
    at br.com.tcc_manutencao.presentation.Appl_Principal$3.actionPerformed(Appl_Principal.java:60)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$400(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: org.xml.sax.SAXException: No deserializer defined for array type {http://schemas.xmlsoap.org/soap/encoding/}Struct
    at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:276)
    at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:104
    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
    at org.apache.axis.client.Call.invoke(Call.java:2467)
    ... 46 more
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.loadComboBox(Form_CadastroEquipamento.java:154)
    at br.com.tcc_manutencao.presentation.Form_CadastroEquipamento.<init>(Form_CadastroEquipamento.java:131)
    at br.com.tcc_manutencao.presentation.Appl_Principal.CadastroEquipamentoActionPerformed(Appl_Principal.java:101)
    at br.com.tcc_manutencao.presentation.Appl_Principal$3.actionPerformed(Appl_Principal.java:60)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$400(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)



    Segue WSDL:


    Alguém pode me ajudar a resolver?

    Obrigado desde já.

    Desculpe pela má formatação do post



  1. Relacionados