Hi All, I'm using Jbos4.0.2 web services. When I tried to call my web service from client it is throwing the following Null pointer exception. Pls help me to rectify this.
Thanks Satya Server Stach trace ulr :: http://T5-1FB-140531:8080/csda/csda/AcceptRequest?wsdl Contacting webservice at http://T5-1FB-140531:8080/csda/csda/AcceptRequest?wsdl log4j:WARN No appenders could be found for logger (org.jboss.webservice.EngineConfigurationFinder). log4j:WARN Please initialize the log4j system properly. javax.xml.rpc.ServiceException: java.lang.NullPointerException at org.jboss.webservice.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:124) at com.pindarset.csda.imaging.client.CSDAAcceptRequestWsClient.main(CSDAAcceptRequestWsClient.java:48) Caused by: java.lang.NullPointerException at java.util.StringTokenizer.(Unknown Source) at java.util.StringTokenizer.(Unknown Source) at org.jboss.webservice.deployment.ServiceDescription.getPackageName(ServiceDescription.java:946) at org.jboss.webservice.deployment.ServiceDescription.initOperations(ServiceDescription.java:732) at org.jboss.webservice.deployment.ServiceDescription.initServiceDescription(ServiceDescription.java:140) at org.jboss.webservice.deployment.ServiceDescription.(ServiceDescription.java:108) at org.jboss.webservice.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:119) ... 1 more Exception in thread "main" Client Program public class CSDAAcceptRequestWsClient { public static void main(String[] args) throws Exception{ String urlstr = "http://T5-1FB-140531:8080/csda/csda/AcceptRequest?wsdl"; System.out.println("ulr :: " +urlstr); String jobId = "A123"; String jobtype = "JobType"; String colorCode = "MONO"; String grFormat = "jpeg"; int height=123; int width=123; System.out.println("Contacting webservice at " + urlstr); URL url = new URL(urlstr); String ns = "http://ws_acceptrequest.imaging.csda.pindarset.com/"; QName qname = new QName(ns, "AcceptRequestService"); QName port = new QName(ns, "AcceptRequestPort"); QName operation = new QName(ns, "requestValidation"); ServiceFactory factory = ServiceFactory.newInstance(); Service service = factory.createService(url, qname); Call call = service.createCall(port, operation); System.out.println("output:" + call.invoke(new Object[]{jobId,jobtype,colorCode,grFormat, new Integer(height),new Integer(width)})); } } Web service Interface package com.pindarset.csda.imaging.ws_acceptrequest; import java.rmi.Remote; import java.rmi.RemoteException; import com.pindarset.csda.imaging.common.WebServiceDO; import com.pindarset.csda.imaging.exception.CSDAImagingException; public interface AcceptRequest extends Remote { public String requestValidation(String strJobId, String strJobType, String strColorCode, String strJobGraphicFormat, Integer objHeight, Integer objWidth) throws RemoteException, CSDAImagingException; public Integer requestStatus(String strJobId)throws RemoteException, CSDAImagingException; public WebServiceDO getMetaData() throws RemoteException, CSDAImagingException; } and Web service Bean package com.pindarset.csda.imaging.ws_acceptrequest; import java.lang.reflect.InvocationTargetException; import java.rmi.RemoteException; import java.sql.Connection; import java.sql.SQLException; import java.util.ArrayList; import javax.ejb.EJBException; import javax.ejb.SessionBean; import javax.ejb.SessionContext; import javax.naming.NamingException; import com.pindarset.csda.imaging.exception.CSDAImagingException; import com.pindarset.csda.imaging.common.CSDAImagingContstants; import com.pindarset.csda.imaging.common.JNDINames; import com.pindarset.csda.imaging.common.Util; import com.pindarset.csda.imaging.common.WebServiceDO; import com.pindarset.csda.imaging.ipservice.sb_ipservice.IPServiceMgr; import com.pindarset.csda.imaging.ipservice.sb_ipservice.IPServiceMgrHome; import com.pindarset.csda.imaging.data.CSDADataDAO; import com.pindarset.csda.imaging.data.Job; import com.pindarset.csda.imaging.common.EJBUtil; public class AcceptRequestBean implements SessionBean { public String requestValidation(String strJobId, String strJobType, String strColorCode, String strJobGraphicFormat, Integer objHeight, Integer objWidth) throws CSDAImagingException{ // } public Integer requestStatus(String strJobId) throws CSDAImagingException{ // } public WebServiceDO getMetaData() throws CSDAImagingException{ // } /** * Callback method called by container before the bean is swapped into memory. */ public void setSessionContext(SessionContext arg0) throws EJBException, RemoteException { } /** * Callback method called by container before the bean is swapped into memory. */ public void ejbCreate(){ } /** * Callback method called by container before the data removed from the memory. */ public void ejbRemove(){ } /** * Callback method called by container before the bean is swapped into memory. */ public void ejbActivate() { } /** * Callback method called by container before the bean is swapped into memory. */ public void ejbPassivate(){ } } //Mappings.xml <?xml version="1.0" encoding="UTF-8"?> <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"> <package-mapping> <package-type>com.pindarset.csda.imaging.ws_acceptrequest</package-type> http://ws_acceptrequest.imaging.csda.pindarset.com/types </package-mapping> <package-mapping> <package-type>com.pindarset.csda.imaging.ws_acceptrequest</package-type> http://ws_acceptrequest.imaging.csda.pindarset.com/ </package-mapping> <java-xml-type-mapping> <java-type>com.pindarset.csda.imaging.common.WebServiceDO</java-type> <root-type-qname xmlns:typeNS="http://ws_acceptrequest.imaging.csda.pindarset.com/types">typeNS:WebServiceDO</root-type-qname> <qname-scope>complexType</qname-scope> <variable-mapping> <java-variable-name>strBookType</java-variable-name> <xml-element-name>strBookType</xml-element-name> </variable-mapping> <variable-mapping> <java-variable-name>strGraphicColorCodes</java-variable-name> <xml-element-name>strGraphicColorCodes</xml-element-name> </variable-mapping> <variable-mapping> <java-variable-name>strGraphicFormats</java-variable-name> <xml-element-name>strGraphicFormats</xml-element-name> </variable-mapping> <variable-mapping> <java-variable-name>strGraphicSizes</java-variable-name> <xml-element-name>strGraphicSizes</xml-element-name> </variable-mapping> </java-xml-type-mapping> <java-xml-type-mapping> <java-type>com.pindarset.csda.imaging.exception.CSDAImagingException</java-type> <root-type-qname xmlns:typeNS="http://ws_acceptrequest.imaging.csda.pindarset.com/types">typeNS:CSDAImagingException</root-type-qname> <qname-scope>complexType</qname-scope> <variable-mapping> <java-variable-name>message</java-variable-name> <xml-element-name>message</xml-element-name> </variable-mapping> </java-xml-type-mapping> <exception-mapping> <exception-type>com.pindarset.csda.imaging.exception.CSDAImagingException</exception-type> <wsdl-message xmlns:exMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">exMsgNS:CSDAImagingException</wsdl-message> <constructor-parameter-order> <element-name>message</element-name> </constructor-parameter-order> </exception-mapping> <service-interface-mapping> <service-interface>com.pindarset.csda.imaging.ws_acceptrequest.AcceptRequestService</service-interface> <wsdl-service-name xmlns:serviceNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">serviceNS:AcceptRequestService</wsdl-service-name> <port-mapping> <port-name>AcceptRequestPort</port-name> <java-port-name>AcceptRequestPort</java-port-name> </port-mapping> </service-interface-mapping> <service-endpoint-interface-mapping> <service-endpoint-interface>com.pindarset.csda.imaging.ws_acceptrequest.AcceptRequest</service-endpoint-interface> <wsdl-port-type xmlns:portTypeNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">portTypeNS:AcceptRequest</wsdl-port-type> <wsdl-binding xmlns:bindingNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">bindingNS:AcceptRequestBinding</wsdl-binding> <service-endpoint-method-mapping> <java-method-name>getMetaData</java-method-name> <wsdl-operation>getMetaData</wsdl-operation> <wsdl-return-value-mapping> <method-return-value>com.pindarset.csda.imaging.common.WebServiceDO</method-return-value> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_getMetaDataResponse</wsdl-message> <wsdl-message-part-name>result</wsdl-message-part-name> </wsdl-return-value-mapping> </service-endpoint-method-mapping> <service-endpoint-method-mapping> <java-method-name>requestStatus</java-method-name> <wsdl-operation>requestStatus</wsdl-operation> <method-param-parts-mapping> <param-position>0</param-position> <param-type>java.lang.String</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestStatus</wsdl-message> <wsdl-message-part-name>String_1</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <wsdl-return-value-mapping> <method-return-value>java.lang.Integer</method-return-value> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestStatusResponse</wsdl-message> <wsdl-message-part-name>result</wsdl-message-part-name> </wsdl-return-value-mapping> </service-endpoint-method-mapping> <service-endpoint-method-mapping> <java-method-name>requestValidation</java-method-name> <wsdl-operation>requestValidation</wsdl-operation> <method-param-parts-mapping> <param-position>0</param-position> <param-type>java.lang.String</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestValidation</wsdl-message> <wsdl-message-part-name>String_1</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <method-param-parts-mapping> <param-position>1</param-position> <param-type>java.lang.String</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestValidation</wsdl-message> <wsdl-message-part-name>String_2</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <method-param-parts-mapping> <param-position>2</param-position> <param-type>java.lang.String</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestValidation</wsdl-message> <wsdl-message-part-name>String_3</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <method-param-parts-mapping> <param-position>3</param-position> <param-type>java.lang.String</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestValidation</wsdl-message> <wsdl-message-part-name>String_4</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <method-param-parts-mapping> <param-position>4</param-position> <param-type>java.lang.Integer</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestValidation</wsdl-message> <wsdl-message-part-name>Integer_5</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <method-param-parts-mapping> <param-position>5</param-position> <param-type>java.lang.Integer</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestValidation</wsdl-message> <wsdl-message-part-name>Integer_6</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <wsdl-return-value-mapping> <method-return-value>java.lang.String</method-return-value> <wsdl-message xmlns:wsdlMsgNS="http://ws_acceptrequest.imaging.csda.pindarset.com/">wsdlMsgNS:AcceptRequest_requestValidationResponse</wsdl-message> <wsdl-message-part-name>result</wsdl-message-part-name> </wsdl-return-value-mapping> </service-endpoint-method-mapping> </service-endpoint-interface-mapping> </java-wsdl-mapping> WSDL File <?xml version="1.0" encoding="UTF-8"?> <definitions name="AcceptRequestService" targetNamespace="http://ws_acceptrequest.imaging.csda.pindarset.com/" xmlns:tns="http://ws_acceptrequest.imaging.csda.pindarset.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://ws_acceptrequest.imaging.csda.pindarset.com/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > < types> < schema targetNamespace="http://ws_acceptrequest.imaging.csda.pindarset.com/types" xmlns:tns="http://ws_acceptrequest.imaging.csda.pindarset.com/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> < sequence> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <soap:operation soapAction=""/> <soap:body use="literal" namespace="http://ws_acceptrequest.imaging.csda.pindarset.com/"/> <soap:body use="literal" namespace="http://ws_acceptrequest.imaging.csda.pindarset.com/"/> <soap:fault name="CSDAImagingException" use="literal"/> <soap:operation soapAction=""/> <soap:body use="literal" namespace="http://ws_acceptrequest.imaging.csda.pindarset.com/"/> <soap:body use="literal" namespace="http://ws_acceptrequest.imaging.csda.pindarset.com/"/> <soap:fault name="CSDAImagingException" use="literal"/> <soap:operation soapAction=""/> <soap:body use="literal" namespace="http://ws_acceptrequest.imaging.csda.pindarset.com/"/> <soap:body use="literal" namespace="http://ws_acceptrequest.imaging.csda.pindarset.com/"/> <soap:fault name="CSDAImagingException" use="literal"/> <soap:address location="REPLACE_WITH_ACTUAL_URL"/> View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891424#3891424 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891424 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
