The leadSelector is not supported. 20110

Anonymous
Not applicable
Each time i try to use the version 2_0 wsdl and specity a lead selector when calling getMultipleLeads 
I get the fault
The leadSelector is not supported. (20110)


Tags (1)
5 REPLIES 5
Anonymous
Not applicable
Hi,

Any body in the community making java calls for the marketo api 2_0  function LeadSelector, I am trying to use the ParamGetMultipleLeads and trying to set the LeadSelector by passing the SOAP request.


    String SOAP_REQUEST = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:mkt=\"http://www.marketo.com/mktows/\">"
                            +"<soapenv:Header><mkt:AuthenticationHeader><mktowsUserId>ciscosandbox1_607669354C8EAFB39CE7B8</mktowsUserId> <requestSignature>"+signature+"</requestSignature>"
                            +"<requestTimestamp>"+timestamp+"</requestTimestamp></mkt:AuthenticationHeader> </soapenv:Header> <soapenv:Body><mkt:paramsGetMultipleLeads>"
                            +" <leadSelector xsi:type=\"mkt:StaticListSelector\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"
                            +" <staticListName>Marketo Test</staticListName></leadSelector></mkt:paramsGetMultipleLeads></soapenv:Body></soapenv:Envelope>";

if i try without the Marketo API 2_0 call, i am getting the response, but when i make a call using below function , its telling the error . Because the LeadSelector.Factory.parse(xread) is getting null.


Please let me know the input for the LeadSelector.Factory.parse is nothing but the soap envelop request.

20012 - Request not understood
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at com.marketo.www.mktows.MktMktowsApiServiceStub.getMultipleLeads(MktMktowsApiServiceStub.java:1304)
    at com.marketo.www.client.MktApiClient.getMarketoStaticListName(MktApiClient.java:312)
    at com.marketo.www.client.MktApiClient.main(MktApiClient.java:193)



StringReader sr = new StringReader(SOAP_REQUEST);
 XMLStreamReader xread = inputFactory.createXMLStreamReader(sr);

ParamsGetMultipleLeads paramLeads = new ParamsGetMultipleLeads();
paramLeads.setLeadSelector(LeadSelector.Factory.parse(xread));

ParamsGetMultipleLeads paramLeads = new ParamsGetMultipleLeads();
            ParamsGetMultipleLeadsE   paramLeadsE = new ParamsGetMultipleLeadsE();
            
            
            
            paramLeads.setLeadSelector(LeadSelector.Factory.parse(xread));
            paramLeads.getLeadSelector();
            paramLeadsE.setParamsGetMultipleLeads(paramLeads);
            
            
        AuthenticationHeaderInfo authInfo = new AuthenticationHeaderInfo();     
        authInfo.setMktowsUserId(mktowsUserId);
        authInfo.setRequestSignature(signature);
        authInfo.setRequestTimestamp(timestamp);
        
        
        AuthenticationHeader authHead = new AuthenticationHeader();
        authHead.setAuthenticationHeader(authInfo);

            SuccessGetMultipleLeadsE sucess = stub.getMultipleLeads(paramLeadsE, authHead);



Please share your comments.


Thanks,
Dinesh.r
          
Anonymous
Not applicable
Hi,
yeah my soap endpoint is https://817-EZO-781.mktoapi.com/soap/mktows/2_0 and i am using the 2_0 wsdl...

It's as if the api understands that there is a lead selector, but just won't accept it. (again, with any lead selector type)
Anonymous
Not applicable
Hmm. I'm not seeing anything obviously wrong. Are you calling the 2.0 version of the API?
Anonymous
Not applicable
Thanks Erik, here is my xml body (it doesn't work with any lead selector i try, but if i take out the lead selector it works)

   <ns1:Body>
      <ns0:paramsGetMultipleLeads>
         <leadSelector xsi:type="ns0:LeadKeySelector">
            <keyType>EMAIL</keyType>
            <keyValues>
               <stringItem>someemail@company.com</stringItem>
            </keyValues>
         </leadSelector>
         <batchSize>100</batchSize>
         <includeAttributes>
            <stringItem>Title</stringItem>
         </includeAttributes>
      </ns0:paramsGetMultipleLeads>
   </ns1:Body>

Anonymous
Not applicable
Can you provide the XML of your request? I'm guessing you're passing in the values slightly incorrectly.