Getting chain of fault in the Web Service response

Hello

I developed a Web Service and deployed to the Glassfish server. When I try to call the web service a few times I am getting following error
<faultstring>String index out of range: 0</faultstring>
What is the meaning of this? How to solve this problem?



Kind regards
Ajay Sharma

Each cal with values that do not cause a chain index to be out of range or change the webservice to hear the case which causes this differently. Anyway the point of departure is to discover where in webservice String index is out of range.

Tags: Java

Similar Questions

  • Extract the data from the web service response

    Hello

    I called a web service and in response to XML data, now I have to extract the values and store them in the array

    My steps,

    1 call WebService
    2 answer stored in the CLOB column
    3, then used after the request

    SELECT loc.*
    OF my_xml PO,.
    XMLTable (XMLNAMESPACES)
    "urn: schemas-microsoft-com: XML-diffgram-v1" as "diffgr".
    ,'http://api. .com / "as"ns0"
    )
    ,'/ ns0:DataSet / diffgr:diffgram/NewDataSet/OptOutAll '
    PASS xmltype.createxml (PO.xml_data)
    COLUMNS
    "E-mail" TANK (100) path "Email."
    'Reason' TANK (150) PATH 'reason '.
    ) As loc
    WHERE ROWNUM < = 10;

    I wrote using this example

    But it does not work, do not know why

    / Zab

    If I use the XML (stored in the table XMLType TMP_XML) below:

    
    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                          
                          
                          
                          
                        
                      
                    
                  
                
              
            
            
              
                
                  2012-05-09T22:40:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-07T22:30:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-14T00:20:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-19T20:50:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
              
            
          
        
      
    
    

    Then I can do:

    SQL> SELECT x.*
      2  FROM tmp_xml t
      3     , XMLTable(
      4         XMLNamespaces(
      5           'http://www.w3.org/2003/05/soap-envelope' as "soap"
      6         , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
      7         , 'http://api.***.com/' as "ns0"
      8         )
      9       , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
     10         PASSING t.object_value
     11         COLUMNS OptOutTime  TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
     12               , MailingList VARCHAR2(100)            PATH 'MailingList'
     13               , Reason      VARCHAR2(150)            PATH 'Reason'
     14       ) x
     15  ;
    
    OPTOUTTIME                          MAILINGLIST                    REASON
    ----------------------------------- ------------------------------ --------------------------------------------------------------------------------
    09/05/12 22:40:00,000000 +02:00     information                    Subscriber confirmed
    07/06/12 22:30:00,000000 +02:00     information                    Subscriber confirmed
    14/06/12 00:20:00,000000 +02:00     information                    Subscriber confirmed
    19/06/12 20:50:00,000000 +02:00     information                    Subscriber confirmed
     
    

    Are you getting something different?

  • How to get the IP address of the calling client to the web service built in Jdeveloper 11.1.1.7 application?

    I built an application of web service in Jdeveloper 11.1.1.7 to be used by other clients. Just the General steps as follows (Server web service Application is generated--> deployed on the server-> used by clients with the location of the WSDL file).

    Now, I met a requirement where I need to get the port number and IP address for the client.

    Questions :

    How to get the IP address of the calling client to the web service application generated in Jdeveloper?

    Commune technologies used to build web service applications is AXIS or CXF. What Jdeveloper technology use to built web service application?

    The common technologies used to build web service applications is AXIS or CXF. What Jdeveloper technology allows built web service application?

    It depends on the option selected during the creation of web services (if I remember correctly, there are several options, style J2EE 1.4 RPC style JavaEE JAX - WS 1.5,...)

    For example, to get the ip address of the compatible with jax - ws web service, you need to inject the context in your service class with:

    @Resource
    WebServiceContext wsContext;
    

    and then inside your method:

    MessageContext mc = wsContext.getMessageContext();
    HttpServletRequest req = (HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST);
    String ip = req.getRemoteAddr();
    

    Dario

  • How to get the response from the web service

    Hello

    My requirement is necessary send the UI ADF input parameter and get web service respone. I created proxy WSDL-based methods. Now in my action button earpiece that I wrote the logic below.

    {} public void submitAction (ActionEvent actionEvent)
    Add the code in the event here...
    BigDecimal merNam = null;
    String number = this.it1.getValue (m:System.NET.SocketAddress.ToString ()); my entry value
    merNam = new BigDecimal (number);
    MV MerchantValidate = new MerchantValidate(); / / created by jdeveloper when proxy generation.
    mv.setMerchantNumber (merNam); / / the value input to the web service
    System.out.println ("merchant number is:" + mv.getMerchantNumber ());

    Mr. MerchantValidateResponse = new MerchantValidateResponse(); / / create object of response class
    String result = mr.getResult (); / / try to get the answer
    System.out.println ("result:" + result); / / I'm getting null as a result
    / * this.setResult (mr.getResult ());
    System.out.println ("the answer is:" + this.getResult ()); * /

    Can someone help how to pass values to the web service and get the response. And how can we get the Web service data control.

    It's very urgent pls help. I'm not for this technology.


    }

    Hello

    You can view the tutorial for a good understanding on creation and use of a Web Service data control:

    http://www.Oracle.com/technology/OBE/obe11jdev/11/wsdc/wsdc.htm#T1

    Thank you
    Vishal

  • How can I fnd my claim code and the reprint of the web services information sheet

    Hi, I have a HP Deskjet 3520 and try to put in place the eprint.  I read the suggestions on the forum and the FAQ but I can't locate the web services information sheet I need to reprint for claim code.

    Could not find anything under Printer Control Panel either. Please advise!

    Thank you!!

    Hi Chris88,

    Welcome to the HP Support forums.  I appreciate that you try to configure the ePrint on your Deskjet 3520 printer feature.

    If you have the inkjet printer Deskjet 3520 with a C8994 product number this printer does not have the ePrint service.  The Deskjet 3520 printer only has USB connection and ePrint to function the printer must have an independent internet connection through a wireless or a wired ethernet network.  I've included the specifications of the printer for your reference.

    If you have the e-all-in-one printer Deskjet 3520 then we obtain the claim code.  You can request the information sheet of web services from the front panel of the printer, and there the claim code printed in blue. Instructions on how to get it can be found in the section titled "to print a document using ePrint' in your on page 15 user's guide.  Please follow the instructions in step 1.

    HP Deskjet 3520 inkjet printer specifications

    User's Guide e-All-in-One Series HP Deskjet 3520

  • Impossible to activate the web services photosmart7515

    On the web services on my printer I get

    e-mail connection error

    ePrint connection error

    Web services connection error

    What can I do?

    Hi Catjoy36,

    Thanks for the reply.  It seems that we have to take steps more.  Follow the steps below, and once you complete the steps, then you can follow the steps above.

    1. go in the front panel of your printer.

    2. Select the icon wireless on your printer.

    3. Select settings.

    4. highlight and select restore default network settings.

    5. click OK to restore default values.

    6. now, select Wireless and go through the wireless configuration wizard.

    Let me know how it goes.

  • Unable to connect to the web services server

    Unable to connect to the web services server.  It is a common error that you might see if you try to enable web services.  If you receive this message, try the following steps.

    For Officejet printers

    1. open the internet browser type printer IP address.

    2 should bring you to the status of the printer page.

    3. Select the tab network at the top.

    4. left side select IPv4 under wireless.

    5. under DNS address Configuration select manual DNS server.

    6. for favorite enter 8.8.8.8

    7. for alternate enter 8.8.4.4

    8. Select apply. You can get a warning saying that this could break the connection which is very good.

    9. turn the printer off for about 30 seconds and then try to enable web services.

    For Photosmart printers

    1. Enter the printer's IP address in a browser.

    2 Select the network at the top of the page.

    3. on the left, select network.

    4. Select Network (IP) address

    5. select manual DNS server

    a. manual Preferred DNS should read 8.8.8.8

    b. alternate DNS server should read. 8.8.4.4

    6. Select apply you could get a fair warning select OK

    I hope this helps!

  • Unable to connect to the Web Services Proxy/unused (a HP 7500 JO)

    Hello

    Here's the situation:

    Previous installer:

    .  I have connected my 7500 for the corporate network (IP = 172... series)

    .  registered the product with ePrintCenter

    .  used a PC under Windows to print (and scan) with the printer

    .  web proxy entry "webproxy.phila.gov".

    .  However, because homeland security rules, I could never work, so I just let it go

    Current situation

    .  has taken the home printer and set up on my home network, i.e.,.

    -using the 192.168.xx.xx series

    -Router broadband Netgear ' G' (1 years) set up at the 192.168.xx.254

    -SSID & encryption assigned

    -printer, the value 192.168.xx.155 (static IP address, the subnet and the gateway assigned as well)

    -My DNS is identical to the bridge and it works fine for all the internet access to this day

    -with the help of a PC and a Macbook Air to print and scan and everything works fine

    .  HOWEVER,.

    -Initially, 'web services' were active (carried over from when I was on the company neetwork?)

    ..  Are looking for, found and downloaded updates

    -When I went to hp.com ePrintCenter he showed the product as 'registered '.

    ..  He would'nt I would like to connect (with a name and a password I had used previously), or create a new account

    ..  I never remember getting an email address of the printer

    ..  and I had never been able to send anything to the printer to print because of my problem of network security

    -Yes, after trying all sorts of things, I:

    ..  I tried to get another email without success

    ..  tried to re - enable web services, but he said I need to 'proxy', and I discovered that he had always "webproxy.phila.gov."

    ..  I have reset the values by default web services and network values

    ..  I put the static IP address return address in (i.e., printer, subnet and gateway (it has nowhere to put in a DNS one))

    ..  printing and scanning to 192.168.xx.155 works fine

    ..  From my iPad AirPrint works very well

    .  BUT, I still can not online and therefore web server, web services are not enabled, therefore not ePrint

    -everytime I try, it says it needs a proxy

    - but I don't have a proxy installed on my internal home network bit

    -Comcast/Xfinity, my ISP, do not use a proxy

    So, I'm dead in the water.  I can't figure out how to get the web services enabled; I do not use a proxy, so I don't know how to go beyond this issue. How to regenerate address of the printer; and so, how do I connect an account on the ePrintCenter (or get them to send me my old account information).  I'm dead in the water and cannot use a feature most of my printer that I desperately want to be put in place and functional.

    Any help would be greatly appreciated!

    Tommy

    Problem solved, but I don't know exactly how I did it. However, I went back in and let the printer assign the IP address. Then I turned the printer off and on again. Last I kept pressing the button "Printer e-mail address", who has repeatedly failed, but then finally went through and print the 'printer' page, I quickly used to connect to the ePrintCenter and put everything in place.

    Now it's working.

  • URL of the Web Service, LV2013 vs LV2012 length limits

    (* CROSS POST: http://lavag.org/topic/18435-web-service-url-length-limits-lv2013-vs-lv2012/ *)

    (* Please answer in this forum.  I scored the other thread for responses here. *)

    A that someone noticed a reduction in the limit on the length of the URL for the Web Services between the versions of LV 2012 and 2013?

    Under LV2012, a RESTful web service seems to accept URLS with lengths at least as long as 4096 characters.  With LV2013, the maximum length of URL seems to be 511 characters for RESTful web services as the project item. Unfortunately for me the project, I have converted just travel on this issue. My goal with posting this request here is my understanding of this limitation before deciding the best way to modify my code.  Certainly using POST instead of GET with a long URL is an option, but again, I am looking to understand the change in limitation before choosing a solution.

    To illustrate, I enclose three projects for the most part identical, demonstrating the issue.  In each case, the project contains a webservice consisting of a single VI, 'ComputeLength', which takes a string as an input parameter and that returns the length of the string.  The three projects are the following.

    1 LV2012 RESTful WebService.

    2 LV2013 RESTful WebService.

    3 LV2013 article project web service.

    The web service contains a single VI.  For the relaxing examples, the web service is started by selecting deploy menu of right-click Build specification.  For the example of project item, the web service is started by selecting start in right click menu position of work/WebService. The use of this example is shown with the following URL:

    (Note that the port is 8080 for both relaxing examples and 8001 for the project web service point if used in debug mode, which is the default value for the statement above.)

    http://localhost: 8080/webservice/computelength? string = 1234567890

    And the output looks like this.

    Workaround.  Apparently from 2013 of LV, there is a default limit of 512 to the length of the URL.  The default limit can be overridden as described below.

    Martin

    He is Brian in the technique of applications for National Instruments. I am following up about the 511 character limit in your Web Service HTTP request after the port number. After some research, I realized that the problem is related to a web site by default, the setting of the server called "LimitUri", which limits the maximum length of a URL. The default is 512 characters long that's why we are seeing this problem.

    There are several ways to modify the URL length limit depending on how you use your web service. If you publish the web service using the Application Web Server can change "C:\Program Files (x 86) \National WebServer\NIWebAppServer.conf" and add "LimitUri 4096" at the end of the file without the quotes.

    If you run the Debug Web server simply by clicking start on the web service, and then change "C:\Program Files (x 86) \National 2013\resource\webserver\niwsdebugserver.conf" and add "LimitUri 4096" at the end of the file without the quotes.

  • deploy the web service to xp embedded

    Hi all

    I struggle to run a web service on an xp embedded system. The web service works very well in my LV 2011 development environment and I have created an installer for my main application it is the lvws file is included as described in web services FAQ:

    http://zone.NI.com/DevZone/CDA/tut/p/ID/7747#toc12

    After the installation on the target computer, I can't access the web service. Also if you call localhost:3580, then I get an access error.

    But in the System Control Panel administrative tools, I can see that the server system OR like many Web server OR Web applications are started.

    For further investigation, I added the 'Distributed System Manager' to my Installer. With this tool, I see that all my web services deployed on my development system, but on the XP embedded system with TEN target is listed.

    I installed my application for a professional reference XP system to exclude that the problem is caused by embedded XP. But the behavior is exactly the same. So far, I tested only local so that settings security like firewalls and ports system should pose no problems. But to be sure I have disabled the firewall without success... I can't access the Web service. I have often found the suggestions in the forum to check if the web service is enabled. But I am not already and then access to http://localhost:3580.

    Any ideas?

    Thank you!

    This help document is somewhat outdated.

    You see 2 different problems: 1) you can not display the Configuration utility and do not install Web using localhost:3580 2) your web service monitoring.

    For the first number-->

    You probably did not understand the "Interface Web NI 2011 infrastructure" in your Setup program.  The doc to help you mentioned does not tell you to do, because it is not necessary for your web service works. However, if you want to change one of the settings of your web server after the installation, you will need this extra setup program.

    For the second question-->

    You probably didn't get your Spec to build Web services as a source file in your Setup program.  The help doc says to put your LVWS file as your installation source, but this is not correct. You must include the technical article to build real web service as a source file (not the web service create out of spec files, like LVWS).

    Let me know if any of these will help you.

    -Jared

  • change the frequency for the web service

    I'm under LabVIEW Web Service with an application following the method shown in the example of weather monitor. But my problem here is that I have to keep clicking the Refresh button, then the Web Service can only update the latest data for me. Can someone help me to set an example on how to let the page Web of the Web Service automatically update the value without pressing the Refresh button. Thank you

    First of all your customer needs to support it. If you use the HTTP Client in LabVIEW (GET.vi and so on) you cannot use this method. A normal browser should.

    Take a look at the address book example FindContacts.vi.

    The help topic linked in the previous post, you should get on the way as well. The news are scattered throughout the help file, but it should be possible to understand.

    Basically, there are two output options for a web service VI: Terminal mode as used in the example weather and fashion such Stream used in the example address book VI.

    Use stream mode and build the HTML page yourself, then sends it to the browser with Response.vi write. Somewhere in the top of the HTML page, you need to insert

    
    

    If you need to return a string like

    
    my title
    
    
    
    

    If your browser supports Refresh, this page refreshes in 5 seconds. And add some real contents here

    See also W3C .

    Good luck

  • HP Photosmart 5520 - problems with the connection to the web service

    Hi, I'm trying to run the web service on Hp Photosmart 5520, but it does not work. Wireless printing works well, but he says that it cannot connect to the server and sometimes requires adding a proxy.

    I've set up a fixed IP and I used it in the IP (manual ip) configuration, I've implemented manula and gateway subnet mask (using the address of my router). I used the same primary DNS preferred (but also tried 8.8.8.8 and others)

    No question.

    Currently, I removed all of the proxy page. The error I get says that it cannot communicate with the server.

    Thanks in advance

    .. don't ask me what happened... while I was writing this worked
    Thanks anyway

  • OfficeJet 6500 a Plus: impossible to activate the Web services; roadblocks at all stages

    This printer is connected to my network by Ethernet. I want to activate Web services, so I can use ePrint.

    When I try to enable Web services from the printer control panel, I said that I might need to enter a proxy address. I'm not running a proxy server, but it is not possible around this prompt.

    There are posts on this Board indicating that Web services can be activated with a Wi - Fi connection. I unplugged the Ethernet cable and wireless enabled, but I was always invited address proxy information when I tried to activate the Web services. I disabled wireless and returned to Ethernet.

    A response to another post suggested updating the firmware to bypass the proxy server error. HP recommendation is to do it from the control panel of the printer. In the Panel menu control, firmware upgrade is the title of the Web services, which I can't because of the mistake of the proxy. So I downloaded the firmware and tried to install the update from my computer. The update found my printer on the network, but it is gray, saying 'Not applicable', under the State. I couldn't select it.

    In another post, someone suggested THAT DNS has been configured. I saw, through Server Web shipped by the printer, there is no configured DNS server (the printer is configured for manual IPv4). So via the integrated Web server, I tried to enter addresses (my domain controller, OpenDNS, Google) DNS server. With each of them, the SAP replied: "an error has occurred. (ipv4Page-400). Click 'OK' to go back. "There is no place to enter the DNS settings on the printer control panel.

    Web services require a Wi - Fi connection?

    Why the printer think there need a proxy address?

    The firmware update will solve the proxy error?

    I have to update the firmware, if the update statement indicates does not apply?

    What is another method for updating the firmware out of the control panel or from my computer?

    How to enter the DNS of the EWS information without getting an error?

    Jeffrey Pike

    Groton public library

    Charles:

    Thank you for taking the time to provide a complete response to my questions.

    I finally got the Web services enabled on the printer. What I had to do was enter the DNS settings in SAP to bypass the prompt for proxy information. Step I missed yesterday, when I got page not found error in the SAP, was that I had to do the secure version of the SAP ("https", not "http"), and then the EWS would accept my DNS entries. Once this is done, I went to the printer and could enable Web services without having to provide proxy information.

    The printer is now registered to hpconnect.com, and I can start letting my library to print patterns on my wireless network, that was my goal all along.

    Thanks again for your help.

    Jeffrey Pike

    Groton public library

  • problem connecting to the web services server

    I tried to download the latest updates of software/firmware for my all-in-one HP Photosmart Prem C310a.

    I can't get updates or activate Web Services because it still gives me the error message "problem connect to the web services server.

    I tried everything in the section of the Web of HPs site including connection via WPS - unsucessfully problems.

    I understand that you have found impossible to connect to the server error message on your printer. I would first disconnect the router and the printer for about 1 minute. I would plug the router first then the printer. I would then try to enable web services. If not successful, and you get the same error message. I'd follow these steps.

    1 obtain the IP address of your printer
    a. This can be done by pressing the icon on the printer wireless.
    2. Enter the printer's IP address in a browser.
    3. Select the tab network at the top of the page.
    4. on the left, select network.
    5. Select Network (IP) address
    6. select manual DNS server
    a. manual Preferred DNS should read 8.8.8.8
    b. alternate DNS server should read. 8.8.4.4
    7. Select apply you could get a fair warning select OK.

  • How to call the web service?

    Hello

    I want to know how to call the web service from my application HTML5 & javascript.

    Please help me find this detail as what I can access easily. and I want to access web services online (a method of it) I'm not concered with how background Web service takes place.

    I just want that when you call a web service method, I will return the result.

    Please try this out for a WebService call

    var xmlhttp;
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("get","your url",true);
    xmlhttp.setRequestHeader("Accept","application/json");
    xmlhttp.setRequestHeader("Content-type", "application/json");
    xmlhttp.onreadystatechange=function() {
     if (xmlhttp.readyState==4) {
      if (xmlhttp.status == 200) {
        console.log(xmlhttp.responseText);
      }
     }
    }
    xmlhttp.send();
    

    This will display the result of the invocation of webservice. The url is the application that you deploy and the type can be get/post. If xmlhttp.send (post) takes argument for the display of the data. You can call it by clicking a button in HTML.

Maybe you are looking for