Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Web Service question

  Asked By: Kerri    Date: Sep 10    Category: Java    Views: 562
  

How to pass a java.sql.date class to a web service? Is there a way to
do this?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Adalric Fischer     Answered On: Sep 10

I have done it once using CalendarHolder Implemented by axis-1.4/jaxrpc.jar here is the sample code:


Calendar cal = Calendar.getInstance();
cal.setTime(new java.sql.Date(System.currentTimeMillis()));
CalendarHolder dt = new CalendarHolder(cal);

 
Answer #2    Answered By: Julia Flores     Answered On: Sep 10

If you are using Axis to provide WebService then you could use :

    <beanMapping languageSpecificType="java:org.hatami.web.manager.entity.Statement"
qname="ns1:Statement" xmlns:ns1="urn:org.hatami.web.manager.entity"/>

after service  definition in server-config.wsdd file.

 
Didn't find what you were looking for? Find more on Web Service question Or get search suggestion and latest updates.




Tagged: