Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. error when call fuction ArrayList in WebService ???

error when call fuction ArrayList in WebService ???

Scheduled Pinned Locked Moved Java
helpdatabasequestion
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aa_zz
    wrote on last edited by
    #1

    hi all. i have fuction showdata in Webserivice: public ArrayList showdata() { ... ArrayList arr = new ArrayList(); while (reader.next()) { int id = reader.getInt("id"); String content = reader.getString("content"); Time time = reader.getTime("time"); arr.add(new GetData(id, content, time)); } return arr; } class GetData { private int ID; private String CONTENT; private Time TIME; public GetData(int id, String content, Time time){ ID = id; CONTENT = content; TIME = time; } } ############################# in web client . get data from database via showdata() from sebservice. <% SW2Service sv = new SW2Service(); SW2 port = sv.getSW2Port(); ArrayList arr = new ArrayList(); arr = port.showdata(); ==> Erro this %> please help me nothing

    G R 2 Replies Last reply
    0
    • A aa_zz

      hi all. i have fuction showdata in Webserivice: public ArrayList showdata() { ... ArrayList arr = new ArrayList(); while (reader.next()) { int id = reader.getInt("id"); String content = reader.getString("content"); Time time = reader.getTime("time"); arr.add(new GetData(id, content, time)); } return arr; } class GetData { private int ID; private String CONTENT; private Time TIME; public GetData(int id, String content, Time time){ ID = id; CONTENT = content; TIME = time; } } ############################# in web client . get data from database via showdata() from sebservice. <% SW2Service sv = new SW2Service(); SW2 port = sv.getSW2Port(); ArrayList arr = new ArrayList(); arr = port.showdata(); ==> Erro this %> please help me nothing

      G Offline
      G Offline
      Gerben Jongerius
      wrote on last edited by
      #2

      What is the error you are getting from the service and what type of service are you using (eg: Swing, Axis, generic SOAP)? Please note that if you are using an implementation of a SOAP (Axis/Swing) service arraylists are not the way to go, as these could cause issues in the serialization and deserialization.

      A 1 Reply Last reply
      0
      • G Gerben Jongerius

        What is the error you are getting from the service and what type of service are you using (eg: Swing, Axis, generic SOAP)? Please note that if you are using an implementation of a SOAP (Axis/Swing) service arraylists are not the way to go, as these could cause issues in the serialization and deserialization.

        A Offline
        A Offline
        aa_zz
        wrote on last edited by
        #3

        i using SOAP. please help me nothing

        D G 2 Replies Last reply
        0
        • A aa_zz

          i using SOAP. please help me nothing

          D Offline
          D Offline
          David Skelly
          wrote on last edited by
          #4

          Please help you to do what? If you ask a specific question you will stand more chance of getting a useful answer.

          A 1 Reply Last reply
          0
          • D David Skelly

            Please help you to do what? If you ask a specific question you will stand more chance of getting a useful answer.

            A Offline
            A Offline
            aa_zz
            wrote on last edited by
            #5

            thank you i using netbean 6.9.1. glassfish in netbean. webservice SOAP. please help me nothing

            1 Reply Last reply
            0
            • A aa_zz

              i using SOAP. please help me nothing

              G Offline
              G Offline
              Gerben Jongerius
              wrote on last edited by
              #6

              And what is the error that is being thrown. Only knowing that something throws an exception doesn't really help anyone to give you clues as to how to fix it.

              1 Reply Last reply
              0
              • A aa_zz

                hi all. i have fuction showdata in Webserivice: public ArrayList showdata() { ... ArrayList arr = new ArrayList(); while (reader.next()) { int id = reader.getInt("id"); String content = reader.getString("content"); Time time = reader.getTime("time"); arr.add(new GetData(id, content, time)); } return arr; } class GetData { private int ID; private String CONTENT; private Time TIME; public GetData(int id, String content, Time time){ ID = id; CONTENT = content; TIME = time; } } ############################# in web client . get data from database via showdata() from sebservice. <% SW2Service sv = new SW2Service(); SW2 port = sv.getSW2Port(); ArrayList arr = new ArrayList(); arr = port.showdata(); ==> Erro this %> please help me nothing

                R Offline
                R Offline
                RaviRanjanKr
                wrote on last edited by
                #7

                Please mention error which you getting in your code.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups