Calling https web service POST method from ABAP

Hi all,
I'm having some problems trying to call a credit card https web service from ABAP on 2004s SP11. I'm not using a proxy server and a call from a test https page on my local machine works fine. The page does not require a certificate.
Do I need to do anything in particular to make https work ? I've done calls to http services without any problems. The only difference from a programming perspective as far as I know is the scheme 2 instead of 1, and the server protocol changed to HTTPS.
All is fine until  I call method http_client->receive, at that point I get a return code of 1, http_communication_failure. 
Your suggestions & contributions will be greatly appreciated.
Cheers,
Wouter.
report zcreditcardtest .
data: wf_user type string .
data: wf_password type string .
data: rlength type i,
      txlen type string  .
data: http_client type ref to if_http_client .
data: wf_string type string .
data: wf_string1 type string .
data: wf_proxy type string ,
      wf_port type string .
selection-screen: begin of block a with frame .
parameters: crcard(16) type c lower case default '4242424242424242',
            cvn(4)     type c lower case default '564',
            year(2)    type c lower case default '07',
            month(2)   type c lower case default '11',
            amount(10) type c lower case default '100.00',
            cukey(4)   type c lower case default 'AUD',
            order(10)  type c lower case default 'AB1322-refund'.
selection-screen skip 1.
parameters: user(50) lower case,
            password(50) lower case ,
            p_proxy(100) lower case default '' ,
            p_port(4) default ''.
selection-screen: end of block a .
at selection-screen output.
  loop at screen.
    if screen-name = 'PASSWORD'.
      screen-invisible = '1'.
      modify screen.
    endif.
  endloop.
start-of-selection .
  clear wf_string .
  concatenate
  'order.type=capture&customer.username=SOMEUSER'
  '&customer.password=SOMEPASSWORD'
  '&customer.merchant=SOMEMERCHANT'
  '&card.PAN=' crcard
  '&card.CVN=' cvn
  '&card.expiryYear=' year
  '&card.expiryMonth=' month
  '&order.amount=' amount
  '&customer.orderNumber=' order
  '&card.currency=' cukey
  '&order.ECI=IVR'
  '&customer.captureOrderNumber=' order
  '&order.priority=1'
  '&message.end=null'
  into wf_string .
  break-point.
  clear :rlength , txlen .
  rlength = strlen( wf_string ) .
  move: rlength to txlen .
  clear: wf_proxy, wf_port .
  move: p_proxy to wf_proxy ,
        p_port to wf_port .
  call method cl_http_client=>create
    exporting
      host          = 'api.somewhere.com'
      service       = '80'
      scheme        = '2'                        "https
      proxy_host    = wf_proxy
      proxy_service = wf_port
    importing
      client        = http_client.
  http_client->propertytype_logon_popup = http_client->co_disabled.
  wf_user = user .
  wf_password = password .
* proxy server authentication
  call method http_client->authenticate
    exporting
      proxy_authentication = 'X'
      username             = wf_user
      password             = wf_password.
  call method http_client->request->set_header_field
    exporting
      name  = '~request_method'
      value = 'POST'.
  call method http_client->request->set_header_field
    exporting
      name  = '~server_protocol'
      value = 'HTTPS/1.0'.
  call method http_client->request->set_header_field
    exporting
      name  = '~request_uri'
      value = '/post/CreditCardAPIReceiver'.
  call method http_client->request->set_header_field
    exporting
      name  = 'Content-Type'
      value = 'application/x-www-form-urlencoded; charset=UTF-8'.
  call method http_client->request->set_header_field
    exporting
      name  = 'Content-Length'
      value = txlen.
  call method http_client->request->set_header_field
    exporting
      name  = 'HOST'
      value = 'api.somewhere.com:80'.
  call method http_client->request->set_cdata
    exporting
      data   = wf_string
      offset = 0
      length = rlength.
  call method http_client->send
    exceptions
      http_communication_failure = 1
      http_invalid_state         = 2.
  call method http_client->receive
    exceptions
      http_communication_failure = 1
      http_invalid_state         = 2
      http_processing_failed     = 3.
  if sy-subrc <> 0.
    message e000(oo) with 'Processing failed !'.
  endif.
  clear wf_string1 .
  wf_string1 = http_client->response->get_cdata( ).
* Further Processing of returned values would go here.

Well, finally got this running !
First of all I needed to download SAP Cryptographic Software and install it on the Web Application Server. Added some parameters to the profile, then set up some nodes in strust. Note 510007 describes the full process.
I then installed the certifcate I needed by opening the website in internet explorer and exporting it to a CER file and then importing it into the SSL client (Anonymous). The blog from Thomas Yung, "BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP" describes the process of exporting and importing certificates.
I then had to start the HTTPS service on my NW 2004s ABAP preview edition SP11. I set this up for port 443.
/osmicm --> GOTO --> SERVICES --> SERVICE --> CREATE
Then finally, the program needed a few changes :
  call method cl_http_client=>create
    exporting
      host          = 'api.somewhere.com'
      service       = '443'                       " <<-----  443 NOT 80
      scheme        = '2'                        "https
      ssl_id        = 'ANONYM'              " <<----- SSL_ID Added
      proxy_host    = wf_proxy
      proxy_service = wf_port
    importing
      client        = http_client.
and further in the program (thanks Andrew !) :
  call method http_client->request->set_header_field
    exporting
*   name  = '~server_protocol'             " <<<--- DELETE
      name  = '~request_protocol'         " <<<-- INSERT must be request
      value = 'HTTPS/1.0'.
and presto, we can now consume a https webservice via a POST method from within an ABAP program ! Nice.... Can I give myself 10 points ?

Similar Messages

  • How to call HTTP web services in an Interactive Form?

    Hi all,
    I am using Adobe Livecycle Designer currently in a trial 8.2 version.
    I need to invoke an HTTP Web Service (non-SOAP) in an Adobe Interactive Form. The Net.HTTP method does not work due to security reasons. The error message I get is:
    (german)
    " NotAllowedError: Sicherheitseinstellungen verhindern den Zugriff auf diese Eigenschaft oder Methode.
    Net.HTTP.request:28:XFA:form1[0]:mysubform[0]:Region[0]:change"
    In english this translates to: "Security settings prohibit the call of this property or method.
    And indeed the "Javascript for Acrobat API reference" includes the following note:
    "Note:This method can only be made outside the context of a document (for example, in a folder level JavaScript)."
    So this method seems to be excluded from use in an Adobe document, e. g. in an interactive form. But why is it then listed at all? Is there a way to call HTTP Web Services in an Adobe Interactive Form by somehow branching out the call outside the document itself? Of course I do not want to call a SOAP service which then calls the HTTP Web Service ;-)
    Is there any other way to invoke HTTP Web Services in an Adobe Interactive Form?
    Thanks a lot for your response!
    Regards
    Christoph

    Hello Kavita,
    patterns are not processed during editing. If you can't use the default behavior of the numeric field when a character is entered (handled when the user finished editing), you could use scripting to process input. Depending on what you want to do you could use the exit event or the change event.
    A change event has a property called "change" that caused the event. You could try "xfa.host.messageBox( upper(event.change) )" in FormCalc to show the characters in upper case.
    But, you should go this way only if the patterns for editing and for display and validation scripts can't be used in your case.
    Best regards
    Juergen

  • Workflow 2013: Call HTTP Web Service

    Is It possible to use the Call HTTP Web Service action in Workflow 2013 to make it send
    a document from a document libary with meta-data to ohter system webservice that I have implemented ?

    Hi,
    I have seen your similar thread post
    here, please check if Steve's reply is helpful.
    Thanks
    Best Regards
    Jerry Guo
    TechNet Community Support

  • Calling (HTTPS web service) in sharepoint 2013 workflow (SPD)

    I am using SharePoint 2013. I have created a list workflow in SharePoint Designer. I know there is an action "Call HTTP Web Service". Is it possible to access some webservice with authentication (username and password)?

    http://msdn.microsoft.com/en-us/library/office/dn567558%28v=office.15%29.aspx
    the OData formats support communication with anonymous web services as well as with those protected by various types of authentication. In short, you have full control over the request and response for each service call. This allows you to use a series of
    activities within a workflow to first authenticate using one service and obtain an OAuth token, and then include that token in future requests to services secured using the
    OAuth 2.0 protocol.
    http://blogs.msdn.com/b/kaevans/archive/2009/03/10/calling-sharepoint-lists-web-service-using-wcf.aspx
    <?xml version="1.0" encoding="utf-8" ?>
    2: <configuration>
    3: <system.serviceModel>
    4: <bindings>
    5: <basicHttpBinding>
    6: <binding name="ListsSoap">
    7: <security mode="TransportCredentialOnly">
    8: <transport clientCredentialType="Ntlm" />
    9: </security>
    10: </binding>
    11: </basicHttpBinding>
    12: </bindings>
    13: <client>
    14: <endpoint
    15: address="http://sharepoint/sites/HSC/_vti_bin/lists.asmx"
    16: binding="basicHttpBinding"
    17: bindingConfiguration="ListsSoap"
    18: contract="ServiceReference1.ListsSoap"
    19: name="ListsSoap" />
    20: </client>
    21: </system.serviceModel>
    22: </configuration>http://www.tonytestasworld.com/post/2009/06/04/How-To-Authenticate-and-Use-SharePoint-Web-Services-in-an-FBA-SharePoint-site.aspx

  • HOW TO CALL A WEB SERVICE OR EJB FROM BPEL

    HI
    i want to call java web service or ejb from my bpel process. how can i do this.
    i am using oracle soa10.1.3.1.0 and jdeveloper 10.1.3.1.0 and oracle database xe 10g.
    thanks in advance K ROY

    You could deploy your EJB or Java under a web service into your OC4J, after that, you invoke a partnerlink from BPEL to the destination of wsdl will do. Also don't forget to add in your XSD schema as well.
    Thanks,
    Jyno

  • Calling https web service from pl/sql

    hi,
    i've to call a web service from my database, after some research, i've tryed to use utl_dbws package to get the job, i've managed to put to work some of the examples i saw, that allways use http. My webservice is invoked using https with some user credentials.
    i'me getting the following message:
    ORA-29532: Java call terminated by uncaught Java exception: HTTP transport error:
    javax.xml.soap.SOAPException: java.security.PrivilegedActionException:
    javax.xml.soap.SOAPException: Message send failed: Socket is closed
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 85
    i've tryed with this 2 procedures:
    declare
    service_ sys.utl_dbws.SERVICE;
    call_ sys.utl_dbws.CALL;
    service_qname sys.utl_dbws.QNAME;
    port_qname sys.utl_dbws.QNAME;
    operation_qname sys.utl_dbws.QNAME;
    string_type_qname sys.utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(100);
    retx_len number;
    params sys.utl_dbws.ANYDATA_LIST;
    wsm varchar2(4000);
    config varchar2(4000);
    request sys.XMLTYPE;
    response sys.XMLTYPE;
    begin
    Request := sys.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>'||
    ' <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'||
    ' <soap:Header>'||
    ' <UserCredentials xmlns="http://tempuri.org/">'||
    ' <UserID>username</UserID>'||
    ' <Password>password</Password>'||
    ' </UserCredentials>'||
    ' </soap:Header>'||
    ' <soap:Body>'||
    ' <GetInfo xmlns="http://tempuri.org/">'||
    ' <wsID>13</wsID>'||
    ' </GetInfo>'||
    ' </soap:Body>'||
    ' </soap:Envelope>');
    service_qname := sys.utl_dbws.to_qname(null, 'GetInfo');
    service_ := sys.utl_dbws.create_service(service_qname);
    operation_qname := sys.utl_dbws.to_qname('http://tempuri.org/', 'GetInfo');
    call_ := sys.utl_dbws.create_call(service_);
    sys.utl_dbws.set_target_endpoint_address(call_, 'https://ws.livesolutions.pt:8800/wsLivesolutions.asmx');
    sys.utl_dbws.set_property( call_
    , 'OPERATION_STYLE'
    , 'document'
    sys.utl_dbws.set_property( call_
    , 'SOAPACTION_URI'
    ,' https://ws.livesolutions.pt:8800/wsLivesolutions');
    response:= sys.utl_dbws.invoke(call_, request);
    END;
    declare
    service_ utl_dbws.SERVICE;
    call_ utl_dbws.CALL;
    service_qname utl_dbws.QNAME;
    port_qname utl_dbws.QNAME;
    operation_qname utl_dbws.QNAME;
    string_type_qname utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params utl_dbws.ANYDATA_LIST;
    l_input_params utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    request sys.XMLTYPE;
    response sys.XMLTYPE;
    begin
    l_namespace := 'http://tempuri.org/';
    service_qname := utl_dbws.to_qname(l_namespace, 'wsLivesolutions');
    service_ := utl_dbws.create_service(service_qname);
    port_qname := utl_dbws.to_qname(l_namespace, 'wsLivesolutionsSoap');
    operation_qname := utl_dbws.to_qname(l_namespace, 'GetInfo');
    call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
    utl_dbws.set_target_endpoint_address(call_, 'https://ws.livesolutions.pt:8800/wsLivesolutions.asmx');
    utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    utl_dbws.set_property(call_, 'SOAPACTION_URI', 'http://tempuri.org/GetInfo');
    utl_dbws.set_property(call_, 'OPERATION_STYLE', 'document');
    UTL_DBWS.set_property(call_, 'USERNAME', 'username');
    UTL_DBWS.set_property(call_, 'PASSWORD', 'password');
    string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'schema');
    utl_dbws.add_parameter(call_, 'wsID', string_type_qname, 'ParameterMode.IN');
    utl_dbws.set_return_type(call_, string_type_qname);
    params(0) := ANYDATA.convertnumber(13);
    retx := utl_dbws.invoke(call_, params);
    utl_dbws.release_service(service_);
    end;
    can anyone help me in this?
    thx

    Are you expecting us to guess at the message you received when you got the 28868?
    I guess: "the wallet is closed."
    If I guessed correctly then open it.
    ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "<your_wallet_password_here>";If I didn't guess correctly then you need to provide all of the information you neglected in your original post.
    Start with the version number.

  • How to call "https" web service from Oracle without certification.

    The reuirement is to call a secured web service (*https web service*) from Oracle9i without involving any additional cost.
    Initialy I tried with UTL_HTTP package but in vain as it is needed some certification. As per the requirement no additional cost should be involved with the implementation.
    So is there any way to achieve the above mentioned problem?
    Please let me know the responses with the sample code/steps.

    Please try not to double post. You have the ability to edit your original thread.
    Oh, BTW, try searching the forum. A quick search turned up this: HTTPS request signed by client certificate from PL/SQL procedure
    Check that out and maybe that will solve your problems.
    Thanks!

  • Connection close exception while calling HTTPS web service from BlackBerry 8100 using KSOAP

    Hi
    I am trying to call HTTPS we services using J2ME Polish application and using KSOAP.
    My Application works fine on other device Blackberry Bold, curve. But on BlackBerry 8100 pearl  it gives me 
    net.rim.device.api.io.connectionclosed exception.
    Device Description : BlackBerry Pearl 8100
    OS                       : 4.2
     Please help me out in this issue.
    Regards
    Amit Deshpande

    Hi
    I am trying to call HTTPS we services using J2ME Polish application and using KSOAP.
    My Application works fine on other device Blackberry Bold, curve. But on BlackBerry 8100 pearl  it gives me 
    net.rim.device.api.io.connectionclosed exception.
    Device Description : BlackBerry Pearl 8100
    OS                       : 4.2
     Please help me out in this issue.
    Regards
    Amit Deshpande

  • Call HTTP Web Service Retries Every 1 Minute

    I currently have a SharePoint 2013 workflow setup. This workflow calls an HTTP Web Service using the HTTP Get Method. The web service takes over a minute to execute what it needs to and respond. The workflow retries calling the web service every 1 minute
    if it doesn't get a response back. This is causing issues as the process is already running and doesn't need to be run again. Is there some setting or response/request header value that I can set to prevent the workflow from retrying the web service call every
    minute?
    Thank You,
    Jon

    Hi,
     As per your posting, I believe there is no direct approach in the workflow to check the web service status for every call. 
    Let me try to work on that and try to give you the appropriate solution.
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever you
    see a reply being an answer to the question of the thread, click "Mark As Answer

  • Call HTTP web service action not allowing HTTPS in SharePoint Designer 2013.

    HTTP works perfectly in browser and in workflow.
    HTTPS works perfectly in browser and hangs in workflow.
    Others having this issue have been advised to use OAuth2. OAuth2 is not an option without HTTPS, you're passing authorization tokens around in plaintext. This is not an acceptable solution.
    Please advise.

    It says HTTPS web services will have an Issue with the SharePoint Designer. 
    Thanks, Parth

  • Error in calling a web service of primavera from sap MII

    Hi All,
    I am trying to consume a web service of primavera p6 from SAP XMII 12.1
    I tested the web service from SOAP UI ,its working fine for me,but when I tested with MII ,connection is unsuccessful
    I have used the HTTP_Post Action block and entered the required information as specified correctly
    Error is:
    [ERROR] Post Action: error occured while trying to connect to the server Exception: [Connect timed out]
    I tested with web service action block of MII also but no luck now.
    Please explain me reason for hte error and how to get rid of it,
    Its very urgent,please help

    Hey,
    I think this is an authentication issue. Are you passing the user credentials in Web Service action block.
    Regards,
    Gita

  • SharePoint 2013 Designer Workflow Cannot find Action - Call Http web service

    Hi All,
    I Do not see the option in the workflow where i can add the action "Call HTTP Webservice.
    Am I doing something wrong.
    Thanks

    Hi Nick,
    Is only this action "Call HTTP Webservice" missing from SharePoint 2013 workflow?
    If other actions are also missing, you can reinstall and reconfigure workflow for SharePoint 2013.
    Please double check and make sure you create the SharePoint 2013 workflow platform .
    http://technet.microsoft.com/en-us/library/jj658588(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/jj164026(v=office.15).aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • Calling KM Web-Service with SSO from EJB

    Hello Community-Folks,
    i have developed an EJB which already uses KM-Webservices to interact from my NW 7.1 CE App-Server (SP5) with out KM on an NW 7.0 (where our Portal also runs on).
    For using the KM-WebService i have to authenticate to the KM. At the moment i use the following code to connect and authenticate
    rf = new RepositoryFrameworkWS(wsdlUrl, new QName(this.Default_QNSUri,this.Default_QNSLPart));
    vi = rf.getConfig1Port_Document();
    ((BindingProvider)vi).getRequestContext().put(BindingProvider.USERNAME_PROPERTY , username);
    ((BindingProvider)vi).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY , password);
    But this EJB itself is called from another bean of my application and from Java Web-Dynpro Apps on my NW 7.1 CE-Server. The user normally authenticate to my applcation and i now want to use that logged in user to authenticate to the KM also. In my example above i have to know user and password for HTTP-Basic-Authentication.
    But what do i have to do using a logon-Ticket instead?
    Ironically my Web-Dynpros are called from a Portal, and the user is athenticated to my Web-Dynpro-App using sso from the portal. In this WD-App i know want to authenticate against the KM (which resides on the portal where the user came from).
    Any hints are warmly welcome,
    regards
    Matthias

    Hi,
    And Could we know how you manage this?
    I'm also interested in resolving this kind of issue.
    Edited by: Xavier Tendron on Oct 19, 2009 3:23 PM

  • New to Web Services - need to call a HTTPS web service from PL/SQL

    I am new to Web Services and need to call HTTPS web service from PL/SQL program. I am using 10g Database.
    I have been reading there are 2 options -
    1. UTL_HTTP - with this package its possible to call HTTPS web services
    2. UTL_DBWS
    Questions -
    1. Is it possible to call a HTTPS web service using UTL_DBWS ? I have not been able to find any information on it.
    2. Can someone point me to UTL_HTTP and UTL_DBWS examples calling a HTTPS web service ?
    3. The HTTPS web service that I need to call needs username/password to connect - how will I incorporate this in the pl/sql code ?
    Appreciate the help.
    Cheers,
    newWebServicesUser

    Hi,
    1. UTL_DBWS not work for https from what I understand
    2. Here is a sample example:
    [http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php#]
    Be careful, you must change http/1.0 IN 1.1 inside package SOAP_API.
    Here is an example for a prime number where the SOAP message is already construct:
    CREATE OR REPLACE procedure test_ws_2
    IS
    http_req utl_http.req;
    http_resp utl_http.resp;
    request_env varchar2(32767);
    response_env varchar2(32767);
    begin
    -- Set proxy details if no direct net connection.
    UTL_HTTP.set_proxy('http://<USER>:<PASS>@10.0.2.21:8070', NULL);
    UTL_HTTP.set_persistent_conn_support(TRUE);
    request_env:='<?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">'||
    '<SOAP-ENV:Body><GetPrimeNumbers xmlns="http://microsoft.com/webservices/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
    '<max xsi:type="xsd:int">10</max>'||
    '</GetPrimeNumbers></SOAP-ENV:Body></SOAP-ENV:Envelope>';
    dbms_output.put_line('Length of Request:' || length(request_env));
    dbms_output.put_line ('Request: ' || request_env);
    http_req := utl_http.begin_request('http://www50.brinkster.com/vbfacileinpt/np.asmx','POST', utl_http.HTTP_VERSION_1_1);
    utl_http.set_header(http_req, 'Content-Type', 'text/xml; charset=utf-8');
    utl_http.set_header(http_req, 'Content-Length', length(request_env));
    utl_http.set_header(http_req, 'SOAPAction', '"http://microsoft.com/webservices/GetPrimeNumbers"');
    utl_http.write_text(http_req, request_env);
    dbms_output.put_line('');
    http_resp := utl_http.get_response(http_req);
    dbms_output.put_line('Response Received');
    dbms_output.put_line('--------------------------');
    dbms_output.put_line ( 'Status code: ' || http_resp.status_code );
    dbms_output.put_line ( 'Reason phrase: ' || http_resp.reason_phrase );
    utl_http.read_text(http_resp, response_env);
    dbms_output.put_line('Response: ');
    dbms_output.put_line(response_env);
    utl_http.end_response(http_resp);
    end test_ws_2;
    Otherwice for testing url, i recommand you to use that function: Re: Error using UTL_HTTP over HTTPS
    it's a verry helpful function when you have an error.
    wrote:
    When testing using UTL_HTTP, you MUST ensure that you open a new session after importing the SSL certificates into your Wallet,
    as I've learned (the hard way) that existing sessions point to the wallet contents that were present when the session was opened.
    If you don't realise/know this, it can cause a lot of additional frustration during testing, when you keep getting the ORA-29024 exception AFTER
    you've imported the SSL certificates................. ;) 3. i think you can use that after the begin_request but not sure :
    UTL_HTTP.set_authentication(r => http_req,
    username => ,
    password => ,
    scheme => ,
    for_proxy => );
    Edited by: Malebodja on Oct 22, 2009 6:53 AM
    Edited by: Malebodja on Oct 22, 2009 6:55 AM

  • Urgent - How to call a Web Services from PLSQL - Please help

    Hello,
    I am very much new to WebServices, need to call web services through PLSQL. I have a urgent requirement, where i need to call the web services by passing from some paramters to it and the web services will return a varchar values as 'PASSED' or 'FAILED'.
    Can you please approch me the best way to start with.
    Thanks,
    Srikanth.

    Hi,
    I need to do it from PLSQL API's not from JAVA.
    I have started developing the code through UTIL_HTTP. Getting lots of error.
    Can you please guide me through these error.
    Below is the wsdl and a blcok where i am trying to retrive the value from webservice.
    Hope this will help you.
    Code:
    declare
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    begin
    soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:soapCheckRequest1 wsdl:ns1="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <FirstName xsi:type="xsd:string">saddam</FirstName>
    <LastName xsi:type="xsd:string">hussein</LastName>
              <companyName xsi:type="xsd:string">samueladams</companyName>
              <address1 xsi:type="xsd:string">123 APT</address1>
              <address3 xsi:type="xsd:string">Atlanta</address3>
              <city xsi:type="xsd:string">uk</city>
              <stateOrRegion xsi:type="xsd:string">GA</stateOrRegion>
              <postalCode xsi:type="xsd:string">30338</postalCode>
              <email xsi:type="xsd:string">sj@samueladams</email>
              <isoCountryCode xsi:type="xsd:string">US</isoCountryCode>
              <endUserIP xsi:type="xsd:string">209.134.168.203</endUserIP>
    </ns1:soapCheckRequest1>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    http_req:= utl_http.begin_request
    ( 'http://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService'
    , 'POST'
    , 'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req, 'SOAPAction', ''); -- required to specify this is a SOAP communication
    utl_http.write_text(http_req, soap_request);
    http_resp:= utl_http.get_response(http_req);
    DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response---------------------');
    DBMS_OUTPUT.PUT_LINE('http_resp.status_code is :'||http_resp.status_code );
    DBMS_OUTPUT.PUT_LINE('http_resp.reason_phrase is :'||http_resp.reason_phrase);
    DBMS_OUTPUT.PUT_LINE('http_resp.http_version is :'||http_resp.http_version);
    DBMS_OUTPUT.PUT_LINE('http_resp.private_hndl is :'||http_resp.private_hndl);
    DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response----------------------');
    utl_http.read_text(http_resp, soap_respond);
    utl_http.end_response(http_resp);
    resp:= XMLType.createXML(soap_respond);
    resp:= resp.extract('/soap:Envelop/soap:Body/child::node()'
    , 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
    i:=0;
    loop
    dbms_output.put_line(substr(soap_respond,1+ i*255,250));
    i:= i+1;
    if i*250> length(soap_respond)
    then
    exit;
    end if;
    end loop;
    end;
    Error Message
    http_resp.reason_phrase is :Internal Server Error
    http_resp.http_version is :HTTP/1.1
    http_resp.private_hndl is :0
    -------utl_http.get_response----------------------
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultco
    apenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXParseException: The prefix &quot;ns1&quot; for element &quot;ns1:soapCheckRequest1&quot; is not bound.</faultstring><detail><ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">atlcms
    2.iss.net</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
    <?xml version="1.0" encoding="UTF-8" ?>
    - <wsdl:definitions targetNamespace="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:intf="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <!--
    WSDL created by Apache Axis version: 1.3
    Built on Oct 05, 2005 (05:23:37 EDT)
    -->
    - <wsdl:message name="soapCheckResponse1">
    <wsdl:part name="soapCheckReturn" type="soapenc:string" />
    </wsdl:message>
    - <wsdl:message name="soapCheckRequest1">
    <wsdl:part name="firstName" type="soapenc:string" />
    <wsdl:part name="lastName" type="soapenc:string" />
    <wsdl:part name="companyName" type="soapenc:string" />
    <wsdl:part name="address1" type="soapenc:string" />
    <wsdl:part name="address2" type="soapenc:string" />
    <wsdl:part name="address3" type="soapenc:string" />
    <wsdl:part name="city" type="soapenc:string" />
    <wsdl:part name="stateOrRegion" type="soapenc:string" />
    <wsdl:part name="postalCode" type="soapenc:string" />
    <wsdl:part name="email" type="soapenc:string" />
    <wsdl:part name="phone" type="soapenc:string" />
    <wsdl:part name="isoCountryCode" type="soapenc:string" />
    <wsdl:part name="endUserId" type="soapenc:string" />
    <wsdl:part name="endUserIP" type="soapenc:string" />
    <wsdl:part name="endUserSession" type="soapenc:string" />
    <wsdl:part name="performGovCheck" type="xsd:boolean" />
    <wsdl:part name="sendEmailNotification" type="xsd:boolean" />
    <wsdl:part name="screeningLevelBasedOnSuppliedCountryCode" type="xsd:boolean" />
    <wsdl:part name="screeningLevelBasedOnEndUserIP" type="xsd:boolean" />
    <wsdl:part name="soundexMatch" type="xsd:boolean" />
    </wsdl:message>
    - <wsdl:message name="soapCheckRequest">
    <wsdl:part name="firstName" type="soapenc:string" />
    <wsdl:part name="lastName" type="soapenc:string" />
    <wsdl:part name="companyName" type="soapenc:string" />
    <wsdl:part name="address1" type="soapenc:string" />
    <wsdl:part name="address2" type="soapenc:string" />
    <wsdl:part name="address3" type="soapenc:string" />
    <wsdl:part name="city" type="soapenc:string" />
    <wsdl:part name="stateOrRegion" type="soapenc:string" />
    <wsdl:part name="postalCode" type="soapenc:string" />
    <wsdl:part name="email" type="soapenc:string" />
    <wsdl:part name="phone" type="soapenc:string" />
    <wsdl:part name="isoCountryCode" type="soapenc:string" />
    <wsdl:part name="endUserId" type="soapenc:string" />
    <wsdl:part name="endUserIP" type="soapenc:string" />
    <wsdl:part name="endUserSession" type="soapenc:string" />
    <wsdl:part name="performGovCheck" type="xsd:boolean" />
    <wsdl:part name="sendEmailNotification" type="xsd:boolean" />
    <wsdl:part name="screeningLevelBasedOnEndUserIP" type="xsd:boolean" />
    <wsdl:part name="soundexMatch" type="xsd:boolean" />
    </wsdl:message>
    - <wsdl:message name="soapCheckResponse">
    Thanks and Regard,
    Srikanth

Maybe you are looking for

  • Acrobat 8 Standard installation file?

    Hi, Not sure if it's the right place, but is there a downloadable file to install Acrobat 8 standard (full) somewhere?   we set up a new PC we have to connect to the net and run through the updates.  Problem is sometimes we don't have net access easi

  • Looking for some RAID storage ideas...can anyone help?

    Hi, I'm looking for some recommendations out there. I'm going to be getting a new PowerMac tower with a cinema display and will also be looking to get some RAID-type storage for it so that I can do lots of video editing and photo storage. Ideally, I'

  • ORA-15063: ASM discovered an insufficient number of disks for diskgroup

    Hello DBAs, I have encountered this problem. I am using storage vendor snapshot capability. On my first node, I have 2 disks for ASM diskgroups. ORCL:DATA belongs to DATA diskgroup and ORCL:FLASH belongs to FLASH diskgroup. After making the snapshots

  • Elements 10 won't open a nef(raw) file?

    I downloaded photoshop elements 10.Uptated it.It still won't open a nef(raw) file.It just said it is the wrong type of file?What do I have to download to open and edit this type of file?

  • Strange happenings on Yosemite

    I have a MacBook Pro (Retina, 13 inch, early 2013, 8 GB, 256GB)  Running Yosemite 10.10 I noticed that every now and then the laptop seems to "go to sleep" or simply stop responding for sometimes several seconds up to about 20 seconds), and now just