on 02-05-2009 4:32 AM
Hi All,
I am trying to call a webservice in WD java. On execution the following exception is getting displayed.
java.rmi.RemoteException: Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.XmlMarshalException: XML Serialization Error. Property [BOM_COMPONENTS] of class [com.sands.demo.proxies.types.ZBAPI_BOM_GETCOMPONENTS] must exist and can not be null. This is required by schema description.
I am runnig this application in clients network using VPN.
The coding done are
wdDoInit()
Request_MI_ZBAPI_BOM_GETCOMPONENTS_MI_ZBAPI_BOM_GETCOMPONENTS requestWS=new Request_MI_ZBAPI_BOM_GETCOMPONENTS_MI_ZBAPI_BOM_GETCOMPONENTS();
ComplexType_ZBAPI_BOM_GETCOMPONENTS oParameters=new ComplexType_ZBAPI_BOM_GETCOMPONENTS();
requestWS.setParameters(oParameters);
wdContext.nodeRequest_MI_ZBAPI_BOM_GETCOMPONENTS_MI_ZBAPI_BOM_GETCOMPONENTS().bind(requestWS);
Execute Method
try {
wdContext.currentRequest_MI_ZBAPI_BOM_GETCOMPONENTS_MI_ZBAPI_BOM_GETCOMPONENTSElement().modelObject()._setUser("bapiuser");
wdContext.currentRequest_MI_ZBAPI_BOM_GETCOMPONENTS_MI_ZBAPI_BOM_GETCOMPONENTSElement().modelObject()._setPassword("bapiuser");
wdContext.currentRequest_MI_ZBAPI_BOM_GETCOMPONENTS_MI_ZBAPI_BOM_GETCOMPONENTSElement().modelObject().execute();
} catch (Exception e) {
}
Please let me know whether am missing something. I am using WebService Model.
Regards
George
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi George,
Please check the following links:
http://help.sap.com/saphelp_nw04/helpdata/en/42/93d56ba5061d68e10000000a1553f6/frameset.htm
Hope it solves your problem.
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I have solved this issue. Actually I was missing initialization of a complex type and the return.
//Initializing Complex Data Type
ZPR_DATA_3[] zpr = new ZPR_DATA_3[0];
requestWS.getParameters().getOriginalBean().setBOM_COMPONENTS(zpr);
//Initializing Return Type
BAPIRET2[] ret = new BAPIRET2[0];
requestWS.getParameters().getOriginalBean().setRETURN(ret);
Regards
George
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.