SOAP Response Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santycalde
    New Member
    • Sep 2007
    • 1

    SOAP Response Error

    Hi!!

    I am executing a call to a webservice with SOAP and the following mistake takes place:

    [SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to deserialize a 'http://PkgFechaSistema Sync:ns1:out' using encoding style 'http://schemas.xmlsoap .org/soap/encoding/'.; targetException =java.lang.Ille galArgumentExce ption: No Deserializer found to deserialize a 'http://PkgFechaSistema Sync:ns1:out' using encoding style 'http://schemas.xmlsoap .org/soap/encoding/'.]

    The XML of the wsdl is:

    <?xml version="1.0" encoding="UTF-8" ?>
    - <wsdl:definitio ns targetNamespace ="http://PkgFechaSistema Sync" xmlns:tns ="http://PkgFechaSistema Sync" xmlns:wsdlsoap= "http://schemas.xmlsoap .org/wsdl/soap/ " xmlns:soap12=" http://www.w3.org/2003/05/soap-envelope" xmlns:xsd ="http://www.w3.org/2001/XMLSchema " xmlns:soapenc11 =" http://schemas.xmlsoap .org/soap/encoding/" xmlns:soapenc12 ="http://www.w3.org/2003/05/soap-encoding" xmlns:soap11="h ttp://schemas.xmlsoap .org/soap/envelope/ " xmlns:wsdl=" http://schemas.xmlsoap .org/wsdl/">
    - <wsdl:types>
    - <xsd:schema xmlns:xsd ="http://www.w3.org/2001/XMLSchema" attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" targetNamespace ="http://PkgFechaSistema Sync">
    - <xsd:element name=" FechaActualSist ema">
    < xsd:complexType />
    </xsd:element >
    - <xsd:element name=" FechaActualSist emaResponse">
    - <xsd:complexTyp e>
    - <xsd:sequence >
    < xsd:element maxOccurs="1" minOccurs="1" name ="out" nillable ="true" type="xsd:strin g " />
    </xsd:sequence >
    </xsd:complexType >
    </xsd:element >
    </xsd:schema >
    </wsdl:types >
    - <wsdl:message name=" FechaActualSist emaResponse">
    < wsdl:part name="parameter s" element="tns:Fe chaActualSistem aResponse" />
    </wsdl:message >
    - <wsdl:message name=" FechaActualSist emaRequest">
    < wsdl:part name="parameter s" element="tns:Fe chaActualSistem a" />
    </wsdl:message >
    - <wsdl:portTyp e name=" WSFechaSistemaS yncPortType">
    - <wsdl:operati on name=" FechaActualSist ema">
    < wsdl:input name="FechaActu alSistemaReques t" message="tns:Fe chaActualSistem aRequest" />
    < wsdl:output name="FechaActu alSistemaRespon se" message="tns:Fe chaActualSistem aResponse" />
    </wsdl:operation >
    </wsdl:portType >
    - <wsdl:binding name=" WSFechaSistemaS yncHttpBinding" type="tns:WSFec haSistemaSyncPo rtType ">
    < wsdlsoap:bindin g style="document " transport="http ://schemas.xmlsoap .org/soap/http " />
    - <wsdl:operati on name=" FechaActualSist ema">
    < wsdlsoap:operat ion soapAction="" />
    - <wsdl:input name=" FechaActualSist emaRequest">
    < wsdlsoap:body use="literal" />
    </wsdl:input >
    - <wsdl:output name=" FechaActualSist emaResponse">
    < wsdlsoap:body use="literal" />
    </wsdl:output >
    </wsdl:operation >
    </wsdl:binding >
    - <wsdl:service name=" WSFechaSistemaS ync">
    - <wsdl:port name=" WSFechaSistemaS yncHttpPort" binding="tns:WS FechaSistemaSyn cHttpBinding ">
    < wsdlsoap:addres s location=" http://172.16.98.56:70 01/WSFechaSistemaS ync/services/WSFechaSistemaS ync" />
    </wsdl:port >
    </wsdl:service >
    </wsdl:definition s >

    The make call implementacion:

    //Obtener la URL de Configuración
    URL url = new URL("http://172.16.98.56:70 01/WSFechaSistemaS ync/services/WSFechaSistemaS ync");
    //URL url = new URL(rutaURL);

    //logger.pintarTr aza("Antes de LLamar a un Objeto SOAP");

    Call call = new Call();

    //logger.pintarTr aza("Despues de LLamar a un Objeto SOAP");

    SOAPMappingRegi stry soap = new SOAPMappingRegi stry();
    soap.mapTypes(C onstants.NS_URI _SOAP_ENC, new QName("http://PkgFechaSistema Sync","xsd:stri ng"),
    String.class, null, new StringDeseriali zer());

    call.setSOAPMap pingRegistry(so ap);

    //Obtener la URI de Configuración
    //call.setTargetO bjectURI(operat ion);
    call.setTargetO bjectURI("http://PkgFechaSistema Sync");

    //Obtener el Método de Invocación de Configuración
    call.setMethodN ame("ejecutaEJB ");

    call.setEncodin gStyleURI(Const ants.NS_URI_SOA P_ENC);

    Vector params = new Vector();

    for (int j=0; j<parametros.le ngth; j++) {
    params.addEleme nt(new Parameter("in"+ j, String.class,
    kaka[j], null));
    }

    call.setParams( params);

    try {

    Response response = call.invoke(url ,"http://PkgFechaSistema Sync");

    } catch (SOAPException ex) {
    logger.pintarTr aza("Error en la Clase: AccesoWebServic e - Método: accederWebServi ce" + ex.getMessage() );
    ex.printStackTr ace();
    }
Working...