Como receber array de objeto SOAP complexType pelo Java? . Axis2 não gera as classes completas, Somente deste wsdl.

07/12/2018

6

https://farmaciapopular-autorizador.saude.gov.br/farmaciapopular-autorizador/services/ServicoSolicitacaoWS?wsdl


<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://service.datasus.org/" xmlns:intf="http://service.datasus.org/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://service.datasus.org/">
 <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)
-->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://service.datasus.org/">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="PesquisaDTO">
<sequence>
<element name="dataFim" nillable="true" type="xsd:dateTime"/>
<element name="dataInicio" nillable="true" type="xsd:dateTime"/>
<element name="nuCnpj" nillable="true" type="xsd:string"/>
<element name="nuCnpjMatriz" nillable="true" type="xsd:string"/>
<element name="numeroPagina" type="xsd:int"/>
<element name="statusTransacao" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="UsuarioDTO">
<sequence>
<element name="senhaFarmacia" nillable="true" type="xsd:string"/>
<element name="senhaVendedor" nillable="true" type="xsd:string"/>
<element name="usuarioFarmacia" nillable="true" type="xsd:string"/>
<element name="usuarioVendedor" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="UsuarioFarmaciaDTO">
<complexContent>
<extension base="impl:UsuarioDTO">
<sequence/>
</extension>
</complexContent>
</complexType>
<complexType name="MedicamentoDTO">
<sequence>
<element name="coCodigoBarra" nillable="true" type="xsd:string"/>
<element name="dsUnidApresentacao" nillable="true" type="xsd:string"/>
<element name="inAutorizacaoEstorno" nillable="true" type="xsd:string"/>
<element name="inAutorizacaoMedicamento" nillable="true" type="xsd:string"/>
<element name="qtAutorizada" type="xsd:double"/>
<element name="qtDevolvida" type="xsd:double"/>
<element name="qtEstornada" type="xsd:double"/>
<element name="qtPrescrita" type="xsd:double"/>
<element name="qtSolicitada" type="xsd:double"/>
<element name="statusTransacao" nillable="true" type="xsd:string"/>
<element name="vlPrecoSubsidiadoMS" type="xsd:double"/>
<element name="vlPrecoSubsidiadoPaciente" type="xsd:double"/>
<element name="vlPrecoSubsidiadoPacientePosEstorno" type="xsd:double"/>
<element name="vlPrecoVenda" type="xsd:double"/>
<element name="vlrSubsidiadoMSPosEstorno" type="xsd:double"/>
<element name="vlrTotalVendaPosEstorno" type="xsd:double"/>
</sequence>
</complexType>
<complexType name="ArrayOfMedicamentoDTO">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="impl:MedicamentoDTO[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ItemPesquisaDTO">
<sequence>
<element name="arrMedicamentoDTO" nillable="true" type="impl:ArrayOfMedicamentoDTO"/>
<element name="coSolicitacaoFarmacia" nillable="true" type="xsd:string"/>
<element name="dtAutorizacao" nillable="true" type="xsd:dateTime"/>
<element name="dtRecebimento" nillable="true" type="xsd:dateTime"/>
<element name="dtSolicitacao" nillable="true" type="xsd:dateTime"/>
<element name="nuAutorizacao" nillable="true" type="xsd:string"/>
<element name="nuCpf" nillable="true" type="xsd:string"/>
<element name="nuCrm" nillable="true" type="xsd:string"/>
<element name="nuCupomFiscal" nillable="true" type="xsd:string"/>
<element name="sgUfCrm" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfItemPesquisaDTO">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="impl:ItemPesquisaDTO[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="RetornoPesquisaDTO">
<sequence>
<element name="arrItemPesquisaDTO" nillable="true" type="impl:ArrayOfItemPesquisaDTO"/>
<element name="codigoRetorno" nillable="true" type="xsd:string"/>
<element name="dataFim" nillable="true" type="xsd:dateTime"/>
<element name="dataInicio" nillable="true" type="xsd:dateTime"/>
<element name="mensagemRetorno" nillable="true" type="xsd:string"/>
<element name="nuCnpj" nillable="true" type="xsd:string"/>
<element name="nuCnpjMatriz" nillable="true" type="xsd:string"/>
<element name="numeroPagina" type="xsd:int"/>
<element name="quantidadePaginas" type="xsd:int"/>
<element name="statusTransacao" nillable="true" type="xsd:string"/>
<element name="totalTransacoes" type="xsd:int"/>
<element name="totalTransacoesPagina" type="xsd:int"/>
</sequence>
</complexType>
<complexType name="EstornoDTO">
<sequence>
<element name="arrMedicamentoDTO" nillable="true" type="impl:ArrayOfMedicamentoDTO"/>
<element name="nuAutorizacao" nillable="true" type="xsd:string"/>
<element name="nuCnpj" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ConfirmacaoEstornoDTO">
<sequence>
<element name="arrMedicamentoDTO" nillable="true" type="impl:ArrayOfMedicamentoDTO"/>
<element name="descMensagemErro" nillable="true" type="xsd:string"/>
<element name="inSituacaoEstorno" nillable="true" type="xsd:string"/>
<element name="nuEstorno" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="SolicitacaoDTO">
<sequence>
<element name="arrMedicamentoDTO" nillable="true" type="impl:ArrayOfMedicamentoDTO"/>
<element name="coSolicitacaoFarmacia" nillable="true" type="xsd:string"/>
<element name="dnaEstacao" nillable="true" type="xsd:string"/>
<element name="dtEmissaoReceita" nillable="true" type="xsd:dateTime"/>
<element name="nuCnpj" nillable="true" type="xsd:string"/>
<element name="nuCpf" nillable="true" type="xsd:string"/>
<element name="nuCrm" nillable="true" type="xsd:string"/>
<element name="sgUfCrm" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="AutorizacaoDTO">
<sequence>
<element name="arrMedicamentoDTO" nillable="true" type="impl:ArrayOfMedicamentoDTO"/>
<element name="coSolicitacaoFarmacia" nillable="true" type="xsd:string"/>
<element name="descMensagemErro" nillable="true" type="xsd:string"/>
<element name="inAutorizacaoSolicitacao" nillable="true" type="xsd:string"/>
<element name="noPessoa" nillable="true" type="xs


 
    public static void main(String[] args) {
        try {
            SolicitacaoDTO solicitacaoDTO = new SolicitacaoDTO();

            ArrayOfMedicamentoDTO m = new ArrayOfMedicamentoDTO();
             
            solicitacaoDTO.setArrMedicamentoDTO(m);
            solicitacaoDTO.setCoSolicitacaoFarmacia("?");
            solicitacaoDTO.setDnaEstacao("?");
            solicitacaoDTO.setDtEmissaoReceita(Calendar.getInstance());
            solicitacaoDTO.setNuCnpj("?");
            solicitacaoDTO.setNuCpf("?");
            solicitacaoDTO.setNuCrm("?");
            solicitacaoDTO.setSgUfCrm("?");

            UsuarioFarmaciaDTO usuarioFarmaciaDTO = new UsuarioFarmaciaDTO();
            usuarioFarmaciaDTO.setSenhaFarmacia("?");
            usuarioFarmaciaDTO.setSenhaVendedor("?");
            usuarioFarmaciaDTO.setUsuarioFarmacia("?");                         
            usuarioFarmaciaDTO.setUsuarioVendedor("?");                         
            
             String wsdl = "https://farmaciapopular-autorizador.saude.gov.br/farmaciapopular-autorizador/services/ServicoSolicitacaoWS";
             ServicoSolicitacaoWSServiceStub s = new ServicoSolicitacaoWSServiceStub(wsdl );
                   
            ExecutarSolicitacao h = new ExecutarSolicitacao();
            h.setIn0(solicitacaoDTO);
            h.setIn1(usuarioFarmaciaDTO);

            s.executarSolicitacao(h);
        } catch (Exception ex) {
            Logger.getLogger(FPopExecutarSolicitacao.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
Responder
×
+1 DevUP
Acesso diário, +1 DevUP
Parabéns, você está investindo na sua carreira