• Erik Ivarsson
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
I am investigating possibilities for changing the RecordType of an Account from Person to Business Account. The reasoning for this is that I have a third party system which syncs Accounts with Salesforce and Accounts can be created in both systems, sometimes these are created with the wrong Recordtype (or it might be that they change).

I am doing this change through Dell Boomi (http://www.boomi.com/) and have successfully manage to do it for the change in RecordType from Busienss to Person Account types. I am not looking for a solution to this in Boomi, but what I need is some clarifications about the possibilities to acctually do it.

My investigation gives me very little to stand on regarding this, and the little information I see suggests that I might even be required to create a new Person Account and then re-referencing everything from the old Business Account to the new Person Account.

Is there another solution to this problem than doing this re-creation so to say? Any help is appreciated, APEX, DataLoader etc.
Hi!
I'm trying to invoke a web service callout from Salesforce. The web service endpoint is a local Dell Boomi Atom that is stored behind a firewall, the firewall has been white listing the required IP ranges and has been configured to both SOAP and REST. I have tried with no luck connecting to this through my apex class that was generated through a WSDL, I get the error:
Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'


I have seen this on multiple issues here and most of the solutions I have found is that the firewall is not configured with the IP ranges, this should be the case for this firewall. Since I was unable to get any more information on this through the debug logs when doing a SOAP call I did one simple with REST:
public class WebServiceCallout { 
public static void callBoomi() { 
HttpRequest req = new HttpRequest(); 
HttpResponse res = new HttpResponse(); 
Http http = new Http(); 
req.setEndpoint('YYYYYYYYYYY:9090/ws/simple/queryHelloWorld'); 
req.setMethod('POST'); String a = 'Test='+EncodingUtil.urlEncode('Hej', 'UTF-8'); 
req.setBody(a); req.setCompressed(true); // otherwise we hit a limit of 32000 
req.setTimeout(120000); 
try { 
     res = http.send(req); 
     System.debug(res.getBody()); 
}catch(System.CalloutException e) { 
     System.debug('Callout error: '+ e); 
     System.debug(res.toString()); 
} 
} 
}
Since this is just a test web service to make sure that Salesforce can connect to Dell Boomi all this does is take a parameter 'Test' and returns 'Hello World' + Test. When I invoke this I see, what I assume is, the same response that I get from my SOAP request (the HTML page):User-added image
The server is up and running so it should not have timed out for that reason. Assuming that all IP ranges are white listed, I have added the endpoint as a remote site, is there something I have missed in Salesforce?
 
Im facing an issue when I try to import my WSDL into Salesforce and generate APEX code from this one (Error: Failed to parse wsdl: schema:targetNamespace can not be null). When I add a targetnamespace to my second schema in the following file, I need to update the reference so that my request still has the valid format:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wss="http://www.boomi.com/connector/wss">
       <soapenv:Header/>
       <soapenv:Body>
          <wss:querySearch>
             <!--Optional:-->
             <Car>
                <Reg_Number></Reg_Number>
             </Car>
          </wss:querySearch>
       </soapenv:Body>
    </soapenv:Envelope>
My current WSDL:
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.boomi.com/connector/wss" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="WebServiceProvider" targetNamespace="http://www.boomi.com/connector/wss" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <xs:schema elementFormDefault="qualified" targetNamespace="http://www.boomi.com/connector/wss" version="1.0">
          <xs:import />
          <xs:element name="querySearch" type="tns:querySearch" />
          <xs:complexType name="querySearch">
            <xs:sequence>
              <xs:element minOccurs="0" ref="Car" />
            </xs:sequence>
          </xs:complexType>
          <xs:element name="querySearchResponse" type="tns:querySearchResponse" />
          <xs:complexType name="querySearchResponse">
            <xs:sequence>
              <xs:element minOccurs="0" ref="Car" />
            </xs:sequence>
          </xs:complexType>
        </xs:schema>
        <xs:schema elementFormDefault="qualified" version="1.0">
          <xs:element name="Car" type="Car" />
          <xs:complexType name="Car">
            <xs:sequence>
              <xs:element minOccurs="1" maxOccurs="1" name="Reg_Number" type="xs:string" />
              
            </xs:sequence>
          </xs:complexType>
        </xs:schema>
      </wsdl:types>
      <wsdl:message name="querySearch">
        <wsdl:part name="parameters" element="tns:querySearch" />
      </wsdl:message>
      <wsdl:message name="querySearchResponse">
        <wsdl:part name="parameters" element="tns:querySearchResponse" />
      </wsdl:message>
      <wsdl:portType name="WebServiceProviderPortType">
        <wsdl:operation name="querySearch">
          <wsdl:input message="tns:querySearch" />
          <wsdl:output message="tns:querySearchResponse" />
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="WebServiceProviderPortBinding" type="tns:WebServiceProviderPortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="querySearch">
          <soap:operation soapAction="querySearch" />
          <wsdl:input>
            <soap:body use="literal" />
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal" />
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="WebServiceProvider">
        <wsdl:port name="WebServiceProviderPort" binding="tns:WebServiceProviderPortBinding">
          <soap:address location="XXXXXXXX" />
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>

When I alter my WSDL to the following (adding a targetnamespace and adding the "tns:" to the types):
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.boomi.com/connector/wss" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="WebServiceProvider" targetNamespace="http://www.boomi.com/connector/wss">
      <wsdl:types>
        <xs:schema elementFormDefault="qualified" targetNamespace="http://www.boomi.com/connector/wss" version="1.0">
          <xs:element name="Car" type="tns:Car"/>
          <xs:complexType name="Car">
            <xs:sequence>
              <xs:element maxOccurs="1" minOccurs="1" name="Reg_Number" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
          <xs:element name="querySearch" type="tns:querySearch"/>
          <xs:complexType name="querySearch">
            <xs:sequence>
              <xs:element minOccurs="0" ref="tns:Car"/>
            </xs:sequence>
          </xs:complexType>
          <xs:element name="querySearchResponse" type="tns:querySearchResponse"/>
          <xs:complexType name="querySearchResponse">
            <xs:sequence>
              <xs:element minOccurs="0" ref="tns:Car"/>
            </xs:sequence>
          </xs:complexType>
        </xs:schema>
      </wsdl:types>
      <wsdl:message name="querySearch">
        <wsdl:part element="tns:querySearch" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="querySearchResponse">
        <wsdl:part element="tns:querySearchResponse" name="parameters"/>
      </wsdl:message>
      <wsdl:portType name="WebServiceProviderPortType">
        <wsdl:operation name="querySearch">
          <wsdl:input message="tns:querySearch"/>
          <wsdl:output message="tns:querySearchResponse"/>
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="WebServiceProviderPortBinding" type="tns:WebServiceProviderPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="querySearch">
          <soap:operation soapAction="querySearch"/>
          <wsdl:input>
            <soap:body use="literal"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="WebServiceProvider">
        <wsdl:port binding="tns:WebServiceProviderPortBinding" name="WebServiceProviderPort">
          <soap:address location="XXXXXXXXXXXXXXXXX"/>
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>

It goes through Salesforce but generates the following request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wss="http://www.boomi.com/connector/wss">
       <soapenv:Header/>
       <soapenv:Body>
          <wss:querySearch>
             <!--Optional:-->
             <wss:Car>
                <wss:Reg_Number>?</wss:Reg_Number>
             </wss:Car>
          </wss:querySearch>
       </soapenv:Body>
    </soapenv:Envelope>
It adds the "wss" prefix to the Car element and the input paramter in the request, which makes the request invalid. Can I solve this in some way by altering the namespaces or something like that? The wsdl is generated from Dell Boomi and hence a solution from there would be prefered but for now I am satisfied if I can alter the WSDL manually.

Ciao!
Hi!
I'm trying to invoke a web service callout from Salesforce. The web service endpoint is a local Dell Boomi Atom that is stored behind a firewall, the firewall has been white listing the required IP ranges and has been configured to both SOAP and REST. I have tried with no luck connecting to this through my apex class that was generated through a WSDL, I get the error:
Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'


I have seen this on multiple issues here and most of the solutions I have found is that the firewall is not configured with the IP ranges, this should be the case for this firewall. Since I was unable to get any more information on this through the debug logs when doing a SOAP call I did one simple with REST:
public class WebServiceCallout { 
public static void callBoomi() { 
HttpRequest req = new HttpRequest(); 
HttpResponse res = new HttpResponse(); 
Http http = new Http(); 
req.setEndpoint('YYYYYYYYYYY:9090/ws/simple/queryHelloWorld'); 
req.setMethod('POST'); String a = 'Test='+EncodingUtil.urlEncode('Hej', 'UTF-8'); 
req.setBody(a); req.setCompressed(true); // otherwise we hit a limit of 32000 
req.setTimeout(120000); 
try { 
     res = http.send(req); 
     System.debug(res.getBody()); 
}catch(System.CalloutException e) { 
     System.debug('Callout error: '+ e); 
     System.debug(res.toString()); 
} 
} 
}
Since this is just a test web service to make sure that Salesforce can connect to Dell Boomi all this does is take a parameter 'Test' and returns 'Hello World' + Test. When I invoke this I see, what I assume is, the same response that I get from my SOAP request (the HTML page):User-added image
The server is up and running so it should not have timed out for that reason. Assuming that all IP ranges are white listed, I have added the endpoint as a remote site, is there something I have missed in Salesforce?