Hi and thanks for reading about my problem and possibly providing me with some help!
I am working on a school project and I'm supposed to program a web application based on PHP/SOAP calls to a dynamics CRM server of a company. The amount of issues I've encountered is astounding and it seems nigh-impossible to find a decent tutorial-style page on the internet about this. (Trust me, I've tried)
Some more background you should know: I have no idea how to work with SOAP, end points of web applications, even PHP isn't something I'm too familiar with. Bear that in mind...
One of the recent issues is the SoapUI program (4.5.1, both the free and Pro version) causing rendering issues - probably an issue with hardware accelerated graphics since I had a very similar issue with Visual Studio 2012 and disabling this option fixed it perfectly. There doesn't seem to be an option to do this in SoapUI (nor in my catalyst control center nor in the screen resolution > advanced > troubleshooting 'settings' - this is greyed out)
Anyway, that's besides the point. I can handle that driving me nuts for a couple more days before I find some other computer to work on.
I've 'simulated' this CRM server by making a trial account for the CRM online program. Now I'm trying to send some generic requests to the web service using SoapUI (both SoapUI 4.5.1 and SoapUI Pro 4.5.1, the 14-day trial). In steps, here's what I did within the program so far:
1-Make a new project
a) named it 'MSCRMOnlineTest'
b) As "Initial WSDL" I added a WSDL file saved locally on my machine. This file was downloaded from my CRM Online Trial account under Customizations > Developer Resources > Organization Service. To clarify, it's the file obtained by going to this link: https://{OrganizationName}.api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl=wsdl0
c) The only option clicked was the very first one ('Create sample requests for all operations?')
I now had a list of 8 Operations with each 1 request automatically generated called 'Request 1'
2-Add endpoint
a) I opened up the request 1 from Retrieve (seemed like a good place to start - retrieving some data)
b) Saw the 'no endpoint set' message a the top, so I decided to add one. I added this:
https://{OrganizationName}.api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl=wsdl0
I know it's oddly the same as link that I got the WSDL file from, but it seemed the only sensible option?
3-Enter login credentials and started the test
a) Put in the login credentials in the 'Request Properties' box in the lower lefthand corner . This is the exact information that I use to log into the CRMOnline environment in the browser.
b) Pressed the play button (yey, something familiar!) and saw that the request was responded to (response time 249ms, 576 bytes).
c) Examined the XML output, which boiled down to this:
http://www.w3.org/2005/08/addressing/soap/fault s:Sender a:InvalidSecurity An error occurred when verifying security for the message.
4-Tried step 3 24x over with my computer set on every different timezone
This because apparantly, that's a common cause for this error code. Not that it helped any, it stayed exactly the same
My questions:
- Did I use all correct links/files/credentials/settings?
- How do I fix this error, or at least find some decent sources that can help me with it?
- Am I somewhat on the right track to discover what all my soap messages should look like?
- How do I continue from here?
- What else do I need to use it in a .php 'website'? (i.e. where a user puts in his login and can pick "retrieve data" to have it displayed and the likes)
If you need any more information, feel free to ask
Fast answers appreciated - This project has been driving me crazy for about 20 hours with little to no answers and many, many mysteries that need solving.
Cheers
Ward