You need to sign in to do that
Don't have an account?
Login Error: API_DISABLED_FOR_ORG
Hi,
We are using API version 14 and partner WSDL and accessing the SFDC web service using JAX-WS API.
We also have received "Client ID" from Salesforce.com
In our Java web service client, when we login to SFDC using Salesforce.com Professional Edition Account, we are getting a login Error "API_DISABLED_FOR_ORG: API is not enabled for this Organization or Partner". This error occurs when logging-in using any professional account.
I am setting the client ID and putting the "CallOptions" into BindingProvider's RequestContext Map. Setting the client-id should take care of login for Professional accounts, but it doesn't.
The login to SFDC works fine for non-Professional accounts.
Let me know how to fix this issue.
I have pasted the code below:
URL wsdlLocation = this.getClass().getClassLoader().getResource(WSDL_FILE); Soap _port = new SforceService(wsdlLocation, new QName(SALESFORCE_URN, "SforceService")).getSoap(); Map<String, Object> reqCtx = ((BindingProvider) _port).getRequestContext(); reqCtx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, _serviceUrl); reqCtx.put(BindingProviderProperties.REQUEST_TIMEOUT, TIMEOUT); CallOptions co = new CallOptions(); co.setClient("XXXX"); //actual client-id not shown for confidentiality reqCtx.put("CallOptions", co); LoginResult loginResponse = _port.login(username, password);
Thanks!
The following is the HTTP request i could capture by using "-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true" to java options. The documentation for this JVM option says "The resulting dump shows all of the SOAP traffic but not all of the HTTP headers.".
Is there a different way to capture/look at the actual SOAP request message sent?
Also, as you can see, "BindingProviderProperties.REQUEST_TIMEOUT" and "CallOptions" that i put into the requestcontext Map are missing in the SOAP envelope. Am i setting the "CallOptions" as it is supposed to be set?
---[HTTP request]--- SOAPAction: "" Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Content-Type: text/xml;charset="utf-8" <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns3:login xmlns="urn:fault.partner.soap.sforc e.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:partner.soap.sforce.com"><ns3:username>vasu.yalavarthi@yahoo.com</ns3: username><ns3:password>vyalavarvDRy4Uqte7unNZdWt3LFNnQlm</ns3:password></ns3:login></S:Body></S:Envelope>--------------------
Thanks a lot for your help.