1 Reply Latest reply on Nov 4, 2005 4:14 AM by Thomas Diesler

    Bug in JBoss 4.0.3? Some web service request's parameter nam

    Gennadi Pais Newbie

      Hi,

      I?d like to describe a problem we found in JBoss 4.0.3.
      Our web services are developed from a WSDL file using JWSDP 1.6 and deployed into JBoss. Everything worked fine till we tried the new JBoss 4.0.3 SP1 version. SAXException: ?invalid parameter in <request type name>? was thrown when some of our methods were invoked. After investigation we figured out that the cause of the problem is a single lower case letter in front of the parameter name i.e. ?aParam? parameter name leads to exception, but ?anyParam? works fine.

      You will find two files are listed below. It is a contract of simple test web service that has one method with two input parameters wrapped as a document literal request type. If a test web service will be build based on those two files then an exception is thrown (the exact exception is listed below). To avoid the exception the first parameter ?aFirstParam? should be renamed (e.g. ?firstParam?).

      So parameter name can?t start from a single lower case letter.

      The WSDL file is:

      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:tns="http://idm.vignette.com/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://idm.vignette.com/">
      <types>
      <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
      <xs:import namespace="http://idm.vignette.com/" schemaLocation="TestServiceMessages.xsd"/>
      </xs:schema>
      </types>
      <message name="testMethodRequest">
      <part name="parameters" element="tns:testMethod"/>
      </message>
      <message name="testMethodResponse">
      <part name="result" element="tns:testMethodResponse"/>
      </message>
      <portType name="TestService">
      <operation name="testMethod">
      <input message="tns:testMethodRequest"/>
      <output message="tns:testMethodResponse"/>
      </operation>
      </portType>
      <binding name="TestServiceBinding" type="tns:TestService">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="testMethod">
      <soap:operation soapAction="http://idm.vignette.com/testMethod"/>
      <input>
      <soap:body use="literal"/>
      </input>
      <output>
      <soap:body use="literal"/>
      </output>
      </operation>
      </binding>
      <service name="TestService">
      <port name="TestServicePort" binding="tns:TestServiceBinding">
      <soap:address location="http://NoTargetAdress"/>
      </port>
      </service>
      </definitions>
      

      The schema is:
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:tns="http://idm.vignette.com/"
      attributeFormDefault="unqualified" elementFormDefault="unqualified"
      targetNamespace="http://idm.vignette.com/">
      <xs:element name="testMethod" type="tns:testMethod"/>
      <xs:complexType name="testMethod">
      <xs:sequence>
      <xs:element name="aFirstParam" type="xs:string"/>
      <xs:element name="secondParam" type="xs:string"/>
      </xs:sequence>
      </xs:complexType>
      <xs:element name="testMethodResponse" type="tns:testMethodResponse"/>
      <xs:complexType name="testMethodResponse">
      <xs:sequence>
      <xs:element name="result" type="xs:int"/>
      </xs:sequence>
      </xs:complexType>
      </xs:schema>
      


      The exception was thrown:
      ERROR [RPCInvocation] org.xml.sax.SAXException: Invalid element in test.echo.TestMethod - aFirstParam
      org.xml.sax.SAXException: Invalid element in test.echo.TestMethod - aFirstParam
       at org.jboss.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:432)
       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:1389)
       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:911)
       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:159)
       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)