Exception: Missing SoapHeader

263 views
Skip to first unread message

Gopi

unread,
Jun 2, 2014, 2:47:32 PM6/2/14
to adwor...@googlegroups.com
I am getting the below soap response and it doesn't happen all the time. If i retry it will proceed as normal, there is no change in the code. Is there anything i am missing?

Soap Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>Missing SoapHeader while invoking public abstract com.google.ads.api.services.campaignmgmt.criterion.campaigncriterion.v201309.jaxbgen.CampaignCriterionPage com.google.ads.api.services.campaignmgmt.criterion.campaigncriterion.v201309.jaxbgen.CampaignCriterionServiceInterface.get(com.google.ads.api.services.campaignmgmt.criterion.campaigncriterion.v201309.jaxbgen.Selector) throws com.google.ads.api.services.campaignmgmt.criterion.campaigncriterion.v201309.jaxbgen.ApiException_Exception with params [com.google.ads.api.services.campaignmgmt.criterion.campaigncriterion.v201309.jaxbgen.Selector@7ee222e4].</faultstring>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>


Soap Request:

<?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:Body>
  <get xmlns="https://adwords.google.com/api/adwords/cm/v201309">
   <serviceSelector>
    <fields>AgeRangeType</fields>
    <fields>CampaignId</fields>
    <fields>CarrierCountryCode</fields>
    <fields>CarrierName</fields>
    <fields>ContentLabelType</fields>
    <fields>CriteriaType</fields>
    <fields>DisplayType</fields>
    <fields>GenderType</fields>
    <fields>GeoPoint</fields>
    <fields>Id</fields>
    <fields>KeywordMatchType</fields>
    <fields>KeywordText</fields>
    <fields>LanguageCode</fields>
    <fields>LanguageName</fields>
    <fields>LocationName</fields>
    <fields>Operand</fields>
    <fields>ParentLocations</fields>
    <fields>Path</fields>
    <fields>PlacementUrl</fields>
    <fields>PlatformName</fields>
    <predicates>
     <field>CampaignId</field>
     <operator>EQUALS</operator>
     <values>142981910</values>
    </predicates>
    <paging>
     <startIndex>0</startIndex>
     <numberResults>1000</numberResults>
    </paging>
   </serviceSelector>
  </get>
 </soapenv:Body>
</soapenv:Envelope>


Thanks
Gopi

Josh Radcliff (AdWords API Team)

unread,
Jun 3, 2014, 10:59:41 AM6/3/14
to adwor...@googlegroups.com
Hi Gopi,

Are you using one of the client libraries? If the request below is your complete request, it is indeed missing the SOAP header, as the error indicates.

If you are using of the client libraries then I'd be interesting in knowing which one you are using (including the version) and whether you recently downloaded a newer version of the library.

Cheers,
Josh, AdWords API Team

Gopi

unread,
Jun 3, 2014, 1:40:21 PM6/3/14
to adwor...@googlegroups.com
Josh,

   We are using client libraries -  googleads-java-lib-v1.26.0

Thanks
Gopi

Josh Radcliff (AdWords API Team)

unread,
Jun 3, 2014, 6:17:59 PM6/3/14
to adwor...@googlegroups.com
Hi Gopi,

That's interesting - I haven't heard of this happening before. Could you share the code you're using to create and submit your requests? If you'd prefer, you can send it only to me by clicking Reply to Author. Also, it would be good to know if you are running in a multi-threaded environment and if so, which objects you are sharing across threads.

Thanks,
Josh, AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
Jun 12, 2014, 9:53:17 AM6/12/14
to adwor...@googlegroups.com
In case anyone else is following this thread -- this issue was caused by sharing instances of AdWordsSession across multiple threads, but AdWordsSession is not thread-safe. For more details on thread safety in the Java client library, please refer to the Thread Safety page on github.

Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages