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.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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.ja
va:186)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323
)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava: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.j
ava:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
r.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:524)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
ava: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(CachedConnecti
onValve.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:1
48)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker
Thread.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,getSelfServi
ceStatusMessage" />
<namespace>SelfService</namespace>
</service>
********** End WSDD Snippet ***************
Thanks in advance for any assistance anyone can give me.
Mike Bauer