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

Similar Messages

  • 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

  • How to call Web Service using http?

    Hello everyone,
    I have created a web service in weblogic 8.1sp4. The web service is deployed and in the test page in the administration console I see that the wsdl is sth like
    http://localhost:6101/SomeWebService/SomeWebService/SomeWebService?WSDL
    How is it possible to call the web service operation (let's say someOperation) using http? The problem is that the client which will call the operation is not a java or .net one and is needs to do the call using a URL. I have tried sth like
    http://localhost:6101/SomeWebService/SomeWebService/SomeWebService?string=somestring&operation.invoke=someOperation which is the URL used in the test page in the administration console and although it works, instead of getting the SOAP response back I get the whole html page returned by the test page.
    Please help me,
    Thanks,
    Yiannis

    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]

  • Can any one show me how to call web service using soap lite mod perl client

    Hi,  Experts
    SAP is new for me and now I need to develop a perl client using soap lite, I have read "HOWTO: SCRIPTING LANGUAGE SUPPORT FOR SAP SERVICES - PERL" but not quit understand that. Can some one show me a real perl client example?
    I enclosed the wsdl file generated from SAP web service.
    <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions targetNamespace="urn:sap-com:document:sap:rfc:functions" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:sap-com:document:sap:rfc:functions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <wsdl:types>
    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions" elementFormDefault="unqualified" attributeFormDefault="qualified">
    - <xsd:element name="Z_RFC_WEBSERVICE">
    - <xsd:complexType>
      <xsd:sequence />
      </xsd:complexType>
      </xsd:element>
    - <xsd:element name="Z_RFC_WEBSERVICEResponse">
    - <xsd:complexType>
    - <xsd:sequence>
      <xsd:element name="EV_STRING" type="xsd:string" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>
      </wsdl:types>
    - <wsdl:message name="Z_RFC_WEBSERVICE">
      <wsdl:part name="parameters" element="tns:Z_RFC_WEBSERVICE" />
      </wsdl:message>
    - <wsdl:message name="Z_RFC_WEBSERVICEResponse">
      <wsdl:part name="parameters" element="tns:Z_RFC_WEBSERVICEResponse" />
      </wsdl:message>
    - <wsdl:portType name="Z_RFC_WEBSERVICE">
    - <wsdl:operation name="Z_RFC_WEBSERVICE">
      <wsdl:input message="tns:Z_RFC_WEBSERVICE" />
      <wsdl:output message="tns:Z_RFC_WEBSERVICEResponse" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="Z_RFC_WEBSERVICESoapBinding" type="tns:Z_RFC_WEBSERVICE">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="Z_RFC_WEBSERVICE">
      <soap:operation soapAction="" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="Z_RFC_WEBSERVICEService">
    - <wsdl:port name="Z_RFC_WEBSERVICESoapBinding" binding="tns:Z_RFC_WEBSERVICESoapBinding">
      <soap:address location="http://darkwind:9080/sap/bc/srt/rfc/sap/Z_RFC_WEBSERVICE?sap-client=800" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    Thanks for your help!

    now I know how to call from perl tool,
    #!/usr/bin/perl -wd
    use SOAP::Lite;
        use SOAP::Lite +trace;
       my $client = SOAP::Lite->new();
       $client->uri('urn:Z_RFC_WEBSERVICE');
       $client->on_action(sub {return'""'});
       $client->proxy('http://darkwind:9080/sap/bc/srt/rfc/sap/Z_RFC_WEBSERVICE?sap-client=800');
       my $som = $client->Z_RFC_WEBSERVICE();
       my $output = $som->result;
       print $output  "\n";
    but I got "Operation not supported" error when executing 
    my $som = $client->Z_RFC_WEBSERVICE();
    here is trace:
    SOAP::Transport::new: ()
    SOAP::Serializer::new: ()
    SOAP::Deserializer::new: ()
    SOAP::Parser::new: ()
    SOAP::Lite::new: ()
    SOAP::Transport::HTTP::Client::new: ()
    SOAP::Lite::call: ()
    SOAP::Serializer::envelope: ()
    SOAP::Serializer::envelope: Z_RFC_WEBSERVICE testtypesZ_RFC_WEBSERVICE
    SOAP::Data::new: ()
    SOAP::Data::new: ()
    SOAP::Data::new: ()
    SOAP::Data::new: ()
    SOAP::Data::new: ()
    SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x93f14a4)
    SOAP::Transport::HTTP::Client::send_receive: POST http://darkwind:9080/sap/bc/srt/rfc/sap/Z_RFC_WEBSERVICE?sap-client=800 HTTP/1.1
    Accept: text/xml
    Accept: multipart/*
    Content-Length: 552
    Content-Type: text/xml; charset=utf-8
    SOAPAction: ""
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:Z_RFC_WEBSERVICE xmlns:namesp1="urn:Z_RFC_WEBSERVICE"><c-gensym3 xsi:type="xsd:string">testtypesZ_RFC_WEBSERVICE</c-gensym3></namesp1:Z_RFC_WEBSERVICE></SOAP-ENV:Body></SOAP-ENV:Envelope>
    SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x93eb288)
    SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
    Server: SAP Web Application Server (1.0;700)
    Content-Length: 264
    Content-Type: text/xml; charset=utf-8
    Client-Date: Sat, 14 Feb 2009 19:33:50 GMT
    Client-Peer: 146.225.80.176:9080
    Client-Response-Num: 1
    Sap-Srt-Id: 20090214/113349/v1.00_final_6.40/49958133C5E634E8E100000092E150B0
    Set-Cookie: sap-usercontext=sap-client=800; path=/
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><soap-env:Fault><faultcode>soap-env:Client</faultcode><faultstring xml:lang="en">Operation not supported</faultstring></soap-env:Fault></soap-env:Body></soap-env:Envelope>
    SOAP::Deserializer::deserialize: ()
    SOAP::Parser::decode: ()
    SOAP::SOM::new: ()
    Can't use an undefined value as a symbol reference at ./sapClient.pl line 10.
    SOAP::Lite::DESTROY: ()
    SOAP::Deserializer::DESTROY: ()
    SOAP::Parser::DESTROY: ()
    SOAP::Transport::DESTROY: ()
    SOAP::Transport::HTTP::Client::DESTROY: ()
    SOAP::Serializer::DESTROY: ()
    SOAP::Data::DESTROY: ()
    SOAP::Data::DESTROY: ()
    SOAP::Data::DESTROY: ()
    SOAP::Data::DESTROY: ()
    SOAP::Data::DESTROY: ()
    SOAP::SOM::DESTROY: ()
    Ran SAP Web Service Navigator Test 'Z_RFC_WEBSERVICE' OK
    Can someone help?
    Thanks!

  • How to call web services in WEB DYNPRO ABAP

    Hi ABAPER'S,
    Please let me know how to call web services in web dynpro.
    Thanks,
    Sandy.

    Hi Sandy,
    Please check this blog..
    /people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    also cehck this...
    call the webservices in webdynpro ABAP.
    calling webservice in webdynpro component
    Re: Web Services in WDA.
    Cheers,
    Kris.
    Edited by: kissnas on May 24, 2011 11:37 AM

  • How to call WEB Service From SAP

    Hi Friends,
    How to call WEB Service From SAP.
    Thanks in advance,
    Murali Krishna K

    Hi,
    if you mean calling a web service in Web Dynpro ABAP, see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/d7/951b42f828df2ce10000000a1550b0/frameset.htm">documentation</a>, if you mean calling a web service in general, this is not the correct forum. This here is the Web Dynpro ABAP forum, for general questions on ABAP, use the ABAP forum.
    Regards, Heidi

  • How to call web services from HTML

    Hi All,
    Does anybody have an idea on how to call web services from HTML using axis and i am using jboss-4.0.5 as the application server.

    What did your Google search return?

  • How to call web services from PL/SQL?

    Hi,
    Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc....
    Thanks in advance

    Here's some example skeleton code to get you started...
      PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
        soap_request  VARCHAR2(30000);
        soap_respond  CLOB;
        http_req      utl_http.req;
        http_resp     utl_http.resp;
        resp          XMLType;
        soap_err      exception;
        v_code        VARCHAR2(200);
        v_msg         VARCHAR2(1800);
        v_len number;
        v_txt Varchar2(32767);
      BEGIN
        UTL_HTTP.SET_PROXY(p_proxy);
        -- Define the SOAP request according the the definition of the web service being called
        soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
                       '<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">'||
                       '  <SOAP-ENV:Body>'||
                       '    <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
                       '      <m:UserName>'||p_username||'</m:UserName>'||
                       '      <m:Password>'||p_password||'</m:Password>'||
                       '    </m:DownloadRequest>'||
                       '  </SOAP-ENV:Body>'||
                       '</SOAP-ENV:Envelope>';
        http_req:= utl_http.begin_request
                  ( 'http://www.website.net/webservices/GetDetailsService.asmx'
                  , 'POST'
                  , 'HTTP/1.1'
        utl_http.set_header(http_req, 'Content-Type', 'text/xml');
        utl_http.set_header(http_req, 'Content-Length', length(soap_request));
        utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
        utl_http.write_text(http_req, soap_request);
        http_resp:= utl_http.get_response(http_req);
        utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
        FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
        LOOP
            utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
            soap_respond := soap_respond || v_txt; -- build up CLOB
        END LOOP;
        utl_http.end_response(http_resp);
        resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
      END;Using secure web services (https)...
    Web serivces call in Plsql
    As for 'pros and cons'... there's nothing to compare against... either you want to call a web service or you don't.

  • How to call WEB Service From SAP 4.6 c

    Hi Friend,
    How to call WEB Service From SAP 4.6 c Report
    Thanks in advance.

    It is not possible to directly call a web service from SAP 4.6c.
    Indeed, web service enablement is available as from Web AS 6.20, thus as from SAP R/3 4.7
    So as described above, the solution is indeed to make use of PI(XI) for this.
    Rgds,
    Karim

  • How to develop web service using Intellij Idea 6.0

    How to develop web services using Intellij Idea 6.x. A sample web service and service client is needed with full procedure. Thanx in advance.

    Web service is technology not a tools that bundle with IDE.
    For example you can't say how can I develope object orented program with Eclipse.
    1- You should get some general info about SOAP, WSDL and Web sevice usage
    2- Start to implmenet a simple Hello world web service and deploy it on application(web service) server
    3- Write Client code and test it.
    for step 2,3 Apache Axis(2) could be a good solution for developement or you can use JAX-WS for sun

  • Calling web service using ksoap2

    Hello Friends,
    I am writing a Java client which uses ksoap2. I am new to web services and ksoap2. The WSDL is like this
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://leaguematch.com/matchwatch/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://leaguematch.com/matchwatch/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://leaguematch.com/matchwatch/">
    <s:element name="WebServiceInfo">
    <s:complexType />
    </s:element>
    <s:element name="WebServiceInfoResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="WebServiceInfoResult" type="tns:Information" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:complexType name="Information">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="ServiceName" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="SupportPhone" type="s:string" />
    </s:sequence>
    </s:complexType>
    <s:complexType name="Credential">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="Email" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    <s:element name="GetScore">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="credValidate" type="tns:Credential" />
    <s:element minOccurs="1" maxOccurs="1" name="MyScript" type="tns:ScriptData" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:complexType name="ScriptData">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="sScriptCode" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="sScriptName" type="s:string" />
    </s:sequence>
    </s:complexType>
    <s:element name="GetScoreResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="GetScoreResult" type="s:boolean" />
    <s:element minOccurs="1" maxOccurs="1" name="MyScript" type="tns:ScriptData" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    <wsdl:message name="WebServiceInfoSoapIn">
    <wsdl:part name="parameters" element="tns:WebServiceInfo" />
    </wsdl:message>
    <wsdl:message name="WebServiceInfoSoapOut">
    <wsdl:part name="parameters" element="tns:WebServiceInfoResponse" />
    </wsdl:message>
    <wsdl:message name="GetScoreSoapIn">
    <wsdl:part name="parameters" element="tns:GetScore" />
    </wsdl:message>
    <wsdl:message name="GetScoreSoapOut">
    <wsdl:part name="parameters" element="tns:GetScoreResponse" />
    </wsdl:message>
    <wsdl:portType name="matchwatchSoap">
    <wsdl:operation name="WebServiceInfo">
    <wsdl:input message="tns:WebServiceInfoSoapIn" />
    <wsdl:output message="tns:WebServiceInfoSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetScore">
    <wsdl:input message="tns:GetScoreSoapIn" />
    <wsdl:output message="tns:GetScoreSoapOut" />
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="matchwatchSoap12" type="tns:matchwatchSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="WebServiceInfo">
    <soap12:operation soapAction="http://leaguematch.com/matchwatch/WebServiceInfo" style="document" />
    <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetScore">
    <soap12:operation soapAction="http://leaguematch.com/matfchwatch/GetScore" style="document" />
    <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="matchwatch">
    <wsdl:port name="matchwatchSoap" binding="tns:matchwatchSoap">
    <soap:address location="http://www.leaguematch.com.au/matchwatch/matchwatch.asmx" />
    </wsdl:port>
    <wsdl:port name="matchwatchSoap12" binding="tns:matchwatchSoap12">
    <soap12:address location="http://www.leaguematch.com.au/matchwatch/matchwatch.asmx" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    This is how I get the data from the web service with J2SE platform
    javax.xml.ws.Holder<com.leaguematch.matchwatch.ScriptData> myScript = new
    javax.xml.ws.Holder<com.leaguematch.matchwatch.ScriptData>();
    com.leaguematch.matchwatch.ScriptData scData = new com.leaguematch.matchwatch.ScriptData();
    scData.setSScriptCode(jTextField1.getText());
    myScript.value = scData;
    javax.xml.ws.Holder<Boolean> getScoreResult = new javax.xml.ws.Holder<Boolean>();
    port.getScore(credValidate, myScript, getScoreResult);
    What is the equivalent for JavaME platform? This is what I tried.
    SoapObject credential = new SoapObject(nameSpace, "Credential");
    credential.addProperty("Email", new String("[email protected]"));
    credential.addProperty("Password", new String("[email protected]"));
    SoapObject scriptData = new SoapObject(nameSpace, "ScriptData");
    scriptData.addProperty("sScriptCode", new String("GROUND1"));
    request.addProperty("credValidate", credential );
    request.addProperty("MyScript", scriptData);
    request.addProperty("getScoreResult", getScoreResult);
    // serialize the envelope
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.bodyOut = request;
    envelope.setOutputSoapObject(request);
    //make the call
    // set up the transport
    HttpTransport ht = new HttpTransport(endPointURL);
    ht.debug = true;
    ht.call("http://leaguematch.com/matchwatch/GetScore", envelope);
         The server responded
         SoapFault - faultcode: 'soap:Server' faultstring: 'System.Web.Services.Protocols.SoapException:
         Server was unable to process request. ---> System.Exception: You must pass Script Code in
         MyScript.sScriptCode:=ScriptData.sScriptCode to execute GetScore successfully
    I am able to get data using "WebServiceInfoResponse" method.
    But to getScore, I don't know how to pass the credential and scriptData to the web services and get its result ?
    Please help
    Sudheer Palaprambil

    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

  • 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

  • How to call web services from oracle database 10g

    Hi all ,
    How can i call web services from oracle database 10g ?
    thanks ...

    abdou123 wrote:
    but how can i get complex result
    for example
    i pass input parameter like National Id Number
    and get the person details ( name , age , date of birth , ............ ) .Basic approach to web services using UTL_HTTP explained in {message:id=10448611}.
    An example of using a pipeline table function as a data transformation process (turning web data into rows and columns) in {message:id=10158148}.

  • How to call Web Services (with javascript) in a view load event ?

    Hello to the expert community,
    I'm looking for a piece of javascript code allowing to call Web Services in a view load event ?
    Any ideas will be really appreciated.
    Regards.
    Have a nice week.

    Thank you for your answer, dongmei.
    It seems that the MethodResultTableDataProvider does not return the response of the web service as a value field if the WSDL contains only one result element.
    E.g. from WSDL of the USWeather Web Service which returns theGetWeatherReportResult string:
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.webserviceX.NET" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
          <s:element name="GetWeatherReport">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="GetWeatherReportResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="GetWeatherReportResult" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="string" nillable="true" type="s:string" />
        </s:schema>If I drag the web service method on the page and I should be able to select the response value in the Bind to Data dialog box. But there is no value field. Value fields only occur if the web service returns more than one value.
    The question is how can I get the response GetWeatherReportResult from the service.

  • 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

Maybe you are looking for

  • How to upload the RM and PM budjeted cost in sap.

    Dear sap guru's,              Could you please suggest me , how to upload the 2008 budjeted cost(RM/PM)  in sap, One way i can upload the budjet Through  materi master( costing2 tab) ie planed price1 or 2 , Please suggest me is there any other way to

  • FM and/or method for displaying file from frontend ?

    hi there, i have word-documents, excel-sheets, PDF'S, etc.......... on my frontend PC. i need a function module and/or method of class to OPEN this files. do you have any hints for me ? regards, Martin

  • JTree DnD, disable clipboard

    We have a JTree which contains custom nodes. We have enabled inter-tree Drag and Drop on the tree (Java 6 only. For java 5, we disable it), which works wonderfully, although in the example that you see below, it's only partially enabled. These nodes

  • Dictophone problems (does not play recorded audio)

    Hi, everyone. I have a very big problem with my Ipod 4g touch. I've made several audio notes by standart dictophone. But two of them are not playing. Also the're not displaying in iTunes. I don't want to loose these notes, because they're very import

  • Nexus 1000v and vcenter domain admin account

    I changed out domain admin account on our domain in which vcenter services runs as and now its using a different services account. I am wondering if I need to update anything on the nexus 1000v switch side between the 1000v and venter