Exception Handling in Webservice Client

Hi..I have a webservice (JWS) running on Tomcat and Apache AXIS..which is installed on different sites/locations..I have a search portal (JSP) that will invoke that webservices and return an array of values in SOAP.
My problem is how can my Jsp page as client of webservice..detect that the webservice is down, or the tomcat is not started? I also want to check periodically if the webservice on different site is available (online) or not..if not an email will be automatically send to the administrator..reminding him to start the service..
how can i determined if a webservice is down from my jsp page?
Thanks in advance for your help..

does it returm a value error 404 page cannot blah bla blah?

Similar Messages

  • How to handle exception propagation in webservice client?

    Hi ,
    Is there a way to catch an exception thrown by Webservice server handler?
    We have a situation where we need to handle the exception on the client side thrown by the server handler.
    We are using Webspehere webservices created thru RAD 7 and clients are generated using axis 2 code generator tool. We generate WSDL from java class rather than Java from WSDL.
    We have vague idea that we can use wsld fault mechanism but does not have much implementation knowledge on it.
    Any ideas on this will be great help.
    Thanks in advance..

    Here is little more detail ::
    We have our regular webservices which has some business methods. Also we have a custom handler which extends javax.xml.rpc.handler.GenericHandler to handle requests [public boolean handleRequest(MessageContext context){
    return true;
    }] for all our application Webservices.
    So, in case of any application errors, handler throws an excpetion which we expect it to be caught in the client stub. e.g. if our application throws InvalidDataException with a specific message on it, we expect it to be caught in the client code as InvalidDataException with the original message on it.
    Is there a way to achieve this?
    Thanks,

  • Exception handling in synchronous client proxy

    Hi, I have a synchronous outbound proxy-web service scenario. If our Post request (unknown data in the receiver) fails, the receiver system returns a 404 error that results in application error in PI. Now, I want know how to handle CX_AI_APPLICATION_FAULT using the standard fault message type (ExchangeFaultData). I couldn't find any reference for synchronous client proxies using this. I hope you can help me out. Thank you.

    Hi Mark,
    You have a link here How to handle CX_AI_SYSTEM_FAULT in RFC - Code Gallery - SCN Wiki or here https://help.sap.com/saphelp_nw04/helpdata/en/75/a55c3cff8ca92be10000000a114084/content.htm
    I dont know what is your exact problem, you can retrieve certain information in the ABAP code but i usually set a generic message like "Connection unsuccessful" because if you debbug the object the information is so technical to be showed to a client.
    Hope this helps.
    Regards.

  • Exception in Java WebService Client

    Hi,
    I am using RAD7.0 with WAS6.1, I have generated client from wsdl, I am trying to invoke one of the operation in webservice. I am getting the following error.
    The same code is working in local environment, but its getting failed delivary environment.
    Error:
    2009-05-19 10:25:30,ERROR,com.hbos.dimsarchival.dimsclient.ArchivalBatchJob,WebSphere_EJB_Timer_Service_WorkManager.Alarm Pool : 0 Error while ArchivingDocument
    WebServicesFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
    faultString: WSWS3713E: Connection to the remote host 10.164.1.19 failed.Received the following error: Async IO operation failed, reason: RC: 32 There is no process to read data written to a pipe.
    faultActor: null
    faultDetail:
    WSWS3713E: Connection to the remote host 10.164.1.19 failed.Received the following error: Async IO operation failed, reason: RC: 32 There is no process to read data written to a pipe.
         at com.ibm.ws.webservices.engine.transport.http.HttpOutboundChannelConnection.connect(HttpOutboundChannelConnection.java:820)
         at com.ibm.ws.webservices.engine.transport.http.HttpsOutboundChannelConnection.connect(HttpsOutboundChannelConnection.java:210)
         at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:530)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:228)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:228)
         at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
         at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:929)
         at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:722)
         at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:673)
         at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:495)
         at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:948)
         at com.hb.dimsarchival.dimsentities.DIMSServiceEndpointBindingStub.archiveDocuments(DIMSServiceEndpointBindingStub.java:1136)
         at com.hb.dimsarchival.dimsclient.ArchivalBatchJob.archiveDocuments(ArchivalBatchJob.java:106)
         at com.hb.dimsarchival.archivescript.ArchiveSchedulerBean.ejbTimeout(ArchiveSchedulerBean.java:130)
         at com.ibm.ejs.container.TimedObjectWrapper.ejbTimeout(TimedObjectWrapper.java:90)
         at com.ibm.ejs.container.TimerTaskHandler.doWork(TimerTaskHandler.java:265)
         at com.ibm.ws.scheduler.AlarmListener.executeTaskWithNotification(AlarmListener.java:795)
    Service is available, and its running successfully. I have checked the endpoint url.
    Can any one help me on this topic.
    Edited by: javausers07 on May 20, 2009 7:45 AM

    Hi, I Found the solution.
    Its mistake in SSLConfiguration. End point url is given in IP but in SSL configuration we have give workstation name.
    So instead of getting SSLConfiguration issue we got this issue.
    Thanks alot.

  • Exception handling in client proxy

    Hi
    Can someone please help me with exception handling in ABAP client proxy.

    HI
      Welcome to SDN
    Check this link you wil get information regarding ABAP Proxy  http://help.sap.com/saphelp_nw04/helpdata/en/c9/74246d8ad2447799063d39013e9a11/content.htm

  • Webservices Client, Exceptions and Log4J

    Hi all.
    Let me explain the setup of our project before asking for a solution on my problem!
    We are implementing a project with 2 teams. One team handles everything that has to deal with the front-end and uses a wsdl to generate a webservices client side that is trigger for most of the requests.
    Another team creates the complete backend including the webservices server side.
    Thus, we (as team one) do not interfere nor guide team two in how they implement things.
    Now here's the problem.
    Our side uses Log4J to log all the exceptions. There side probably doesn't (we don't know). If however an exception is triggered from within a WebService call, it is not send to Log4J but to the standard System.out !
    Is there any way to change this? Because the only thing we do is generate a client from the WSDL and nothing else! We do however catch any exception and store a message in our log files, but before the catch happens, our System.out has already added the WSexcpetion :(
    Is this clear in any way?
    Anyone?
    Thanks in advance,
    Kind Regards,
    Les.

    A web service client written on WLS [1], should work with
    service hosted by any vendor, including .Net, AXIS, Sun RI,
    etc.
    The client code you write in WLS which is based on JAX-RPC [1]
    should compile as is on other vendor JAX-RPC implementation.
    So, if you are looking for client code portability then JAX-RPC
    is your best bet.
    Regards,
    -manoj
    [1] http://edocs.bea.com/wls/docs81/webserv/client.html#1069703
    [2] http://java.sun.com/xml/jaxrpc/
    "hanks" <[email protected]> wrote in message
    news:3ea3392d$[email protected]..
    >
    I have tried webservices with apache and weblogic7.0 but i realised thatboth was
    to be done very specific to servers.I may be wrong. I am trying tounderstand
    how can i write a sercive for one server and access using another server.
    When i write webservice in java tomcat server, I create a service andregister
    as urn name. For a client to access this service, code kind of looks ejbcode
    where we lookup the service and call its method. Instead of looking upJNDI name
    we lookup urn and access method. Mind you this client uses ORG packagesspecific
    to tomcat.
    Now when we write a websercice with weblogic we have to create a ear whichhas
    webserverice and write a client to access that service, which lookscompletely
    diffrent from one that we wrote for tomcat. I am wondering how can i usethe same
    client to access both the services. It rarely happens that both side wouldbe
    using same servers.
    I am sure that there is some mistake i m doing cos webservices is supposeto be
    even language independent.
    Can you guys help me in resolving this, more questions later ;-)

  • Dynamic WebService client within a WebService Handler

    We have a WebService running on WebLogic 10.3 that has a handler that contains a Webservice client that connects to a set of IIS WebServices.
    The client is called with code like this:
    QName qname = new QName("http://www.company.com/Webservices/", "UserService");
    UserService service = new UserService(url, qname);
    service.setHandlerResolver(resolver);
    UserServiceSoap uss = service.getUserServiceSoap();
    The URL is dynamic, we have different servers that contain different data other than that they are the same. When this is called the first time with URL http://abc it works just fine. If it is called again but this time pointing to URL http://xyz, the client still goes to http://abc. We have check through debugging to ensure that we are really passing the correct URL, and we are. I traced this through a tool called WireShark and can see our client making 2 GET requests to the proper WSDL but then does the POST to http://abc. URLS have been altered to protect the innocent :) This same webservice containing this handler works as expected within Tomcat, it is in WebLogic that things get weird. Any help would be appreciated.
    Thanks,

    Hi
    <b>Bojja Guruvulu</b>
    My Email Id is : <b>[email protected]</b>

  • Handling cookies in a WebService Client

    Hi,
    I've written the following code for a simple webservice client and everything work fine.
    Additionally, I have to read a Cookie from the HTTPHeader of the first response and put it into the
    HTTPHeader of the next requests. What is the best practice to implement
    this task?
    My service is a Weblogic WebService on Weblogic 8.1 sp5.
    Thanks in advance
    Wahid
    public class ClientTest {
    public static void main(String[] args) throws Exception {
    System.setProperty("javax.xml.rpc.ServiceFactory",
    "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    ServiceFactory factory = ServiceFactory.newInstance();
    String targetNamespace = "http://www.mycomp.de/namespace";
    QName serviceName = new QName(targetNamespace, "MyService");
    QName operationName = new QName(targetNamespace, "testConnection");
    Service service = factory.createService(serviceName);
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING);
    mapping.register(VerbindungstestVO.class,
    new QName(targetNamespace, "TestConnectionVO"),
    new TestConnectionCodec(),
    new TestConnectionCodec());
    Call call = service.createCall();
    call.setOperationName(operationName);
    call.addParameter("request", new QName(targetNamespace, "TestConnectionVO"), ParameterMode.IN);
    call.setReturnType(new QName(targetNamespace, "TestConnectionVO"));
    call.setTargetEndpointAddress("http://localhost:7001/my-ws/MyService");
    TestConnectionVO vo = new TestConnectionVO();
    vo.setPing("3");
    TestConnectionVO res = (TestConnectionVO) call.invoke(new Object[] {vo});
              System.out.println(res);
    }

    quote:
    Originally posted by:
    MartinW-2006
    Any suggestions? AM I right in presuming this is a bug?
    Start by ensuring that your function actually runs when you
    invoke it. Does anything get returned to your calling template?

  • Exception handling in rmi in client side

    Hello everybody, I'm developing a small client-server application using JDBC and RMI .
    I would like to ask if any body can help to know how handle exceptions thrown in the server side and show them for the client.
    Any help will be appreciated

    I prefer not to have the server's exceptions known to the client. The client only gets the exceptions the client expects. This is part of the server interface which is defined and owned by the client.
    So any exception thrown on the server I would handle and rethrow a different appropriate exception up to the client.

  • Where is the exception stacktrace - weblogic.webservice.core.handler.Invoke

    Hi, I am debugging a Web Service. It sometimes throws an exception while deserializing the input. But when I look through the log all I see is:
    ####<Jul 27, 2010 9:20:43 AM EDT> <Info> <WebService> <myhost.net> <prodServer114> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1280236843573> <BEA-220024> <Handler weblogic.webservice.core.handler.InvokeHandler threw an exception from its handleRequest method. The exception was:
    java.lang.NumberFormatException: For input string: "".>
    How do I make weblogic spit out the exception stacktrace?
    I am using Weblogic 9.2.
    Thanks in advance!

    Hi, I am debugging a Web Service. It sometimes throws an exception while deserializing the input. But when I look through the log all I see is:
    ####<Jul 27, 2010 9:20:43 AM EDT> <Info> <WebService> <myhost.net> <prodServer114> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1280236843573> <BEA-220024> <Handler weblogic.webservice.core.handler.InvokeHandler threw an exception from its handleRequest method. The exception was:
    java.lang.NumberFormatException: For input string: "".>
    How do I make weblogic spit out the exception stacktrace?
    I am using Weblogic 9.2.
    Thanks in advance!

  • Webservices client exception

    Our application has servlets talking to webservices. To communicate we place webservices client in WEB-INF directory in war files. The problem we are facing is that when we try to access one of our webservices , It throws following exception
    java.lang.VerifyError: Cannot inherit from final class
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLo
    ader.java:476)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.
    java:181)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClas
    sLoader.java:62)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.
    java:223)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClas
    sLoader.java:41)
    at weblogic.xml.schema.binding.ClassLoadingUtils.loadNonArrayClass(ClassLoading
    Utils.java:68)
    at weblogic.xml.schema.binding.ClassLoadingUtils.loadClass(ClassLoadingUtils.ja
    va:43)
    at weblogic.xml.schema.binding.internal.TypeMappingBase.loadClass(TypeMappingBa
    se.java:627)
    at weblogic.xml.schema.binding.internal.TypeMappingBase.newInstance(TypeMapping
    Base.java:611)
    at weblogic.xml.schema.binding.internal.TypeMappingBase.addTypeMapping(TypeMapp
    ingBase.java:587)
    at weblogic.xml.schema.binding.internal.TypeMappingBase.readXML(TypeMappingBase
    .java:771)
    at weblogic.xml.schema.binding.internal.TypeMappingBase.readXML(TypeMappingBase
    .java:550)
    at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegistry.jav
    a:73)
    at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:78)
    at com.telverse.soap.admin.user.provisioning.process.Provisioning_Impl.<init>(Provisioning_Impl.java:22)
    at com.telverse.manager.ProvisioningManager.findFaceplateButtonsByUID(Provision
    ingManager.java:109)
    at com.telverse.actions.PhoneAction.displayPage(PhoneAction.java:434)
    The code which tries to access is as following:
    1. Provisioning_Impl prov = new Provisioning_Impl(url+"/provisioning/provisioning?WSDL");
    2. ProvisioningPort provPort = prov.getprovisioningPort();
    3. provPort.CALLFUNCTION();
    The above exception is thrown at Line no1.
    Does anybody know the solution of this error?

    I am not sure what is causing this error. Are you able to run this client outside the web app as a standalone client?
    http://manojc.com

  • Exception while invoking webservices using Dynamic client without WSDL

    Hi All,
    I am getting the below exception while invoking webservices using Dynamic client without WSDL.
    javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
    at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
    at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
    Exception in thread "main"
    Please find my source file below....
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    public class TestWSWithoutWSDL {
    public static void main(String[] args) {
    try{
    String address = "<WSDL's SOAP Address>";
    String namespaceURI = "<namespaceURI>";
    String serviceName = "<serviceName>";
    String portName = "<portName>";
    String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
    String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
    String agencyID = "AGN00533";
    String fileName = "testWS";
    String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
    System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    ServiceFactory factory = ServiceFactory.newInstance();
    * Create an instance of the Service with the given service QName
    Service service = factory.createService(new QName(serviceName));
    Call call = service.createCall(new QName(portName));
    call.setTargetEndpointAddress(address);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
    QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
    * Set operation name to invoke.
    call.setOperationName(new QName(namespaceURI,"<operationName>"));
    * Add parameters definitions in the call object.
    call.addParameter("string", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
    * Set definition of the return type.
    call.setReturnType(stringQName);
    Object[] inParams = new Object[3];
    inParams[0] = new String(agencyID);
    inParams[1] = new String(fileName);
    inParams[2] = new String(xmlString);
    String result = ((String)call.invoke(inParams)).toString();
    System.out.println(result);
    }catch (Exception e){
    e.printStackTrace();
    Please give your suggestions for the above said exception....
    Thanks & Regards....

    Hi All,
    I am getting the below exception while invoking webservices using Dynamic client without WSDL.
    javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
    at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
    at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
    Exception in thread "main"
    Please find my source file below....
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    public class TestWSWithoutWSDL {
    public static void main(String[] args) {
    try{
    String address = "<WSDL's SOAP Address>";
    String namespaceURI = "<namespaceURI>";
    String serviceName = "<serviceName>";
    String portName = "<portName>";
    String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
    String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
    String agencyID = "AGN00533";
    String fileName = "testWS";
    String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
    System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    ServiceFactory factory = ServiceFactory.newInstance();
    * Create an instance of the Service with the given service QName
    Service service = factory.createService(new QName(serviceName));
    Call call = service.createCall(new QName(portName));
    call.setTargetEndpointAddress(address);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
    QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
    * Set operation name to invoke.
    call.setOperationName(new QName(namespaceURI,"<operationName>"));
    * Add parameters definitions in the call object.
    call.addParameter("string", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
    * Set definition of the return type.
    call.setReturnType(stringQName);
    Object[] inParams = new Object[3];
    inParams[0] = new String(agencyID);
    inParams[1] = new String(fileName);
    inParams[2] = new String(xmlString);
    String result = ((String)call.invoke(inParams)).toString();
    System.out.println(result);
    }catch (Exception e){
    e.printStackTrace();
    Please give your suggestions for the above said exception....
    Thanks & Regards....

  • WebService Client - how to enable HTTP Compression

    Hi
    I have written a simple WebService Client. The WebService expects that the WebService clients enable HTTP compression. This is the exact text from the docs:-
    ""1. Client should be HTTP Compression enabled
    HTTP Compression had been made mandatory for API�s. Thus API�s client should
    include �Accept-Encoding: zip� header as part of request and should be able to
    handle compressed data. Please note that system will send an error message if client
    are not http compression enabled saying client should be compression enabled."
    I do not know how to enable HTTP compression in the WebService Client. The method called is "GetInstantaneousFlowData". It accepts no arguments and returns xsd:datetime.
    The wsdl can be found at:-
    http://energywatch.natgrid.co.uk/EDP-PublicUI/PublicPI/InstantaneousFlowWebService.asmx?WSDL
    Can someone please help :-
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    import java.util.Calendar;
    public class TestNGPubTime4 {
    public static void main(String[] args) throws Exception {
         // Setup the global JAX-RPC service factory
         System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    // create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    // define qnames
    String targetNamespace = "http://www.NationalGrid.com/EDP/BusinessEntities/Public/";
    QName serviceName = new QName(targetNamespace, "InstantaneousFlowWebService");
    QName portName = new QName(targetNamespace, "InstantaneousFlowWebServiceSoap");
    QName operationName = new QName("http://www.NationalGrid.com/EDP/UI/GetInstantaneousFlowData",
         "GetLatestPublicationTime");
    // create service
    Service service = factory.createService(serviceName);
    // create call
    Call call = service.createCall();
    // set port and operation name
    call.setPortTypeName(portName);
    call.setOperationName(operationName); // add parameters
         call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
         call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://www.NationalGrid.com/EDP/UI/GetInstantaneousFlowData");
    //     call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "http://schemas.xmlsoap.org/soap/encoding/");
    call.setReturnType(new QName( "http://www.w3.org/2001/XMLSchema","datetime") );
    // set end point address : soap address location
    call.setTargetEndpointAddress("http://energywatch.natgrid.co.uk/EDP-PublicUI/PublicPI/InstantaneousFlowWebService.asmx");
    // invoke the remote web service
    Calendar result = (Calendar) call.invoke(new Object[] {});
    System.out.println("result=" + result);
    }

    Rishika,
    Thanks for your reply.
    Could I get clariffication on some more thing?
    I am using Axis 1.4 version. And I am able to implement the gzip while doing the following steps.
    1) Change the pivote value to CommonsHTTpSender.
    <transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>
    2) public class RetreiveReservationsSOAPBindingStubLocal extends RetreiveReservationsSOAPBindingStub.
    I Override the method to support GZIP.
    org.apache.axis.client.Call _call = super.createCall();
    call.setOperation(operations[0]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("retreiveReservations");
    _call.setEncodingStyle(null);
    call.setProperty(org.apache.axis.client.Call.SENDTYPE_ATTR, Boolean.FALSE);
    call.setProperty(org.apache.axis.AxisEngine.PROPDOMULTIREFS, Boolean.FALSE);
    call.setProperty(HTTPConstants.MCACCEPT_GZIP, Boolean.TRUE);
    call.setProperty(HTTPConstants.MCGZIP_REQUEST, Boolean.TRUE);
    call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName("", "retreiveReservations"));
    super.setRequestHeaders(_call);
    super.setAttachments(_call);
    Object resp = call.invoke(new Object[] {retreiveReservationsRequest});
    I am able to send and receive the request and response in gzip encoded format.
    Now my clarrification is,
    Is it possible to set the piote value to CommonsHTTPSender for the transport http through my code?
    How could I set the values from code?
    Reason is, I don't want to manually edit the axis 1.4's client-config.wsdd
    Since this is very critical thing, please please help me.
    Thanks in advance.
    Regards,
    Nishad Ponery

  • Delete Statement Exception Handling

    Hi guys,
    I have a problem in my procedure. There are 3 parameters that I am passing into the procedure. I am matching these parameters to those in the table to delete one record at a time.
    For example if I would like to delete the record with the values ('900682',3,'29-JUL-2008') as parameters, it deletes the record from the table but then again when I execute it with the same parameters it should show me an error message but it again says 'Deleted the Transcript Request.....' Can you please help me with this?
    PROCEDURE p_delete_szptpsr_1 (p_shttran_id IN saturn.shttran.shttran_id%TYPE,
    p_shttran_seq_no IN saturn.shttran.shttran_seq_no%TYPE,
    p_shttran_request_date IN saturn.shttran.shttran_request_date%TYPE) IS
    BEGIN
    DELETE FROM saturn.shttran
    WHERE shttran.shttran_id = p_shttran_id
    and shttran.shttran_seq_no = p_shttran_seq_no
    and trunc(shttran_request_date) = trunc(p_shttran_request_date);
    DBMS_OUTPUT.PUT_LINE('Deleted the Transcript Request Seq No (' || p_shttran_seq_no || ') of the Student (' || p_shttran_id ||') for the requested date of (' || p_shttran_request_date ||')');
    COMMIT;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.PUT_LINE('Error: The supplied Notre Dame Student ID = (' || p_shttran_id ||
    '), Transcript Request No = (' || p_shttran_seq_no || '), Request Date = (' || p_shttran_request_date || ') was not found.');
    END p_delete_szptpsr_1;
    Should I have a SELECT statement to use NO_DATA_FOUND ???

    A DELETE statement that deletes no rows (just like an UPDATE statement that updates no rows) is not an error to Oracle. Oracle won't throw any exception.
    If you want your code to throw an exception, you'll need to write that logic. You could throw a NO_DATA_FOUND exception yourself, i.e.
    IF( SQL%ROWCOUNT = 0 )
    THEN
      RAISE no_data_found;
    END IF;If you are just going to catch the exception, though, you could just embed whatever code you would use to handle the exception in your IF statement, i.e.
    IF( SQL%ROWCOUNT = 0 )
    THEN
      <<do something about the exception>>
    END IF;In your original code, your exception handler is just a DBMS_OUTPUT statement. That is incredibly dangerous in real production code. You are relying on the fact that the client has enabled output, that the client has allocated a large enough buffer, that the user is going to see the message, and that the procedure will never be called from any piece of code that would ever care if it succeeded or failed. There are vanishingly few situations where those are safe things to rely on.
    Justin

  • Java Exception Handling

    Hello everyone,
    I'm searching for a design pattern / framework to manage exception handling. I'm currently working on a distributed document management system for PC / AS/400, which consists of Commandline clients, a Socket Server and a windows NT daemon in java, which accepts network requests from the Socket Server. Communication is done via serialized Objects.
    My Problem is, that exceptions can be thrown either on the server or on the client side and have to be transferred to the user. Error Messages should be read from the database. Exception handling should prefferably take place in a central piece of code, such as the two endpoints of network connections, the SocketServer as service under win32 and another SocketServer as Application on another box, currently with UNIX OS.
    thanks in advance for any answers
    regards

    You should look into Bridge [GOF:151] and Memento [GOF:273].
    Bridge allows you to decouple your mechanism from the implementation memento on how to propergate the decoupled exception information.

Maybe you are looking for

  • Having a problem with HP Solution Center seeing my hp6940 printer

    So here's the environment, windows XP, ip address 192.168.50.2, hp 6940 at 10.9.26.100.  These two networks are connected by a router.  I can ping the printer, I can browse to the printer address and see the printer web pages.  If I bring up HP Solut

  • MSI GE70 Doesn't Boost, Stuck at 745 Mhz (650m gpu)

    hello, i bought my laptop yesterday and i figured out a strange thing. my gpu won't go above 745 Mhz even if i play games(dota2, bf3). as far as i know it should boost to 830Mhz. i google'd it and found out that some dell owners had that aswell and a

  • Connecting an amp with XLR outputs to GB

    Hi, I'm new to the forum, to Mac world and to recording as well, so please be patient... I'm trying to find out what would be the best way to record an amp guitar into GB. Right now I'm using the amp XLR right and left outputs directly into the Mac's

  • Mapping reuseability

    hi, We are having quite good number of XSLT transformations within our scope. How can we reuse the existing XSLT mappings defined under different software component versions? Lets say can we import XSLT transformation under SWCV1 and can we make use

  • Restore Settings - any other option?!

    Connected my ipod and it is saying that I have to restore settings. This happened after I had it plugged into my home computre and my husband put some songs on from his iTunes. Obviously I don't want to have to do this. Any ideas on what I can try? T