BingAds / BingAds-Java-SDK

Other
43 stars 47 forks source link

Issue using bing api from generated jar. #132

Open olymk2 opened 2 years ago

olymk2 commented 2 years ago

This issue seems related https://github.com/BingAds/BingAds-Java-SDK/issues/76

This error only occurs when running from the generated jar, I am not using shadow or gradle like in the linked issue, but perhaps this is related is this perhaps a missing dependency ?

Not sure where to start diagnosing this ?

** ERROR: **
Exception: #error {
 :cause No binding factory for namespace http://schemas.xmlsoap.org/soap/ registered.
 :via
 [{:type javax.xml.ws.WebServiceException
   :message org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for null
   :at [org.apache.cxf.jaxws.ServiceImpl getPort ServiceImpl.java 344]}
  {:type org.apache.cxf.service.factory.ServiceConstructionException
   :message Could not resolve a binding for null
   :at [org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory createBindingInfo AbstractWSDLBasedEndpointFactory.java 361]}
  {:type org.apache.cxf.BusException
   :message No binding factory for namespace http://schemas.xmlsoap.org/soap/ registered.
   :at [org.apache.cxf.bus.managers.BindingFactoryManagerImpl getBindingFactory BindingFactoryManagerImpl.java 93]}]
 :trace
 [[org.apache.cxf.bus.managers.BindingFactoryManagerImpl getBindingFactory BindingFactoryManagerImpl.java 93]
  [org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory createBindingInfo AbstractWSDLBasedEndpointFactory.java 348]
  [org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory createEndpointInfo AbstractWSDLBasedEndpointFactory.java 268]
  [org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory createEndpoint AbstractWSDLBasedEndpointFactory.java 146]
  [org.apache.cxf.frontend.ClientFactoryBean create ClientFactoryBean.java 91]
  [org.apache.cxf.frontend.ClientProxyFactoryBean create ClientProxyFactoryBean.java 159]
  [org.apache.cxf.jaxws.JaxWsProxyFactoryBean create JaxWsProxyFactoryBean.java 142]
  [org.apache.cxf.jaxws.ServiceImpl createPort ServiceImpl.java 492]
  [org.apache.cxf.jaxws.ServiceImpl getPort ServiceImpl.java 342]
  [org.apache.cxf.jaxws.ServiceImpl getPort ServiceImpl.java 337]
  [javax.xml.ws.Service getPort Service.java 210]
  [com.microsoft.bingads.internal.ServiceFactoryImpl createProxyFromService ServiceFactoryImpl.java 176]
  [com.microsoft.bingads.ServiceClient getService ServiceClient.java 143]
  [com.microsoft.bingads.v13.reporting.ReportingServiceManager submitDownloadAsync ReportingServiceManager.java 223]
  [jdk.internal.reflect.NativeMethodAccessorImpl invoke0 NativeMethodAccessorImpl.java -2]
  [jdk.internal.reflect.NativeMethodAccessorImpl invoke NativeMethodAccessorImpl.java 62]
  [jdk.internal.reflect.DelegatingMethodAccessorImpl invoke DelegatingMethodAccessorImpl.java 43]
  [java.lang.reflect.Method invoke Method.java 566]
qitia commented 2 years ago

what do you mean by generated jar? are you not using the official one that could be fetched from maven?

olymk2 commented 1 year ago

@qitia been looking at this again, so basically I am including this version which is pulled from maven.

com.microsoft.bingads/microsoft.bingads {:mvn/version "13.0.13"}

I am then building my project into an uberjar for deployment, how ever things fail I have had it mentioned that perhaps I need to add something to META-INF/service to make it work but this is not something I have had to do previously with other libraries so I am a bit lost.

It was explained that the library may use a ServiceLoader although searching the repository does not show any such usage.

qitia commented 1 year ago

OK got you. I did a quick search but do not find any obvious clue. Please share your solution if you have it resolved.