[JBossWS] - java.lang.IllegalStateException: Cannot obtain endpoint meta
by r12345_2003
Hi All,
I am very new to JBoss web services and am trying to create a sample web service application using JBoss WS. Here is what i have done so far:
1) Created a POJO for the web service. Its source code is as follows:
package test.webservices;
|
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
|
| @WebService(name = "CalculatorService")
| public class CalculatorService
| {
| @WebMethod
| public Integer add(@WebParam(name = "arg1")Integer arg1,@WebParam(name = "arg2") Integer arg2){
| return arg1+arg2;
| }
| }
|
2) Created entry in web.xml. My web.xml looks like the following:
| <?xml version="1.0" encoding="UTF-8"?>
| <web-app version="2.4"
| xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
| <servlet>
| <servlet-name>CalculatorService</servlet-name>
| <servlet-class>test.webservices.CalculatorService</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>CalculatorService</servlet-name>
| <url-pattern>/CalculatorService</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
3) Deployed the project as a war file. However when i start the server, i see the following exception trace:
java.lang.IllegalStateException: Cannot obtain endpoint meta data
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleWSDLRequest(RequestHandlerImpl.java:520)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doGet(RequestHandlerImpl.java:144)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:126)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| 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:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
|
When i open the link http://localhost:8080/jbossws/services, I can see an end point name and end point address. However when i click on the WSDL link, i do not see the WSDL.
Can someone help me in figuring out what might be the issue?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139353#4139353
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139353
16 years, 9 months
[JBossWS] - Overriding InvocationHandlerFactory
by zach.mabe@cox.com
Particulars: Jboss AS 4.2.2.GA, JBossWS native 2.0.3.GA with JSE endpoints.
I am trying to implement my own InvocationHandlerFactory so that I can implement my own InvocationHandler instead of the DefaultInvocationHandlerJAXWS.
To do so, I've created my implementations of the factory and the handler. These classes are in WEB-INF/classes directory of the WAR file.
In the base dir of the WAR. I've created the file
META-INF\services\org.jboss.wsf.spi.invocation.InvocationHandlerFactory
with the name of my factory class as the only line.
I also have this same file in the classes directory of the WEB-INF directory so its path looks like
WEB-INF/classes/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory
Regardless, the ServiceLoader keeps finding service file in jboss-4.2.2.GA-Cox-AS/server/default/lib/jbossws-jboss42.jar.
So the question is...am I supposed to be able to override that service definition? If so, can I configure the classloader to find the service file in my war before looking in the lib directory without screwing stuff up?
Thanks
Zach
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139026#4139026
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139026
16 years, 9 months
[JBossWS] - Connection refused
by kkkasper
Hello
I have a problem. When I envoke a webservice call on a weblogic 8 from within jboss i get a connection refused error.
Calling it from OUTSIDE jboss everything works fine (using the same class for doing the calling)
, but when run inside JBOSS (that is being run as part of executing a webservice call on the jboss), it refuses
to do the call to the weblogic server. (see stack trace below)
I've tried connecting to the WS url using a URL object just to see if that was possible and I
was able to read and output to the screen the full wsdl file. However, looking at the stack trace, it looks
as though its the call thats failing.. but i don't know..
I'm using axis2 for the webservice call which nicely generated code based on the service's wsdl file.
I hope someone has a clue as what I have done wrong. I'm a rookie both at jboss and WS for the moment ;-)
many thanks!
K
I'm running
14:48:19,203 INFO [Server] Starting JBoss (MX MicroKernel)...
14:48:19,234 INFO [Server] Release ID: JBoss [Zion] 4.0.3RC1 (build: CVSTag=JBoss_4_0_3_RC1 date=200506260723)
14:48:19,234 INFO [Server] Home Dir: C:\jboss-4.0.3RC1
14:48:19,234 INFO [Server] Home URL: file:/C:/jboss-4.0.3RC1/
14:48:19,234 INFO [Server] Library URL: file:/C:/jboss-4.0.3RC1/lib/
14:48:19,234 INFO [Server] Patch URL: null
14:48:19,234 INFO [Server] Server Name: default
14:48:19,234 INFO [Server] Server Home Dir: C:\jboss-4.0.3RC1\server\default
14:48:19,234 INFO [Server] Server Home URL: file:/C:/jboss-4.0.3RC1/server/default/
14:48:19,234 INFO [Server] Server Data Dir: C:\jboss-4.0.3RC1\server\default\data
14:48:19,250 INFO [Server] Server Temp Dir: C:\jboss-4.0.3RC1\server\default\tmp
14:48:19,250 INFO [Server] Server Config URL: file:/C:/jboss-4.0.3RC1/server/default/conf/
14:48:19,250 INFO [Server] Server Library URL: file:/C:/jboss-4.0.3RC1/server/default/lib/
14:48:19,250 INFO [Server] Root Deployment Filename: jboss-service.xml
14:48:19,250 INFO [Server] Starting General Purpose Architecture (GPA)...
14:48:20,437 INFO [ServerInfo] Java version: 1.6.0_01,Sun Microsystems Inc.
14:48:20,437 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0_01-b06,Sun Microsystems Inc.
14:48:20,437 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
14:48:21,312 INFO [Server] Core system initialized
and here is the stack trace
14:50:12,109 INFO [STDOUT] calling http://10.xxx.xxx.xxx:7001/Doc/webservice/Document.jws?WSDL
14:50:17,703 INFO [STDOUT] java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException
Detail:
<bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:193)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:515)
at sun.net.www.http.HttpClient.(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:318)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:733)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:658)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
at weblogic.webservice.binding.http11.Http11ClientBinding.send(Http11ClientBinding.java:399)
at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHandler.java:37)
at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:231)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:303)
at weblogic.jws.proxies.DocumentBatchSoap_Stub.updateBatchStatus(DocumentBatchSoap_Stub.java:482)
at weblogic.jws.proxies.DocumentBatchSoap_Stub.updateBatchStatus(DocumentBatchSoap_Stub.java:504)
...
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:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:87)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:300)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
at org.jboss.ejb.Container.invoke(Container.java:873)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1090)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
at org.jboss.mq.SpySession.run(SpySession.java:333)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
at java.lang.Thread.run(Thread.java:619)
</bea_fault:stacktrace>
; nested exception is:
javax.xml.rpc.soap.SOAPFaultException
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139010#4139010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139010
16 years, 9 months