Unable to make a JAX-RPC web service call from client
<p>I am using Jboss 5.0.1 server and trying to make a webservice <code>JAX-RPC</code> call to one of the EJB in our application. I downloaded and Copied the following three jars from <code>JBOSS_HOME\server\default\lib</code> to <code>JBOSS_HOME\lib\endorsed</code></p>

<ul>
<li>jboss-jaxrpc.jar</li>
<li>jboss-jaxws.jar</li>
<li>jboss-saaj.jar</li>
</ul>

<p>I am unable to make a webservice client call, when made this exception is thrown:</p>

<pre><code>**11:54:33,995 ERROR [CommonClient] Exception caught while (preparing for) performing the invocation:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1937)
        at org.jboss.ws.core.client.EndpointInfo.lowerCaseProtocol(EndpointInfo.java:114)
        at org.jboss.ws.core.client.EndpointInfo.&lt;init&gt;(EndpointInfo.java:49)
        at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:335)
        at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:516)
        at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:275)
        at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:154)
        at $Proxy106.checkPlanData(Unknown Source)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:88)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:662)
11:54:34,307 ERROR [STDERR] java.rmi.RemoteException: Call invocation failed; nested exception is:
        java.lang.StringIndexOutOfBoundsException: String index out of range: -1
11:54:34,323 ERROR [STDERR]     at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:535)
11:54:34,323 ERROR [STDERR]     at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:275)
11:54:34,338 ERROR [STDERR]     at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:154)
11:54:34,338 ERROR [STDERR]     at $Proxy106.checkPlanData(Unknown Source)
11:54:34,354 ERROR [STDERR]     at org.apache.jsp.index_jsp._jspService(index_jsp.java:88)
11:54:34,354 ERROR [STDERR]     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
11:54:34,370 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
11:54:34,370 ERROR [STDERR]     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
11:54:34,385 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
11:54:34,401 ERROR [STDERR]     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
11:54:34,401 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
11:54:34,417 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
11:54:34,417 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:54:34,432 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
11:54:34,432 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
11:54:34,448 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11:54:34,448 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
11:54:34,463 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
11:54:34,463 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
11:54:34,479 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
11:54:34,495 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
11:54:34,495 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
11:54:34,510 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
11:54:34,510 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
11:54:34,526 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
11:54:34,526 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
11:54:34,542 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
11:54:34,542 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
11:54:34,557 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
11:54:34,557 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
11:54:34,573 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:662)
11:54:34,588 ERROR [STDERR] Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
11:54:34,588 ERROR [STDERR]     at java.lang.String.substring(String.java:1937)
11:54:34,604 ERROR [STDERR]     at org.jboss.ws.core.client.EndpointInfo.lowerCaseProtocol(EndpointInfo.java:114)
11:54:34,604 ERROR [STDERR]     at org.jboss.ws.core.client.EndpointInfo.&lt;init&gt;(EndpointInfo.java:49)
11:54:34,620 ERROR [STDERR]     at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:335)
11:54:34,620 ERROR [STDERR]     at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:516)
11:54:34,635 ERROR [STDERR]     ... 30 more**
</code></pre>

<p>I am not know what could be the problem, Please help me The client code is as follows:</p>

<pre><code>&lt;%@page import="java.util.Hashtable"%&gt;   
&lt;%@page import="javax.naming.*,com.test.*,javax.xml.rpc.*,stub.*"%&gt;
&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;                                              
&lt;html&gt;&lt;head&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;&lt;title&gt;JSP
Page&lt;/title&gt;&lt;/head&gt;&lt;body&gt;
             &lt;h1&gt;Hello World!&lt;/h1&gt;
             &lt;%
              try{
                 InitialContext ic = new InitialContext( );
                  CarrierWS service = (CarrierWS)ic.lookup("java:comp/env/service/CarrierWS");            
                  out.println("======================="+service.getCarrierWSSEIPort().checkPlanData("2007-01-01"));

              }
              catch(Exception e)
                                {
                   out.println("Exception occurred : " + e.getMessage());
                    e.printStackTrace();
                } 
                 %&gt;
               &lt;/body&gt;
           &lt;/html&gt;
</code></pre>

<p>Thanks in advance</p>

<p>Senthil</p>
