Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Webservice datacontrol not able to display on amx page in adf mobile.

vivek280991Jun 26 2014

I have create a web service data control which takes an input as a string and returns a list as output. I have dragged and dropped the method and input text. when try to invoke it just shows the busy cursor and not output is displayed. is it because of any timeout issue? or anything else is possible?. I have tested the web service using soapUI(a tool to test the web service) and it gives the output.

Comments

BarryB

I didn't figure it out, (didn't get any help on SO either).
So I made a workaround by saving it to a table.

It probably looks horrible to a Java programmer but seems to work.

//Save the message to 
           ByteArrayOutputStream bos = new ByteArrayOutputStream();
           ByteArrayInputStream bis = null;
           //memory = new MemoryStream ();
           try  {
                msg.writeTo(bos);
                int i = bos.toByteArray().length;
                byte[] array = new byte[i];
                array = bos.toByteArray();
                
                
                
                //insertIntoProducts(desBlob);
                Connection conn = DriverManager.getConnection("jdbc:default:connection:");
                Blob desBlob = conn.createBlob();
                desBlob.setBytes(1, array);
                //PreparedStatement ps2 = conn.prepareStatement("insert into mytable values (hextoraw(?))");
                PreparedStatement ps2 = conn.prepareStatement("insert into barry_testtable(blobcolumn) values (?)");
                ps2.setBytes(1,array);
                try{
                int rowsAffected = ps2.executeUpdate();
                System.out.println(rowsAffected); //1
                } catch (SQLException e) {
                    System.err.format("SQL State: %s\n%s", e.getSQLState(), e.getMessage());
                } catch (Exception e) {
                    e.printStackTrace();
                }
                
           }catch(Exception exp){
               exp.printStackTrace();}
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 24 2014
Added on Jun 26 2014
0 comments
157 views