Cliente Web Service - Funciona no Teste mas não funciona no servidor!

11 respostas
P

Caros,

Tá difícil lidar com isso! :D

Fiz um cliente de um Web Service que funciona em um teste com o main(), porém no servidor ele lança uma exceção que nem um trycatch capturando exception captura!

O cliente e o método que o consome foram criados pela própria IDE!

Alguma idéia de solução?? Vejam o erro e os códigos:

02/09/2011 14:58:37 com.sun.faces.lifecycle.InvokeApplicationPhase execute
AVISO: #{uploadController.submeterArquivo}: java.lang.Error: Undefined operation name beaInvoke
javax.faces.FacesException: #{uploadController.submeterArquivo}: java.lang.Error: Undefined operation name beaInvoke
<02/09/2011 14h58min37s BRT> <Error> <HTTP> <BEA-101017> <[ServletContext@8483338[app:AlephCarregaXML module:web path:/AlephCarregaXML spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@e76fcc[
POST /AlephCarregaXML/faces/index.xhtml HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.1) Gecko/20100101 Firefox/6.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-br,pt;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Referer: http://192.168.56.1:7001/AlephCarregaXML/faces/index.xhtml
Cookie: JSESSIONID=BBygThYXCd4RpP1n8QjpMNjt16GDpG4QMmRhwxNQJMSnYvnG68wl!-579124966
Content-Type: application/x-www-form-urlencoded
Content-Length: 115

]] Root cause of ServletException.
javax.faces.el.EvaluationException: java.lang.Error: Undefined operation name beaInvoke
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
	Truncated. see log file for complete stacktrace
Caused By: java.lang.Error: Undefined operation name beaInvoke
	at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:327)
	at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:104)
	at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:289)
	at com.sun.xml.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:762)
	at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.buildRuntimeModel(WLSProvider.java:982)
	Truncated. see log file for complete stacktrace
> 
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at weblogic.servlet.utils.FastSwapFilter.doFilter(FastSwapFilter.java:66)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: javax.faces.el.EvaluationException: java.lang.Error: Undefined operation name beaInvoke
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
	... 27 more
Caused by: java.lang.Error: Undefined operation name beaInvoke
	at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:327)
	at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:104)
	at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:289)
	at com.sun.xml.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:762)
	at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.buildRuntimeModel(WLSProvider.java:982)
	at com.sun.xml.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:746)
	at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:737)
	at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:361)
	at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.internalGetPort(WLSProvider.java:934)
	at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate$PortClientInstanceFactory.createClientInstance(WLSProvider.java:1039)
	at weblogic.wsee.jaxws.spi.ClientInstancePool.takeSimpleClientInstance(ClientInstancePool.java:376)
	at weblogic.wsee.jaxws.spi.ClientInstancePool.take(ClientInstancePool.java:232)
	at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:852)
	at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:344)
	at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:792)
	at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
	at javax.xml.ws.Service.getPort(Service.java:92)
	at br.gov.ana.integracao.webservice.DadoHidrologicoServiceImplService.beaInvokeSuper(DadoHidrologicoServiceImplService.java)
	at br.gov.ana.integracao.webservice.DadoHidrologicoServiceImplService$beaVersion0_18.getDadoHidrologicoServiceImplPort(DadoHidrologicoServiceImplService.java:56)
	at br.gov.ana.integracao.webservice.DadoHidrologicoServiceImplService.getDadoHidrologicoServiceImplPort(DadoHidrologicoServiceImplService.java)
	at br.gov.ana.carregaXML.model.services.UploadXMLSessionEJBimpl$beaVersion0_11.inserirMedicao(UploadXMLSessionEJBimpl.java:291)
	at br.gov.ana.carregaXML.model.services.UploadXMLSessionEJBimpl.inserirMedicao(UploadXMLSessionEJBimpl.java)
	at br.gov.ana.carregaXML.model.services.UploadXMLSessionEJBimpl$beaVersion0_11.submeterWebService(UploadXMLSessionEJBimpl.java:261)
	at br.gov.ana.carregaXML.model.services.UploadXMLSessionEJBimpl.submeterWebService(UploadXMLSessionEJBimpl.java)
	at br.gov.ana.carregaXML.controller.UploadController$beaVersion0_6.submeterArquivo(UploadController.java:75)
	at br.gov.ana.carregaXML.controller.UploadController.submeterArquivo(UploadController.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.el.parser.AstValue.invoke(Unknown Source)
	at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
	... 28 more

Service:

@Override
    public Map submeterWebService(EstacaoMedicaoXMLEntity entidade) {

        try {

            List<EstacaoTO> estacoes = new ArrayList<EstacaoTO>();
            String senha = entidade.getSenha();
            String login = entidade.getLogin();

            for (Estacao e : entidade.getEstacoes()) {

                EstacaoTO to = new EstacaoTO();

                to.setCodigoFlu(e.getCodigoFlu());
                to.setCodigoPlu(e.getCodigoPlu());

                for (Medicao m : e.getMedicoes()) {

                    MedicaoTO mTO = new MedicaoTO();

                    if (m.getChuva() != null) {
                        mTO.setChuva(Double.parseDouble(m.getChuva()));
                    }
                    if (m.getNivel() != null) {
                        mTO.setNivel(Double.parseDouble(m.getNivel()));
                    }
                    if (m.getVazao() != null) {
                        mTO.setVazao(Double.parseDouble(m.getVazao()));
                    }
                    mTO.setDataMedicao(m.getDataMedicao());

                    to.getMedicao().add(mTO);
                }

                estacoes.add(to);

            }

            System.out.println("\n\n\n Cheguei aqui!!! 123 \n\n\n");

            RetornoService retorno = inserirMedicao(login, senha, estacoes);

            String mensagem = retorno.getMensagem();
            Integer qtd = retorno.getQuantidadeInserida();

            Map mapa = new HashMap();

            mapa.put("mensagem", mensagem);
            mapa.put("quantidade", qtd);

            return mapa;

        } catch (Exception e) {
            System.out.println("Erro de conexão com o Web Service!!!");
            e.printStackTrace();

            String mensagem = ("Erro de Conexão com o Web Service! Erro: " + e.getMessage());
            Integer qtd = 0;

            Map mapa = new HashMap();

            mapa.put("mensagem", mensagem);
            mapa.put("quantidade", qtd);

            return mapa;
        }
    }

    private static RetornoService inserirMedicao(String login, String senha, List<EstacaoTO> estacao) {
        DadoHidrologicoServiceImplService service = new DadoHidrologicoServiceImplService();
        DadoHidrologicoService port = service.getDadoHidrologicoServiceImplPort();
        return port.inserirMedicao(login, senha, estacao);
    }

Classe que testa o cliente:

package br.gov.ana.carregaXML.model.services;
public class TestaClient {

    public static void main(String[] args) {

        List<EstacaoTO> estacoes = new ArrayList<EstacaoTO>();
        String senha = "#####";
        String login = "#####";

        DadoHidrologicoServiceImplService dadoHidrologicoServiceImplService = new DadoHidrologicoServiceImplService();
        DadoHidrologicoService clientWebService =
                dadoHidrologicoServiceImplService.getDadoHidrologicoServiceImplPort();

        EstacaoTO to = new EstacaoTO();

        to.setCodigoFlu("12345678");
        to.setCodigoPlu("87654321");

        MedicaoTO mTO = new MedicaoTO();
        mTO.setChuva(new Double(15));
        mTO.setNivel(new Double(16));
        mTO.setVazao(new Double(17));
        mTO.setDataMedicao("16/01/1984");

        to.getMedicao().add(mTO);

        estacoes.add(to);

        System.out.println("\n\n\n Cheguei aqui!!! 123 \n\n\n");

        RetornoService retorno = clientWebService.inserirMedicao(login, senha, estacoes);

        String mensagem = retorno.getMensagem();
        Integer qtd = retorno.getQuantidadeInserida();

        System.out.println("Resposta do Servidor: " + mensagem + " quantidade inserida: " + qtd);


        DadoHidrologicoServiceImplService service = new DadoHidrologicoServiceImplService();
        DadoHidrologicoService port = service.getDadoHidrologicoServiceImplPort();
        RetornoService retorno2 = port.inserirMedicao(login, senha, estacoes);
        
        
        mensagem = retorno2.getMensagem();
        qtd = retorno2.getQuantidadeInserida();
        
        System.out.println("Resposta do Servidor2: " + mensagem + " quantidade inserida: " + qtd);
    }
}

Thx,
PH

11 Respostas

A

Hipóteses:

  1. O servidor não enxerga a máquina onde o WS está disponibilizado;
  2. O servidor enxerga um load balancer que acaba redirecionando para outra máquina que não a máquina certa;
  3. O web service de fato não tem uma operação beaInvoke.
  4. Os parâmetros para a operação beaInvoke mudaram entre o teste e a disponibilização no servidor.

Enfim… ajudaria se você mostrasse um WSDL e/ou uma especificação um pouco mais detalhada da sua arquitetura.

[]'s

P

O que é interessante saber da arquitetura?

O WSDL - http://smh.ana.gov.br:8090/ws-telemetria/services .

O arquivo WSDL na minha maquina:

<?xml version='1.0' encoding='utf-8'?><wsdl:definitions name="DadoHidrologicoServiceImplService" targetNamespace="http://webservice.integracao.ana.gov.br/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.integracao.ana.gov.br/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://webservice.integracao.ana.gov.br/" xmlns:tns="http://webservice.integracao.ana.gov.br/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="retornoService"> <xs:sequence> <xs:element minOccurs="0" name="mensagem" type="xs:string"></xs:element> <xs:element name="quantidadeInserida" type="xs:int"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="estacaoTO"> <xs:sequence> <xs:element minOccurs="0" name="codigoFlu" type="xs:string"></xs:element> <xs:element minOccurs="0" name="codigoPlu" type="xs:string"></xs:element> <xs:element maxOccurs="unbounded" minOccurs="0" name="medicao" nillable="true" type="tns:medicaoTO"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="medicaoTO"> <xs:sequence> <xs:element minOccurs="0" name="chuva" type="xs:double"></xs:element> <xs:element minOccurs="0" name="dataMedicao" type="xs:string"></xs:element> <xs:element minOccurs="0" name="nivel" type="xs:double"></xs:element> <xs:element minOccurs="0" name="vazao" type="xs:double"></xs:element> </xs:sequence> </xs:complexType> <xs:element name="consultarMedicao" type="tns:consultarMedicao"></xs:element> <xs:complexType name="consultarMedicao"> <xs:sequence> <xs:element minOccurs="0" name="login" type="xs:string"></xs:element> <xs:element minOccurs="0" name="senha" type="xs:string"></xs:element> <xs:element minOccurs="0" name="codigoPLU" type="xs:string"></xs:element> <xs:element minOccurs="0" name="codigoFLU" type="xs:string"></xs:element> <xs:element minOccurs="0" name="dataInicial" type="xs:string"></xs:element> <xs:element minOccurs="0" name="dataFinal" type="xs:string"></xs:element> </xs:sequence> </xs:complexType> <xs:element name="consultarMedicaoResponse" type="tns:consultarMedicaoResponse"></xs:element> <xs:complexType name="consultarMedicaoResponse"> <xs:sequence> <xs:element minOccurs="0" name="retorno" type="tns:retornoService"></xs:element> </xs:sequence> </xs:complexType> <xs:element name="inserirMedicao" type="tns:inserirMedicao"></xs:element> <xs:complexType name="inserirMedicao"> <xs:sequence> <xs:element minOccurs="0" name="login" type="xs:string"></xs:element> <xs:element minOccurs="0" name="senha" type="xs:string"></xs:element> <xs:element maxOccurs="unbounded" minOccurs="0" name="estacao" type="tns:estacaoTO"></xs:element> </xs:sequence> </xs:complexType> <xs:element name="inserirMedicaoResponse" type="tns:inserirMedicaoResponse"></xs:element> <xs:complexType name="inserirMedicaoResponse"> <xs:sequence> <xs:element minOccurs="0" name="retorno" type="tns:retornoService"></xs:element> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types> <wsdl:message name="inserirMedicaoResponse"> <wsdl:part element="tns:inserirMedicaoResponse" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="inserirMedicao"> <wsdl:part element="tns:inserirMedicao" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="consultarMedicao"> <wsdl:part element="tns:consultarMedicao" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="consultarMedicaoResponse"> <wsdl:part element="tns:consultarMedicaoResponse" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:portType name="DadoHidrologicoService"> <wsdl:operation name="consultarMedicao"> <wsdl:input message="tns:consultarMedicao" name="consultarMedicao"> </wsdl:input> <wsdl:output message="tns:consultarMedicaoResponse" name="consultarMedicaoResponse"> </wsdl:output> </wsdl:operation> <wsdl:operation name="inserirMedicao"> <wsdl:input message="tns:inserirMedicao" name="inserirMedicao"> </wsdl:input> <wsdl:output message="tns:inserirMedicaoResponse" name="inserirMedicaoResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="DadoHidrologicoServiceImplServiceSoapBinding" type="tns:DadoHidrologicoService"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding> <wsdl:operation name="consultarMedicao"> <soap:operation soapAction="" style="document"></soap:operation> <wsdl:input name="consultarMedicao"> <soap:body use="literal"></soap:body> </wsdl:input> <wsdl:output name="consultarMedicaoResponse"> <soap:body use="literal"></soap:body> </wsdl:output> </wsdl:operation> <wsdl:operation name="inserirMedicao"> <soap:operation soapAction="" style="document"></soap:operation> <wsdl:input name="inserirMedicao"> <soap:body use="literal"></soap:body> </wsdl:input> <wsdl:output name="inserirMedicaoResponse"> <soap:body use="literal"></soap:body> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="DadoHidrologicoServiceImplService"> <wsdl:port binding="tns:DadoHidrologicoServiceImplServiceSoapBinding" name="DadoHidrologicoServiceImplPort"> <soap:address location="http://smh.ana.gov.br:8090/ws-telemetria/services/inserirMedicoes"></soap:address> </wsdl:port> </wsdl:service> </wsdl:definitions>

A

Me parece que os dois (sua máquina e o servidor) enxergam o mesmo serviço, certo? Então, isso te leva às hipóteses 1 e 2.

P.S: Não conseguí abrir o WSDL na minha máquina. Isso te diz alguma coisa?

Edit: Seria interessante, também, você postar quais métodos você tem disponíveis no seu cliente.

[]'s

P
asaudate:
Me parece que os dois (sua máquina e o servidor) enxergam o mesmo serviço, certo? Então, isso te leva às hipóteses 1 e 2.

P.S: Não conseguí abrir o WSDL na minha máquina. Isso te diz alguma coisa?

Edit: Seria interessante, também, você postar quais métodos você tem disponíveis no seu cliente.

[]'s

Não quer dizer muita coisa, aqui na rede eu tenho acesso!

Não conheço sobre esse load balancer, mas o servidor também está na minha maquina. Me parece que ele também teria que ter acesso ao web service não?

Anexei o código de todas as classes envolvidas!

Thx,
PH

Outras classes envolvidas:

@WebServiceClient(name = "DadoHidrologicoServiceImplService", targetNamespace = "http://webservice.integracao.ana.gov.br/", wsdlLocation = "http://smh.ana.gov.br:8090/ws-telemetria/services/inserirMedicoes?wsdl")
public class DadoHidrologicoServiceImplService
    extends Service
{

    private final static URL DADOHIDROLOGICOSERVICEIMPLSERVICE_WSDL_LOCATION;
    private final static WebServiceException DADOHIDROLOGICOSERVICEIMPLSERVICE_EXCEPTION;
    private final static QName DADOHIDROLOGICOSERVICEIMPLSERVICE_QNAME = new QName("http://webservice.integracao.ana.gov.br/", "DadoHidrologicoServiceImplService");

    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("http://smh.ana.gov.br:8090/ws-telemetria/services/inserirMedicoes?wsdl");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        DADOHIDROLOGICOSERVICEIMPLSERVICE_WSDL_LOCATION = url;
        DADOHIDROLOGICOSERVICEIMPLSERVICE_EXCEPTION = e;
    }

    public DadoHidrologicoServiceImplService() {
        super(__getWsdlLocation(), DADOHIDROLOGICOSERVICEIMPLSERVICE_QNAME);
    }

    public DadoHidrologicoServiceImplService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    /**
     * 
     * @return
     *     returns DadoHidrologicoService
     */
    @WebEndpoint(name = "DadoHidrologicoServiceImplPort")
    public DadoHidrologicoService getDadoHidrologicoServiceImplPort() {
        return super.getPort(new QName("http://webservice.integracao.ana.gov.br/", "DadoHidrologicoServiceImplPort"), DadoHidrologicoService.class);
    }

    /**
     * 
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return
     *     returns DadoHidrologicoService
     */
    @WebEndpoint(name = "DadoHidrologicoServiceImplPort")
    public DadoHidrologicoService getDadoHidrologicoServiceImplPort(WebServiceFeature... features) {
        return super.getPort(new QName("http://webservice.integracao.ana.gov.br/", "DadoHidrologicoServiceImplPort"), DadoHidrologicoService.class, features);
    }

    private static URL __getWsdlLocation() {
        if (DADOHIDROLOGICOSERVICEIMPLSERVICE_EXCEPTION!= null) {
            throw DADOHIDROLOGICOSERVICEIMPLSERVICE_EXCEPTION;
        }
        return DADOHIDROLOGICOSERVICEIMPLSERVICE_WSDL_LOCATION;
    }

}
/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2-hudson-752-
 * Generated source version: 2.1
 * 
 */
@WebService(name = "DadoHidrologicoService", targetNamespace = "http://webservice.integracao.ana.gov.br/")
@XmlSeeAlso({
    ObjectFactory.class
})
public interface DadoHidrologicoService {


    /**
     * 
     * @param dataFinal
     * @param codigoPLU
     * @param dataInicial
     * @param login
     * @param senha
     * @param codigoFLU
     * @return
     *     returns br.gov.ana.integracao.webservice.RetornoService
     */
    @WebMethod
    @WebResult(name = "retorno", targetNamespace = "")
    @RequestWrapper(localName = "consultarMedicao", targetNamespace = "http://webservice.integracao.ana.gov.br/", className = "br.gov.ana.integracao.webservice.ConsultarMedicao")
    @ResponseWrapper(localName = "consultarMedicaoResponse", targetNamespace = "http://webservice.integracao.ana.gov.br/", className = "br.gov.ana.integracao.webservice.ConsultarMedicaoResponse")
    public RetornoService consultarMedicao(
        @WebParam(name = "login", targetNamespace = "")
        String login,
        @WebParam(name = "senha", targetNamespace = "")
        String senha,
        @WebParam(name = "codigoPLU", targetNamespace = "")
        String codigoPLU,
        @WebParam(name = "codigoFLU", targetNamespace = "")
        String codigoFLU,
        @WebParam(name = "dataInicial", targetNamespace = "")
        String dataInicial,
        @WebParam(name = "dataFinal", targetNamespace = "")
        String dataFinal);

    /**
     * 
     * @param estacao
     * @param login
     * @param senha
     * @return
     *     returns br.gov.ana.integracao.webservice.RetornoService
     */
    @WebMethod
    @WebResult(name = "retorno", targetNamespace = "")
    @RequestWrapper(localName = "inserirMedicao", targetNamespace = "http://webservice.integracao.ana.gov.br/", className = "br.gov.ana.integracao.webservice.InserirMedicao")
    @ResponseWrapper(localName = "inserirMedicaoResponse", targetNamespace = "http://webservice.integracao.ana.gov.br/", className = "br.gov.ana.integracao.webservice.InserirMedicaoResponse")
    public RetornoService inserirMedicao(
        @WebParam(name = "login", targetNamespace = "")
        String login,
        @WebParam(name = "senha", targetNamespace = "")
        String senha,
        @WebParam(name = "estacao", targetNamespace = "")
        List<EstacaoTO> estacao);

}
/**
 * <p>Java class for retornoService complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="retornoService">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="mensagem" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="quantidadeInserida" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "retornoService", propOrder = {
    "mensagem",
    "quantidadeInserida"
})
public class RetornoService {

    protected String mensagem;
    protected int quantidadeInserida;

    /**
     * Gets the value of the mensagem property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getMensagem() {
        return mensagem;
    }

    /**
     * Sets the value of the mensagem property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setMensagem(String value) {
        this.mensagem = value;
    }

    /**
     * Gets the value of the quantidadeInserida property.
     * 
     */
    public int getQuantidadeInserida() {
        return quantidadeInserida;
    }

    /**
     * Sets the value of the quantidadeInserida property.
     * 
     */
    public void setQuantidadeInserida(int value) {
        this.quantidadeInserida = value;
    }

}
/**
 * <p>Java class for estacaoTO complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="estacaoTO">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="codigoFlu" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="codigoPlu" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="medicao" type="{http://webservice.integracao.ana.gov.br/}medicaoTO" maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "estacaoTO", propOrder = {
    "codigoFlu",
    "codigoPlu",
    "medicao"
})
public class EstacaoTO {

    protected String codigoFlu;
    protected String codigoPlu;
    @XmlElement(nillable = true)
    protected List<MedicaoTO> medicao;

    /**
     * Gets the value of the codigoFlu property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getCodigoFlu() {
        return codigoFlu;
    }

    /**
     * Sets the value of the codigoFlu property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCodigoFlu(String value) {
        this.codigoFlu = value;
    }

    /**
     * Gets the value of the codigoPlu property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getCodigoPlu() {
        return codigoPlu;
    }

    /**
     * Sets the value of the codigoPlu property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCodigoPlu(String value) {
        this.codigoPlu = value;
    }

    /**
     * Gets the value of the medicao property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the medicao property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getMedicao().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link MedicaoTO }
     * 
     * 
     */
    public List<MedicaoTO> getMedicao() {
        if (medicao == null) {
            medicao = new ArrayList<MedicaoTO>();
        }
        return this.medicao;
    }

}
/**
 * <p>Java class for medicaoTO complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="medicaoTO">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="chuva" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
 *         &lt;element name="dataMedicao" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="nivel" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
 *         &lt;element name="vazao" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "medicaoTO", propOrder = {
    "chuva",
    "dataMedicao",
    "nivel",
    "vazao"
})
public class MedicaoTO {

    protected Double chuva;
    protected String dataMedicao;
    protected Double nivel;
    protected Double vazao;

    /**
     * Gets the value of the chuva property.
     * 
     * @return
     *     possible object is
     *     {@link Double }
     *     
     */
    public Double getChuva() {
        return chuva;
    }

    /**
     * Sets the value of the chuva property.
     * 
     * @param value
     *     allowed object is
     *     {@link Double }
     *     
     */
    public void setChuva(Double value) {
        this.chuva = value;
    }

    /**
     * Gets the value of the dataMedicao property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getDataMedicao() {
        return dataMedicao;
    }

    /**
     * Sets the value of the dataMedicao property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setDataMedicao(String value) {
        this.dataMedicao = value;
    }

    /**
     * Gets the value of the nivel property.
     * 
     * @return
     *     possible object is
     *     {@link Double }
     *     
     */
    public Double getNivel() {
        return nivel;
    }

    /**
     * Sets the value of the nivel property.
     * 
     * @param value
     *     allowed object is
     *     {@link Double }
     *     
     */
    public void setNivel(Double value) {
        this.nivel = value;
    }

    /**
     * Gets the value of the vazao property.
     * 
     * @return
     *     possible object is
     *     {@link Double }
     *     
     */
    public Double getVazao() {
        return vazao;
    }

    /**
     * Sets the value of the vazao property.
     * 
     * @param value
     *     allowed object is
     *     {@link Double }
     *     
     */
    public void setVazao(Double value) {
        this.vazao = value;
    }

}
A

A URL http://smh.ana.gov.br:8090/ws-telemetria/services/inserirMedicoes?wsdl abre na sua máquina? Você usa alguma espécie de VPN para abrir, ou coisa assim? Como você gerou o cliente, com o arquivo do WSDL ou referenciando a URL? E o que é a operação beaInvoke?

[]'s

P

asaudate:
A URL http://smh.ana.gov.br:8090/ws-telemetria/services/inserirMedicoes?wsdl abre na sua máquina? Você usa alguma espécie de VPN para abrir, ou coisa assim? Como você gerou o cliente, com o arquivo do WSDL ou referenciando a URL? E o que é a operação beaInvoke?

[]'s

Cara,

Eu abro a URL aqui tranquilamente!
Não existe uma VPN aqui!
eu gerei o client utilizando o wizard do Netbeans e apontando a URL!

Essa operação beaInvoke não faz parte da minha codificação, já fiz um search por ela mas não retorna nada!

Pode ser algo em relação a JDK e JRocket???

A

palerique:
asaudate:
A URL http://smh.ana.gov.br:8090/ws-telemetria/services/inserirMedicoes?wsdl abre na sua máquina? Você usa alguma espécie de VPN para abrir, ou coisa assim? Como você gerou o cliente, com o arquivo do WSDL ou referenciando a URL? E o que é a operação beaInvoke?

[]'s

Cara,

Eu abro a URL aqui tranquilamente!
Não existe uma VPN aqui!
eu gerei o client utilizando o wizard do Netbeans e apontando a URL!

Estou estranhando bastante por não conseguir abrir aqui…

palerique:

Essa operação beaInvoke não faz parte da minha codificação, já fiz um search por ela mas não retorna nada!

Pode ser algo em relação a JDK e JRocket???

É uma possibilidade. Acho difícil, na realidade, mas não custava nada fazer o teste. São VM’s diferentes, o servidor e o seu desenvolvimento?

[]'s

P

asaudate:
palerique:
asaudate:
A URL http://smh.ana.gov.br:8090/ws-telemetria/services/inserirMedicoes?wsdl abre na sua máquina? Você usa alguma espécie de VPN para abrir, ou coisa assim? Como você gerou o cliente, com o arquivo do WSDL ou referenciando a URL? E o que é a operação beaInvoke?

[]'s

Cara,

Eu abro a URL aqui tranquilamente!
Não existe uma VPN aqui!
eu gerei o client utilizando o wizard do Netbeans e apontando a URL!

Estou estranhando bastante por não conseguir abrir aqui…

palerique:

Essa operação beaInvoke não faz parte da minha codificação, já fiz um search por ela mas não retorna nada!

Pode ser algo em relação a JDK e JRocket???

É uma possibilidade. Acho difícil, na realidade, mas não custava nada fazer o teste. São VM’s diferentes, o servidor e o seu desenvolvimento?

[]'s

Uploaded with ImageShack.us

Acabei de saber que no servidor o JRockit é utilizado, mas testei localmente e não faz diferença utilizar um ou outro!

:frowning:

A

Como assim, “acabou de saber”? O servidor não está rodando na sua própria máquina?

P

Sim, mas é uma cópia do que utilizamos em desenvolvimento e em produção.

Instalei na minha maquina para não ter que ficar fazendo deploy nos “oficiais”.

Descobri porque fuçando nos diretórios do servidor achei um do jrockit.

P

O Banshee não serve pra mim?

Criado 2 de setembro de 2011
Ultima resposta 2 de set. de 2011
Respostas 11
Participantes 2