понедельник, 30 марта 2015 г.

How to call PI Web Service or SOAPFaultException: Server Error

Problem:
You are trying to call SAP PI - Process Integration or XI -  Exchange Infrastructure or PO - process Orchestration.

You made proxy Java Class using WSDL and NWDS, and you are trying to call it and you have error:
com.sap.engine.services.webservices.espbase.client.bindings.exceptions.SOAPFaultException: Server Error

Solution:
1. You should ask your PI developer for URL for WSDL for Web Service which you want to use. I have it like this: http://<server>:<port>/dir/wsdl?p=ic/<some id>
2. You should import WSDL in NWDS in your project using this URL.
3. Then you should generate proxy Java Classes using that WSDL.
4. It should work.

I've described how to generate proxy java classes here call Web Service Java Client (Proxy) Example.

четверг, 26 марта 2015 г.

среда, 4 марта 2015 г.

How to search checked out record in SAP MDM via MDM JAVA API

You can search, find or retrieve checked out record with MDM JAVA API in SAP MDM using property "setCheckoutSearchType()" of "Search" object. Here code example:

Code example:
    Search search = new Search;
    search.setCheckoutSearchType(Search.CheckOutSearchType.STANDARD);
    RetrieveLimitedRecordsCommand cmd = new RetrieveLimitedRecordsCommand(
    cmd.setSearch(search);
    cmd.execute();

You set search type. It can be one of the three:

Search.CheckOutSearchType.STANDARD - you will find record which was checked out as new, and you will find record which existed in MDM and which has protected version and checked out version. You will find checked out version.

Search.CheckOutSearchType.ORIGINAL - you will find original record which is not checked out. If you are searching record which checked out as new, you will not find anything, but if you are searching record which existed in MDM and it checked out, and it has protected version and checked out version, you will find protected version - it is original record.

Search.CheckOutSearchType.ALL - if you are searching record which checked out as new, then you will find it. If you are searching record which existed in MDM and it checked out and it has two versions - protected(original) and checked out version (user can change it), you will find protected version (original).

вторник, 3 марта 2015 г.

MDM Record - Checkout Status

MDM Record can be in that checkout Statuses:

Record.CheckoutStatus.UNDEFINED: -1

Record.CheckoutStatus.NONE: 0 - record is not checked out

Record.CheckoutStatus.ORIGINAL: 1 - you found original record, that means record is checked out and you found protected version of record.

Record.CheckoutStatus.MEMBER: 2 - record is checked out and you joined to checkout and you found record which is checked out, not protected version.

Record.CheckoutStatus.OWNER: 3 - record is checked out and you owner of the chekced out version, and you found checked out version, not protected version.

Record.CheckoutStatus.NON_MEMBER: 4 - record is checked out and you did not join, and you found checked out version, not protected version.