Boa tarde pessoal , estou tentando instanciar uma classe de um WS SOAP porem esta dando o seguinte erro.
segue abaixo o codigo do meu method :
public void consultaOperadoresSafra(){
CapturaPropostas capturaPropostas = new CapturaPropostas();
ICapturaPropostas iCapturaPropostas = capturaPropostas.getBasicHttpBindingICapturaPropostas();
DadosBasicosSafra basicosSafra = iCapturaPropostas.dadosSafra("1DFFA600E6489D3700A39CE2E5BEFD01");
System.out.println(basicosSafra);
}
abaixo o codigo do meu WS SOAP:
package org.tempuri;
import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature;
@WebServiceClient( name = "CapturaPropostas", targetNamespace = "http://tempuri.org/", wsdlLocation = "https://fei-h.safrafinanceira.com.br/CapturaPropostas.svc?wsdl" ) public class CapturaPropostas extends Service { private static final URL CAPTURAPROPOSTAS_WSDL_LOCATION; private static final WebServiceException CAPTURAPROPOSTAS_EXCEPTION; private static final QName CAPTURAPROPOSTAS_QNAME = new QName("http://tempuri.org/", "CapturaPropostas");
public CapturaPropostas() {
super(__getWsdlLocation(), CAPTURAPROPOSTAS_QNAME);
}
public CapturaPropostas(WebServiceFeature... features) {
super(__getWsdlLocation(), CAPTURAPROPOSTAS_QNAME, features);
}
public CapturaPropostas(URL wsdlLocation) {
super(wsdlLocation, CAPTURAPROPOSTAS_QNAME);
}
public CapturaPropostas(URL wsdlLocation, WebServiceFeature... features) {
super(wsdlLocation, CAPTURAPROPOSTAS_QNAME, features);
}
public CapturaPropostas(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public CapturaPropostas(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
super(wsdlLocation, serviceName, features);
}
@WebEndpoint(
name = "BasicHttpBinding_ICapturaPropostas"
)
public ICapturaPropostas getBasicHttpBindingICapturaPropostas() {
return (ICapturaPropostas)super.getPort(new QName("http://tempuri.org/", "BasicHttpBinding_ICapturaPropostas"), ICapturaPropostas.class);
}
@WebEndpoint(
name = "BasicHttpBinding_ICapturaPropostas"
)
public ICapturaPropostas getBasicHttpBindingICapturaPropostas(WebServiceFeature... features) {
return (ICapturaPropostas)super.getPort(new QName("http://tempuri.org/", "BasicHttpBinding_ICapturaPropostas"), ICapturaPropostas.class, features);
}
private static URL __getWsdlLocation() {
if (CAPTURAPROPOSTAS_EXCEPTION != null) {
throw CAPTURAPROPOSTAS_EXCEPTION;
} else {
return CAPTURAPROPOSTAS_WSDL_LOCATION;
}
}
static {
URL url = null;
WebServiceException e = null;
try {
url = new URL("https://fei-h.safrafinanceira.com.br/CapturaPropostas.svc?wsdl");
} catch (MalformedURLException var3) {
e = new WebServiceException(var3);
}
CAPTURAPROPOSTAS_WSDL_LOCATION = url;
CAPTURAPROPOSTAS_EXCEPTION = e;
}
}
ALGUEM PODE ME DAR UM HELP POR FAVOR NÃO ESTOU CONSEGUIND OFAZER ESTE METODO EXECUTAR.