Don't you need to put "http://www.ana.gov.br"; into the qnames for the
service and port?

2009/9/15 Walter Mourão <[email protected]>

> Hi folks,
> the following code:
>
>    DynamicClientFactory dcf = DynamicClientFactory.newInstance();
>    Client client = dcf.createClient(new URL("
> http://hidroweb.ana.gov.br/fcthservices/FCTH.asmx?WSDL";),new
> QName("FCTHService"), new QName("FCTHServiceSoap"));
>
> throws *org.apache.cxf.service.factory.ServiceConstructionException: Could
> not find definition for service FCTHService.*
>
> I added the wsdl below, after the e-mail message.
>
> I could not understand what I'm doing wrong... Could you please help me ?
>
> Thanks in advance,
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>
> wsdl:
>
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:s="http://www.w3.org/2001/XMLSchema";
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:tns="http://www.ana.gov.br";
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> targetNamespace="http://www.ana.gov.br";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
>
>  <wsdl:types>
>    <s:schema elementFormDefault="qualified"
> targetNamespace="http://www.ana.gov.br";>
>
>      <s:element name="Estacoes">
>        <s:complexType>
>
>          <s:sequence>
>            <s:element minOccurs="0" maxOccurs="1"
> name="strDataInicial" type="s:string" />
>
>            <s:element minOccurs="0" maxOccurs="1" name="strDataFinal"
> type="s:string" />
>
>          </s:sequence>
>
>        </s:complexType>
>      </s:element>
>      <s:element name="EstacoesResponse">
>
>        <s:complexType>
>          <s:sequence>
>            <s:element minOccurs="0" maxOccurs="1" name="EstacoesResult">
>
>              <s:complexType mixed="true">
>                <s:sequence>
>
>                  <s:any />
>
>                </s:sequence>
>              </s:complexType>
>
>            </s:element>
>          </s:sequence>
>        </s:complexType>
>
>      </s:element>
>
>    </s:schema>
>  </wsdl:types>
>  <wsdl:message name="EstacoesSoapIn">
>
>    <wsdl:part name="parameters" element="tns:Estacoes" />
>
>  </wsdl:message>
>
>  <wsdl:message name="EstacoesSoapOut">
>    <wsdl:part name="parameters" element="tns:EstacoesResponse" />
>
>  </wsdl:message>
>  <wsdl:message name="EstacoesHttpGetIn">
>
>    <wsdl:part name="strDataInicial" type="s:string" />
>
>    <wsdl:part name="strDataFinal" type="s:string" />
>
>  </wsdl:message>
>
>  <wsdl:message name="EstacoesHttpGetOut">
>
>    <wsdl:part name="Body" />
>  </wsdl:message>
>
>  <wsdl:message name="EstacoesHttpPostIn">
>
>    <wsdl:part name="strDataInicial" type="s:string" />
>
>    <wsdl:part name="strDataFinal" type="s:string" />
>
>  </wsdl:message>
>  <wsdl:message name="EstacoesHttpPostOut">
>
>    <wsdl:part name="Body" />
>
>  </wsdl:message>
>
>  <wsdl:portType name="FCTHServiceSoap">
>    <wsdl:operation name="Estacoes">
>
>      <documentation xmlns="http://schemas.xmlsoap.org/wsdl/";>Retorna
> as estações de São Paulo do HIDRO no formato XML. Deve ser informado:
> a data inicial (DD/MM/AAAA), e data final (DD/MM/AAAA)</documentation>
>
>      <wsdl:input message="tns:EstacoesSoapIn" />
>      <wsdl:output message="tns:EstacoesSoapOut" />
>
>    </wsdl:operation>
>  </wsdl:portType>
>
>  <wsdl:portType name="FCTHServiceHttpGet">
>
>    <wsdl:operation name="Estacoes">
>
>      <documentation xmlns="http://schemas.xmlsoap.org/wsdl/";>Retorna
> as estações de São Paulo do HIDRO no formato XML. Deve ser informado:
> a data inicial (DD/MM/AAAA), e data final (DD/MM/AAAA)</documentation>
>
>      <wsdl:input message="tns:EstacoesHttpGetIn" />
>      <wsdl:output message="tns:EstacoesHttpGetOut" />
>
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:portType name="FCTHServiceHttpPost">
>
>    <wsdl:operation name="Estacoes">
>
>      <documentation xmlns="http://schemas.xmlsoap.org/wsdl/";>Retorna
> as estações de São Paulo do HIDRO no formato XML. Deve ser informado:
> a data inicial (DD/MM/AAAA), e data final (DD/MM/AAAA)</documentation>
>
>      <wsdl:input message="tns:EstacoesHttpPostIn" />
>      <wsdl:output message="tns:EstacoesHttpPostOut" />
>
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:binding name="FCTHServiceSoap" type="tns:FCTHServiceSoap">
>
>    <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
> style="document" />
>
>    <wsdl:operation name="Estacoes">
>      <soap:operation soapAction="http://www.ana.gov.br/Estacoes";
> style="document" />
>
>      <wsdl:input>
>        <soap:body use="literal" />
>
>      </wsdl:input>
>      <wsdl:output>
>
>        <soap:body use="literal" />
>
>      </wsdl:output>
>    </wsdl:operation>
>
>  </wsdl:binding>
>
>  <wsdl:binding name="FCTHServiceHttpGet" type="tns:FCTHServiceHttpGet">
>
>    <http:binding verb="GET" />
>
>    <wsdl:operation name="Estacoes">
>
>      <http:operation location="/Estacoes" />
>      <wsdl:input>
>
>        <http:urlEncoded />
>      </wsdl:input>
>      <wsdl:output>
>
>        <mime:content part="Body" type="text/xml" />
>
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:binding name="FCTHServiceHttpPost" type="tns:FCTHServiceHttpPost">
>
>    <http:binding verb="POST" />
>    <wsdl:operation name="Estacoes">
>
>      <http:operation location="/Estacoes" />
>
>      <wsdl:input>
>
>        <mime:content type="application/x-www-form-urlencoded" />
>
>      </wsdl:input>
>
>      <wsdl:output>
>        <mime:content part="Body" type="text/xml" />
>
>      </wsdl:output>
>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:service name="FCTHService">
>
>    <wsdl:port name="FCTHServiceSoap" binding="tns:FCTHServiceSoap">
>
>      <soap:address
> location="http://hidroweb.ana.gov.br/fcthservices/FCTH.asmx"; />
>
>    </wsdl:port>
>    <wsdl:port name="FCTHServiceHttpGet" binding="tns:FCTHServiceHttpGet">
>
>      <http:address
> location="http://hidroweb.ana.gov.br/fcthservices/FCTH.asmx"; />
>
>    </wsdl:port>
>    <wsdl:port name="FCTHServiceHttpPost" binding="tns:FCTHServiceHttpPost">
>
>      <http:address
> location="http://hidroweb.ana.gov.br/fcthservices/FCTH.asmx"; />
>
>    </wsdl:port>
>  </wsdl:service>
>
> </wsdl:definitions>
>

Reply via email to