3 Replies Latest reply on Jan 4, 2006 9:44 AM by Thomas Diesler

    problems with SEI method with arg type of String[]

    mark5man Newbie

      case 1:
      I implemented a method with String[] type argument, and deploy as webservice under JBoss4.0.2 using ws4ee. I do strictly as what the wiki page Mapping Custom Arrays told.
      When i test this method, the server report errors that not Deserializer for type String[].

      case 2:
      However, I also have a method with return type String[], it works fine.

      Who can tell me why I got the error in case 1? And how can i correct it?

      Thanks!

      ERROR [RPCInvocation] org.xml.sax.SAXException: Deserializing parameter 'arrayOfString_1': could not find deserializer for type {http://webservice.ejb.incep.scnb.siemens.com/types/arrays/java/lang}StringArray
      org.xml.sax.SAXException: Deserializing parameter 'arrayOfString_1': could not find deserializer for type {http://webservice.ejb.incep.scnb.siemens.com/types/arrays/java/lang}StringArray
       at org.jboss.axis.message.RPCHandler.onStartChild(RPCHandler.java:326)
       at org.jboss.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1168)
       at org.jboss.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
       at org.jboss.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1386)
       at org.jboss.axis.message.RPCElement.deserialize(RPCElement.java:262)
       at org.jboss.axis.message.RPCElement.getParams(RPCElement.java:396)
       at org.jboss.axis.providers.java.RPCInvocation.prepareFromRequestEnvelope(RPCInvocation.java:235)
       at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:103)
       at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
       at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
       at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
       at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
       at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
       at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:200)
       at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:89)
       at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:905)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Unknown Source)
      


      here is my SEI
      public interface PortalEndpoint
       extends java.rmi.Remote
      {
      public void deleteUser( java.lang.String[] userNameArray ) //doesn't work
       throws java.rmi.RemoteException;
      public java.lang.String[] viewUser( ) //it works
       throws java.rmi.RemoteException;
      }
      


      the corresponding part of wsdl file
       <complexType name="StringArray">
       <sequence>
       <element name="value" type="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType></schema>
      
      


      the corresponding part of jax-rpc.xml file
      <java-xml-type-mapping>
      <java-type>java.lang.String[]</java-type>
      <root-type-qname xmlns:typeNS="http://webservice.ejb.incep.scnb.siemens.com/types/arrays/java/lang">typeNS:StringArray</root-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>