×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Interaction with Ellipse via Java Middleware API – working examples re

Interaction with Ellipse via Java Middleware API – working examples re

Interaction with Ellipse via Java Middleware API – working examples re

(OP)
Hi,

I'm working for a client who is using Ellipse 6.2.1 on a AIX server with CICS.
I'm trying to interact with Ellipse via Java Middleware API version 1.09.004.
There's a need to work with Ellipse object  named PurchaseOrder  - create a new order, retrieve orders data and modify these data.
It appears that it's not clear what parameters and what types of these parameters have to be passed to execute operations mentioned above.
E.g. when trying to work with object PURCHASEORDER.CreatePO using the code below:

                        MIMSBlock myBlock = new MIMSBlock();
                        MIMSRequest myReq = null;
                        myReq = myBlock.getRequests().create();
                        myReq.getFields().create(MIMSBlock.SERVICE, "PURCHASEORDER.CreatePO");
                        myReq.getInstances().create().getFields().create("DstrctCode","330");
                        myReq.getInstances().create().getFields().create("PreqItemNo","000000000007");
                        myReq.getInstances().create().getFields().create("PreqNo","001");
                        myReq.getInstances().create().getFields().create("PurchaseOrdNo","Т03400");
                        myReq.getInstances().create().getFields().create("PurchOrdItemNo","001");
                        myReq.getInstances().create().getFields().create("TranOrigType","000708610");
                myReq.getFields().create(MIMSBlock.REPLYLIST, "PreqPOReturn");

I'm receiving an exception:

com.mincom.mims.tech.mware.common.ServerException: "INPUT REQUIRED                                                 "
            at com.mincom.mims.tech.mware.common.MimsSession.checkForCBRServerException(MimsSession.java:709)
            at com.mincom.mims.tech.mware.cics.CicsSession.request(CicsSession.java:521)
            at ru.iteco.mincom.connect.MIMSBlockWork.createPO(MIMSBlockWork.java:197)
            at ru.iteco.mincom.connect.MIMSBlockWork.main(MIMSBlockWork.java:30)

Could anyone provide please working examples of Java code that executes these operations using both MIMS blocks and MSO (Mincom Screen Objects)?
Any help on this will be highly appreciated.

Thanks in advance,
Artem

RE: Interaction with Ellipse via Java Middleware API – working examples re

Hi Artem, from the error message, it seems you miss some required fields. If you can catch the error message, it might give you more information.
Wei.
 

RE: Interaction with Ellipse via Java Middleware API – working examples re

(OP)
Hi Wei,

Thanks for the answer.
You're right.
An exception raised because of  the incorrect method used when working with collection: multiple collections have been created instead of populating the required fields for the actual collection created.
It's fixed now the way below:

                        myReq.getInstances().create().getFields().create("DstrctCode","330");
                        myReq.getInstances().item(0).getFields().create("PreqItemNo","001");
                        myReq.getInstances().item(0).getFields().create("PreqNo","001");
                        myReq.getInstances().item(0).getFields().create("PreqPOReturn","");
                        myReq.getInstances().item(0).getFields().create("PurchaseOrdNo","Т03400");
                        myReq.getInstances().item(0).getFields().create("PurchOrdItemNo","001");

Could you please let me know any means to catch an error message besides of  use mySession.setTracing()?

Artem

RE: Interaction with Ellipse via Java Middleware API – working examples re

Hi Artem,
Good to hear you fixed it. Not sure how you catch the error? In one of my code, I use something like.
try {
..........
}catch (IOException e) {
   System.out.println("IOException caught e=" + e.getMessage());
                
} catch (ServerException e) {
   System.out.println("ServerException caught e=" + e.getMessage() + e.block +
e.block.makeCbrBuffer(3));
                
} catch (ScreenException e) {
   System.out.println("ScreenException caught e=" + e.getMessage());
                
} catch (CBRException e) {
   System.out.println("CBRException " + e.getMessage());
               
}       

RE: Interaction with Ellipse via Java Middleware API – working examples re

Another thing to look for is the 'ActiveField' - this is often the field which the error message is referencing... Drew

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close