function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
saasteamsaasteam 

Inbound integration

Hi all,

I'm experiencing a problem with inbound integration. I'm using both XMLSpy and a custom JAVA application to invoke Salesforce's WSDL:Enterprise WSDL.

When I look at the response that I get i'm asked to insert username and password+security token. I have generated a new security token before starting integration.

 

When I invoke this Web Service I have an error  message stating: "Invalid login".

 

This is the code of my invocation:

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header>
        <m:LoginScopeHeader xmlns:m="urn:enterprise.soap.sforce.com">
            <m:organizationId>000000000000000000</m:organizationId>
            <m:portalId>000000000000000000</m:portalId>
        </m:LoginScopeHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <m:login xmlns:m="urn:enterprise.soap.sforce.com">
            <m:username>user@domain.com</m:username>
            <m:password>pwdtoken</m:password>
        </m:login>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 

 

This is Salesforce response

<?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>
        <soapenv:Fault>
            <faultcode xmlns:ns1="urn:fault.enterprise.soap.sforce.com">ns1:INVALID_LOGIN</faultcode>
            <faultstring>INVALID_LOGIN: Invalid username or password or locked out.</faultstring>
            <detail>
                <sf:fault xsi:type="sf:LoginFault" xmlns:sf="urn:fault.enterprise.soap.sforce.com">
                    <sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode>
                    <sf:exceptionMessage>Invalid username or password or locked out.</sf:exceptionMessage>
                </sf:fault>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

 

Can you help me  understanding where I'm wrong?

werewolfwerewolf
Perhaps you haven't whitelisted or activated the IP address from which you're trying to access Salesforce.com?
shanumanshanuman

Hi All,

 

Currently I’m working on Adobe Flex client,

 

I’m accessing the production and sandbox environment through defaultServerUrl in Flex. Its working fine.


For accessing production and sandbox we required username, password along with security token. All there login credentials we have.


My question is how do I access the custom portals in Flex client?


And for accessing the custom portal,how to get security token for portal users?


Please any suggestion

 

--sunil

 

Message Edited by shanuman on 03-23-2009 05:55 AM
SuperfellSuperfell
Are you trying to authenticate portal users or regular users? i assume you're really passing something more interesting for organizationId & portalId ? Also log into the web UI and look at the login history, that might give you more clues.
shanumanshanuman

Hi Simon,

 

Thanks for ur reply.

 

Im authenticating portal user not the regular user, for testing purpose im hardcoding organizationId & portalId.

 

And im assigning new User License "Customer Portal Manager Standard" to the portal user and trying to authenticate in Flex Client.

 

But it is throwing following error.

 

3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Util apex.login ( (com.salesforce.objects::LoginRequest)#0
  callback = (com.salesforce::AsyncResponder)#1
    context = (null)
    faultHandler = (function)
    resultHandler = (function)
  server_url = (null)
  session_id = (null)
  username = "test.user@xyz.com"
);
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection login with creds
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection App Domain = null
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection Api Server name = www.salesforce.com
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection _internalServerUrl = https://www.salesforce.com/services/Soap/u/15.0/
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection set serverUrl: skip the policy file for sandboxType:localTrusted and server:www.salesforce.com
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection invoke login
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection intServerUrl is null
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection intServerUrl = https://www.salesforce.com/services/Soap/u/15.0/
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.Connection _invoke login
3/30/2009 11:16:24.185 [DEBUG] com.salesforce.events.SendEvent Method name is: login
3/30/2009 11:16:24.201 [DEBUG] com.salesforce.events.SendEvent Method name is: login
3/30/2009 11:16:25.683 [ERROR] com.salesforce.AsyncResponder (com.salesforce.events::ApexFaultEvent)#0
  bubbles = false
  cancelable = true
  context = (null)
  currentTarget = (null)
  eventPhase = 2
  fault = (mx.rpc::Fault)#1
    errorID = 0
    faultCode = "Server.Error.Request"
    faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://www.salesforce.com/services/Soap/u/15.0/"
    faultString = "HTTP request error"
    message = "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://www.salesforce.com/services/Soap/u/15.0/'"
    name = "Error"
    rootCause = (flash.events::IOErrorEvent)#2
      bubbles = false
      cancelable = false
      currentTarget = (flash.net::URLLoader)#3
        bytesLoaded = 0
        bytesTotal = 0
        data = ""
        dataFormat = "text"
      eventPhase = 2
      target = (flash.net::URLLoader)#3
      text = "Error #2032"
      type = "ioError"
  headers = (null)
  message = (mx.messaging.messages::ErrorMessage)#4
    body = (Object)#5
    clientId = "DirectHTTPChannel0"
    correlationId = "DF871406-F974-42D5-92FC-55EA1039084B"
    destination = ""
    extendedData = (null)
    faultCode = "Server.Error.Request"
    faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://www.salesforce.com/services/Soap/u/15.0/"
    faultString = "HTTP request error"
    headers = (Object)#6
    messageId = "303B112E-32A7-9E7C-38B7-55EA1613D81B"
    rootCause = (flash.events::IOErrorEvent)#2
    timestamp = 0
    timeToLive = 0
  messageId = "303B112E-32A7-9E7C-38B7-55EA1613D81B"
  target = (null)
  token = (mx.rpc::AsyncToken)#7
    message = (mx.messaging.messages::HTTPRequestMessage)#8
      body = "<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner.soap.sforce.com"/><se:Body><login xmlns="urn:partner.soap.sforce.com" xmlns:ns1="sobject.partner.soap.sforce.com"><username>test.user@xyz.com</username><password>Password1234</password></login></se:Body></se:Envelope>"
      clientId = (null)
      contentType = "text/xml; charset=UTF-8"
      destination = "DefaultHTTP"
      headers = (Object)#9
        DSEndpoint = "direct_http_channel"
      httpHeaders = (Object)#10
        Accept = "text/xml"
        SOAPAction = """"
        X-Salesforce-No-500-SC = "true"
      messageId = "DF871406-F974-42D5-92FC-55EA1039084B"
      method = "POST"
      recordHeaders = false
      timestamp = 0
      timeToLive = 0
      url = "https://www.salesforce.com/services/Soap/u/15.0/"
    responders = (Array)#11
      [0] (Connection.as$270::SalesForceResponder)#12
    result = (null)
  type = "fault"

SuperfellSuperfell
Looking at the trace below, you're not sending the LoginScopeHeader.