Accessing web service in run-time

Hello,
In the project I am currently working we have a component (Device Monitor) that needs to access other web services which contain the same interface (MonitorRemote). The webservices wit the MonitorRemote interface register in run-time giving their end-point, wsdl url and any other information that we may need.
My problem is to access these webservices in run-time. I have tried many approaches and nothing seems to work.
Currently I am creating 2 webservices with the same MonitorRemote remote interface but different name, service name and portName.
I try to execute the following:
1)String serviceName = method.getMethodName();
2)String portName= method.getPortName();
3)URL wsdlURL = new URL(method.getURL());
4)String namespaceURI = method.getNamespaceURI();
5)QName serviceQName = new QName(namespaceURI, serviceName);               
6)QName portQName = new QName(namespaceURI, portName);
7)TimeoutMonitorService mtService = new TimeoutMonitorService(wsdlURL, serviceQName);
8)MonitorRemote monitoringRemote = mtService.getPort(portQName, MonitorRemote.class);
9)monitoringRemote.stopMonitoringFeature(0, 0);
Before the execution I test my TimeoutMonitorService with the webservice navigator and it works fine. After I execute line 9) the TimeoutMonitorService crashes giving the following message:
System exception 
[EXCEPTION]
javax.ejb.EJBException: Exception raised from invocation of public void com.sap.sii.devicemonitor.DeviceMonitorBean.stopMonitoringFeature(com.sap.sii.devicemonitor.entities.ResourceMonitoringSettings) throws com.sap.sii.dataStructures.exceptions.IncorrectParameterException method on bean instance com.sap.sii.devicemonitor.DeviceMonitorBean@92f4d2 for bean sap.com/SII_device_monitor_EARannotation|SII_device_monitor_ejb.jarannotation|DeviceMonitorBean; nested exception is: javax.xml.ws.soap.SOAPFaultException: com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException
javax.xml.ws.soap.SOAPFaultException: com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException
at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.processFault(JAXWSUtil.java:341)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:984)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:700)
Afer the first time I receive this error I start getting many warining messages in the log files with the following message:
Exception occurred during open of configuration [apps/sap.com/SII_device_monitor_EAR/TimeoutMonitoringTaskService].
[EXCEPTION]
com.sap.engine.frame.core.configuration.ConfigurationLockedException: Can not lock Configuration "apps/sap.com/SII_device_monitor_EAR/TimeoutMonitoringTaskService" because it is already locked.
at com.sap.engine.core.configuration.impl.ServerEnvironment.lockConfiguration(ServerEnvironment.java:664)
at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.openConfiguration(ConfigurationCache.java:879)
I tried to remove and re-deploy but the webservice only returns this error message once I execute my code. The only work around is to create a new project with different interface names.
I am using:
SAP NetWeaver Developer Studio
SAP NetWeaver 7.1 SP05 PAT0000
Build id: 200802021401
Any help would be really appreciated.

need bit more info. from where you are trying to access this webservice? what is the wsdl you are using

Similar Messages

  • Error at run time When Access Web Service in web dynpro java

    Hi
    I am used web service created on other machine.I am used wsdl file created in web service.
    is there any setting on J2EE Engine server for accessing web service? after run web dynpro application it gives following error.
    The initial exception that caused the request to fail, was:
       java.io.IOException: Unable to open connection to host "128.9.125.6:8000". Connection timed out:could be due to invalid address.
        at com.tssap.dtr.client.lib.protocol.Connection.openSocket(Connection.java:2117)
        at com.tssap.dtr.client.lib.protocol.Connection.open(Connection.java:1380)
        at com.tssap.dtr.client.lib.protocol.Connection.sendInternal(Connection.java:1534)
        at com.tssap.dtr.client.lib.protocol.Connection.send(Connection.java:1427)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        ... 50 more
    please help me.
    thank in advance

    Hi,
    java.io.IOException: Unable to open connection to host "128.9.125.6:8000". Connection timed out: could be due to invalid address. first check it are you able to connect the WSNavigator. I think you are not able to connect the WSNavigator and are you able to see the WebService in WSNavigator?
    Procedure
    To import a Web service model, proceed as follows:
           1.      Choose the context menu entry -
    Create Model on the -
    Models node of the relevant component.
           2.      In the model wizard, choose Import Web Service Model followed by Next.
           3.      In the second wizard window, enter a model name and specify the package and source code directory. The name of the proxy package is created automatically when you specify the model package.
           4.      Select whether your Web service source is from a local server, is addressed using a URL, or whether it is a UDDI service.
           5.      If you select Local File System or URL, choosing Next will take you to the following window in which you enter a local WSDL URL or select one by choosing Browse.
           6.      If you selected the option UDDI or URL, choosing Next will take you to the following wizard window in which you either enter a WSDL URL of a UDDI service directly or select one by choosing UDDIu2026
    Enter the WSDL description of the Web service in the Wsdl field u2013 for example, http://webservices.matlus.com/scripts/emailwebservice.dll/wsdl/IemailService for an e-mail service.
    You do not need to make any entries in the next step, Proxy Definition / URI Package Mappings. Choose Finish to close the window.
           7.      Switch to the Package Explorer view, select the file lport1.lp in the directory \src\packages\<myPackage>\, and check the port entries.
    Hope this helps!!
    Regards
    Vijay

  • _Choosing operation in Business Service on run  time

    Hi,
    I have a WSDL having multiple operations. The same wsdl is usd to create business and proxy service.
    In proxy service I am using operational branching.So for each operation , I need to call business service with respective operation.
    Is there any way to choose the operation in business service on run time using single route node.Is it possible through Dynamic Routing?
    I have used dyanmic routing to choose different business service at run time.
    Please let me know if some other information is required.
    Thanks in advance,
    Seemant

    The following code can be used inside the expresion for Dynamic routing to achieve the same-
    <ctx:route>
    <ctx:service>{$path}</ctx:service>
    <ctx:service>{$operation}</ctx:service>
    </ctx:route>
    The vairable operation keeps the name of the operation invoked.

  • Not able to access web service with axis and tomcat

    Dear all
    i am trying to access web service using axis in tomcat.
    i downloaded axis-bin-1_4.zip, unzipped it and installed it properly in tomcat.
    i had tested axis, its working fine.
    i had created a simple java class(a sample class from book) and deployed it in axis. i also created a client(a java consol class) for accessing that web service. but its giving error. i have no idea why this is comming.
    plz point me in right direction.
    thanks in advance
    The error is:
    Exception in thread "main" AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (404)/axis/ArithmeticProcessor.jws
    faultActor:
    faultNode:
    faultDetail:
            {}:return code:  404
    <html><head><title>Apache Tomcat/6.0.14 - Error report</tit
    le><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;ba
    ckground-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;
    color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Ari
    al,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-f
    amily:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-famil
    y:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:
    Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color :
    black;}A.name {color : black;}HR {color : #525D76;}--></style> </hea
    d><body><h1>HTTP Status 404 - /axis/ArithmeticProcessor.jws</h
    1><HR size="1" noshade="noshade"><p><b>
    type</b> Status report</p><p><b>message</b> <u&
    gt;/axis/ArithmeticProcessor.jws</u></p><p><b>descriptio
    n</b> <u>The requested resource (/axis/ArithmeticProcessor.jws) is n
    ot available.</u></p><HR size="1" noshade="noshade
    "><h3>Apache Tomcat/6.0.14</h3></body></html>
            {http://xml.apache.org/axis/}HttpErrorCode:404
    (404)/axis/ArithmeticProcessor.jws
            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
    ava:744)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
    y.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
            at org.apache.axis.client.Call.invoke(Call.java:2767)
            at org.apache.axis.client.Call.invoke(Call.java:2443)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at ArithmeticClient.main(ArithmeticClient.java:50)

    Hi ,
    Please go through this link and check in this way only you created the webservice correctly or not. If not follow and do it definitely will get you the webservice access by iphone or any application.
    www.scribd.com/doc/19255987/Web-Services-in-Abap

  • How to check error type in accessing web service?

    Dear all,
    I have created a form using WSDL connection to access web service in SOAP protocol.
    But I have difficulties in error handling when acccessing web service.
    I try to put a try catch block for the following statement :
    ie. xfa.connectionSet.WebServiceDC.execute(false);
    in case for any error, I can only catch message saying GeneralFault only.
    Is there any extra object in the script that I can catch to handle for different error type?
    e.g checking SOAP.? and where should I put the codes in?
    Actualy I want to detect if network connection is not ok or if it fails to find ecert which is required under https connection
    Rgds.

    Have you tried the try catch block ?
    See the error codes it responds with.
    Then look through the properties of the Exception
    try
        doInit();
    } catch(err)
        var vDebug = "";
        for (var prop in err)
           vDebug += "property: "+ prop+ " value: ["+ err[prop]+ "]\n";
        vDebug += "toString(): " + " value: [" + err.toString() + "]";
        status.rawValue = vDebug;
    function doInit()
        doWebServiceCallThatFails();
    Have fun with these articles
    http://blogs.adobe.com/formfeed/2009/06/collected_form_development_and.html
    http://blogs.adobe.com/formfeed/2009/03/handling_javascript_exceptions.html

  • Not able to access Web services

    Hi all,
    I am trying to access web services using the transaction WSADMIN.
    But when i give the authorization while generating the WSDL, the following error pops up:
    <b>Technical Details of Soap Core Exception
    Message Text: SRT: ASSERT failed: object reference not bound
    Class: CL_SOAP_REGISTRY
    Method: generate_wsdl
    LocationID: 6
    Program: CL_SOAP_REGISTRY==============CP
    Include: CL_SOAP_REGISTRY==============CM00J
    Line: 59</b>
    Can anyboby share his/her insights in this regard?
    Thanks,
    Ankit

    Hi Fernando,
    Thanks for this.
    I was able to activate and deactivate the services. But i was not able to test these services (HTTP 500 Internal server error).
    Also the services which are listed in the trnx SICF are not present in the trnx WSADMIN (I am using trnx WSADMIN to go to the home page of the web service and download the WSDL file of the service). What may be the reason?
    Is there some configuration setting which I am missing or is it some other problem?
    Regards,
    Ankit

  • How to consume/access web services in forefront identity manager 2010 r2

    Hi,
    I have one web service  in c# for authentication  so i want to integrate this web service in my FIM 2010 R2.I want to ask one more question how to consume/access web service of FIM 2010 R2,so please tell me how is it possible in FIM 2010 R2 and
    anybody have any example for consuming/accessing web service step by step in FIM 2010 R2.
    Regards
    Anil Kumar

    Here is some C# code that accesses FIM resource attributes from the web services via the FIM 2010 Resource Management Client which I mentioned in an earlier post:
    using System;
    using System.Collections.Generic;
    using Microsoft.ResourceManagement.Client;
    using Microsoft.ResourceManagement.ObjectModel;
    namespace MyTest
    public partial class ResourceAttribute
    public ResourceAttribute()
    public string GetTypeAndDisplayName(string objectID)
    String ReturnValue = String.Empty;
    using (Microsoft.ResourceManagement.Client.DefaultClient client = new DefaultClient())
    client.ClientCredential = CredentialCache.DefaultNetworkCredentials;
    client.RefreshSchema();
    string query = String.Format("/*[ObjectId={0}]", objectID);
    foreach (RmResource res in client.Enumerate(query))
    String displayName = res.DisplayName;
    String objectType = res.ObjectType;
    ReturnValue = displayName + " (" + objectType + ")";
    break;
    return ReturnValue;
    You would just need to define your bindings and endpoints in your web.config. This method will return the DisplayName and ObjectType for the resource with the ObjectId matching the objectID argument. If you need more information, please provide more specifics
    for what you are trying to accomplish.
    There are many code examples for this library on its CodePlex home:
    http://fim2010client.codeplex.com/

  • Can anybody tell how to access web service from Message Driven bean

    Can anybody tell how to access web service from Message Driven bean

    Can anybody tell how to access web service from Message Driven bean

  • How do i access web services on my hp deskjet 3050a printer

    how do i access web services on my hp deskjet 3050a printer?

    Hi
    Please find the link given below might help you to resolve your issue.
    Getting Started with EPrint
    Let us know how it goes!
    "I work for HP."
    ****Click the (purple thumbs up icon in the lower right corner of a post) to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    Regards
    Manjunath

  • Security Error when trying to access web service

    I have an app that connects over HTTPS to a web service on
    our internal network. The interface to the web service was created
    by using the WSDL Import function of the Flex IDE.
    I can run the app and retrieve data without a problem when I
    run from the debug-bin folder that the Flex IDE compiles to.
    However, I cannot connect to the web service from anywhere else,
    such as a different location on my own local drives, a network
    drive, or another persons machine.
    I've setup a local instance of Apache with mod_ssl so I could
    host the app under an HTTPS connection itself, which the
    documentation seemed to imply that would work. However, when I run
    the app, I get:
    [FaultEvent fault=[RPC Fault faultString="Security error
    accessing url" faultCode="Channel.Security.Error"
    faultDetail="Destination: DefaultHTTPS"] messageId=null
    type="fault" bubbles=true cancelable=true eventPhase=2]
    I am accessing the app by going to
    https://mymachine.companydomain.com/myapp.html, and the web service
    is being accessed through https://webservice.companydomain.com/.
    Anybody have any thoughts on what I should be looking at?
    I've been searching and trying things for a few days with no luck.
    Any help would be appreciated. Thanks.

    The SSL handshake works differently to a browser as it is making the connections automatically.
    The browser asks every time if you want to trust an expired certificate, and it also recommends not to. Its impractical to manually check every service call to say do you trust the certificate so the functionality doesn't exist. I doubt any integration product does this. Therefore there isn't a option to ignore the certificate if it has expired.
    This makes sence as the certificate is untrustworthy. The whole idea around SSL is trusting the site you are communicating with, all parties need to be trusted. This stops hackers from replicating their site and intercepting data.
    If the administrator of the remote site is not willing to renew the certificate, are they really interested in SSL. I suggest they expose a non SSL service.
    cheers
    James

  • Exception (org.apache.axis2.AxisFault: Server) when accessing Web-Service

    Hi all,
    I have read already some interesting posts on Java implementation for Oracle CoD Web Services.
    Somehow I am stuck and can't find a way out.
    I try to access the LeadQuery command via the following code:
              String sessionCookie = logon(
                        "https://secure-ausomxapa.crmondemand.com/Services/Integration",
                        username, password);
              LeadStub stub;
              try {
                   stub = new LeadStub(
                             "https://secure-ausomxapa.crmondemand.com/Services/Integration;jsessionid="
                                       + sessionCookie);
                   // ServiceClient client = stub._getServiceClient();
                   // client.getOptions().setManageSession(true);
                   // client.getOptions().setProperty("jsessionid", sessionCookie);
                   // client.getOptions().setUserName(username);
                   // client.getOptions().setPassword(password);
                   LeadQueryPage_Input leadQueryPage_Input = new LeadQueryPage_Input();
                   ListOfLeadQuery listOfLeadQuery = new ListOfLeadQuery();
                   QueryType queryType = new QueryType();
                   queryType.setString("LIKE 'A*'");
                   LeadQuery leadQuery = new LeadQuery();
                   leadQuery.setCompany(queryType);
                   listOfLeadQuery.setLead(leadQuery);
                   leadQueryPage_Input.setListOfLead(listOfLeadQuery);
                   LeadQueryPage_Output leadQueryPage_Output = stub
                             .LeadQueryPage(leadQueryPage_Input);
              } catch (AxisFault e) {
                   e.printStackTrace();
              } catch (RemoteException e) {
                   e.printStackTrace();
              } catch (Exception e) {
                   e.printStackTrace();
                   System.err.println("\n\n\n");
              logoff("https://secure-ausomxapa.crmondemand.com/Services/Integration",
                        sessionCookie);
    Logging In and Out is no problem, runs like music. But whenever LeadQueryPage is called, I just receive the following error:
    org.apache.axis2.AxisFault: Server
         at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
         at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
         at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
         at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
         at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
         at crmondemand.LeadStub.LeadQueryPage(LeadStub.java:1026)
         at CODconnection.main(CODconnection.java:58)
    I'm using Eclipse 3.4.2 with AXIS2 1.4, and the Eclipse Plug-In for AXIS 1.3 (with some small patch to get it to work).
    I downloaded the custom WSDL from Oracle CoD (CRM On Demand) Admin page and used the AXIS-Wizard in Eclipse to transform it to Java.
    For that, I already tried the -g option (which is "Create everything - Client and Server" in the wizard).
    Anyone has a clue what the problem might be?
    Btw.: I downloaded also V1.0 WSDL to check if that works. Some problem.
    Found out that just the error reporting sucks and at the end the Server missed the correct Authentification.
    Funnily I just did what I read a couple of time. With this small bit of code it works:
                   ServiceClient client = stub._getServiceClient();
                   client.getOptions().setManageSession(true);
                   client.getOptions().setProperty(HTTPConstants.HEADER_COOKIE, "jsessionid="+sessionCookie);
                   client.getOptions().setUserName(username);
                   client.getOptions().setPassword(password);
    -----

    You are missing the end point location. See the sample client below:
    MyHelloMyHelloSOAP11PortStub stub = new MyHelloMyHelloSOAP11PortStub("http://localhost:8080/axis2/services/MyHello");
                   MyHelloMyHelloSOAP11PortStub.SayHello hello = new MyHelloMyHelloSOAP11PortStub.SayHello();
                   hello.setS("ABCD");
                   MyHelloMyHelloSOAP11PortStub.SayHelloResponse resp=stub.sayHello(hello);
                   System.out.println("Response from Web Service "+resp.get_return());

  • Fix for "Not Connected" Error Messages When Trying to Access Web Services

    If you run across an error message on your printer stating that it is "Not Connected" when trying to access ePrint or your Apps, but you know it is connected to the internet, it probably just means that the printer is not connecting to the server properly.
    Here is the first set of steps I would try, since they seem to resolve this issue half of the time.
    The first thing I would try in this situation is a network reboot.
    First, disconnect the power cord from the back of your router. 
    Next disconnect the power cord from either the back of the printer or the wall, without powering it off first. 
    Wait about 30 seconds and reconnect the power cord to your router.
    Wait about another 30 seconds and plug the printer back in. It should boot back up automatically, but if it doesn't go ahead and press the power button.
    Once everything is back up and running, try to access ePrint or your Apps.
    If those steps don't work for you, the next thing would be setting a Static IP & DNS for the printer. Before doing this, you want to print off a network configuration page. It varies from model to model, but it is usually found under the Wireless Settings or under Reports in the Setup menu. After you have that page, follow these steps.
    Before we start, we need a network configuration page with your current connection settings. To get this, press the wireless button on the front of your printer and then press "Print Info" or "Print Report". This will print off a network configuration page, which has information on it that we need to complete the next few steps.
    After you have that, we will need to access the printers Embedded Web Server (EWS). You can do so by entering the printers IP address (from the network configuration page) into your browsers address bar and pressing enter.
    Once there, press the "Network" tab at the top of the page. From there you will want to click the "IPv4" button, located on the lef-hand side of the page. It will be there for WIreless and Wired, so make sure to click the one for you however you are connected. If you do not see "IPv4", you should see "Networking", press that and then press "Network Address(IP)".
    Next, you will want to click the small round button next to "Manual IP Address" and then fill in the boxes for IP Address, Subnet Mask, and Default Gateway, using the information found on the network configuration page.  
    For the Primary or Preffered DNS Server, you will want to enter 8.8.8.8.
    For the Secondary or Alternate DNS Server, you will want to enter 8.8.4.4.
    Click apply and when the message pops up saying that the changes have been applied, press "OK". 
    Press the power button on your printer, wait for it to fully power off and then press it again to power it back on.
    After doing this, go ahead and try to enable ePrint again.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    This question was solved.
    View Solution.

    The reason we recommend using 8.8.8.8 and 8.8.4.4 for the DNS server is because they work when ISP assigned DNS servers do not. The DNS server assigned to you by your ISP is not able to resolve the domain for web services, therefore not allowing the printer to connect. 
    I assure you that it is with your ISP's DNS server and not the printer. If you were to take the printer back to the store and get a replacement, you would have the same issue, unless you changed the DNS. Same goes for any of our web service enabled printers. 
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • WSDLXML error in Web services for real time job

    Hi Experts,
    I want to use Data Services as a web services.
    I have configured a Batch job and Real time job   that is available as a web service.
    Web services for Batch job is no problem. but  Real time job is problem
    I get the following error message in  the WSDLXML
    <tns:documentation>Web Services published by BusinessObjects Data Services Version 12.1.0.0, using Apache Axis 1.1The following errors and warnings were found during WSDL generation. Please refer to the Data Services Administrator for detailed explanations. *** Unable to create WSDL for service: job_testconnectivity.</tns:documentation>
    Version is DATA SERVICES XI (12.1.0.0)
    Edited by: moon bum cho on Dec 1, 2008 3:00 PM
    Edited by: moon bum cho on Dec 1, 2008 3:15 PM

    check whether the Access Server for which this service is configured is running
    the real-time service configuration is saved with Access Server, management console will get the information from Access Server while generating the WSDL
    to check the status of access server
    click on administrator -> Access Servers
    click on the Access Server and click on Ping

  • How to access web service from Oracle ?

    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    I am trying to make a call to a web service through a procedure/function...
    I tried to use
    CREATE OR REPLACE PROCEDURE Call_Rest_Webservice
    AS
      t_Http_Req Utl_Http.Req;
      t_Http_Resp Utl_Http.Resp;
      t_Request_Body VARCHAR2(30000);
      t_Respond VARCHAR2(30000);
      t_Start_Pos INTEGER := 1;
      t_Output VARCHAR2(2000);
    BEGIN
      /*Construct the information you want to send to the webservice.
      Normally this would be in a xml structure. But for a REST-
      webservice this is not mandatory. The webservice i needed to
      call excepts plain test.*/
      t_Request_Body := 'the data you want to send to the webservice';
      /*Telling Oracle where the webservice can be found, what kind of request is made
      and the version of the HTTP*/
      t_Http_Req := Utl_Http.Begin_Request('**webservice address**',
                                           'GET',
                                           'HTTP/1.1');
      /*In my case the webservice used authentication with a username an password
      that was provided to me. You can skip this line if it's a public webservice.*/
      --Utl_Http.Set_Authentication(t_Http_Req, 'username', 'password');
      /*Describe in the request-header what kind of data is send*/
      Utl_Http.Set_Header(t_Http_Req, 'Content-Type', 'text/xml charset=UTF-8');
      /*Describe in the request-header the lengt of the data*/
      Utl_Http.Set_Header(t_Http_Req, 'Content-Length', Length(t_Request_Body));
      /*Put the data in de body of the request*/
      Utl_Http.Write_Text(t_Http_Req, t_Request_Body);
      /*make the actual request to the webservice en catch the responce in a
      variable*/
      t_Http_Resp := Utl_Http.Get_Response(t_Http_Req);
      /*Read the body of the response, so you can find out if the information was
        received ok by the webservice.
        Go to the documentation of the webservice for what kind of responce you
        should expect. In my case it was:
        <responce>
          <status>ok</status>
        </responce>
      Utl_Http.Read_Text(t_Http_Resp, t_Respond);
      /*Some closing?1 Releasing some memory, i think....*/
      Utl_Http.End_Response(t_Http_Resp);
    END;But it gave me ORA-29272: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1029
    ORA-12545: Connect failed because target host or object does not exist
    But I can link to the web server by going to **webservice address** through my browser.
    Is there any ACL should be open in order to have this capability? I asked my DBA but she asked me I will need to give her username/password/ip in order to open an ACL...
    however there is no username/password required while visiting the web service...
    Any help would be highly appreciated..
    Thanks,
    Edited by: 986006 on Mar 4, 2013 8:38 AM

    Y.L wrote:
    That is because the database was unable to connect to the specified server. Wrong hostname or IP specified. Failure to resolve the hostname into an IP. Firewall blocking. Etc.The hostname I put there can be visit through my browser. I think it should not be the host server's issue... So it could be a firewall on my database side that needs to be open in order to visit the hostserver?The "web browser" code (your PL/SQL code using UTL_HTTP) runs on the Oracle database server. It needs the same type of network access that your browser on your PC enjoys. (firewalls opened, proxy authentication if required, etc).
    On 11g. Not on 10g.I saw the example code you post through the link you provided... will those only work on 11g?
    If it can work on 10g, what package or what steps I need to follow in order to have that working on me?The code I've posted will work on both versions. My comment was regards to ACLs. No ACLs existed on 10g. So you only need execute privs on the relevant packages (e.g. UTL_HTTP, etc).
    ACLs were introduced with 11g - so on 11g you also need the DBA to create an ACL for you that will allow UTL_HTTP access to the network.

  • ORA-29541 while trying to access web service using UTL_DBWS

    Hi all,
    Solicit your help in the beforesaid scenario:
    I've 9.2.01 RDBMS, JPub 9.2.0.1.0 Production and OC4J Release 10.1.2 (standalone) environment and a local webservice.
    While issuing jpub, I get the following response:
    jpub -user=scott/tiger@ORACLE -sysuser sys/tiger -proxywsdl="e:\IMyFloatWebService.wsdl" -endpoint="http://10.177.238.71:8988/WS_Appln-WSFloat_prj-context-root/MyFloatWebService" -proxyopts=soap,tabfun -dir=FloatValue -plsqlpackage=soap_callout_wrap_eg -proxyopts=noload
    Note: FloatValue\MyFloatWebServiceProxy.java uses unchecked or unsafe operations
    Note: Recompile with -Xlint:unchecked for details.
    FloatValue\MyFloatWebServiceProxyJPub.java
    FloatValue\plsql_wrapper.sql
    FloatValue\plsql_dropper.sql
    FloatValue\plsql_grant.sql
    FloatValue\plsql_revoke.sql
    FloatValue\plsql_proxy.jar
    Please run FloatValue\plsql_wrapper.sql in the user schema, load the generated j
    ar file and run FloatValue\plsql_grant.sql in the SYS schema.
    i. e - I get message as seen above:
    "Please run FloatValue\plsql_wrapper.sql in the user schema, load the generated j
    ar file and run FloatValue\plsql_grant.sql in the SYS schema."
    And in sqlplus, while I try to access the web service, I get this error:
    "SQL> sho user;
    USER is "SCOTT"
    SQL> SELECT soap_callout_wrap_eg.getCircumference(20)
    2 FROM dual;
    FROM dual
    ERROR at line 2:
    ORA-29541: class SCOTT.MyWebServiceFloatRTEProxyJPub could not be resolved"
    Could somebody please advise me where I might be going wrong? Any help in this regards will be highly appreciated.
    Regards,
    Leslie

    Hi,
    I presume your Web Service needs HTTP (BASIC?) Authentication.
    All this needs is setting the following 2 properties, which as can be seen, you are setting....
    UTL_DBWS.set_property(l_call, 'USERNAME', '<username>');
    UTL_DBWS.set_property(l_call, 'PASSWORD', '<pwd>');
    This should work as long as your DBWS Callout Utility was downloaded from OTN after June 2008, and it's version is atleast 10.1.3.1.
    Following is a sample code snippet that was tested successfully for this :
    Declare
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.call;
    l_result sys.XMLTYPE;
    l_request sys.XMLTYPE;
    BEGIN
    l_service := UTL_DBWS.create_service(null);
    l_call := UTL_DBWS.create_call(l_service);
    UTL_DBWS.set_target_endpoint_address(l_call, 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
    UTL_DBWS.set_property(l_call, 'USERNAME', 'username');
    UTL_DBWS.set_property(l_call, 'PASSWORD', 'pwd');
    UTL_DBWS.set_property(l_call, 'OPERATION_STYLE', 'document');
    UTL_DBWS.set_property(l_call, 'SOAPACTION_USE', 'true');
    UTL_DBWS.set_property(l_call, 'SOAPACTION_URI', 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
    l_request := XMLTYPE('<Z_CENTRICITY_GET_DOCLIST
    xmlns:urn="urn:sap-com:document:sap:rfc:functions">' ||
    '<I_INCLUDE_OLD_VERSIONS></I_INCLUDE_OLD_VERSIONS>' ||
    '<I_INSTITUTION>0001</I_INSTITUTION>' ||
    '<I_PATIENT_NR>0000000181</I_PATIENT_NR>' ||
    '</Z_CENTRICITY_GET_DOCLIST>');
    l_result := UTL_DBWS.invoke(l_call, l_request);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(sqlcode || ' ' || sqlerrm);
    END;
    Hope this helps,
    Yogesh

Maybe you are looking for

  • The Firefox window doesn't open at all I can't run safe mode or make other trubleshot changes

    since yesterday 08/10/2011 the Firefox window doesn't open at all I can't run safe mode or make other trubleshot changes. When I click on the desktop short-cut the Firefox windows starts loading but before open is crushing.I have sent several message

  • In BDC report ..

    In BDC report ..what is meaning for ok_code value equal to /00  ,     =BS    and   =BU. Thanking u in adv. Sangeeta.

  • List of Object Classes

    Hello, Does anyone know the relationship between 'Object Class' and R/3 Document Types... My question is how one determines, for example, that VERKBELEG pertains to Sales Document Changes; and LIEFERUNG is for ... and so on...? Where in R/3 (or in He

  • Two-part SMS gets corrupted

    I have Nokia 6131. I have 548 messages in my Sent Items folder. I noticed lately that two-part messages in my Sent Items folder got exchanged. One part of a SMS gets exchanged with one part of another SMS. Single part SMSs are OK. I have packed the S

  • Entered iTunes card and loaded it then lost my card don't have the pin how can I get my credit?

    Loaded a iTunes card and now it is asking for my pin and I threw the card away thinking that since I had loaded it I didn't need it anymore how do I retrieve it?