JAX-RPC
Jboss 5.0.1 サーバーを使用しており、アプリケーション内の EJB の 1 つに Web サービス呼び出しを行おうとしています。次の3つのjarをダウンロードしてコピーしJBOSS_HOME\server\default\lib
ましたJBOSS_HOME\lib\endorsed
- jboss-jaxrpc.jar
- jboss-jaxws.jar
- jboss-saaj.jar
この例外がスローされると、Web サービス クライアント呼び出しを行うことができません。
**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.<init>(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.<init>(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**
何が問題なのかわかりません。助けてください クライアントコードは次のとおりです。
<%@page import="java.util.Hashtable"%>
<%@page import="javax.naming.*,com.test.*,javax.xml.rpc.*,stub.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>JSP
Page</title></head><body>
<h1>Hello World!</h1>
<%
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();
}
%>
</body>
</html>
前もって感謝します
センティル