Discussions

XML & Web services: WSDL to Java issues

  1. WSDL to Java issues (4 messages)

    I a web service deployed which exposes an API that takes the parameter of type "java.Util.Date" and returns a list -

    public java.util.List getUsersCreatedOn(Java.util.Date date)

    However, when i tried to create the stubs from the WSDL of this web service, the stub has an API like this -

    Object[] getUsersCreatedOn(GregorianCalendar date)

    Why the List is treated as Object array and Date as GregorianCalendar?
    How can I avoide this?
    I am using Weblogic Server's clientgen ant task to create the stubs from WSDL. Is it the clientgen's limitations?
    which other utlity does not have this limitation?

    Threaded Messages (4)

  2. WSDL to Java issues[ Go to top ]

    Can you post your wsdl? I'd like to run it through Axis.
  3. WSDL to Java issues[ Go to top ]

    Here is the WSDL. I am using weblogic's clientgen utiltiy to create stubs from WSDL file. I also tried JWSDP's wscompile utility. However, it also returned the same kind of stub where List is treated as Object array.

    ------------------------------------------------------------------
    <?xml version="1.0" encoding="utf-8"?>

    <definitions xmlns:s="http://www.w3.org/2001/XMLSchema"
       xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:tns="http://www.bea.com/webservices/basic/statelesSession"
       xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
       targetNamespace="http://www.bea.com/webservices/basic/statelesSession"
       xmlns="http://schemas.xmlsoap.org/wsdl/">
       <types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:stns="java:language_builtins.util"
       attributeFormDefault="qualified"
       elementFormDefault="qualified"
       targetNamespace="java:language_builtins.util">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/">
      </xsd:import>
      <xsd:complexType name="List">
       <xsd:complexContent>
        <xsd:restriction xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
          base="soapenc:Array">
         <xsd:attribute xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
           ref="soapenc:arrayType"
           wsdl:arrayType="xsd:anyType[]">
         </xsd:attribute>
        </xsd:restriction>
       </xsd:complexContent>
      </xsd:complexType>
     </xsd:schema>
    </types>
               
      <message name="getUsersCreatedOn" >
       
      <part name="date" xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:dateTime" />
      
     
      <part name="string" xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:string" />
      
     
      <part name="string0" xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:string" />
      
     
      </message>
      <message name="getUsersCreatedOnResponse" >
        
      <part name="result" xmlns:partns="java:language_builtins.util" type="partns:List" />
      
     
      </message>
      
               <portType name="SSOWebServicePort" >
        
      <operation name="getUsersCreatedOn" >
        <input message="tns:getUsersCreatedOn" />
        
        <output message="tns:getUsersCreatedOnResponse" />
         
        
      </operation>
     
      </portType>

       
               <binding name="SSOWebServicePortSoapBinding"
               type="tns:SSOWebServicePort" >

        <soap:binding style="rpc"
               transport="http://schemas.xmlsoap.org/soap/http" />
        
      <operation name="getUsersCreatedOn" >
        <soap:operation
        soapAction=""
        style="rpc" />

        <input>
          
          <soap:body use="encoded" namespace="http://www.bea.com/webservices/basic/statelesSession"
              encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          
          
        </input>
        <output>
                
          <soap:body use="encoded" namespace="http://www.bea.com/webservices/basic/statelesSession"
              encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          
        </output>
      
      </operation>
     
      </binding>

       
         <service name="SSOWebService" >
        <documentation>todo: add your documentation here</documentation>
        
        <port name="SSOWebServicePort"
          binding="tns:SSOWebServicePortSoapBinding">
         <soap:address location="http://localhost:7001/web-services/SSOWebService"/>
        </port>
        
      </service>

    </definitions>
  4. WSDL to Java issues[ Go to top ]

    It did the same thing with Axis. I need to understand WSDL better! Sorry that I cannot help.
  5. WSDL to Java issues[ Go to top ]

    Can you please provide me the Java Bean Component from which you create this web service(wsdl).

    I create a java proxy from this WSDL by using WSAD i am also getting the same Object[] instead of List object.

    -Mohit