dcsimg
the "java.util.Date" type as the input parameter of the webservice method
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   zhebin_cong
Posted On:   Thursday, March 13, 2003 01:03 AM

hello i publish a simple class as webservice(expose the method named testInOut),in the testInOut method,there is a input parameter is "java.util.Date" type,when i test it in the "WebLogic Webservice standard testing home page",it threw following exception: Failed to invoke service: java.lang.NullPointerException java.lang.NullPointerException at weblogic.xml.stream.util.TypeFilter.accept(TypeFilter.java:40) at weblogic.xml.stream.util.XMLInputStreamFilterBase.hasNext(XMLInputStreamFilterBase.java:55) at weblogic.webservice.xml.XMLNode.read(XMLNode.java:627) at weblogic.webservice.xml.XMLNode.read(XMLNode.java:618) at weblogic.webservice.tools.pagegen.SampleInstance.getJavaObject(SampleInstance.java   More>>

hello


i publish a simple class as webservice(expose the method named testInOut),in the testInOut method,there is a input parameter is "java.util.Date" type,when i test it in the "WebLogic Webservice standard testing home page",it threw following exception:

Failed to invoke service:
java.lang.NullPointerException java.lang.NullPointerException at weblogic.xml.stream.util.TypeFilter.accept(TypeFilter.java:40) at weblogic.xml.stream.util.XMLInputStreamFilterBase.hasNext(XMLInputStreamFilterBase.java:55) at weblogic.webservice.xml.XMLNode.read(XMLNode.java:627) at weblogic.webservice.xml.XMLNode.read(XMLNode.java:618) at weblogic.webservice.tools.pagegen.SampleInstance.getJavaObject(SampleInstance.java:129) at weblogic.webservice.server.servlet.ServletBase.getJavaParams(ServletBase.java:296) at weblogic.webservice.server.servlet.ServletBase.invokeOperation(ServletBase.java:239) at weblogic.webservice.server.servlet.WebServiceServlet.invokeOperation(WebServiceServlet.java:306) at weblogic.webservice.server.servlet.ServletBase.handleGet(ServletBase.java:198) at weblogic.webservice.server.servlet.ServletBase.doGet(ServletBase.java:124) at weblogic.webservice.server.servlet.WebServiceServlet.doGet(WebServiceServlet.java:224) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5412) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:744) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3086) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)


if i replace the parameter as "String" type,it works well,i wonder if i can take the object type as the input parameter of the webservice method,if yes,how?

thank you!

   <<Less

Re: the "java.util.Date" type as the input parameter of the webservice method

Posted By:   Shaun_Shen  
Posted On:   Friday, March 21, 2003 07:04 PM

I have got the same problem before. Actually, the web service have no problem. You can write your own client and test it. I think this it is the test client's problem. Also, the java.util.Date is deprecated, so better to use java.util.Calendar. Actualy, weblogic use java.util.Calendar to handle xsd:date.

Cheers,

Shaun
About | Sitemap | Contact