Skip to Content
avatar image
Former Member

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

Hi All,

Im using WSDL to implement a functionality in webdynpro application.this WSDL requires 3 inputs :<b>flag,SampleId,Reason</b>.Im setting the values to the nodes but while deploying the

application im getting the following error:

Service call exception; nested exception is: <b>com.sap.engine.services.webservices.jaxrpc.exceptions.XmlMarshalException: XML Serialization Error. Property [FLAG] of class [apprejmodel.proxies.types.LspmRequestApprRejAdhocSampleDT] must exist and can not be null. This is required by schema description</b>

I think this error comes if i do not set the flag value .but in the code i have set the flag value

The Structure of Context is below:-

--->RequestApprReject(MN-cardinality 0..1)

-


>Lspm_RequestAppRejectSampleMT(MN-cardinality 0..1)

-


>Flag(MN-cardinality 0..n)

-


>flg(MA-cardinality 0..1)

-


>SampleId(MN-cardinality 0..n)

-


>sampleid(MA-cardinality 0..1)

-


>Reason(MN-cardinality 0..n)

-


>reason(MA-cardinality 0..1)

here im writing the code which sets the values to WSDL.

<b>Code</b>

ComplexType_ItemInner3 newFlag = new ComplexType_ItemInner3();

newFlag.setFLG(flagApp);

FlagList.add(newFlag);

ComplexType_ItemInner4 newReason = new ComplexType_ItemInner4();

newReason.setZADHOCREJRES(reason);

ResList.add(newReason);

ComplexType_ItemInner5 newSampleId = new ComplexType_ItemInner5();

newSampleId.setZSAMPLEID(sampleId);

aList.add(newSampleId);

ComplexType_LspmRequestApprRejAdhocSampleDT grid = new ComplexType_LspmRequestApprRejAdhocSampleDT();

grid.setFLAG(FlagList);

grid.setZSAMPLEID(aList);

grid.setZADHOCREJRES(ResList);

IPrivateAdhocTestView.ILspmRequestApprRejAdhocSampleMTElement ele = wdContext.createLspmRequestApprRejAdhocSampleMTElement(grid);

wdContext.currentLspmRequestApprRejAdhocSampleMTElement().modelObject().setFLAG(FlagList);

wdComponentAPI.getMessageManager().reportSuccess("flagApp:"+flagApp);

wdComponentAPI.getMessageManager().reportSuccess("newflag:"+newFlag);

wdContext.currentLspmRequestApprRejAdhocSampleMTElement().modelObject().setZADHOCREJRES(ResList);

wdContext.currentLspmRequestApprRejAdhocSampleMTElement().modelObject().setZSAMPLEID(aList);

wdThis.wdGetAdhocTestAppController().executeRequest_LspmRequestApprRej();

ArrayList abcList =(ArrayList) wdContext.currentRequest_LspmRequestApprRejAdhocSampleOSMI_lspmRequestApprRejAdhocSampleOSMIElement().modelObject().getLspmRequestApprRejAdhocSampleMT().getFLAG();

for(int k=0;k<abc.size();k++)

{

ComplexType_ItemInner3 flagtemp = (ComplexType_ItemInner3)abcList.get(k);

wdComponentAPI.getMessageManager().reportSuccess("flagvalue before wsdl exec"+flagtemp.getFLG());

}

ArrayList a1List = (ArrayList) wdContext.currentRequest_LspmRequestApprRejAdhocSampleOSMI_lspmRequestApprRejAdhocSampleOSMIElement().modelObject().getLspmRequestApprRejAdhocSampleMT().getZSAMPLEID();

for (int i = 0 ; i < a1List.size(); i++ )

{

ComplexType_ItemInner5 temp = (ComplexType_ItemInner5)a1List.get(i);

wdComponentAPI.getMessageManager().reportSuccess(" sample ID "+ temp.getZSAMPLEID()+" is approved successfully");

}

In this way im setting values and displaying values that set.

But i dont know why this Serialisation error is coming.

Any help in this issue would be appreciated.Hope u provide the solution at the earliest.

Regards,

Usha.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Mar 15, 2007 at 12:50 PM

    Hi Usha,

    Try setting the attributes on OriginalBean as below

    wdContext.currentLspmRequestApprRejAdhocSampleMTElement().modelObject().

    getOriginalBean().setFLAG(FlagList);

    Regards,Anilkumar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Anil,

      Thanks for ur suggestion.the problem is resolved.i changed the structure of WSDL.I tried by importing the new WSDL.

      Regards,

      Usha.

  • avatar image
    Former Member
    Mar 15, 2007 at 12:46 AM

    Hi Usha,

    Try setting "" values to mandatory fields.

    Your Webservice is expecting input value for Return element. The Return value is passing as null. May be you have not binded Return element to Request object properly.

    Error reason:

    http://help.sap.com/saphelp_erp2005/helpdata/en/42/93d56ba5061d68e10000000a1553f6/frameset.htm

    Regards, Suresh KB

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 15, 2007 at 02:39 AM

    Hi Usha,

    Create a instance of request Object like following

    RequestApprReject reqObj=new RequestApprReject(model);

    ComplexType_LspmRequestApprRejAdhocSampleDT grid = new ComplexType_LspmRequestApprRejAdhocSampleDT();

    grid.setFLAG(FlagList);

    grid.setZSAMPLEID(aList);

    grid.setZADHOCREJRES(ResList);

    reqObj.setLspm_RequestAppRejectSampleMT(grid);

    Regards,Anilkumar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Anil,

      I tried this.But this is also giving me the same exception.

      Do u have any other alternative.

      One more thing,the same application (webdynpro 7.0) when deployed in 2004s Web AS is woking fine.when the application is migrated to Webdynpro 2.0.9 version and deployed in 2004 version, is not working properly.

      Hope u would suggest me at the earliest as this problem is a causing hinfrance to my project.

      regards,

      Usha.

  • avatar image
    Former Member
    Mar 15, 2007 at 05:43 AM

    Hai usha,

    this was the problem occurs when the wsdl definition changed.

    re-import the model can solve this problem.

    regards,

    naga

    Add comment
    10|10000 characters needed characters exceeded