Hello,

I found the issue, and it's a tricky one. The good thing is that the 
request you are making to the API is successful, so there is nothing wrong 
with your request. The issue is what is being returned. You are 
successfully getting a response. However, that response has hidden 
characters in it. When Java tries to parse it, it considers those hidden 
characters as invalid XML characters, and that is where you are getting the 
errors. I found one of the reasons, but there may be more than one reason. 
I'll send you the account with the hidden character issue in a separate, 
private email. I just wanted to make sure that people reading the forum in 
the future know to look for hidden characters when this happens.

Best,
Nadine, AdWords API Team

On Monday, September 25, 2017 at 11:46:07 PM UTC-4, 郭文豪 wrote:
>
> Request
> ====================================
>
>
> 11:21:04.739 [main] INFO 
> com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger - 
> SOAP request:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
>     <soapenv:Header>
>         <ns1:RequestHeader xmlns:ns1="
> https://adwords.google.com/api/adwords/mcm/v201708"; 
> soapenv:mustUnderstand="0">
>             <ns2:clientCustomerId xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201708
> ">client-customer-id</ns2:clientCustomerId>
>             <ns3:developerToken xmlns:ns3="
> https://adwords.google.com/api/adwords/cm/v201708
> ">REDACTED</ns3:developerToken>
>             <ns4:userAgent xmlns:ns4="
> https://adwords.google.com/api/adwords/cm/v201708";>unknown (AwApi-Java, 
> AdWords-Axis/3.8.0, Common-Java/3.8.0, Axis/1.4, Java/1.8.0_101, maven, 
> SelectorBuilder)</ns4:userAgent>
>             <ns5:validateOnly xmlns:ns5="
> https://adwords.google.com/api/adwords/cm/v201708
> ">false</ns5:validateOnly>
>             <ns6:partialFailure xmlns:ns6="
> https://adwords.google.com/api/adwords/cm/v201708
> ">false</ns6:partialFailure>
>         </ns1:RequestHeader>
>     </soapenv:Header>
>     <soapenv:Body>
>         <get xmlns="https://adwords.google.com/api/adwords/mcm/v201708";>
>             <serviceSelector>
>                 <ns7:fields xmlns:ns7="
> https://adwords.google.com/api/adwords/cm/v201708";>CustomerId</ns7:fields>
>                 <ns8:fields xmlns:ns8="
> https://adwords.google.com/api/adwords/cm/v201708";>Name</ns8:fields>
>                 <ns9:paging xmlns:ns9="
> https://adwords.google.com/api/adwords/cm/v201708";>
>                     <ns9:startIndex>1040</ns9:startIndex>
>                     <ns9:numberResults>20</ns9:numberResults>
>                 </ns9:paging>
>             </serviceSelector>
>         </get>
>     </soapenv:Body>
> </soapenv:Envelope>
>
>
> Response
> ====================================
>
> 11:21:04.739 [main] INFO 
> com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger - 
> SOAP response:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
>     <soapenv:Body>
>         <soapenv:Fault>
>             <faultcode>soapenv:Server.userException</faultcode>
>             <faultstring>org.xml.sax.SAXParseException; lineNumber: 1; 
> columnNumber: 816; 在文件元素內容中找到無效的 XML 字元 (Unicode: 0x8)。</faultstring>
>             <detail>
>                 <ns1:stackTrace 
> xmlns:ns1="http://xml.apache.org/axis/";>org.xml.sax.SAXParseException; 
> lineNumber: 1; columnNumber: 816; 在文件元素內容中找到無效的 XML 字元 (Unicode: 0x8)。
> at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
> at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
> at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
> at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
> at 
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1465)
> at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2920)
> at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
> at 
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
> at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504)
> at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
> at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
> at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
> at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
> at 
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
> at 
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
> at 
> org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
> at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
> at 
> org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
> at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
> at 
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
> at org.apache.axis.client.Call.invoke(Call.java:2767)
> at org.apache.axis.client.Call.invoke(Call.java:2443)
> at org.apache.axis.client.Call.invoke(Call.java:2366)
> at org.apache.axis.client.Call.invoke(Call.java:1812)
> at 
> com.google.api.ads.adwords.axis.v201708.mcm.ManagedCustomerServiceSoapBindingStub.get(ManagedCustomerServiceSoapBindingStub.java:821)
> at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> com.google.api.ads.common.lib.soap.SoapClientHandler.invoke(SoapClientHandler.java:100)
> at 
> com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(AxisHandler.java:234)
> at 
> com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(SoapServiceClient.java:63)
> at 
> com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(SoapServiceClient.java:93)
> at com.sun.proxy.$Proxy18.get(Unknown Source)
> at tw.com.urad.web.security.Test.runExample(Test.java:57)
> at tw.com.urad.web.security.Test.main(Test.java:36)
> </ns1:stackTrace>
>                 <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/
> ">local</ns2:hostname>
>             </detail>
>         </soapenv:Fault>
>     </soapenv:Body>
> </soapenv:Envelope>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/beeb15fb-07f1-48f5-a0be-4e253d0bd351%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Cannot get all... 郭文豪
    • Re: Canno... 郭文豪
      • Re: C... 'Nadine Sundquist (AdWords API Team)' via AdWords API Forum
        • R... wise
          • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API Forum

Reply via email to