[
http://jira.codehaus.org/browse/XFIRE-777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tomasz Sztelak reassigned XFIRE-777:
------------------------------------
Assignee: Tomasz Sztelak (was: Dan Diephouse)
> WebService (JSR181) with soap header as INOUT parameter
> -------------------------------------------------------
>
> Key: XFIRE-777
> URL: http://jira.codehaus.org/browse/XFIRE-777
> Project: XFire
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.2
> Environment: Windows 2003, JBOSS 4.0.3SP1, XFire 1.2.2, String 2.0
> Reporter: Victor Trakhtenberg
> Assigned To: Tomasz Sztelak
> Attachments: ServiceInvocationHandler.java, XFireProblem.war,
> XFireProblem.zip
>
>
> I'm developing web service using XFire,Spring JSR181 implementation.
> I need to use SOAP header in mode INOUT.
> I've define the following operation in web service interface:
> @WebMethod(operationName = "op")
> @WebResult(name = "opRes")
> public String op(@WebParam(name = "ws_header", header = true, mode =
> WebParam.Mode.INOUT)Holder<SessionInfoHeader> ws_header);
> The implementation is simple it just prints some string.
> (see attached ServiceAWS.java,ServiceAImpl.java)
> The problem is that I have a following exception:
> Please see attache the eclipse project XFireProblem.zip the war as it was
> deployed in JBoss.
> I've used the client: com.jacada.ServiceAClient
> the exception is:
> java.lang.IllegalArgumentException: wrong number of arguments
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
> at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:271)
> at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:84)
> at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:132)
> at
> org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:107)
> at
> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
> at
> org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
> at
> org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
> at
> org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:301)
> at
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130)
> at
> org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 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)
> at java.lang.Thread.run(Unknown Source)
> java.lang.IllegalArgumentException: wrong number of arguments
> (I will provide the stack trace later).
> I saw in org.codehaus.xfire.service.binding.ServiceInvocationHandler class in
> protected Object[] fillInHolders(MessageContext context,OperationInfo opInfo,
> MessageInfo inMsg, MessageInfo outMsg, MessagePartContainer headerMsg,
> MessagePartContainer outHeaderMsg, List params) method calculation of the
> number of the parameters:
> int outSize = 0;
> if (outMsg != null)
> {
> outSize = outHeaderMsg.size() + outMsg.size();
> if (outSize != 0) outSize--;
> }
> int total = inMsg.size() + headerMsg.size() + outSize;
> In my case for method "op" which takes only one parameter (the header) the
> value of total is 2.
> Later the allocated array
> Object[] newParams = new Object[total];
> used in Java reflection to find the method, BUT there's no method with 2
> parameters, but only with one parameter.
> So it seems that there's a bug here.
> I don't understand why does outSize participates in calculation of total.
> Would it be correct to make the line:
> int total = inMsg.size() + headerMsg.size();
> May the problem in some other place.
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email