Skip to Content
author's profile photo Former Member
Former Member

WebDynPro example

Is there a webservices demo that shows how to retreive data into webdynpro model ?

The 2 examples only send data to a webservice and only show a result of success or failiure.

What if we get a table of data back from the webservice. How do we address the data in the table or array ?

Greetings Danny.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 09, 2003 at 12:44 PM

    Hi Danny,

    well with arrays it works the same way. I give an example of a webservice from xmethods where you can get the current Marketheadlines from Reuters.

    The wsdl file is here:

    The structure of the webservice might be like this:





    +- Response_Xignite_getMarketHeadLines( cardinality: 0..1)

    +- Result (of type JavaBean_MarketNews)(Cardinality: 0..n)




    You will see this as context structure once you bound the Request ModelClass to a model node in your view.
    What you see here is that the the result of the response is not a simple type like an integer anymore as it was in the email webservice but it references an array of ModelClass of the type JavaBean_MarketHeadLines. You can see this because the cardinality of result is (0..n). You can just bind the Result Object to a table to visualize the array.

    Steps to do :
    1)Import the webservice from the given URL.
    2) Add model to your component
    3) Create a a view under the component
    4) Go to tab context, create a Model Node with name:"Request_XigniteNewsHttpGet_getReutersMarketNewsHeadLines"
    Right click on the model node "Request_XigniteNewsHttpGet_getReutersMarketNewsHeadLines"
    and choose "edit model binding".
    Map the model node "Request_XigniteNewsHttpGet_getReutersMarketNewsHeadLines" to the model class "Request_XigniteNewsHttpGet_getReutersMarketNewsHeadLines". Keep the Response and Result items checked.

    The code in the wdInit method of the view could look like this:

    Request_XigniteNewsHttpGet_getReutersMarketNewsHeadlines req = new Request_XigniteNewsHttpGet_getReutersMarketNewsHeadlines();

    Create a button and a action.
    in the action you provide this code:

    public void onActionXy(..)
    //@@begin ..
    //inform the client side framework that the underlying model has changed
    catch(Exception ex)


    Up to now it all looked the same as the email webservice. In the layout of the view you can now add a table to the screen. After that you can right click on the table and say "Create Binding" you just select the Result Node of the context and bind it to the table.

    Have fun

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.