Syed Azhar Sultan [https://community.jboss.org/people/syed.azharsultan] created the discussion
"javax.xml.ws.WebServiceException: Cannot create proxy" To view the discussion, visit: https://community.jboss.org/message/829632#829632 -------------------------------------------------------------- Hi Friends, Am facing an exception while invoking webservice. Please help me to resolve this. Server - JBoss 4.2, I have two nodes created in the server that is nodeA and nodeB. nodeA deploys the service. This web service is made available to nodeB. During nodeA start up, i see webservice being deployed and also i see wsdl is generated and published. I can access the webservice via browser. I can see wsdl file in browser. Problems comes when i try to access webservice from nodeB. I get the following exception : 10:23:06,528 ERROR [STDERR] javax.xml.ws.WebServiceException: Cannot create proxy 10:23:06,530 ERROR [STDERR] at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:411) 10:23:06,532 ERROR [STDERR] at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:278) 10:23:06,534 ERROR [STDERR] at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:200) 10:23:06,536 ERROR [STDERR] at javax.xml.ws.Service.getPort(Service.java:116) 10:23:06,539 ERROR [STDERR] at com.framework.serviceinvoker.transport.base.client.BaseURLWebServiceTransportService.getBaseURLWebServiceTranspor tPort(BaseURLWebServiceTransportService.java:56) 10:23:06,555 ERROR [STDERR] at com.base.adminModule.base.action.BaseConfigurationAction.list(BaseConfigurationAction.java:4 98) 10:23:06,564 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 10:23:06,566 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 10:23:06,567 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 10:23:06,572 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 10:23:06,582 ERROR [STDERR] at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106) 10:23:06,583 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) 10:23:06,586 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) 10:23:06,592 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) 10:23:06,595 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) 10:23:06,599 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) 10:23:06,602 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 10:23:06,606 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 10:23:06,609 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 10:23:06,614 ERROR [STDERR] at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) 10:23:06,618 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 10:23:06,622 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 10:23:06,624 ERROR [STDERR] at com.scb.i18n.I18nFilter.doFilter(I18nFilter.java:22) 10:23:06,628 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 10:23:06,630 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 10:23:06,634 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 10:23:06,638 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 10:23:06,642 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 10:23:06,647 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 10:23:06,651 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 10:23:06,655 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) 10:23:06,660 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 10:23:06,663 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 10:23:06,667 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 10:23:06,679 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) 10:23:06,690 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 10:23:06,697 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) 10:23:06,702 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 10:23:06,706 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) 10:23:06,709 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 10:23:06,715 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595) 10:23:06,717 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: com.framework.serviceinvoker.transport.base.BaseURLWebServiceTransport is n ot an interface 10:23:06,719 ERROR [STDERR] at java.lang.reflect.Proxy.getProxyClass(Proxy.java:362) 10:23:06,721 ERROR [STDERR] at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581) 10:23:06,726 ERROR [STDERR] at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:398) 10:23:06,727 ERROR [STDERR] ... 44 more Below are my partial java source files. BaseURLWebServiceTransportService.java package com.framework.serviceinvoker.transport.base.client; import java.net.MalformedURLException; import java.net.URL; import java.util.logging.Logger; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceFeature; import com.framework.serviceinvoker.transport.base.BaseURLWebServiceTransport; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.2-b05-RC1 * Generated source version: 2.1 * */ @WebServiceClient public class BaseURLWebServiceTransportService extends Service { private final static URL BASEINVOKERTRANSPORTSERVICE_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(com.framework.serviceinvoker.transport.base.client.BaseURLWebServiceTransportService.class.getName()); static { URL url = null; try { URL baseUrl; baseUrl = com.framework.serviceinvoker.transport.base.client.BaseURLWebServiceTransportService.class.getResource("."); url = new URL(baseUrl, " http://127.0.0.1:9781/messageBroker/BaseURLWebServiceTransport?wsdl http://127.0.0.1:9781/messageBroker/BaseURLWebServiceTransport?wsdl"); } catch (MalformedURLException e) { logger.warning("Failed to create URL for wsdl"); logger.warning(e.getMessage()); } BASEINVOKERTRANSPORTSERVICE_WSDL_LOCATION = url; } public BaseURLWebServiceTransportService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } public BaseURLWebServiceTransportService() { super(BASEINVOKERTRANSPORTSERVICE_WSDL_LOCATION, new QName(" http://base.transport.serviceinvoker.framework.com/ http://base.transport.serviceinvoker.framework.com/", "BaseURLWebServiceTransportService")); } /** * * @return * returns BaseURLWebServiceTransport */ @WebEndpoint(name = "BaseURLWebServiceTransportPort") public BaseURLWebServiceTransport getBaseURLWebServiceTransportPort() { return super.getPort(new QName(" http://base.transport.serviceinvoker.framework.com/ http://base.transport.serviceinvoker.framework.com/", "BaseURLWebServiceTransportPort"), BaseURLWebServiceTransport.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns BaseURLWebServiceTransport */ @WebEndpoint(name = "BaseURLWebServiceTransportPort") public BaseURLWebServiceTransport getBaseURLWebServiceTransportPort(WebServiceFeature... features) { return super.getPort(new QName(" http://base.transport.serviceinvoker.framework.com/ http://base.transport.serviceinvoker.framework.com/", "SybaseURLWebServiceTransportPort"), BaseURLWebServiceTransport.class, features); } } BaseURLWebServiceTransport.java package com.framework.serviceinvoker.transport; import javax.jws.WebMethod; import javax.jws.WebService; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.2-b05-RC1 * Generated source version: 2.1 * */ @WebService(name = "BaseURLWebServiceTransport", targetNamespace = " http://base.transport.serviceinvoker.framework.com/ http://base.transport.serviceinvoker.framework.com/") public interface BaseURLWebServiceTransport{ /** * * @param header * @param payload * @return * returns java.lang.String */ @WebMethod public String getDbAccess(); /** * * @param header * @param payload * @return * returns java.lang.String */ @WebMethod public void setDbAccess(String dbAccess); } BaseURLWebServiceTransport.java package com.scb.framework.serviceinvoker.transport.sybase; import javax.jws.WebMethod; import javax.jws.WebService; @WebService() public class BaseURLWebServiceTransport implements com.framework.serviceinvoker.transport.BaseURLWebServiceTransport { private static String dbAccess = "mb"; @WebMethod public String getDbAccess() { return dbAccess; } @WebMethod public void setDbAccess(String dbAccess) { SybaseURLWebServiceTransport.dbAccess = dbAccess; } } BaseConfigurationAction.java package com.base.adminModule.base.action; import java.net.URL; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.framework.serviceinvoker.transport.base.BaseURLWebServiceTransport; public class BaseConfigurationAction extends Action{ public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { com.framework.serviceinvoker.transport.base.client.BaseURLWebServiceTransportService service = new com.framework.serviceinvoker.transport.base.client.BaseURLWebServiceTransportService(); com.framework.serviceinvoker.transport.base.BaseURLWebServiceTransport port = service.getBaseURLWebServiceTransportPort(); port.setDbAccess("node"); } catch(Exception ex) { ex.printStackTrace(); ApplicationLogger.getInstance().logErrors("BASE WEBSERVICE INVOCATION EXCEPTION"); } } } Please help me how can i resolve this issue. I have been stucked up with this exception from almost 2 days. Looking forward for your response at the earliest. -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/829632#829632] Start a new discussion in JBoss Web Services at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user