axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Slimane Amar" <sa...@genigraph.fr>
Subject Re: Extend the class Date
Date Thu, 19 Jun 2003 07:57:41 GMT
When i use a complex type with a Date ou Cadendar as an embedded attribute
it works fine.

I think there is a problem with java2WSDL when i use a complex type
which extends Date or Calandar.
Besides the error message is explicit :
- The class Date extends non-bean class java.util.Calendar : An xml schema 
anyType will be used

The definition of the complex type Date is :
public class Date extends java.util.Calendar
{
  ....
}
Then i have a web method which returns an object of my
class Intervalle which has two attributes Date (dateDeb_, dateFin_).

Below the wrong wsdl file generated.
The definition of Calendar is missing.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://app.gsr.edf" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:tns2="http://cte.gsr.edf" xmlns:apachesoap="http://xml.apache.org/xml-
soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:intf="http://app.gsr.edf" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:impl="http://app.gsr.edf" xmlns="http://schemas.xmlsoap.org/wsdl/">
 <wsdl:types>
  <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="http://cte.gsr.edf">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="Intervalle">
    <sequence>
     <element name="dateDeb_" nillable="true" type="tns2:Date"/>
     <element name="dateFin_" nillable="true" type="tns2:Date"/>
    </sequence>
   </complexType>
   <complexType name="ItIntervalle">
    <complexContent>
     <extension base="tns2:Intervalle">
      <sequence/>
     </extension>
    </complexContent>
   </complexType>
   <complexType name="Chronique">
    <sequence>
     <element name="it_" nillable="true" type="tns2:ItIntervalle"/>
     <element name="valDef_" type="xsd:int"/>
     <element name="vals_" nillable="true" type="apachesoap:Vector"/>
    </sequence>
   </complexType>
  </schema>
  <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="http://xml.apache.org/xml-soap">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="Vector">
    <sequence>
     <element name="item" minOccurs="0" maxOccurs="unbounded" 
type="xsd:anyType"/>
    </sequence>
   </complexType>
  </schema>
  <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="http://app.gsr.edf">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_tns2_Chronique">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="tns2:Chronique[]"/>
     </restriction>
    </complexContent>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="getAllSituationsRequest">

      <wsdl:part name="in0" type="xsd:int"/>

      <wsdl:part name="in1" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="suppressionSituationResponse">

   </wsdl:message>

   <wsdl:message name="getChroniquesRequest">

   </wsdl:message>

   <wsdl:message name="transfertSituationRequest">

      <wsdl:part name="in0" type="xsd:string"/>

      <wsdl:part name="in1" type="xsd:int"/>

      <wsdl:part name="in2" type="xsd:string"/>

      <wsdl:part name="in3" type="xsd:string"/>

      <wsdl:part name="in4" type="xsd:string"/>

      <wsdl:part name="in5" type="xsd:float"/>

   </wsdl:message>

   <wsdl:message name="getSituationRequest1">

      <wsdl:part name="in0" type="xsd:string"/>

      <wsdl:part name="in1" type="xsd:int"/>

      <wsdl:part name="in2" type="xsd:string"/>

      <wsdl:part name="in3" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="getSituationResponse">

      <wsdl:part name="getSituationReturn" type="xsd:base64Binary"/>

   </wsdl:message>

   <wsdl:message name="getSituationResponse1">

      <wsdl:part name="getSituationReturn" type="xsd:base64Binary"/>

   </wsdl:message>

   <wsdl:message name="getSituationRequest">

      <wsdl:part name="in0" type="xsd:int"/>

      <wsdl:part name="in1" type="xsd:string"/>

      <wsdl:part name="in2" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="getChroniquesResponse">

      <wsdl:part name="getChroniquesReturn" type="intf:ArrayOf_tns2_Chronique"/>

   </wsdl:message>

   <wsdl:message name="transfertSituationResponse">

   </wsdl:message>

   <wsdl:message name="suppressionSituationRequest">

      <wsdl:part name="in0" type="xsd:int"/>

      <wsdl:part name="in1" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="getAllSituationsRequest1">

      <wsdl:part name="in0" type="xsd:string"/>

      <wsdl:part name="in1" type="xsd:int"/>

      <wsdl:part name="in2" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="getAllSituationsResponse">

      <wsdl:part name="getAllSituationsReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="putSituationResponse">

   </wsdl:message>

   <wsdl:message name="putSituationRequest">

      <wsdl:part name="in0" type="xsd:int"/>

      <wsdl:part name="in1" type="xsd:base64Binary"/>

      <wsdl:part name="in2" type="xsd:string"/>

      <wsdl:part name="in3" type="xsd:string"/>

      <wsdl:part name="in4" type="xsd:string"/>

      <wsdl:part name="in5" type="xsd:float"/>

      <wsdl:part name="in6" type="xsd:int"/>

      <wsdl:part name="in7" type="xsd:int"/>

   </wsdl:message>

   <wsdl:message name="getAllSituationsResponse1">

      <wsdl:part name="getAllSituationsReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:portType name="IAnarchServeur">

      <wsdl:operation name="getAllSituations" parameterOrder="in0 in1">

         <wsdl:input name="getAllSituationsRequest" 
message="intf:getAllSituationsRequest"/>

         <wsdl:output name="getAllSituationsResponse" 
message="intf:getAllSituationsResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getAllSituations" parameterOrder="in0 in1 in2">

         <wsdl:input name="getAllSituationsRequest1" 
message="intf:getAllSituationsRequest1"/>

         <wsdl:output name="getAllSituationsResponse1" 
message="intf:getAllSituationsResponse1"/>

      </wsdl:operation>

      <wsdl:operation name="getSituation" parameterOrder="in0 in1 in2">

         <wsdl:input name="getSituationRequest" 
message="intf:getSituationRequest"/>

         <wsdl:output name="getSituationResponse" 
message="intf:getSituationResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getSituation" parameterOrder="in0 in1 in2 in3">

         <wsdl:input name="getSituationRequest1" 
message="intf:getSituationRequest1"/>

         <wsdl:output name="getSituationResponse1" 
message="intf:getSituationResponse1"/>

      </wsdl:operation>

      <wsdl:operation name="putSituation" parameterOrder="in0 in1 in2 in3 in4 
in5 in6 in7">

         <wsdl:input name="putSituationRequest" 
message="intf:putSituationRequest"/>

         <wsdl:output name="putSituationResponse" 
message="intf:putSituationResponse"/>

      </wsdl:operation>

      <wsdl:operation name="transfertSituation" parameterOrder="in0 in1 in2 in3 
in4 in5">

         <wsdl:input name="transfertSituationRequest" 
message="intf:transfertSituationRequest"/>

         <wsdl:output name="transfertSituationResponse" 
message="intf:transfertSituationResponse"/>

      </wsdl:operation>

      <wsdl:operation name="suppressionSituation" parameterOrder="in0 in1">

         <wsdl:input name="suppressionSituationRequest" 
message="intf:suppressionSituationRequest"/>

         <wsdl:output name="suppressionSituationResponse" 
message="intf:suppressionSituationResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getChroniques">

         <wsdl:input name="getChroniquesRequest" 
message="intf:getChroniquesRequest"/>

         <wsdl:output name="getChroniquesResponse" 
message="intf:getChroniquesResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="SituationGsrServiceSoapBinding" 
type="intf:IAnarchServeur">

      <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="getAllSituations">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getAllSituationsRequest">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="getAllSituationsResponse">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getAllSituations">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getAllSituationsRequest1">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="getAllSituationsResponse1">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getSituation">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getSituationRequest">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="getSituationResponse">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getSituation">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getSituationRequest1">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="getSituationResponse1">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="putSituation">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="putSituationRequest">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="putSituationResponse">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="transfertSituation">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="transfertSituationRequest">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="transfertSituationResponse">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="suppressionSituation">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="suppressionSituationRequest">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="suppressionSituationResponse">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getChroniques">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getChroniquesRequest">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:input>

         <wsdl:output name="getChroniquesResponse">

            <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://app.gsr.edf"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="IAnarchServeurService">

      <wsdl:port name="SituationGsrService" 
binding="intf:SituationGsrServiceSoapBinding">

         <wsdlsoap:address 
location="http://localhost:8080/axis/services/SituationGsrService"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

---------- Debut du message initial -----------

De     : Kevin.Bedell@sunlife.com
A      : axis-user@ws.apache.org
Copies : 
Date   : Wed, 18 Jun 2003 12:56:41 -0400
Sujet  : Re: Extend the class Date



java2wsdl generally observes the following mappings:

java.util.Calendar --> xsd:dateTime
java.util.Date     --> xsd:dateTime

If you're not seeing this then there's likely something wrong -- like maybe
an old jar file laying around on your classpath. or a problem with how you
are executing java2wsdl, or an issue with the interface definition file you
are using.

If you could cut & paste the java method you are using along with the wsdl
it generates, that may be useful in helping to resolve this.




|---------+----------------------------->
|         |                             |
|         |  James Black                |
|         |  <jblack@ieee.org>          |
|         |  06/18/2003 12:35 PM        |
|         |  Please respond to axis-user|
|         |                             |
|---------+----------------------------->
  >-----------------------------------------------------------------------------
------------------------------------------------|
  
|                                                                               
                                              |
  |      To: axis-
user@ws.apache.org                                                              
                              |
  |      cc: (bcc: Kevin 
Bedell/Systems/USHO/SunLife)                                                    
                       |
  |      Subject:  Re: Extend the class 
Date                                                                            
        |
  >-----------------------------------------------------------------------------
------------------------------------------------|




Slimane Amar wrote:

>I have got the same error with Calendar.
>
>
  There should be a mapping for java.util.Calendar to an xml schema,
actually.

  Can you paste your method from the interface and the error?

  Also, have you ensured that java2wsdl is calling the new version? If
you have a prior version in a jar file that is being found first then
that will be used.

--
"We do not lose our identity in our relations with others; in part, at
least, we achieve our identity by those relations." Tony Blair, 1993







---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------






--------------------------------------------------
Slimane AMAR         Mail: samar@genigraph.fr
GENIGRAPH            URL : http://www.genigraph.fr
104, rue Castagnary  Tel : +33 01 45 33 64 63
F-75015 PARIS FRANCE Fax : +33 01 45 33 89 63
--------------------------------------------------


Mime
View raw message