BingAds / BingAds-Java-SDK

Other
42 stars 47 forks source link

Unmarshailling exception when getting user using Bing SDK v11.12.2 #81

Closed pbt31 closed 6 years ago

pbt31 commented 6 years ago

I'm getting error below when trying to fetch the user data:

CompletionException: javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: unexpected element (uri:"https://bingads.microsoft.com/Customer/v12/Entities", local:"LinkedAccountIds"). Expected elements are <{https://bingads.microsoft.com/Customer/v12/Entities}CustomerId>,<{https://bingads.microsoft.com/Customer/v12/Entities}RoleId>,<{https://bingads.microsoft.com/Customer/v12/Entities}AccountIds>

This started failing today. Previously it was working properly. Is there any solution / workaround I can apply to fix this exception?

This is the full stacktrace:

Caused by: javax.xml.bind.UnmarshalException: null
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:483)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:417)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:394)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:855)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:102)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder$2.run(JAXBEncoderDecoder.java:894)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:892)
    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:712)
    at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:179)
    at org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:194)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
    ... 49 common frames omitted
Caused by: com.sun.istack.SAXParseException2: unexpected element (uri:"https://bingads.microsoft.com/Customer/v12/Entities", local:"LinkedAccountIds"). Expected elements are <{https://bingads.microsoft.com/Customer/v12/Entities}CustomerId>,<{https://bingads.microsoft.com/Customer/v12/Entities}RoleId>,<{https://bingads.microsoft.com/Customer/v12/Entities}AccountIds>
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:740)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:262)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:257)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:124)
    at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)
    at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:262)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:573)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:555)
    at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246)
    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:415)
    ... 73 common frames omitted
Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"https://bingads.microsoft.com/Customer/v12/Entities", local:"LinkedAccountIds"). Expected elements are <{https://bingads.microsoft.com/Customer/v12/Entities}CustomerId>,<{https://bingads.microsoft.com/Customer/v12/Entities}RoleId>,<{https://bingads.microsoft.com/Customer/v12/Entities}AccountIds>
    ... 85 common frames omitted
qingjuntian commented 6 years ago

Could you please show how some code?

qitia commented 6 years ago

@pbt31 when look at https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v12/CustomerManagementService.svc?singleWsdl, I do not even see LinkedAccountIds anywhere. May I know how are you using that?

eric-urban commented 6 years ago

@pbt31 @qingjuntian this issue is resolved. The LinkedAccountIds breaking change was caught early and rolled back a couple of weeks ago, and is released to sandbox today as optional. Production, support, documentation, and SDK updates are coming soon. Thanks.