posted 13 years ago
Hello,
I want to call an api from an external webservice. I used WSDL2Java client from websphere tool to generate all the client files. Then I tried to find the service thro' service locator (thro' RPC, it finds the service) and try to call apis from the webservice. I downloaded all the necessary jar files from the websphere installation runtime directory. attached is my client. But when I execute the call,
10/11/2010 10:41:40 com.ibm.ws.webservices.engine.WebServicesProperties$1 run
WARNING: WSWS3227E: Error: Exception:
java.lang.IllegalAccessException: Class org.apache.commons.discovery.tools.ClassUtils can not access a memb
er of class javax.xml.parsers.SAXParserFactory with modifiers "protected"
at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.java:157)
at com.ibm.ws.webservices.engine.WebServicesProperties$1.run(WebServicesProperties.java:231)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:56)
at com.ibm.ws.webservices.engine.WebServicesProperties.newInstance(WebServicesProperties.java:214)
at com.ibm.ws.webservices.engine.WebServicesProperties.newInstance(WebServicesProperties.java:208)
at com.ibm.ws.webservices.engine.utils.XMLUtils.initSAXFactory(XMLUtils.java:234)
at com.ibm.ws.webservices.engine.utils.XMLUtils.getSAXParser(XMLUtils.java:282)
at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextIm
pl.java:246)
at com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope(SOAPPart.java:864)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1225)
at com.ibm.ws.webservices.engine.Message.getFault(Message.java:757)
at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:737)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:252)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:685)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:611)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:441)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:662)
at com.xora.timetrack.XoraTimeTrackUserManagementServices40SoapBindingStub.getUserInfo(XoraTimeTrac
kUserManagementServices40SoapBindingStub.java:288)
at websrvcClient.main(websrvcClient.java:29)
10/11/2010 10:41:40 com.ibm.ws.webservices.engine.PivotHandlerWrapper bindExceptionToResponse
SEVERE: WSWS3400I: Info: unexpected exception.
java.lang.NullPointerException
at com.ibm.ws.webservices.engine.utils.XMLUtils.getSAXParser(XMLUtils.java:284)
at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextIm
pl.java:246)
at com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope(SOAPPart.java:864)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1225)
at com.ibm.ws.webservices.engine.Message.getFault(Message.java:757)
at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:737)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:252)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:685)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:611)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:441)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:662)
at com.xora.timetrack.XoraTimeTrackUserManagementServices40SoapBindingStub.getUserInfo(XoraTimeTrac
kUserManagementServices40SoapBindingStub.java:288)
at websrvcClient.main(websrvcClient.java:29)
10/11/2010 10:41:40 com.ibm.ws.webservices.engine.client.Connection invoke
INFO: WSWS3243I: Info: Mapping Exception to WebServicesFault.
WebServicesFault
faultCode: Server.generalException
faultString: java.lang.NullPointerException
faultActor: null
faultDetail:
java.lang.NullPointerException
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.bindExceptionToResponse(PivotHandlerWrapper.ja
va:347)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:260)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:685)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:611)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:441)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:662)
at com.xora.timetrack.XoraTimeTrackUserManagementServices40SoapBindingStub.getUserInfo(XoraTimeTrac
kUserManagementServices40SoapBindingStub.java:288)
at websrvcClient.main(websrvcClient.java:29)
Caused by: java.lang.NullPointerException
at com.ibm.ws.webservices.engine.utils.XMLUtils.getSAXParser(XMLUtils.java:284)
at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextIm
pl.java:246)
at com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope(SOAPPart.java:864)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1225)
at com.ibm.ws.webservices.engine.Message.getFault(Message.java:757)
at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:737)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:252)
... 7 more
Exception occurred