axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Peterson <paul_peter...@iesc.net>
Subject What is the correct way to instantiate a Axis2 client stub class?
Date Mon, 03 Mar 2008 17:47:13 GMT

What is the correct way to instantiate a Axis2 client stub class?

Hello

I am new to Axis2 and it's been sometime since I did much with java.  I
primarily work with Adobe's Coldfusion (CF) which is built upon J2EE.   CF
allows the creation of java objects and, because of some complex data type
requirements, this is the approach I would like to take in creating a
Coldfusion client to consume web services.

I am developing and testing the idea by attemping to create a CF client for
WebserviceX.Net's Stock Quote service.

I have installed Axis2-1.3 and  the Axis2 Code Generator plugin for Ecplise.  
I generated the java source code from the WDSL (
http://www.webservicex.net/stockquote.asmx?WSDL) 

To call the GetQuote() method from the stub class I created a wrapper class
that I use in the Coldfusion code:

== wrapper class StockQuoteWS.java
====================================================
/**
 * StockQuoteWS.java
 */
package net.webservicex.www;

import java.net.MalformedURLException;
import java.rmi.RemoteException;
import net.webservicex.www.StockQuoteStub;
import net.webservicex.www.GetQuote;
import net.webservicex.www.GetQuoteResponse;

/**
 * StockQuoteWS 
 */
public class StockQuoteWS 
{
	
	public StockQuoteWS() { }
	
	public java.lang.String getQuote(java.lang.String symbol) throws
RemoteException
	{
		java.lang.String strQuote = null;
		strQuote = symbol;
		
		StockQuoteStub wsStockQuote = new StockQuoteStub();
		GetQuote objGetQuote = new GetQuote();
		objGetQuote.setSymbol(symbol);
		strQuote = wsStockQuote.GetQuote(objGetQuote).getGetQuoteResult();	
		return strQuote;
	}

}

Regardless how I init a new StockQuoteStub I get a NPE returned on the
StockQuoteStub wsStockQuote = new StockQuoteStub(); line.

org.apache.axis2.deployment.DeploymentException
	at org.apache.axis2.deployment.util.Utils.loadHandler(Utils.java:134)
	at
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseList(AxisConfigBuilder.java:405)
	at
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseOrders(AxisConfigBuilder.java:433)
	at
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:133)
	at
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:615)
	at
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:115)
	at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
	at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:180)
	at
org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:146)
	at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:139)
	at net.webservicex.www.StockQuoteStub.<init>(StockQuoteStub.java:68)
	at net.webservicex.www.StockQuoteStub.<init>(StockQuoteStub.java:54)
	at net.webservicex.www.StockQuoteStub.<init>(StockQuoteStub.java:106)
	at net.webservicex.www.StockQuoteStub.<init>(StockQuoteStub.java:97)
	at net.webservicex.www.StockQuoteWS.getQuote(StockQuoteWS.java:27)
	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 coldfusion.runtime.StructBean.invoke(StructBean.java:498)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2291)
	at
cfstockquote2ecfm1392456791.runPage(C:\jboss\server\default\deploy\cfusion.war\test\stockquote.cfm:26)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
	at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
	at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.CfmServlet.service(CfmServlet.java:175)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	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:619)
Caused by: java.lang.NullPointerException
	at org.apache.axis2.deployment.util.Utils.loadHandler(Utils.java:118)
	... 60 more


What is the correct way to instantiate a Axis2 client stub class?

Any help would be appreciated.

pwp


-- 
View this message in context: http://www.nabble.com/What-is-the-correct-way-to-instantiate-a-Axis2-client-stub-class--tp15809428p15809428.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message