Calling web service -authentication using passwordtext

Hi,
My requirement is to call a web service . WS which I consume need password type as Passwordtext.
I did following step
1.From SE80 created Enterprise Services using WSDL file.
2.In SOAMANAGER select my consumer proxy.
3.Created Logical port ZXYZ by selecting WSDL based configuration and gave WSDL url.
When I execute this proxy Iu2019m getting login error.
I check the blog /people/wolfgang.bauer2/blog/2009/07/08/call-wcf-service-net-from-sap-with-usernametoken-and-ssl
If use web.config file then I'm getting error in Method: IF_SIDL_DESERIALIZER~DESERIALIZE of program CL_SIDL_DESERIALIZER==========CP. Reason is this method check for url http://schemas.xmlsoap.org/wsdl/ in the file.
When checked the soapui using the password type as passwordtext, Soap header is formed like below and it work fine without any issue.
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>USERNAME</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">5oHK2KjEop8a6OPsl3pw6Q==</wsse:Nonce>
<wsu:Created>2011-08-17T17:58:50.068Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
Can any one help me how to pass password type as passwordtext. And also can you help me on custom binding.
Thanks in advance

Hi Pradeep,
My Abap skills are really limited but I can offer a suggestion to start with, you will need to explicitly add these WS-Security nodes to the SOAP header before the consumer proxy initiates the runtime call.
You do this by using the IF_WSPROTOCOL_WS_HEADER interface. Follow this thread (as well as the referenced thread where Thomas Jung gives a code example) for more detail on how to implement this in the consumer proxy:
[External Web Service Requires - WS-Security Header (calling from ABAP);
Regards, Trevor

Similar Messages

  • Web Service Authentication using Microsoft Active Directory

    Hi
    Is there a way to create Oracle Java Web Services that requires authentication using Active Directory?
    Regards,
    Néstor Boscán

    If you use the SOA Suite the Oracle Web Service Manager is included in there. Using this you can add steps that will authenticate against an AD.
    cu
    Andreas

  • Calling Web services using SOAP

    Hi,
    I am trying to execute a function through a webservice using a SOAP
    package and am getting the following error:ORA-30625: method dispatch
    on NULL SELF argument is disallowed. I think this is to do with one of
    the parameters being null but dont know how to fix this. Following is
    the function:
    CREATE OR REPLACE FUNCTION ILACPMSPRC.GET_GREETING_fnc (p_name IN
    VARCHAR2
    --, p_date VARCHAR2
    , p_age VARCHAR2 )
    RETURN NUMBER
    AS
    l_request soap_api_pkg.t_request;
    l_response soap_api_pkg.t_response;
    l_price NUMBER;
    -- DBMS_OUTPUT.ENABLE(20000);
    BEGIN
    DBMS_OUTPUT.ENABLE(20000);
    DBMS_OUTPUT.PUT_LINE('BEGIN');
    -- Set proxy details if no direct net connection.
    --UTL_HTTP.set_proxy('myproxy:4480', NULL);
    --UTL_HTTP.set_persistent_conn_support(TRUE);
    -- Set proxy authentication if necessary.
    --soap_api.set_proxy_authentication(p_username => 'myusername',
    -- p_password => 'mypassword');
    l_request := soap_api_pkg.new_request(p_method => 'ns1:validate',
    p_namespace => 'xmlns:ns1="http://
    impl.webservice.validation.workmgt.cb.irishlife.ie/xsd"');
    -- parameter 1 is name
    soap_api_pkg.add_parameter(p_request => l_request,
    p_name => 'workType',
    p_type => 'xsd:string',
    p_value => p_name);
    -- parameter 2 is date
    soap_api_pkg.add_parameter(p_request => l_request,
    p_name => 'workItemNo',
    p_type => 'xsd:string',
    p_value => 'ABC');
    --p_value   => '2007-01-01T00:00:00Z');
    -- parameter 3 is age
    soap_api_pkg.add_parameter(p_request => l_request,
    p_name => 'indexName',
    p_type => 'xsd:string',
    p_value => p_age);
    l_response := soap_api_pkg.invoke(p_request => l_request,
    p_url => 'http://
    10.253.55.139:7400/axis2/services/ValidationService',
    p_action => 'http://
    10.253.55.139:7400/axis2/services/ValidationService/validate');
    if l_response.doc is not null then
    dbms_output.put_line('the doc is not null');
    end if;
    DBMS_OUTPUT.PUT_LINE ( 'p_name = ' || p_name );
    HERE l_price := soap_api_pkg.get_return_value(p_response =>
    l_response,
    p_name =>
    'validateResponse',
    p_namespace =>
    'xmlns:ns1="http://impl.webservice.validation.workmgt.cb.irishlife.ie/
    xsd"');
    if l_price is null then
    dbms_output.put_line('opps, the price is null');
    end if;
    DBMS_OUTPUT.PUT_LINE('PRICE:'||l_price);
    RETURN l_price;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(SQLCODE || ', ' || SQLERRM);
    RETURN NULL;
    END GET_GREETING_fnc;
    Where HERE is marked is where the problem lies...the package body is
    here:
    CREATE OR REPLACE PACKAGE BODY SOAP_API_PKG AS
    -- Name : http://www.oracle-base.com/dba/miscellaneous/soap_api
    -- Author : DR Timothy S Hall
    -- Description : SOAP related functions for consuming web services.
    -- Ammedments :
    -- When Who What
    -- =========== ========
    =================================================
    -- 04-OCT-2003 Tim Hall Initial Creation
    -- 23-FEB-2006 Tim Hall Parameterized the "soap" envelope tags.
    -- 08-JUN-2006 Tim Hall Add proxy authentication functionality.
    g_proxy_username VARCHAR2(50) := NULL;
    g_proxy_password VARCHAR2(50) := NULL;
    PROCEDURE set_proxy_authentication(p_username IN VARCHAR2,
    p_password IN VARCHAR2) AS
    BEGIN
    g_proxy_username := p_username;
    g_proxy_password := p_password;
    END;
    FUNCTION new_request(p_method IN VARCHAR2,
    p_namespace IN VARCHAR2,
    p_envelope_tag IN VARCHAR2 DEFAULT 'SOAP-ENV')
    RETURN t_request AS
    l_request t_request;
    BEGIN
    l_request.method := p_method;
    l_request.namespace := p_namespace;
    l_request.envelope_tag := p_envelope_tag;
    RETURN l_request;
    END;
    PROCEDURE add_parameter(p_request IN OUT NOCOPY t_request,
    p_name IN VARCHAR2,
    p_type IN VARCHAR2,
    p_value IN VARCHAR2) AS
    BEGIN
    p_request.body := p_request.body||'<'||p_name||' xsi:type="'||
    p_type||'">'||p_value||'</'||p_name||'>';
    DBMS_OUTPUT.PUT_LINE ( 'p_request.body = ' || p_request.body );
    END;
    --PROCEDURE add_parameter(p_request    IN OUT NOCOPY  t_request,
    -- p_name IN VARCHAR2,
    -- p_type IN DATE,
    -- p_value IN VARCHAR2) AS
    --BEGIN
    -- p_request.body := p_request.body||'<'||p_name||' xsi:type="'||
    p_type||'">'||p_value||'</'||p_name||'>';
    --END;
    --PROCEDURE add_parameter(p_request    IN OUT NOCOPY  t_request,
    -- p_name IN VARCHAR2,
    -- p_type IN INTEGER,
    -- p_value IN VARCHAR2) AS
    --BEGIN
    -- p_request.body := p_request.body||'<'||p_name||' xsi:type="'||
    p_type||'">'||p_value||'</'||p_name||'>';
    --END;
    PROCEDURE generate_envelope(p_request IN OUT NOCOPY t_request,
    p_env IN OUT NOCOPY VARCHAR2) AS
    BEGIN
    p_env := '<'||p_request.envelope_tag||':Envelope xmlns:'||
    p_request.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/"
    ' ||
    'xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">' ||
    '<'||p_request.envelope_tag||':Body>' ||
    '<'||p_request.method||' '||p_request.namespace||' '||
    p_request.envelope_tag||':encodingStyle="http://schemas.xmlsoap.org/
    soap/encoding/">' ||
    p_request.body ||
    '</'||p_request.method||'>' ||
    '</'||p_request.envelope_tag||':Body>' ||
    '</'||p_request.envelope_tag||':Envelope>';
    END;
    PROCEDURE show_envelope(p_env IN VARCHAR2) AS
    i PLS_INTEGER;
    l_len PLS_INTEGER;
    BEGIN
    i := 1; l_len := LENGTH(p_env);
    WHILE (i <= l_len) LOOP
    DBMS_OUTPUT.put_line(SUBSTR(p_env, i, 60));
    i := i + 60;
    END LOOP;
    END;
    PROCEDURE check_fault(p_response IN OUT NOCOPY t_response) AS
    l_fault_node XMLTYPE;
    l_fault_code VARCHAR2(256);
    l_fault_string VARCHAR2(32767);
    BEGIN
    dbms_output.put_line('midas8-1');
    l_fault_node := p_response.doc.extract('/'||
    p_response.envelope_tag||':Fault',
    'xmlns:'||
    p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/');
    dbms_output.put_line('midas8-2');
    IF (l_fault_node IS NOT NULL) THEN
    dbms_output.put_line('midas8-3');
    l_fault_code := l_fault_node.extract('/'||
    p_response.envelope_tag||':Fault/faultcode/child::text()',
    'xmlns:'||
    p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/').getstringval();
    dbms_output.put_line('midas8-4');
    l_fault_string := l_fault_node.extract('/'||
    p_response.envelope_tag||':Fault/faultstring/child::text()',
    'xmlns:'||
    p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/').getstringval();
    dbms_output.put_line('midas8-5');
    --RAISE_APPLICATION_ERROR(-20000, l_fault_code || ' - ' ||
    l_fault_string);
    END IF;
    END;
    FUNCTION invoke(p_request IN OUT NOCOPY t_request,
    p_url IN VARCHAR2,
    p_action IN VARCHAR2)
    RETURN t_response AS
    l_envelope VARCHAR2(32767);
    l_http_request UTL_HTTP.req;
    l_http_response UTL_HTTP.resp;
    l_response t_response;
    BEGIN
    dbms_output.put_line('Invoking request');
    dbms_output.put_line('url :'||p_url);
    dbms_output.put_line('action :'|| p_action);
    generate_envelope(p_request, l_envelope);
    show_envelope(l_envelope);
    l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.0');
    dbms_output.put_line('midas1');
    IF g_proxy_username IS NOT NULL THEN
    DBMS_OUTPUT.PUT_LINE('PROXY USERNAME IS NOT NULL');
    UTL_HTTP.set_authentication(r => l_http_request,
    username => g_proxy_username,
    password => g_proxy_password,
    scheme => 'Basic',
    for_proxy => TRUE);
    END IF;
    UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
    UTL_HTTP.set_header(l_http_request, 'Content-Length',
    LENGTH(l_envelope));
    UTL_HTTP.set_header(l_http_request, 'SOAPAction', p_action);
    UTL_HTTP.write_text(l_http_request, l_envelope);
    dbms_output.put_line('midas2');
    l_http_response := UTL_HTTP.get_response(l_http_request);
    dbms_output.put_line('midas3');
    UTL_HTTP.read_text(l_http_response, l_envelope);
    dbms_output.put_line('midas4');
    UTL_HTTP.end_response(l_http_response);
    dbms_output.put_line('midas5');
    l_response.doc := XMLTYPE.createxml(l_envelope);
    dbms_output.put_line('midas6');
    l_response.envelope_tag := p_request.envelope_tag;
    dbms_output.put_line('midas7');
    l_response.doc := l_response.doc.extract('/'||
    l_response.envelope_tag||':Envelope/'||l_response.envelope_tag||':Body/
    child::node()',
    'xmlns:'||
    l_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/"');
    -- show_envelope(l_response.doc.getstringval());
    dbms_output.put_line('midas8');
    check_fault(l_response);
    dbms_output.put_line('midas9');
    RETURN l_response;
    END;
    FUNCTION get_return_value(p_response IN OUT NOCOPY t_response,
    p_name IN VARCHAR2,
    p_namespace IN VARCHAR2)
    RETURN VARCHAR2 AS
    BEGIN
    -- RETURN p_response.doc.extract('//'||p_name||'/
    child::text()',p_namespace).getstringval();
    dbms_output.put_line('function');
    dbms_output.put_line(p_name);
    DBMS_OUTPUT.PUT_LINE (p_response.doc.extract('//'||p_name||'/
    child::text()', p_namespace).getstringval());
    RETURN p_response.doc.extract('//'||p_name||'/child::text()',
    p_namespace).getstringval();
    END;
    END SOAP_API_PKG;
    Any help greatly appreciated!!

    Hello,
    I have not looked in detail to you code but I would like to point out that Oracle provides utilities to call Web Services from the database, using a DB package and/or Java in the DB.
    Have you looked to the documentation about:
    - Developing a Web Service Client in the Database
    regards
    Tugdual Grall

  • Calling Web Service from CRM using proxy

    Hi all,
    I'm facing a problem trying to call a web service from CRM (WAS 620) via XI 3.0. The response that XI recieves from the web service contains SOAP Envelope, and the mapping fails because of it. I built the proxy manually, because if I load WSDL the proxy generation in CRM generates error that sais that external definition coudn't be used.
    Is there any way to remove SOAP envelope from the response while mapping?
    Is it possible to call web service from WAS 620?
    Thanks!!!!
    Anya.

    Hi Manish,
    SOAP adapter does pass the message to XI (this message contains SOAP envelope although XI expects to get message without it), and during the mapping step i get "Runtime Exception in Message-Mapping transformatio~".
    I suppose it's because i created proxy manually. I did so because when i imported WSDL, and tried to generate proxy in CRM, i got an error message that said that proxy couldn't be generated because external definitions are only allowed in XI 3. But my XI version is 3.0! And when I generate the same proxy in my R/3 system that is installed on WAS 640, it works.
    What can I do?
    Cheers,
    Anya.

  • How to call web service using J2SE 1.3?

    Dear All,
    i have developed a web service by jdev 10.1.3 (JAX-RPC with web service security
    enabled).
    i generate the ws proxy (jdev 10.1.3) and run it with wsclient_extended.jar (required JDK 1.4.1 or above??).
    but one of my client say he has to use J2SE 1.3.x (as OS=AIX 4.3 that without J2SE
    1.4.x ), could anyone tell me how can generate ws proxy (with supporting
    library) for jdk 1.3.x?
    if oracle don't have such library / tools, any third party tools / library available?
    thank you.
    lsp

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • Using utl_dbws to call web service

    We're calling a web service using utl_dbws and getting a response but the problem is the parameters. I haven't been able to find much documentation about how to use the utl_dbws package and have only one example to work from so could do with some expert help.
    The following code calls the webservice:
    procedure call_web_service(p_application_key in number,
    out_success_message out varchar2)
    is
    v_service utl_dbws.service;
    v_call utl_dbws.call;
    v_service_qname utl_dbws.qname;
    v_port_qname utl_dbws.qname;
    v_operation_qname utl_dbws.qname;
    v_string_type_qname utl_dbws.qname;
    v_return anydata;
    v_send_data anydata;
    v_return_string varchar2 (100);
    v_return_length number;
    v_parameter_string varchar2(32767);
    v_params utl_dbws.anydata_list;
    v_interview_xml xmltype;
    v_policy_number varchar2(14);
    -- return parameters
    v_interviewId varchar2(1000);
    v_statusType varchar2(1000);
    v_error_reason varchar2(1000);
    begin
    message_handler.set_module_name('ostp_to_xpb.call_web_service');
    message_handler.set_current_process('retrieve generated xml');
    begin
         select upload_xml, extractvalue(upload_xml, '/interview/externalReferenceNumber') policy_number
         into v_interview_xml, v_policy_number
              from xpb_upload_data
         where application_key = p_application_key
              and extractvalue(upload_xml, '/interview/externalReferenceNumber') is not null;
    --dbms_output.put_line('xml retrieved');
         exception
         when no_data_found then     
              v_success_message := 'No xml found for application_key = '||p_application_key;
              raise v_procedure_error;
         end;
         message_handler.set_current_process('call web service');
    -- create service
    v_service_qname := utl_dbws.to_qname (null, 'xpertBridge');
    v_service := utl_dbws.create_service (v_service_qname);
    -- create call
    v_port_qname := utl_dbws.to_qname (null, 'xpertBridgePort');
    v_operation_qname :=
    utl_dbws.to_qname
    ('http://m0154ukdox1/xpertBridgeEDSLV/services/xpertBridge',
    'orcaAppUpload'
    v_call := utl_dbws.create_call (v_service, v_port_qname, v_operation_qname);
    -- set endpoint
    utl_dbws.set_target_endpoint_address
    (v_call,
    'http://m0154ukdox1/xpertBridgeEDSLV/services/xpertBridge'
    -- set type of input and output parameters
    v_string_type_qname :=
    utl_dbws.to_qname ('http://www.w3.org/2001/XMLSchema', 'string');
    utl_dbws.add_parameter (v_call,
    'orcaXml',
    v_string_type_qname,
    'ParameterMode.IN'
    utl_dbws.add_parameter (v_call,
    'interviewId',
    v_string_type_qname,
    'ParameterMode.OUT'
    utl_dbws.add_parameter (v_call,
    'status',
    v_string_type_qname,
    'ParameterMode.OUT'
    utl_dbws.add_parameter (v_call,
    'errorReason',
    v_string_type_qname,
    'ParameterMode.OUT'
    utl_dbws.set_return_type (v_call, v_string_type_qname);
    -- convert xmltype to string for call
    select xmlserialize(document v_interview_xml)
    into v_parameter_string
    from dual;
    v_params (1) := anydata.convertvarchar(v_parameter_string);
    -- call
    v_return := utl_dbws.invoke (v_call, v_params);
    -- values which can be returned are Success / MessageError / ApplicationError
    v_return_string := v_return.accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_return_string, 'No success message returned'));
    -- retrieve out parameters
    v_interviewId := v_params(2).accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_interviewId, 'No interviewId returned'));
    v_statusType := v_params(3).accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_statusType, 'No status type returned'));
    v_error_reason := v_params(4).accessvarchar2;
    dbms_output.put_line ('Message returned is: ' || nvl(v_error_reason, 'No error reason returned'));
    -- release call
    utl_dbws.release_call ( v_call );
    -- release services
    utl_dbws.release_service ( v_service );
    message_handler.set_module_finish;
    exception
    when others then
    out_success_message := message_handler.formatted_error_message;
    end call_web_service;
    Here is an excerpt from the WSDL relating to the call being made:
         <xs:element name="orcaAppUpload">
                        <xs:annotation>
                             <xs:documentation xml:lang="en">Message payload XML</xs:documentation>
                        </xs:annotation>
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name="orcaXml" type="xs:string"/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
                   <xs:element name="orcaAppUploadResponse">
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name="interviewId" type="xs:string">
                                       <xs:annotation>
                                            <xs:documentation xml:lang="en">Interview identifier used to access the interview from UI</xs:documentation>
                                       </xs:annotation>
                                  </xs:element>
                                  <xs:element name="status" type="tns:StatusType"/>
                                  <xs:element name="errorReason" type="xs:string" minOccurs="0">
                                       <xs:annotation>
                                            <xs:documentation xml:lang="en">Only included if an error has occured </xs:documentation>
                                       </xs:annotation>
                                  </xs:element>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
                   <xs:simpleType name="StatusType">
                        <xs:restriction base="xs:string">
                             <xs:enumeration value="Success"/>
                             <xs:enumeration value="MessageError">
                                  <xs:annotation>
                                       <xs:documentation xml:lang="en">MessageError arises if the request payload was
    rejected by xpertBridge. This might be because it does not validate against the
    expected schema. Alternatively, a business rule is not satisfied.</xs:documentation>
                                  </xs:annotation>
                             </xs:enumeration>
                             <xs:enumeration value="ApplicationError">
                                  <xs:annotation>
                                       <xs:documentation xml:lang="en">ApplicationError would indicate application or system
    error or exception occured in xpertBridge while processing the request.</xs:documentation>
                                  </xs:annotation>
                             </xs:enumeration>
                        </xs:restriction>
                   </xs:simpleType>
              </xs:schema>
         <wsdl:message name="orcaAppUploadReq">
              <wsdl:part name="orcaAppUpload" element="tns:orcaAppUpload"/>
         </wsdl:message>
         <wsdl:message name="orcaAppUploadResp">
              <wsdl:part name="orcaAppUploadResponse" element="tns:orcaAppUploadResponse"/>
         </wsdl:message>
         <wsdl:portType name="xpertBridgePort">
              <wsdl:operation name="orcaAppUpload">
                   <wsdl:documentation>Upload (typically paper) application from ORCA/Ingenium</wsdl:documentation>
                   <wsdl:input message="tns:orcaAppUploadReq"/>
                   <wsdl:output message="tns:orcaAppUploadResp"/>
              </wsdl:operation>
         </wsdl:portType>
    etc.
    The error being returned is the following:
    ostp_to_xpb.call_web_service.call web service.ORA-29532: Java call terminated by uncaught Java exception: unexpected element name: expected=interviewId, actual=status
    Initially I started the params at params(0) but when I received the response above I thought it might solve the problem by starting at 1 - try anything :-) but still had the same response.
    I'm now out of ideas!

    UTL_DBWS is not part of XDB, XDB is more about being the web service, rather than calling a web service. Here's an example of using UTL_HTTP to test a XML DB Database Native Web Service which may help
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 17 08:23:14 2009
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    SQL> spool password.log
    SQL> --
    SQL> connect sys/oracle as sysdba
    Connected.
    SQL> --
    SQL> def USERNAME=DBNWS
    SQL> --
    SQL> def PASSWORD=DBNWS
    SQL> --
    SQL> def HOSTNAME=&1
    SQL> --
    SQL> DROP USER &USERNAME CASCADE
      2  /
    old   1: DROP USER &USERNAME CASCADE
    new   1: DROP USER DBNWS CASCADE
    User dropped.
    SQL> grant connect, resource to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant connect, resource to &USERNAME identified by &PASSWORD
    new   1: grant connect, resource to DBNWS identified by DBNWS
    Grant succeeded.
    SQL> begin
      2    dbms_network_acl_admin.drop_acl('localhost.xml');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_network_acl_admin.create_acl('localhost.xml', 'ACL for &HOSTNAME', '&USERNAME', true, 'connect');
      3    dbms_network_acl_admin.assign_acl('localhost.xml', '&HOSTNAME');
      4  end;
      5  /
    old   2:   dbms_network_acl_admin.create_acl('localhost.xml', 'ACL for &HOSTNAME', '&USERNAME', true, 'connect');
    new   2:   dbms_network_acl_admin.create_acl('localhost.xml', 'ACL for localhost', 'DBNWS', true, 'connect');
    old   3:   dbms_network_acl_admin.assign_acl('localhost.xml', '&HOSTNAME');
    new   3:   dbms_network_acl_admin.assign_acl('localhost.xml', 'localhost');
    PL/SQL procedure successfully completed.
    SQL> COMMIT
      2  /
    Commit complete.
    SQL> GRANT XDB_WEBSERVICES TO &USERNAME
      2  /
    old   1: GRANT XDB_WEBSERVICES TO &USERNAME
    new   1: GRANT XDB_WEBSERVICES TO DBNWS
    Grant succeeded.
    SQL> GRANT XDB_WEBSERVICES_OVER_HTTP TO &USERNAME
      2  /
    old   1: GRANT XDB_WEBSERVICES_OVER_HTTP TO &USERNAME
    new   1: GRANT XDB_WEBSERVICES_OVER_HTTP TO DBNWS
    Grant succeeded.
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> create or replace function GET_SQRT (INPUT_VALUE number) return number
      2  as
      3  begin
      4    return SQRT(2);
      5  end;
      6  /
    Function created.
    SQL> select GET_SQRT(2)
      2    from dual
      3  /
    GET_SQRT(2)
    1.41421356
    SQL> VAR URL VARCHAR2(4000)
    SQL> --
    SQL> BEGIN
      2    :url :=   'http://&USERNAME:&PASSWORD@&HOSTNAME:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/GET_SQRT';
      3  end;
      4  /
    old   2:   :url :=   'http://&USERNAME:&PASSWORD@&HOSTNAME:' || dbms_xdb.getHttpPort() || '/orawsv/&USERNAME/GET_SQRT';
    new   2:   :url :=   'http://DBNWS:DBNWS@localhost:' || dbms_xdb.getHttpPort() || '/orawsv/DBNWS/GET_SQRT';
    PL/SQL procedure successfully completed.
    SQL> print url
    URL
    http://DBNWS:DBNWS@localhost:80/orawsv/DBNWS/GET_SQRT
    SQL> --
    SQL> set long 100000 pages 0 lines 256
    SQL> --
    SQL> select     httpuritype( :url || '?wsdl' ).getXML() from dual
      2  /
    <definitions name="GET_SQRT" targetNamespace="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT" xmlns="http://schemas.xmlsoap.org/wsdl/
    " xmlns:tns="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://
    schemas.xmlsoap.org/wsdl/soap/">
      <types>
        <xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT" elementFormDefault="qualified">
          <xsd:element name="SNUMBER-GET_SQRTInput">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="INPUT_VALUE-NUMBER-IN" type="xsd:double"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="GET_SQRTOutput">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="RETURN" type="xsd:double"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:schema>
      </types>
      <message name="GET_SQRTInputMessage">
        <part name="parameters" element="tns:SNUMBER-GET_SQRTInput"/>
      </message>
      <message name="GET_SQRTOutputMessage">
        <part name="parameters" element="tns:GET_SQRTOutput"/>
      </message>
      <portType name="GET_SQRTPortType">
        <operation name="GET_SQRT">
          <input message="tns:GET_SQRTInputMessage"/>
          <output message="tns:GET_SQRTOutputMessage"/>
        </operation>
      </portType>
      <binding name="GET_SQRTBinding" type="tns:GET_SQRTPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GET_SQRT">
          <soap:operation soapAction="GET_SQRT"/>
          <input>
            <soap:body parts="parameters" use="literal"/>
          </input>
          <output>
            <soap:body parts="parameters" use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="GET_SQRTService">
        <documentation>Oracle Web Service</documentation>
        <port name="GET_SQRTPort" binding="tns:GET_SQRTBinding">
          <soap:address location="http://localhost:80/orawsv/DBNWS/GET_SQRT"/>
        </port>
      </service>
    </definitions>
    SQL> set serveroutput on
    SQL> --
    SQL> DECLARE
      2    V_SOAP_REQUEST      XMLTYPE := XMLTYPE(
      3  '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
    encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      4          <SOAP-ENV:Body>
      5                  <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
      6                          <m:INPUT_VALUE-NUMBER-IN>2</m:INPUT_VALUE-NUMBER-IN>
      7                  </m:SNUMBER-GET_SQRTInput>
      8          </SOAP-ENV:Body>
      9  </SOAP-ENV:Envelope>');
    10    V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
    11    V_REQUEST           UTL_HTTP.REQ;
    12    V_RESPONSE          UTL_HTTP.RESP;
    13    V_BUFFER            VARCHAR2(1024);
    14  BEGIN
    15
    16    V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
    17    UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
    18    V_REQUEST.METHOD := 'POST';
    19    UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
    20    UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
    21
    22    V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);
    23    LOOP
    24      UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
    25      DBMS_OUTPUT.PUT_LINE(V_BUFFER);
    26    END LOOP;
    27    UTL_HTTP.END_RESPONSE(V_RESPONSE);
    28  EXCEPTION
    29    WHEN UTL_HTTP.END_OF_BODY THEN
    30      UTL_HTTP.END_RESPONSE(V_RESPONSE);
    31  END;
    32  /
    old   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
    new   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <?xml version="1.0" ?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GET_SQRTOutput xmlns="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <RETURN>1.41421356237309504880168872420969807857</RETURN>
    </GET_SQRTOutput>
    </soap:Body>
    </soap:Envelope>
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> --
    SQL>
    SQL>

  • How to copy List item from one list to another using SPD workflow using HTTP call web service

    Hi,
    How to copy List item from one list to another using SPD workflow using HTTP call web service.
    Both the Lists are in different Web applications.
    Regards, Shreyas R S

    Hi Shreyas,
    From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
    If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
    As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
    So I recommend to achieve this goal programmatically.
    More references:
    https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Error 504 DNS look up failed while calling web services using XML

    Hi, I am trying to call web service from Oracle using XML.
    Everything seems to be in place but im getting an error "The webserver for <My End URL> reported that an error occurred while trying to access the website. Please click here to return to the previous page."
    If I directly access the end url from my browser its accessible and seems to work fine.
    The http response receiveed is mentioned below:
    Status code: 403
    Reason phrase: Forbidden
    <html>
    <head>
    <title>504 DNS look up failed</title>
    </head>
    <body>
    <font size=2><table width="100%"><tr><td bgcolor=#3300cc align="center" colspan=2>504 DNS look up failed</td></tr></table><br><br>The webserver for 'My End URL' reported that an error occurred while trying to access the website. Please click <u>here</u> to return to the previous page.<br><br><hr></font></body>
    </html>
    Im using Oracle 9i
    Please help
    Edited by: 927814 on Apr 15, 2012 11:41 PM
    Edited by: 927814 on Apr 15, 2012 11:46 PM

    Without far greater details as to what you are doing, what you have installed, and what you have tried, not much can be offered. All that I can gather from the information you provided is that the server name you are trying to contact either is not responding or is invalid. If you have Forms installed on your local machine (for example using Developer Suite), try using localhost rather than the hostname. For example, http://localhost:port/forms/frmservlet?form=yourform
    http://www.checkupdown.com/status/E504.html

  • Call web service using code.

    we want to call a web service from ADF JSP form.
    We used web service data control. But deployment failed.
    we applied Patch 5878326 to JDeveloper 10.1.3.3.0 and OAS.
    But problem is not solved.
    So we need a new way to call web services.
    is there any other way to call web services from Jdev.
    any code sample will be appreciated.
    Thanks.

    Workaround for the Connection Failure
    In JDeveloper, locate the .deploy file in the Resources folder of your web application project.
    Double-click the file to open the WAR Deployment Profile Properties dialog.
    Expand File Groups - WEB-INF/classes - Contributors.
    In the Contributors panel, click Add and use the Browse dialog to locate the .adf folder in the root for your application (for example, /jdev/mywork//.adf path.)
    Select the .adf folder and add it as a contributor to the deployment profile.
    Note that the .adf folder does not become part of the deployable archive. This merely ensures that the contents of the META-INF get placed in an appropriate location in the archive that will permit the web container to find it when the application loads.
    The failure to get the connection to Webservice is beacuse the "connections.xml" is not available in the deployed archive.
    This has been release note'd as in
    http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.0.3/10.1.3_addendum.html under "Deployment issues"

  • Calling Web Service using utl_http; Parameters not being recognized by ws

    Hi All,
    I have set-up appropriate function & packages based on this article:
    Calling Web Services from PL/SQL in the Oracle9i Database -
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    I am able to consume my sample web service using the above, but my web service doesn't see any parameters that I'm passing.
    Any ideas? I'm using Oracle 10g calling a .Net 1.1 web service
    Thanks,
    Robert

    Hello,
    I am not able to access the link you posted about calling a web service. Could please share your code again ?
    Thanks in advance for your help...
    Lionel

  • How to call web-service using only java code

    Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • Calling a web service that uses DIME

    Can ColdFusion interact with a web service that uses DIME? Has anyone worked with that?
    Thanks.

    CF doesn't support DIME "natively", but Apache Axis does, and that's the library that CF uses. So, you'll have to drop to Java to do this.
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • Security issues with calling web services from within Oracle?

    I'd like to use a trigger to initiate pushing data to a web service, so I thought we should call the web service from PL/SQL in a DBMS job, or perhaps create a .NET stored proc to call the service. Our DB Lead is concerned about security, since the standard model is for clients to call the database, and not for the database to function as a client.
    Does this pose any security risk? Can you refer me to any best practices or articles on this?
    Thanks in advance.
    Edited by: Kit.net on Nov 9, 2010 11:28 AM

    First, a trigger is there to for a single sole purpose - guaranteeing the integrity of the data and the transaction. It is not there to interact with external services and processes (like mail, web and other services). Doing that exposes the transaction to those other processes/services. The transaction can now fail. not because of a business rule validation, but because of a network error when the trigger accesses an external service. How on earth can a business transaction fail when the transaction is valid, but a the transaction's trigger hit an external access error!?
    And what happens do that event you have fired off in the trigger, when the transaction is rolled back? How do you undo that event you have created in the trigger that was based on uncommitted data?
    So using a trigger like this is simply stupid (and yes, I have seen it too often in practice with horrible results to sugarcoat such an idiotic approach).
    As for calling a web service from the database, using the database as the client in such a case. This is not a security risk. This is not unusual. In fact, it is very common in my experience. We have a lot of databases, ranging from SE to EE and several RAC clusters. All of them function as a client at some stage during processing. Some use a db link - and as a client fire off a SQL via that db link to a database server to obtain data. Some use ftp and act as a ftp clients, transferring processed data (XML format) to a server. Some call web services to extract data from 3rd party systems to reconcile the differences between local data sets and 3rd party data sets..
    This is common between server and server. I do not see anything unusual in the database server using another server (and acting as a client when it does). Security between servers should not be a major problem (in fact, it can easily be done in a very robust way using trusted and encrypted communication).
    The problem occurs when a client connects to the server and client and server roles are swapped at some stage (like the server "writing" a file directly to the client's filesystem). This very seldom makes any sense. And this is where authentication and security become an issue.

  • X.509 Web Service Authentication for ABAP AS Web Service Interaction

    We are trying to use X.509 web service authentication with SAP Web AS ABAP between 2 different SAP installations. Company 1 is trying to consume a web service set up by Company 2.
    Company 1 has installed Company 2's public key, generated the client proxy using Company 2's WSDL and created a corresponding lpconfig entry.
    Then company 2 has set up the profile parameter ICM/HTTPS/verify_client to accept certificates and imported Company 1's SLL client certificate and mapped the user in USREXTID.  Note that Company 1 uses self-signed certificates, so it does not have a root certificate, which is what the documentation says should be imported into the PSE instead of the SSL client certificate.
    When Company 1 tries the web service call, it receives a request to authenticate the web service from Company 2. (basic authentication logon screen, even though the web service configuration is set to X.509 Client Certificate.
    Should this work or is there a problem because Company 1 uses self-signed certificates or is there something else we are missing?

    >
    Connie Begovich wrote:
    > We are trying to use X.509 web service authentication with SAP Web AS ABAP between 2 different SAP installations. Company 1 is trying to consume a web service set up by Company 2.
    >
    > Company 1 has installed Company 2's public key, generated the client proxy using Company 2's WSDL and created a corresponding lpconfig entry.
    >
    > Then company 2 has set up the profile parameter ICM/HTTPS/verify_client to accept certificates and imported Company 1's SLL client certificate and mapped the user in USREXTID.  Note that Company 1 uses self-signed certificates, so it does not have a root certificate, which is what the documentation says should be imported into the PSE instead of the SSL client certificate.
    >
    > When Company 1 tries the web service call, it receives a request to authenticate the web service from Company 2. (basic authentication logon screen, even though the web service configuration is set to X.509 Client Certificate.
    >
    > Should this work or is there a problem because Company 1 uses self-signed certificates or is there something else we are missing?
    I think that the problem is in Service Authentication (in transaction sicf). You have to consume web-service, transmitting user-password for access.

  • ICM_HTTP_SSL_ERROR when calling web service

    Summary: ICM_HTTP_SSL_ERROR was met when I called web service in ABAP with logical port & RFC Connection of type G.
    Details:
    1. the <b>test of RFC Connection of type G in SM59 works OK</b>, with SSL inactive and basic authentication.
    2. while <b>in ABAP code, the calling to web service throws ICM_HTTP_SSL_ERROR</b>, using the logical port with the RFC Connection as HTTp Destination.
    3. also, with using URL directly in logical port settings, the calling to web service in ABAP throws ICM_HTTP_SSL_ERROR.
    I searched threads and blog for ICM_HTTP_SSL_ERROR, it seems others met ICM_HTTP_SSL_ERROR in SM59; while my case is the test in SM59 works well.
    Anybody can help?
    Thanks and kind regards.
    Said

    Dear Sayid,
    The document which you had mentioned here is really helpful.
    I'am working on Digital Signature for Form16 in SAP.I stucked up with the same issue.
    I went through the document of
    Enabling SSL and Client Certificates on the SAP J2EE Engine by Angel Dichev
    in that document i went through one note
    Note: Per default, the SAP J2EE Engine uses the u201Cssl-credentialsu201D entry for SSL, which contains a
    public-key certificate that has been signed by a test CA. Although this certificate can be used for
    testing purposes, a certificate that has been signed by a well-known, productive CA should be used
    when in production mode.
    right now i'am doing it for testing purpose, in the above note it is mentioned that we can use default credentials but when i see the expiry date of this default credentials in my server 1) SSL-Credentials 2)SSL-Credentials-cert it is given that these certificates are Valid Not After 2005 year.
    So i got confused now whether to use the default credentials or not.
    Please guide me with a solution.
    With Regards,
    Pradeep.B

Maybe you are looking for

  • Stage.addchild

    Hi, This is my Document Class package BowerPower.Startup{ import flash.display.MovieClip; import flash.events.Event; public class Preloader extends MovieClip {   public function Preloader() {    stage.addChild(Preloader); I have a movieclip in the li

  • Infoview not displaying WESubmitLink

    <p>I added the following code to my report. The link shows in infoview but returns an error on the path. the file doesn't exist.</p><p>stringvar path:= WETargetPath ("rpt", "Name", "machines", "");<br />stringvar font:= WEFont ("Arial", 10, "Navy", "

  • All of a sudden, I'm screwed.

    After virtually falling in love with Pr, it has jilted me, and leaving a bad taste in my mouth. I have a project that I've been working on for about a month.  Pr is becoming less and less reliable.  My list of grievances: I just exits without warning

  • Movies for rent and purchase in Ireland

    When will we be able to rent and purchase movies in Ireland? What sites can I go to legally purchase iPod movies?

  • Error: no usable package repositories configured.

    I get this error when trying to pacman -Syu the system. So I downloaded the current pacman package and updated it with pacman -U. [root@1jzgte ~]# pacman -U pacman-3.0.4-3.pkg.tar.gz warning: current locale is invalid; using default "C" locale loadin