Hi, I deployed web services well, but run client with wrong message:java.lang.NullPointerException
wsdl file: <?xml version="1.0" encoding="UTF-8"?> <definitions name="TaxService" targetNamespace="http://tax.webservice.com/" xmlns:tns="http://tax.webservice.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <soap:operation soapAction=""/> <soap:body use="literal" namespace="http://tax.webservice.com/"/> <soap:body use="literal" namespace="http://tax.webservice.com/"/> <soap:address location="REPLACE_WITH_ACTUAL_URL"/> client file: public class TaxClient{ public static void main( String[] args ) throws Exception { try{ String urlstr = "http://mypc:8080/TaxEJB/Tax?wsdl"; System.out.println( "Contacting webservice at " + urlstr ); URL url = new URL(urlstr); QName qName = new QName("http://tax.webservice.com/","TaxService"); ServiceFactory factory = ServiceFactory.newInstance(); Service service = factory.createService( url, qName ); Tax proxy = ( Tax ) service.getPort(Tax.class ); System.out.println( "output:" + proxy.calculateTax(5000d)); }catch (Exception e){ System.err.println(e.toString()); } } } what's wrong with my code? thanks! Dean View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3943761#3943761 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3943761 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
