cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptive WebService Model- Controller Binding

Former Member
0 Kudos

HI,

Cannot execute a webservice from webdynpro applcn due to the error described at the bottom.

My Node Structure:

-Request1(0..n)

--ChildNode1(0..1) of Class ComplexType1

---ChildNode2(0..1) of Class ComplexType2

-


Required_Date

-


Required_Quantity

---Material

---Unit

Source Code:

Request1 input = new Request1();

wdContext.nodeRequest1().bind(input);

ComplexType1 input1 = new ComplexType1();

ComplexType2 input2 = new ComplexType2();

input2.setREQUIRED_DATE("20.06.2007");

input2.setREQUIRED_QUANTITY("5000");

input1.setChildNode2(input2);

input1.setMATERIAL("1000141000");

input1.setUNIT("ST");

wdContext.currentRequest1Element().modelObject().setChildNode1(input1);

try{

wdContext.currentRequest1Element().modelObject().execute();

wdContext.nodeResponse().invalidate();

}catch(Exception ex){

wdComponentAPI.getMessageManager().reportException(ex.toString(), false);

}

Exception:

java.rmi.RemoteException: Service call exception; nested exception is:

com.sap.engine.services.webservices.jaxrpc.exceptions.XmlMarshalException:

XML Serialization Error. Property [ChildNode2] of class [com.test.model.proxies.types.ComplexType1]

must exist and can not be null

Is there anything missing which Iam not instantiating?

Regards

MK.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You are missing

wdContext.currentRequest1Element().modelObject().setChildNode2(input2);

Former Member
0 Kudos

H Shriram,

over the wdContext.currentRequest1Element().modelObject() i can only access ChildNode1.

The ChildNode2 is under ChildNode1.

Former Member
0 Kudos

Hi,

Seems you have not created an element for the ChildNode2 before setting the values into it. Pls check.

Regards,

Shyam.