axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: java.lang.IllegalArgumentException with Document/Literal...help please
Date Thu, 24 May 2007 22:22:40 GMT
Hi Mike-

in the server-config.wsdd.. look for attribute dotNotSoapEncFix and set to true
<parameter name="dotNetSoapEncFix" value="true"/>

Also ..any element declaration defining a boolean type should be of type xsd:boolean
     <xsd:element name="RetVal" type="xsd:boolean"/>

Does this help?
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

  ----- Original Message ----- 
  From: Bauer, Michael 
  To: axis-user@ws.apache.org 
  Sent: Thursday, May 24, 2007 12:26 PM
  Subject: java.lang.IllegalArgumentException with Document/Literal...help please


  To all:

   

  I am stressing about this exception I am getting.  We have a web service, deployed on JBoss
4.2.5 using Axis 1.4.  We were using the default style, but recently we gained a requirement
to support .NET as a consumer of this WS.  The people writing the .NET code reported back
to me that they could not use their auto-generation tools to generate their code from our
WSDL.  Through some digging, I uncovered that .NET does not support RDP:SOAP style, and only
supports Document:Literal.  So, I changed the style to "document" and everything seemed fine.

   

  Now, the users of the service are saying they are getting errors when they actually call
the web service.  I had written some test client code that used stubs generated from WSDL2Java,
and hadn't updated since changing to Document:Literal style, so I decided to get it to work
again.  Low and behold, if I call one of the no-argument methods, the call works fine, but
as soon as I call any of the methods that have >1 argument, the code explodes with the
following:

   

  ************** Exception Output **************

  2007-05-24 11:02:06,945 INFO  [org.apache.axis.providers.java.RPCProvider] Tried to invoke
method public long com.bofa.esm.selfservice.SelfServiceImpl.distributeSelfService(java.lang.String,java.lang.String,java.lang.String,boolean)
throws java.lang.Exception with arguments java.lang.String,null,null,null.  The arguments
do not match the signature.

  java.lang.IllegalArgumentException

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:585)

        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)

        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)

        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)

        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)

        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)

        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)

        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(ReplyHeaderFilterjava:96)

        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(StandardWrapperValvejava:213)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:178)

        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)

        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

        at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)

        at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)

        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:869)

        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

        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(Thread.java:595)

  ************ End Exception Output *************

   

   

  The interesting part is that the request contains all the required parameters, hence they
are not null:

   

  ************** XML Request ****************** <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope 

          xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 

          xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <soapenv:Body>

          <name xmlns="SelfService">mif_creator</name>

          <userId xmlns="SelfService">nbtcia7</userId>

          <epLabel xmlns="SelfService">ESMDEV_RTXT1</epLabel>

          <processPrereqs xmlns="SelfService">false</processPrereqs>

      </soapenv:Body>

  </soapenv:Envelope>

  ************ End XML Request ****************

   

  Here are the relevant bits of code:

   

  ************ Working method *****************

        public String[] getAvailableSelfServiceTargets() throws Exception {

              Collection<SelfServiceVO> c = selfServiceDao.getAll();

              String[] ret = new String[c.size()];

   

              try {

                    int i = 0;

                    for (SelfServiceVO val : c) {

                          ret[i++] = val.getMapName();

                    }

              } catch (Exception e) {

                    logger.error("An error occured.", e);

                    throw e;

              }

   

              return ret;

        }

  ********** End Working method ***************

   

  ************ Broken method *****************

        public long distributeSelfService(String name, String userId, String epLabel, boolean
processPrereqs ) throws Exception {

              try {

                    return selfServiceUtility.distributeMapping(name,epLabel,processPrereqs,userId);

              } catch(Exception e) {

                    logger.error("An error occured.",e);

                    throw e;

              }

        }

  ********** End Broken method ***************

   

  ************ WSDD snippet *****************

        <service name="SelfService" provider="java:RPC" style="document">

              <parameter name="className"

                    value="com.bofa.esm.selfservice.SelfServiceImpl" />

              <parameter name="allowedMethods"

                    value="getAvailableSelfServiceTargets,distributeSelfService,getSelfServiceStatusMessage"
/>

              <namespace>SelfService</namespace>

        </service>

  ********** End WSDD Snippet ***************

   

   

   

  Thanks in advance for any assistance anyone can give me.

   

  Mike Bauer

   

   

Mime
View raw message