Java2WSDL
Consider the following java interface which uses java.util.Date as a return type as well as a method parameter.
public interface MyService {
public java.util.Date getNextDate();
public void updateLastRun(java.util.Date date);
}
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions targetNamespace="http://service"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://service" xmlns:intf="http://service"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4-->
<wsdl:message name="setOpeningDateResponse">
</wsdl:message>
<wsdl:message name="setOpeningDateRequest">
<wsdl:part name="in0" type="xsd:dateTime" />
</wsdl:message>
<wsdl:message name="getOpenningDateResponse">
<wsdl:part name="getOpenningDateReturn" type="xsd:dateTime" />
</wsdl:message>
<wsdl:message name="getOpenningDateRequest">
</wsdl:message>
<!--rest of the content removed-->
</wsdl:definitions>
WSDL2Java
Now we can generate the Java classes using our WSDL file. WSDL2Java tool will use the WSDL file and generate a set of classes for us. Following is the generated MyService class.
package service;
public interface MyService extends java.rmi.Remote {
public java.util.Calendar getOpenningDate()
throws java.rmi.RemoteException;
public void setOpeningDate(java.util.Calendar in0)
throws java.rmi.RemoteException;
}
Since your binding implementation class implements this new interface, you will have some hard time in dealing with this data type changes. May be there's a quick fix which we don't see from here.
We tried this on Axis1.4 and did not try with Axis2.
No comments:
Post a Comment