cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in executing/invoking webservice

Former Member
0 Kudos

<b>Hi All,

I'm trying to invoke a webservice through following code in component controller :</b>

public void getCategoryBapi( )

{

//@@begin getCategoryBapi()

try

{

logger.errorT("INSIDE getCategoryBapi() method...");

wdContext.currentRequest_Z_WS_CATEGORIES_GETLIST_zbapiCategoriesGetlistElement().modelObject().execute();

logger.errorT("WEB SERVICE INVOKED....");

wdContext.nodeResponse_category().invalidate();

wdContext.nodeResult_category().invalidate();

wdContext.nodeZcategDetails_category().invalidate();

IWDAttributeInfo category;

ISimpleTypeModifiable decision;

IModifiableSimpleValueSet valueSetDecision;

category = wdContext.nodeCatNode().getNodeInfo().getAttribute(IPrivateExternalView.ICatNodeElement.CAT_VALUE);

decision = category.getModifiableSimpleType();

valueSetDecision = decision.getSVServices().getModifiableSimpleValueSet();

// Access the proxy and get all available locations

// loop over the result list

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

{

logger.errorT("CATID: " + wdContext.nodeZcategDetails_category().getZcategDetails_categoryElementAt(i).getCatid());

logger.errorT("CAT DESC: " + wdContext.nodeZcategDetails_category().getZcategDetails_categoryElementAt(i).getCatname());

valueSetDecision.put(

wdContext.nodeZcategDetails_category().getZcategDetails_categoryElementAt(i).getCatid(),

wdContext.nodeZcategDetails_category().getZcategDetails_categoryElementAt(i).getCatname());

}

}

catch(Exception e)

{

logger.errorT(e.toString());

}

//@@end

<b>It is throwing exception which is contained in the excerpt below from the stack trace. The following is part of the error trace where it is throwing the exception:</b>

#1.5#001438BEBFDD005F0000B1660000141800040CC8C3841F44#1139956320046#com.bearingpoint.capability.External#sap.com/tcwddispwda#com.bearingpoint.capability.External#Administrator#5804##FGRW20409.tyb_F11_119693450#Administrator#ae66fdb09da911daa4ba001438bebfdd#SAPEngine_Application_Thread[impl:3]_19##0#0#Error##Plain###java.rmi.RemoteException: Service call exception; nested exception is:

com.sap.engine.services.webservices.jaxrpc.exceptions.XmlMarshalException: XML Serialization Error. Property [ZcategDetails] of class [com.bearingpoint.category.webmodel.proxies.types.p1.ZbapiCategoriesGetlist] must exist and can not be null. This is required by schema description.#

<b>Would appreciate if somebody can tell me why I’m getting this exception and what I need to do to fix it.

Regards

Ranjan</b>

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ranjan,

First check weather the attribute exists in the webservice ot not.

2. Request_Z_WS_CATEGORIES_GETLIST_zbapiCategoriesGetlist input = new Request_Z_WS_CATEGORIES_GETLIST_zbapiCategoriesGetlist();

<B>input.setZcategDetails("XXX"); </B>

Regards, Anilkumar

Former Member
0 Kudos

Hi Ranjan,

You need to set the value for the attribute "[ZcategDetails]".

Set the above property in your code and try.

Regards, Anilkumar

Former Member
0 Kudos

Anilkumar,

Actually, I've already set that value in the wddoinit() as shown below. Could you explain further what you mean by "attribute [ZcategDetails]"? If you have any other suggestions, I would really appreciate it.

Thanks,

Ranjan

Request_Z_WS_CATEGORIES_GETLIST_zbapiCategoriesGetlist input = new Request_Z_WS_CATEGORIES_GETLIST_zbapiCategoriesGetlist(); wdContext.nodeRequest_Z_WS_CATEGORIES_GETLIST_zbapiCategoriesGetlist().bind(input); ComplexType_ZbapiCategoriesGetlist comCatgetList = new ComplexType_ZbapiCategoriesGetlist(); comCatgetList.setClassgroup("BAMS"); this.getCategoryBapi(); logger.errorT("CALLEDT");