Как получить доступ к методу wsdl при весенней загрузке? - PullRequest
0 голосов
/ 22 мая 2019

Я получаю ошибку ниже, когда вызываю сервис мыла при весенней загрузке. Я использовал cxf wsdl2java для реализации методов обслуживания. Я могу успешно импортировать wsdl в soap-ui. Но я не могу отправить почтовый запрос в сервис.

Есть ли мнение, как мне решить эту проблему?

@Bean("queryQuotaWebService")
public Endpoint queryQuotaEndpoint() {
       EndpointImpl endpoint = new EndpointImpl(bus, "#queryQuota");
       endpoint.setImplementorClass(QueryQuotaWebServiceImpl.class);
       endpoint.publish("/QueryQuotaWebService");
       return endpoint;
}
@Controller("queryQuota")
public class QueryQuotaWebServiceImpl implements QueryQuotaWebService {

   @Override
   public GetQuotaInfoResultBean getQuotaInfo(GetQuotaInfoInput parameters) 
   {
      try {
          return (GetQuotaInfoResultBean) pimsOperationExecutor.execute(parameters);
      } catch (MyException e) {
          throw new RuntimeException(e);
      }
   }
}
@WebService(targetNamespace = "http://webservice.mycompany.com.tr/", name = "QueryQuotaWebService")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface QueryQuotaWebService {

@WebMethod
    @WebResult(name = "getQuotaInfoResponse", targetNamespace = "http://webservice.mycompany.com.tr/", partName = "parameters")
    public GetQuotaInfoResultBean getQuotaInfo(
        @WebParam(partName = "parameters", name = "getQuotaInfoInput", targetNamespace = "http://webservice.mycompany.com.tr/")
        GetQuotaInfoInput parameters
    );
}

Вот полный стек.

2019-05-22 16: 22: 21.339 ПРЕДУПРЕЖДЕНИЕ 1388 --- [nio-8081-exec-4] oacxf.phase.PhaseInterceptorChain: Application {http://quota.thirdparty.mycompany.com/}QueryQuotaWebServiceImplService#{ http://webservice.mycompany.com.tr/}getQuotaInfo выдал исключение, теперь раскручивается org.apache.cxf.interceptor.Fault: object не является экземпляром объявления класса при вызове public com.mycompany.thirdparty.quota.GetQuotaInfoResultBean com.mycompany.thirdparty.quota.QueryQuotaWebServiceImpl.getQuotacompotaota.part.m ( GetQuotaInfoInput) с параметрами [com.mycompany.thirdparty.quota.GetQuotaInfoInput@256dd1f9]. в org.apache.cxf.service.invoker.AbstractInvoker.createFault (AbstractInvoker.java:166) ~ [cxf-core-3.3.1.jar: 3.3.1] at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault (AbstractJAXWSMethodInvoker.java:267) ~ [cxf-rt-frontend-jaxws-3.3.1.jar: 3.3.1] в org.apache.cxf.service.invoker.AbstractInvoker.invoke (AbstractInvoker.java:140) ~ [cxf-core-3.3.1.jar: 3.3.1] at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke (AbstractJAXWSMethodInvoker.java:232) ~ [cxf-rt-frontend-jaxws-3.3.1.jar: 3.3.1] в org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke (JAXWSMethodInvoker.java:85) ~ [cxf-rt-frontend-jaxws-3.3.1.jar: 3.3.1] в org.apache.cxf.service.invoker.AbstractInvoker.invoke (AbstractInvoker.java:74) ~ [cxf-core-3.3.1.jar: 3.3.1] в org.apache.cxf.interceptor.ServiceInvokerInterceptor $ 1.run (ServiceInvokerInterceptor.java:59) ~ [cxf-core-3.3.1.jar: 3.3.1] в java.util.concurrent.Executors $ RunnableAdapter.call $$$ capture (Executors.java:511) ~ [na: 1.8.0_191] в java.util.concurrent.Executors $ RunnableAdapter.call (Executors.java) ~ [na: 1.8.0_191] в java.util.concurrent.FutureTask.run $$$ capture (FutureTask.java:266) ~ [na: 1.8.0_191] at java.util.concurrent.FutureTask.run (FutureTask.java) ~ [na: 1.8.0_191]

1 Ответ

0 голосов
/ 24 мая 2019

Проблема заключалась в использовании определения конечной точки.

    @Autowired
    private Bus bus;

    @Bean("queryQuotaWebService")
    public Endpoint queryQuotaEndpoint() {
        EndpointImpl endpoint = new EndpointImpl(bus, new QueryQuotaWebServiceImpl());
        endpoint.publish("/QueryQuotaWebService");
        return endpoint;
    }

здесь есть ссылка на код.

https://github.com/ekocbiyik/cxf-springboot

...