C# Integration Request from CRM on demand

I am trying to query the CRM just to see what kind contacts it holds. But no matter what I do I keep on getting HTTP server error 500. Now I have read here that it usually means that I am using the wrong URL. However I am using the same URL I use to obtain the session. I am successful at obtaining jsessionid.
Here is how my code looks like:
_strSOAPURL += ";jsessionid=" + strJsessionId;
String xmlString = "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2002/xx/secext\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><ContactWS_ContactQueryPage_Input xmlns=\"urn:crmondemand/ws/contact/\"><PageSize>10</PageSize><ListOfContact xmlns=\"urn:/crmondemand/xml/contact\"><Contact><ContactFirstName /></Contact></ListOfContact></ContactWS_ContactQueryPage_Input></soap:Body></soap:Envelope>";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] bytesToWrite = encoding.GetBytes( xmlString );
HttpWebRequest req = (HttpWebRequest)WebRequest.Create( _strSOAPURL );
req.Method = "post";
req.ContentLength = bytesToWrite.Length;
req.Headers.Add( "SOAPAction", "\"\"" );
req.ContentType = "text/xml; charset=utf-8";
Stream newStream = req.GetRequestStream();
newStream.Write( bytesToWrite, 0, bytesToWrite.Length );
newStream.Close();
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
I am wondering is there anything on the CRM side of things I need to make sure is happening in order for me to use the service to run an integration query or am I missing any steps in my C# code?

I'm no expert, but you might find this suggestion helpful.
You appear to be sending a SOAPAction header with only a pair of quotation marks. From your code, it looks like you are attempting a Contact QueryPage using the generic WSDL. In that case, you should probably set the SOAPAction header to "document/urn:crmondemand/ws/contact/:ContactQueryPage".
In your code, you might change this line
req.Headers.Add( "SOAPAction", "\"\"" );
to this
req.Headers.Add( "SOAPAction", "\"document/urn:crmondemand/ws/contact/:ContactQueryPage\"" );
When you're having trouble with web services, it can be helpful to catch the response as well as the error message. The response body following an error sometimes includes helpful information.
For example:
try
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
catch (System.Net.WebException webex)
System.Net.WebResponse exresp = webex.Response;
System.IO.Stream stream = exresp.GetResponseStream();
System.IO.TextReader tr = new System.IO.StreamReader(stream);
System.Diagnostics.Debug.WriteLine("Error\r\n" + webex.ToString() + "\r\n" + tr.ReadToEnd());
With your original code, you should get an Error Message: The HTTP request did not contain a valid SOAPAction header. The value of the header was ""
I hope this helps.

Similar Messages

  • Integration from CRM on Demand

    Hi All,
    Is it possible to send integration request from siebel crm on demand.If so, How do we do it.
    I want to integrate CRM on demand with peoplesoft system.Is there any way for the same.
    Any help is appreciated.
    Thanks in advance.
    Vamsi.

    Hi,
    This approach includes use of Web Services Exposed by Oracle.
    (Navigate to Admin >>Web Services Administration >>Download Documentation button on your CRM Admin Account for a PDF Document on Web Services.
    Firstly, write code to query CRM for Opportunity and Lead created in last 1 hour
    Once the Code is written make sure you schedule it for execution say interval would be every 1 hour.
    Dump all the Queried data to People soft System accordingly.
    - Messer
    Edited by: Deepak H Andeli on Nov 27, 2009 12:28 PM

  • How to execute an internal WebService from CRM On Demand?

    Hello,
    I would like to know how to execute an internal WebService, for example Contact's WebService, from CRM On Demand?
    I have seen in the online documentation:
    "An integration event is a mechanism for triggering external processes that are based on changes (create, update, delete, associate, dissociate) to the records in Oracle CRM On Demand.
    You can specify which fields on a record that you want to track. If your company wants to use workflow rules to create integration events, contact Customer Care to request support for Integration Event Administration and to specify the total size of the integration event queues that you require".
    I have this option activated. In fact, I have tried to create a workflow rule to assign an integration event to call the WebService process, but I couldn't do it...
    Thank you and regards.

    Hi, sorry for the late answer. I now understand what you are trying to do, it is an automatic approach so you will need to use integration events.
    So if custom object 2 field is changed you have to generate an integration event with a workflow that triggers when modified record is saved. The event should be transfered to the queue you defined.
    What you need is an external componenet e.g. java component that is running in an application server and polls every (let's say 30 seconds for events in the queue. If there is an event in the queue you will need the custom object 3 Id and the value for the field you would like to update and afterwards you can update the related customonject3 record with a ws call.
    If you use java you can start the timer with a servlet lifecycle event (when application is up start the timer for polling)
    Best Regards
    SL

  • Failed to load data from CRM On Demand. ServerThe server is temporarily una

    Hi,
    I would just like to ask if any of you are encountering this error when sending SOAP requests to CRMOD. Is this just because CRM On-Demand is down?
    Failed to load data from CRM On
    Demand. ServerThe server is temporarily unavailable. Please try again later.
    thanks,
    John

    Hi Royston,
    The instance that we are accessing is: https://secure-ausomxdsa.crmondemand.com.
    I assume that it's a test environment. So I navigated to (https://ebusiness.siebel.com/odcustomercare/support/alerts/staging/index.asp) "Staging & Test Environments" -> "Planned Maintenance - Staging" (since there is no Testing link) and saw a calendar of downtimes which didn't quite match-up to the date when we encountered the error. We encountered the error on November 25, which was marked on the calendar as a planned 8-hour downtime. During that day we didn't encounter continuous downtime but just erratic spurs of the the error. Am I looking in the right place? Thanks

  • Outbound Integration in Siebel CRM On Demand

    As we know that only Inbound integration is possible in Siebel CRM on Demand.Has anybody ever done outbound integration in Siebel CRM on demand using Integration event or using ASP?
    Please repond soon.

    Hi Max,
    Thanks for your reply.
    I have built a workflow.
    Name : SH
    Record Type : Contact
    Trigger Event : When New record saved.
    Then created action .
    Name : Outbound Integration
    type : Integration Event
    I select 'Track Changes' for two fields named : First Name and Last Name as it will save changes in a file whenever any new record saved.
    Then I went to Webservice Administration and downloaded zip file for Integration event wsdl.Also I downloaded wsdl file for contact.
    There are few points where I am stuck.
    1) In pdf,they talked about one xml file which will save all changes whenever any new contact record saved because it is created as Integration Event.
    Which file is this?(Integration Event.wsdl???)
    2) Should I use any of the above downloaded wsdl files to create webservice in siebel as I am doing integration b/w Siebel ondemand and Siebel CRM??
    Can you give me a glimpse of the program to ping the queue ?Where do I need to write code in CRM on Demand?Which changes do I need to do in SIebel CRM?
    Thanks for your help.

  • Hello I'm with you old client I've got some observations When you request from your Website demand is refused I would like to inquire why the request is rejected Please refer my account and make sure rejected previous applications Thank you very much

    Hello
    I'm with you old client I've got some observations
    When you request from your Website demand is refused I would like to inquire why the request is rejected
    Please refer my account and make sure rejected previous applications
    Thank you very much

    Check the Ethernet connection to the AirPort Express. Make sure that the Ethernet connection from the Comcast modem is connected to the WAN port on the back of the AirPort Express. The WAN port is the one with the circle of dots shown over the port.
    It sounds like you are connected to the Ethernet LAN port.

  • Migration from CRM On Demand to On Premise

    Hi,
    Anyone can throw some light on the migration of transactional data from CoD to On premise (7.0 and above)?
    Regards,
    Aneesh

    Hi Gauri,
    As far as I know there are custom programs which need to be developed to migrate data from on demand to on premise solution.
    This is what we had done when we migrated to on premise.
    Regards
    Yogesh

  • About Oracle CRM On Demand Integration package

    Hi All,
    We are using Staging Environment version of Oracle CRM On demand.
    I find description about Oracle CRM On Demand Integration package which can creates a seamless front- and back-office user experience with prebuilt integrations between Oracle CRM On Demand and Oracle E-Business Suite, Siebel CRM, and JD Edwards EnterpriseOne.
    Do we have to pay for this package, if do, how much?
    I can't find any price information on oracle website.
    Thanks!

    Hi, Yes it is paid and has its own technical pre-requisites to deploy and use the same. I believe you may have to speak to your Oracle sales representative to get the pricing related info
    -- Venky CRMIT

  • Consumer Contact's Web Service CRM On Demand: Problem to do an operation!

    Hi,
    I'm trying to consume a Web service offered by CRM On Demand, namely it is the Contact object.
    The steps I followed were:
    1) Download the file .wsdl associated with contact from CRM On Demand
    2) Generate Proxy web service from JDeveloper 10g (version: 10.1.3)
    3) Configure the client to consume the resource and to do, for example, the contact’s insertion.
    I can make a login and a logout on the Web Service correctly, but when I try to do an insertion I can’t do it.
    The log generated by JDeveloper when running the client is as follows:
    WARNING: Unable to connect to URL: https://secure-ausomxgfa.crmondemand.com/Services/Integration due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: www-proxy.au.oracle.com
    error: java.rmi.RemoteException: ; nested exception is:
    HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: www-proxy.au.oracle.com
    java.rmi.RemoteException: ; nested exception is:
    HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: www-proxy.au.oracle.com
    at crmondemand.runtime.Contact_Stub.contactInsert(Contact_Stub.java:283)
    at crmondemand.ContactClient.contactInsert(ContactClient.java:96)
    at crmondemand.ContactClient.main(ContactClient.java:71)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: www-proxy.au.oracle.com
    at oracle.j2ee.ws.common.util.exception.JAXRPCExceptionBase.<init>(JAXRPCExceptionBase.java:93)
    at oracle.j2ee.ws.common.util.exception.JAXRPCExceptionBase.<init>(JAXRPCExceptionBase.java:89)
    at oracle.j2ee.ws.client.ClientTransportException.<init>(ClientTransportException.java:33)
    at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:144)
    at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:121)
    at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:169)
    at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:111)
    at crmondemand.runtime.Contact_Stub.contactInsert(Contact_Stub.java:265)
    ... 2 more
    The HTTP Proxy Server settings (Tools-> Preferences-> Web Browser and Proxy) in JDevloper is:
    - Host name: www-proxy.au.oracle.com
    - Port: 80
    - Exceptions: xpvmware | *. oracle.com | *. peoplesoft.com | *. jdedwards.com | *. mlab.jdedwards.com | *. oracle.com | *. peoplesoft.com | *. jdedwards.com | * . mlab.jdedwards.com
    - No authentication.
    I'm not sure if it's a problem with HTTP proxy server settings or URL/ENDPOINT problem, because maybe I am trying to access an incorrect URL.
    If I try to access from the browser to this URL I can't access the wsdl, so I do not know if this address is correct, but is specified in the file. Wsdl:
    <soap:address location="https://secure-ausomxgfa.crmondemand.com/Services/Integration" />
    For this reason, I supposed that it is correct...
    I have tried to access via URL with the follows:
    - https://secure-ausomxgfa.crmondemand.com/Services/Integration
    - https://secure-ausomxgfa.crmondemand.com/Services/Integration/Contact
    - https://secure-ausomxgfa.crmondemand.com/Services/Integration/Contact?wsdl
    In all I have the next response from the Internet browser:
    <?xml version="1.0" encoding="UTF-8" ?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Client</faultcode>
    <faultstring>Client</faultstring>
    <detail>
    <ErrorCode>SBL-ODU-01001</ErrorCode>
    <ErrorMessage>An invalid command was specified: doGet with no data</ErrorMessage>
    </detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    Since the client generated, I have tried with the follows:
    1) System.setProperty("javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY", endpoint);
    2) myPort.setEndpoint(endpoint);
    where endpoint = "https://secure-ausomxdsa.crmondemand.com/Services/Integration" + ";jsessionid=" + idSesion;
    or "https://secure-ausomxdsa.crmondemand.com/Services/Integration" (with both options I can do the operation...)
    and idSesion = logon("https://secure-ausomxdsa.crmondemand.com/Services/Integration",USERNAME,PASSWORD);
    Do you know what is the correct URL (endpoint)?
    Is that a correct HTTP proxy server configuration to invoke a Web service CRM On Demand? But so, what is the correct setting? And if it is a good configuration, what am I doing wrong?
    The source code from my client is:
    String idSesionFull=null, idSesion=null, endpoint=null;
    try {
    crmod.DefaultClient myPort = new crmod.DefaultClient();
    System.out.println("Invoking: " + myPort.getEndpoint());
    ListOfContact list = new ListOfContact();
    ListOfContact outlist = new ListOfContact();
    Contact[] contacts=new Contact[2];
    Contact contact=new Contact();
    //ContactWS_ContactInsert_Input in=new ContactWS_ContactInsert_Input();
    //ContactWS_ContactInsert_Output out=new ContactWS_ContactInsert_Output();
    // Login WS (HTTPS)
    //URL = "https://secure-ausomxdsa.crmondemand.com/Services/Integration"
    idSesionFull=conexionWS_CRM.logon(URL,USERNAME,PASSWORD);
    idSesion = conexionWS_CRM.getSessionId(idSesionFull);
    //Another option I have tested: endpoint = "https://secure-ausomxdsa.crmondemand.com/Services/Integration" + ";jsessionid=" + idSesion;
    endpoint = "https://secure-ausomxdsa.crmondemand.com/Services/Integration";
    myPort.setUsername(USERNAME);
    myPort.setPassword(PASSWORD);
    myPort.setEndpoint(endpoint);
    System.setProperty("javax.xml.rpc.service.endpoint.address", endpoint);
    System.setProperty("javax.xml.rpc.security.auth.username", USER);
    System.setProperty("javax.xml.rpc.security.auth.password", PASSWORD);
    System.setProperty("javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY", endpoint);
    // Add contacts
    for (int i = 0; i < contacts.length; i++) {
    contact.setContactId("WSCRM"+i);
    contact.setContactFirstName("JDeveloper"+i);
    contact.setContactLastName("prove"+i);
    contact.setCellularPhone("77777777"+i);
    contact.setExternalSystemId("1234"+i);
    contacts=contact;
    list.setContact(contacts);
    //in.setListOfContact(list);
    //in.setEcho("OFF");
    outlist=myPort.contactInsert(list,"OFF"); //<--- Is it correct????
    Contact[] results = new Contact[2];
    Contact result = new Contact();
    for (int i = 0; i < contacts.length; i++) {
    results=outlist.getContact();
    System.out.println("ID:"+results[i].getContactId()+" Name:"+results[i].getContactFirstName());
    // Logout WS (HTTPS)
    logoff(URL, idSesion);
    } catch (Exception ex) {
    System.out.println("error: "+ex);
    ex.printStackTrace();
    logoff(URL, idSesion);
    Any idea to solve this problem?
    Thank you very much in advance for any help.
    Edited by: user12158402 on 03-nov-2009 12:39
    Edited by: user12158402 on 03-nov-2009 12:45
    Edited by: user12158402 on 03-nov-2009 12:47

    Hi Royston,
    thank you for your help, but unfortunately I have the same error message.
    Here is the XML I use, I added the authentication that you provided me.
    <?xml version="1.0" encoding="utf-8"?>
    <soapenv:Header>
         <wsse:Security>
              <wsse:UsernameToken>
                   <wsse:Username>EUROMASTERFR/AELMASKOUNE</wsse:Username>
                   <wsse:Password>aqwAZE19</wsse:Password>
              </wsse:UsernameToken>
         </wsse:Security>
    </soapenv:Header>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:crmondemand/ws/account/10/2004" xmlns:xsdLocal1="urn:/crmondemand/xml/account">
    <soap:Body>
    <tns:AccountWS_AccountQueryPage_Input>
    <tns:PageSize>10</tns:PageSize>
    <xsdLocal1:ListOfAccount>
    <xsdLocal1:Account>
    <xsdLocal1:CurrencyCode/>
    <xsdLocal1:AccountName>IBM</xsdLocal1:AccountName>
    </xsdLocal1:Account>
    </xsdLocal1:ListOfAccount>
    <tns:StartRowNum>0</tns:StartRowNum>
    </tns:AccountWS_AccountQueryPage_Input>
    </soap:Body>
    </soap:Envelope>
    but for (xmlns: WSSE = "http://schemas.xmlsoap.org/ws/2002/xx/secext" do not forget to enclose the tag with a '>') I do not know to include it.
    Best Regards.
    Anas

  • New Release: Oracle Policy Automation Connector for CRM On Demand 10.3.0

    h1. Oracle Policy Automation Connector for CRM On Demand 10.3.0
    Oracle Policy Automation Connector for CRM On Demand 10.3.0 is now available via Oracle E-Delivery (http://edelivery.oracle.com/)
    This release includes:
    Oracle Policy Modeling Imports CRM On Demand Data Model
    Oracle Policy Modeling 10.3 supports importing the data model of a CRM On Demand web service, including the selection of objects to map for loading data, and both saving and inserting data.
    Oracle Policy Automation 10.3 Runtime
    This version of the Oracle Policy Automation Connector for CRM On Demand works with Oracle Policy Automation 10.3 runtime. Rulebases must be built from Oracle Policy Modeling 10.3.
    Oracle Web Determinations Integration
    The connector allows users to pre-seed Oracle Web Determinations with data from CRM On Demand objects and update the same or new CRM On Demand objects with data collected during the interview session.
    Please read the release notes and installation guide contained in the media pack for more details.
    The build number for this release is 10.3.0.2048.0
    -----

    Hi All,
    Just a Clarification about the Oracle Lite Webcast, only customers with a valid CSI.
    Will be able to Connect to the Webcast.
    Regards.
    Marc

  • How to comsume another application´s web service directly from crm on deman

    Hi,
    I am incharge of a integration project between EBS 11.5.10.2 and CRM On Demand via web services
    1. Assumptions:
    Not to use additional architecture (Ex. Fusion Middleware)
    2. One of the requirements is: From CRM On Demand to invoke a EBS web service to see and update item´s stock.
    3. Advances
    We already developed EBS web services to see and update Item´s Stocks
    We need to consume the EBS Web service developed directly from CRM on Demand, but we haven´t found a way.
    In CRM On Demand Panel Administration there is a section for web service integration but just for exposing CRM On Demand objects and functionalities, but not for consuming another application´s web service.
    Mean while we are developing a web service client (web application) to consume EBS web service just for demonstrating its functionality to see and update EBS item stock.
    I will appreciate your help!!!
    Roger
    Edited by: Roycito on 25-jun-2010 9:09

    Roger, I would recommend posting this question on the CRM On Demand Integration Development forum. Thanks for your help.

  • Interwise meeting request from SAP.

    hi,
    Could anybody help me in finding the API/program to create an interwise meeting request ??
    thanks in advance!
    p.s. useful replies will certainly be awarded.

    Hi,
    We're using the Client-base groupware integration.
    After having created an appointment within CRM, it is replicated to Outlook but there is not the possiblity to accept or reject the appointment.
    Do you know why ?
    Is there another way to create Meeting Request from CRM ?
    And why an attendee can only be a CRM user ?
    Thanks a lot,
    Benoî

  • Creation of Credit Memo request from Invoice.

    Dear All,
    We have requirement for creation of CRM Credit Memo request from CRM Invoice.
    Please guide any one if you have clue on this requirement.
    Regards,
    Mallik Kosuru

    This can be achieved by creating  complaints . You create a complaint -credit memo request-credit memo  with reference to billing document, refer to C28 CRM complaints for more info.

  • Integrating CRM On Demand with EBS (12.1.3) using BPEL

    Hi,
    I am working on POC for the integration between EBS and CRM On Demand. We are EBS R12.1.3 and have SOA Suite 10g.
    We are planning to use BPEL to do this communication between EBS and CRM OD. Is this something that is possible using BPEL. In additional to BPEL, do we need Java coding or any other language coding?
    I donwloaded the Account WSDL from the CRM OD website. Created a new BPEL Process using that WSDL. I read that we need to pass the login credentials using a soap header. Can you please let me know how we can do this in a BPEL Process.
    Any pointers would help me alot.
    Thanks in advance.
    Thanks,
    Sreenivas.

    Hi,
    I found a document about using this feature with EBS 11i. I could not find any document that says it is not supported.
    http://simplelogic.in/casestudy/Oracle_EBS_11i_Resumable_Space_Allocation_For_Manufacturing_Sector.pdf
    Regards,
    Bashar

  • How actually Oracle CRM On Demand and Outlook integration works?

    Hi Everyone,
    Here my question means not how to configure this integration but what is behind this technology. Can someone put some light on technical aspect of it? I wanted to know on what technology this integration is based on and other details if u can provide.
    Please help.
    Regards,
    Abhay

    Hello Abhay,
    Actually I am not looking for this. I need to know on what this integration is based on? Like if it is based on Webservices, API, HTTPS Request like that...! Can you tell me about it?Unfortunately I cannot share details of the design. If you can tell me what you are trying to do, I'll do my best to provide you with whatever information I have available.
    Please also it will be great if anyone can tell me if such integration works fine through Citrix connection?Oracle does not currently certify or support desktop or application virtualization solutions, such as Citrix products, for use with Oracle CRM On Demand. Please refer to "CRM On Demand - Support - Citrix [ID 958822.1]" in http://support.oracle.com for more information.
    Thanks,
    Sean

Maybe you are looking for

  • Problem in converting Spool to PDF file, having non-English characters

    Hi All,         I have problem in converting Spool to PDF format. Scenario : I have a spool which has non-English characters. I am using CONVERT_ABAPSPOOLJOB_2_PDF  FM to perform conversion. But my output is having junk values( ie # ) for non-English

  • How to define a keyboard shortcut that includes a function key?

    I was trying to set up a keyboard shortcut for a Service in Sys.Prefs -> Keyboard -> Keyboard Shortcuts and discovered that if I attempt to use a function key as a part of the shortcut that it disappears out of the key entry field as soon I click off

  • Duke's Bookstore

    I have deployed the war file for bookstore6 provided by tutorial.i can see the map on the screen by typing http://localhost:1091/bookstore6. But, when i click on a link from map it gives me error javax.servlet.ServletException      org.apache.jasper.

  • IMovie pictures blurry

    I am currently working on a iMovie Project consisting of pictures. I scanned some of the pictures on to my computer and then imported them to iPhoto as well as importing some from other places. From there I created the iMovie. All of the pictures sho

  • Webcam continuous capture and save to avi later

    Hello, I am new to LabVIEW.  If anyone could help with the USB webcam and LabVIEW 2010.  I have all the IMAQ drivers installed. What I am try to do is capture video continuously into a buffer memory or an array and be able to extract that buffer vide