Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

12

Based on what you said, all options seems viable but it's nearly impossible to tell which one is best. Also your scenario as you tell it looks very simple. Too simple maybe. In my experience the transfer itself is easy and the tough parts are references, relationships and salesforce specials. So I would recommend to ask yourself the following questions: ...


11

POSTMAN is not sending any headers with the SOAP Packet. Try adding this to test: POST https://webservice.exacttarget.com/Service.asmx HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "Create" Content-Length: 1925 Host: webservice.exacttarget.com Connection: Keep-Alive ALSO during my testing of your packet I found ...


9

Through the salesforce service (Apex or others) you cannot directly communicate with an FTP server (either upload or download). Your best bet would be to use an external application. Jitterbit Data Loader is the go to application for FTP interactions with salesforce. You could also create your own service outside of the salesforce platform.


9

Probably the easiest way to understand what methods are defined in a WSDL and what their respective parameters are is to start with a tool like SoapUI. You can import the WSDL and it will generate sample requests that correspond to the available methods. That will give you a good starting point. In terms of the raw WSDL, try starting with the operation ...


8

You need to leverage an External ID field type on your Store object for the Store Number. This will allow the platform to automatically cross reference for you and avoid you needing to pre-query the Store records to obtained the Id's you need. The Salesforce API documentation goes into more details here. You can use external ID fields as a foreign key, ...


8

I imported the Partner v26 WSDL into a Visual Studio 2012 console application as a Web Service Reference (not a WCF service reference). Then with a bit of painful cutting and pasting from the PDF I brought the C# example code in from the SOAP API developers guide pg 27 referenced by Jordan in his answer. It looks like their example is designed for use with ...


8

Before using sforce.connection.query, session ID should be set. Try below code, <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="/soap/ajax/33.0/connection.js" type="text/javascript"></script> <script src="/soap/ajax/33.0/apex.js" type="text/javascript"></script> <script type="text/...


7

Here is an alternative method based on (extracted from) Find My Salesforce Users by Role Hierarchy by Jeff Douglas. Is it better than your proposed solution? Probably not. It will depend on how many user roles there are and how deep the tree is. If you have a large number of UserRoles with very few levels of nesting it may be more efficient to make a couple ...


7

Yes, you can use the XMLStreamReader class to parse the XML file. The downside is that you have to perform all the processing yourself (i.e. you have to step through the entire XML response and process the elements). The general format works like this: XmlStreamReader xml = new XmlStreamReader(xmlString); while(xml.hasNext()) { if(xml.getEventType() == ...


7

Yes - we are planning to extend all functionality of the REST services provided by the Fuel API, and bring it to parity with the SOAP API.


7

According to the RetrieveOptions Object you're able to limit the size of the request using BatchSize. I'm not 100% sure if it'll work as its description states Number of records to return in each batch as part of a Retrieve call. Reserved for future use. This looks to be the only property that can limit the request. Working SOAP Body: <s:Body ...


7

This discussion forum thread suggests that you can do this with https://<instance>.salesforce.com/secur/frontdoor.jsp?sid=<sessionId>&orgId=<orgId>&portalId=<portalId> Change <instance> to the relevant instance, e.g. na1, and substitute in the relevant IDs.


7

Here is how I have tried using workbench to test a SOAP web service. Hope this helps. First you have to get the session ID by passing a Soap request(I copied the request XML from SoapUI) to login method of the Salesforce SOAP API. Service URL: /services/Soap/u/37.0 Method : Post Request Headers: (below) Content-Type: text/xml; charset=UTF-8 Accept: ...


6

Asynchronous calls are executed after Test.stopTest. You can validate execution after calling Test.stopTest. Also, you need to set up a mock receiver class to simulate the call out. See http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm for details on this.


6

Salesforce uses SOAP 1.1. If you look at the WSDL that you can generate from within the setup>develop>API and choose one of the WSDL's you will see xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" If it were SOAP 1.2 it would say: xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"


6

http://requestb.in will let you see the XML that an outgoing message will send. So basically you need to do the following: Add requestbin url in remote sites of your salesforce instance Get a requestb.in endpoint from requestbin website (click "Create a RequestBin") Specify the requestBin endpoint in your outgoing message Trigger your outgoing message (it'...


6

This is expected behavior .The login() has to be from either partner WSDL or the Enterprise WSDL .The Apex class that the would have created with webservice keywords will generate another WSDL that will hold exact calls you will need to do once you obtain Server URL and Session Id from the login call. Here is a simple blog post showing how to use Enterprise ...


5

The Enterprise and Partner APIs are intended for usage outside of Salesforce rather than integrating two Salesforce Orgs together. They are typically consumed by languages like Java, .NET, PHP, Ruby, ... As you found, anyType is not supported by Wsdl2Apex. See Supported WSDL Features: The Salesforce datatype anyType is not supported in WSDLs used to ...


5

There appears to be some bugs in the Tooling API WSDL. The main one being that some of the operations described within it are missing the necessary declarations to tell such tools to pass the SessionHeader (containing the session id). I used the JAX-WS tool in my Maven project to get things generated, the steps are described here. You can also find the ...


5

You can achieve the vision in the drawing. As I see it, you need the following pieces: An abstract base class (WS) that the other classes will inherit from, or an interface, depending on the exact use of the other classes. A scheduled class that executes periodically to check if the server is available, and if so, kick off a batch process. A batch class (...


5

While I'd be happy (and surprised!) to see an implementation using the webservice framework, I think it's impossible. The documentation keeps silence about adjusting namespaces or field names, and both are handled internally. There is some hope though. Salesforce outbound messages are simple enough to successfully accept them with Apex REST. You could ...


5

The Id at the end is the PackageVersion identifier, this is primarily used in the Partner API wsdl and can be configured on the API wsdl download page (setup->Develop->API) before you generate the wsdl. Even if you have no use for this feature a default Id is generated for backward compatibility. However the docs probably describe this feature better: See ...


5

Free-for-all API access is only allowed on Enterprise, Developer, Unlimited, and Performance Edition. Sometimes, Professional Edition clients can pay extra to obtain API access (the policy tends to fluctuate over time). ISV's (Independent Service Vendors) can apply for a "client ID", which grants them API access to orgs that otherwise would not have access (...


5

UPDATE: There is now a known issue for this that you can track "Generate WSDL" generates a WSDL that does not contain the definition of the compound types address and location if API version is 30.0 or above I've seen this before , but can't find the previous occurrence at the moment in Issue with Adding reference Webservice WSDL to VS2010. There is a ...


5

It would help to see the proxy generated by WSDL->Apex, the response from the WS, or just the schema. From the error message, you get a response from the WS, but de-serialization fails. First, you could call the WS from SOAP UI to get a proper image of what you are getting back. Second, check if you have any numeric properties in the Proxy. Apparently, ...


5

Definitely... one straightforward approach would be to spin up a custom public REST service on the SFDC stack. Two basic parts to the exercise: 1) Write your web service 2) Expose it via public Force.com site I'm going to pick a dead-simple example just to make the point. Let's say your goal is a public API to validate that a Contact exists in your SFDC ...


5

Looks like you can expose the same apex method both via SOAP and REST API..I tried the below code and executed via SOAPUI(for SOAP protocol) and workbench(REST protocol) and it worked fine and the bebug statement printed in logs. @RestResource(urlmapping = '/someUrl/*') global class SOAPRESTClass { @HttpGet webservice static void someMethod(){ ...


5

Salesforce auto generates the XML format of the message that is sent to external system. You do not need to provide a WSDL to salesforce if you are implementing an outbound messaging. Only Endpoint uRL is required. How to create a listener SFDC gives you the WSDL when you create a workflow outbound message that can be used to create a listener . However if ...


5

The underlying certificate provided by Salesforce for the connection is changing. This means that you will have to check that the integration you are using can use a SHA-256 certificate. Salesforce has provided a test endpoint for you to test - TEST SHA2 endpoint Also you can register for more information at the Salesforce group Marketing Cloud Certificate ...


5

I haven't tested this, but when you are creating your Named Credential you have the option to tick "Generate Authorization Header", which should do this for you automatically:


Only top voted, non community-wiki answers of a minimum length are eligible