he creado un web service en java, lo publiqué y me funciona con otro programa en JAVA. El problema es cuando creo un cliente de web service en Flash. Hago el llamado al webservice y me sale el siguietne error

undefined,Element tns:HolaResponse not resolvable,undefined

El método que cree en el web service en java es String Hola(String cadena). Recibe una cadena y retorna otra. se supone que debería funcionar ya que lo que retorna es un elemento primitivo, al menos eso supongo.

El cliente de web service lo hago empleando actionscript con la clase WebService.

ES posible que el error esté originado en la forma como creo el web service en java, pero dado que me funciona bien con un programa java y con un browser lo más probable es que el problema sea con ActionScript

les anexto tanto el código ActionScript como el XML del WSDL. Algúna idea?

Código :

import mx.services.*;
/* import all of the webservices class packages.
Note: if you do not use the above import statement you will have to
call the web service with the full path (new mx.services.WebService(..) */
                                                                       
// set it up so that the service is called when the button is pressed.
result_btn.onPress = function() {
    
    // Create a new instance of web service called - stockservice.
    var stockservice = new WebService("http://192.168.0.139:8081/WebService/WService?WSDL");

    // Call the doCompanyInfo method and assign it to the pending call object to handle results.
    salida = stockservice.Hola("asdf");

    stockservice.onLoad = trace("loading");

    // the onResult function is called if the service is successful
    salida.onResult = function(result) {
      trace("adsf");    
        // example result values.  The result is a decoded actionscript object
        //version of the xml returned by the operation.
        // In this case the result is a object with company, lastPrice etc being properties.

        trace("asdf:"+result);
        //trace("yearLow: "+result.yearLow);
        
    }

    salida.onFault = function(fault) {
      
      trace("Error");
        // If there is any error such as the service not working, the onFault handler will be invoked.
          trace(fault.faultCode + "," + fault.faultstring+","+fault.element);

    }
}




Código :

   <definitions targetNamespace="http://screen/" name="WServiceService">
−
   <types>
−
   <xsd:schema>
<xsd:import schemaLocation="http://192.168.0.139:8081/WebService/WService?xsd=1" namespace="http://screen/"/>
</xsd:schema>
</types>
−
   <message name="HolaMundo">
<part element="tns:HolaMundo" name="parameters"/>
</message>
−
   <message name="HolaMundoResponse">
<part element="tns:HolaMundoResponse" name="parameters"/>
</message>
−
   <message name="Hola">
<part element="tns:Hola" name="parameters"/>
</message>
−
   <message name="HolaResponse">
<part element="tns:HolaResponse" name="parameters"/>
</message>
−
   <portType name="WService">
−
   <operation name="HolaMundo">
<input message="tns:HolaMundo"/>
<output message="tns:HolaMundoResponse"/>
</operation>
−
   <operation name="Hola">
<input message="tns:Hola"/>
<output message="tns:HolaResponse"/>
</operation>
</portType>
−
   <binding name="WServicePortBinding" type="tns:WService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
−
   <operation name="HolaMundo">
<soap:operation soapAction=""/>
−
   <input>
<soap:body use="literal"/>
</input>
−
   <output>
<soap:body use="literal"/>
</output>
</operation>
−
   <operation name="Hola">
<soap:operation soapAction=""/>
−
   <input>
<soap:body use="literal"/>
</input>
−
   <output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
−
   <service name="WServiceService">
−
   <port name="WServicePort" binding="tns:WServicePortBinding">
<soap:address location="http://192.168.0.139:8081/WebService/WService"/>
</port>
</service>
</definitions>
:(