on 08-01-2007 9:10 AM
Hi all,
I have a Web Service Deployed in Different Machine. This WebService accepts 2 string1,string2 parameters and returns back a String.
I am unable to Deploy Web DynPro Application because I am facing errors like
1. In the RunTime the fields are non editable (string1,string2).
Any Suggestions / Hints are welcome
-Naren
Hi Naren,
In the Execution Method,Please do add the Following
wdContext.current<Bapi Node>Element().modelObject()._setUser("");
wdContext.currentt<Bapi Node>Element().modelObject()._setPassword("");
Mention the user id ,password(Which u have used to deploy the webservice).
Regards
Nandha.
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Narendra,
If fields (srting1,string2) are under Node (0..n or 0..1)
then you have to initialize your node in side "public void wdDoInit()" Method.
For 0..n node use code inside wdDoInit.
wdContext.node<node_name>().addElement(wdContext.create<node_name>Element());
For 0..1 node use code inside wdDoInit.
wdContext.node<node_name>().bind(wdContext.create<node_name>Element());
Other wise you can make the node cardinality to 1..1 or 1..n
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The fields taking input for string1 and string2 are be binded to some context attribute which are not initialized.
Initialize them.
Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I tried to Add the element in th wdDoInit(), I got the below exception at runtime
The initial exception that caused the request to fail, was:
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(Aug1NewComp.Request_TestMethod): must not add elements to a Node of cardinality 0..1 or 1..1
-Naren
type mismatch: cannot convert from IPublicAug1NewComp.IRequest_TestMethodElement to IPrivateAug1NewView.ITestMethodResponseElement
For the following code
IPrivateAug1NewView.ITestMethodResponseElement element = wdContext.nodeRequest_TestMethod().createRequest_TestMethodElement(new Request_TestMethod(model));
wdContext.nodeRequest_TestMethod().addElement(element);
Hi Narendra,
Node Cardinality 0..1/1..1 will contain only one element.
Cardinality 1..1 means element is already created by the system.
Dont create any element for this. inside wdDoInit.
For 0..1. you have to create one element using.
wdContext.node<node_name>().bind(wdContext.create<node_name>Element());
Regards,
Mithu
First , I would really appreciate the time and effort for resloving my issue , But for my bad luck i am still stuck
Let me put down the steps I followed for developing this web dynpro
1) Created a Web dynpro project
2) Created an Application under it, and a component and a view is been associated to it
3) From the data modeler, created a new model, which basically inherits a Adaptive web service
4) From the controller I used apply template, which created a data link to the Controller and model
5) Created a datalink from View to Component controller and mapped the associated fields
6) In the Action tab created a new action "xx"
7) In the Layout of view created a Group UI component and associated all the fields from the context to the Group
😎 Created a button to invoke the action.
9) Under the implementation tab, I called the execute controller's execute method
10) Controller class is fully generated by web dynpro , as I have given apply template (Binding in wdDoInit(), calling
modelObject().execute() method is generated by itself)
11) Once after building, deploying and running I got the screen with non editable fields and on clicking the button I
I got the exception as mentioned below
Exception on execution of web service with WSDL URL 'http://iwdfvm2225:50000/WsTest/Config1?wsdl' with operation 'TestMethod' in interface 'WsTestVi_Document'
12) But Web service works fine and returns proper value, when tested directly.
-Naren
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.