You need to sign in to do that
Don't have an account?
tonysms2009
calling external web service and additing security header?
We are trying to access the external API web service and it requires
Username Token in the SOAP header. We were able to generate apex script
based on the web service description (we had to simplify the wsdl file
and drop some methods to make it fit into 100k chars), but do not see
how we can add our security header to the stub before making web
service method invokations. We see that HTTP output headers are public
in the Apex code of the stub. Is it possible for SF to make the SOAP headers
public or suggest an idea how to add our security header?
Tony,
I just went down this journey recently, and yes there are lots of "clean up" items.
I have done a large post on the subject. Please review and comment on as appropriate.
1. WSDL - I would highly suggest using a WSDL/XML tool like Atlova XMLSpy (free trial) to examine the Types that are imported. It will allow you to trim down, and integrate the imported (manually - wish they had a merge - going to post that feature request at Atlova) xsd types, etc. I normally work with Visual Studio or Eclipse and they just couldn't get there. It will show you what is in the namespace and what is imported in the WDSL tab visually by color coding.
a. WSDL Apex Class creation Limitations
-No multipe bindings (which most do 1 and 12)
2. Be prepared to spend some time (read as parse, fix error, rise and repeat) many times
3. Best SF reference I found was Link:
4. In the end, you may find to get it working that the HTTP request and manual soap xml codeup to be the quickest solution to get it running, Twitter and Facebook integrations work this way. It was really faster in the end for me.
Best Regards,
Web: http://www.grigsbyconsultingllc.com