Hi Team,
I am facing issue when I am trying to mock googleads API calls for
unit testing(using wiremock server which by using .withEndpoint option in
AdwordsSession routes the Google ADS API call to localhost:8444 server) . I
was able to narrow down the issue to mutate operation call in
userlistOperation class. But I am unable to proceed further. I even checked
the soap XML generated(below) with the SOAP XML that succeeded and I dont
see any issues. Kindly help me in debugging the issue. Also please let me
know if there is a mock capability available for UserList creation and
updating users in them via Google API interface.
PFB the failure log messages:
*<----wiremock intercept of post message sent to localhost------>*
POST /api/adwords/rm/v201809/AdwordsUserListService HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
*Host: localhost:8444*
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 1555
Authorization: Bearer null
*<---corresponding SOAP XML created---->*
<?xml version="1.0" encoding="UTF-8"?><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
soapenv:mustUnderstand="0"
xmlns:ns1="https://adwords.google.com/api/adwords/rm/v201809"><ns2:clientCustomerId
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809">123-456-7891</ns2:clientCustomerId><ns3:developerToken
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201809">AWEDEEDDDDDTREWQSDFGYTR</ns3:developerToken><ns4:userAgent
xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201809">foo
(AwApi-Java, AdWords-Axis/4.4.0, Common-Java/4.4.0, Axis/1.4,
Java/1.8.0_201, maven)</ns4:userAgent><ns5:validateOnly
xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201809">false</ns5:validateOnly><ns6:partialFailure
xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201809">false</ns6:partialFailure></ns1:RequestHeader></soapenv:Header><soapenv:Body><mutate
xmlns="https://adwords.google.com/api/adwords/rm/v201809"><operations><ns7:operator
xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201809">ADD</ns7:operator><operand
xsi:type="ns8:CrmBasedUserList"
xmlns:ns8="https://adwords.google.com/api/adwords/rm/v201809"><ns8:name>newlist_Email</ns8:name><ns8:description>new_email_list</ns8:description><ns8:membershipLifeSpan>10000</ns8:membershipLifeSpan><ns8:uploadKeyType>CONTACT_INFO</ns8:uploadKeyType></operand></operations></mutate></soapenv:Body></soapenv:Envelope>
*<---Error---->*
19/04/30 18:35:33 ERROR SOAPPart: Exception:
java.lang.NullPointerException
java.lang.NullPointerException
at java.io.FilterInputStream.read(Unknown Source)
at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:453)
at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:559)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:322)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.Message.writeTo(Message.java:539)
at
com.google.api.ads.common.lib.soap.ResponseInfoXPathSet.parseMessage(ResponseInfoXPathSet.java:76)
at
com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(AxisHandler.java:249)
- should throw exceptions when Google generation of Custom Audience ID
Fails *** FAILED ***
java.lang.NullPointerException:
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:324)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.Message.writeTo(Message.java:539)
at
com.google.api.ads.common.lib.soap.ResponseInfoXPathSet.parseMessage(ResponseInfoXPathSet.java:76)
at
com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(AxisHandler.java:249)
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.$Proxy37.mutate(Unknown Source)
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.$Proxy37.mutate(Unknown Source)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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/1084221e-1dd8-460f-8c3e-2242fc5883d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.