cancel
Showing results for 
Search instead for 
Did you mean: 

Using GetKeyMappings web service.

Former Member
0 Kudos

I have created a Deployable Proxy of the standard MDM web service, "GetKeyMappings". The NWDS generated a lot of classes, based on the WSDL.

Now I have created an EJB, which should invoke this Deployable Proxy. The bean later would be invoked by some other J2EE applications. The following is the code which I have written.

-


GetKeyMapping keyMapping = (GetKeyMapping)initialContext.lookup("java:com/env/GetKeymappings");

//create a key mapping query object

RecordIdentifierRequest[] recIdentRequests = new RecordIdentifierRequest[1];

recIdentRequests[0]= new RecordIdentifierRequest();

//create a RecordIdentifierCriteria, and set appropriate values

RecordIdentifierCriteria recCrit = new RecordIdentifierCriteria();

recCrit.setRecordId(new Integer(recordId));

//set this as part of the RecordIdentifier

recIdentRequests[0].setRecordIdentifierCriteria(recCrit);

recIdentRequests[0].setTableCode(TABLE_CODE);

//the repository informations set up

RepositoryInformation repInfo = new RepositoryInformation();

repInfo.setDataLang(LANG_CODE);

repInfo.setSchemaLang(LANG_CODE);

repInfo.setRepositoryName(REPOSITORY_NAME);

repInfo.setRepositoryPort(new Integer(REPOSITORY_PORT));

repInfo.setServerName(SERVER_NAME);

//set every thing into the Key Mapping object

keyMapping.setRepositoryInformation(repInfo);

keyMapping.setKeyMappingQuery(recIdentRequests);

-


I find that the Java classes are generated based on the structure of the WSDL XML file. But I am stuck up at the point as to how to execute this WSDL call, and get the response back. Any body who can help me with this?

Thanks and regards,

Sachin.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

sachin,

a. Look up the ws proxy ref in JNDI registry

b. create instance of logical port in your ejbCreate method

c. totally depends which method you need to finally call to execute the web service call based on the wsdl. You would need to take the help of the intelligent editor of NWDS, to show you a list of all available methods and find the correct one.

this page lists all the stpes if you are writing a client EJB for a web service and using Deployable proxy with it

http://help.sap.com/saphelp_nw04s/helpdata/en/45/029840cf43495195da923f32262911/content.htm

Answers (0)