Tags
Before we begin using Siebel CRM On Demand’s web services, we require the WSDL files. The WSDL files are specific to the account and can be downloaded by logging in to Siebel COD.
Create a new SoapUI project and add the WSDL as initial WSDL. SoapUI will create a new project with placeholder requests for all operations. Let’s open ContactQueryPage operation from SoapUI.
The endpoint path will be something like – https://secure-ausoxxxxx.crmondemand.com/Services/Integration
This path is unique to your instance of Siebel COD.
Next lets remove the body of input and replace it with –
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <con:ContactQueryPage_Input xmlns:con="urn:crmondemand/ws/ecbs/contact/" xmlns:quer="urn:/crmondemand/xml/Contact/Query"> <quer:ListOfContact startrownum="0" pagesize="100" recordcountneeded="true"> <quer:Contact searchspec="[ContactFirstName] LIKE 'John'"> <quer:Id/> <quer:ContactFirstName/> <quer:ContactLastName/> <quer:AccountId/> </quer:Contact> </quer:ListOfContact> </con:ContactQueryPage_Input> </soapenv:Body> </soapenv:Envelope>
This results in Soap Fault response with Siebel error code SBL-ODU-01006 and message : “Internal Error: Session is not available. Aborting.”
This is because we still haven’t added username/password for authentication. There is another option to first get the session and then pass that value in header of the request. However I prefer to use the Stateless version above, as it separates the responsibility of handling session.
Let’s make 2 changes to fix this error.
1) Replace first line of the SOAP request with –
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">
2) Add these lines just below the SOAP Envelope element –
<soapenv:Header> <wsse:Security> <wsse:UsernameToken> <wsse:Username>your_siebel_username</wsse:Username> <wsse:Password Type="wsse:PasswordText">your_siebel_password</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header>
What we’ve done here is added WS-SECURITY headers to the SOAP request.
Now the request should run just fine.
Note –
1) You need to add any fields you need to the request before they can be returned by Siebel CRM. e.g., <ContactFirstName/>
2) Its better to confirm data actually exists by logging through web-console.
Great work!!!!!
am using PHP. Is the below one correct way of passing args? how to specify searcspec? Is there any documentation for PHP
$args = array(‘ListOfContact’=>array(
‘Contact’ => array(
‘ContactFirstName’ => ‘test’,
‘ContactLastName’ => ”,
‘AccountId’ => ”
)
));
Hi Vijay,
Thanks for your comment. Unfortunately I’m not conversant with PHP. My background is java. Let me know if you I can help in any other way.
Regards,
Padmarag
Am using the below inputs, but am getting the error Error: HTTP Error: Unsupported HTTP response status 400 Bad Request (soapclient->response has contents of the response) for customobject4 … I got output for contact and customobject3 WSDL.
$param = ”
“;
$namespace= “urn:crmondemand/ws/customobject4/10/2004”;
$soapaction = “document/urn:crmondemand/ws/customobject4/10/2004:CustomObject4QueryPage”;
$method = “CustomObject4WS_CustomObject4QueryPage_Input”;
Hi Vijay,
I’m travelling international right now and would not have access to net for around 30 hrs. A quick search returned this result – http://12s.twelvestone.com/conversations/nusoap-mappoint-web-service-problem?page=1
Can you see if its helpful? If not, let me know I’ll take a look tomorrow.
Regards,
Padmarag
your help on this is highly appreciated..
Thanks Padmarag.. That url is not helpful.
cracked atlast. Thanks for your help
Hello,
i got a error Message, does anybody know the reason for the problem?
SOAP-ENV:Client
Argument ‘urn:crmondemand/ws/contact/10/2004:ContactQueryPage_Input’ für Vorgang ‘ContactQueryPage’ ist unbekannt.(SBL-EAI-04304)
OnDemandServicesObjMgr_enu_97261.log
(SBL-EAI-04304)
Argument ‘urn:crmondemand/ws/contact/10/2004:ContactQueryPage_Input’ für Vorgang ‘ContactQueryPage’ ist unbekannt.(SBL-EAI-04304)
Regards
Johannes
Hey Johannes,
I think it’s most likely due to incorrect request XML. Can you post full request or at least the relevant parts?
Regards,
Padmarag