How do you get multiple E1 BSFN Errors (COM) to show up in a BSSV call?

johndanter

johndanter

Legendary Poster
Hi folks,

If a BSSV calls an E1 NER and the E1 NER generates many errors, how do you ensure ALL the error messages appear in the calling program?
In this case .NET

Am I right in thinking all E1 BSFN messages goto the E1MessageList in the BSSV java and that they should all be view able there?

Thanks

John
 
that's correct and you have to set the list of errors. Then the soap xml response will have your errors ex:
<e1MessageList><e1Messages><message>some error desc</message><e1Messages><e1Messages><message>some error desc 2</message><e1Messages></e1MessageList>

EXAMPLE
E1MessageList messages = callSomeBSFN(context, connection, internalVO);
/*bunch of bsfn calls prior*/
if(messages.hasErrors()){
confirmVO.setE1MessageList(messages);
}
finishPublishedMethod(context, "yourBSSV");
//return outVO, filled with return values and messages
return confirmVO;
 
Last edited:
Ok great. Just checking as that's what I am doing. So I'll try and get the caller o read E1MessageList
 
I'll typically add a member to the confirmVO for cErrorCode. set that if message.hasErrors makes it easier for the consumer.
 
I'll typically add a member to the confirmVO for cErrorCode. set that if message.hasErrors makes it easier for the consumer.

Yeah I've also done that, but that can only convey one error at a time. The issue I was having is allowing the caller to see several errors that had occured. I'll get them to start looking at E1MessageList. As it is part of the WSDL, so I hope they can figure it out
 
Hi again guys

I hope we are not misreading this, but please have a look at this snippet from E1 9.1 BSSV tools doc.

The issue we have the is the returnVO disappears and is not readable upon return IF any errors of type 2 were invoked in the BSFN NER. (Set Return code = 2)
SetNERReturnCode(B0100044.SetNERReturnCode)
"2" -> idErrorStatus [GENLNG]

As it throws an exception.


https://docs.oracle.com/cd/E24705_01/doc.91/e24219/create_publishedbssv.htm#EOTME00021
4.6 Handling Errors in the Published Business Service
The published business service class is the JD Edwards EnterpriseOne object that is exposed as a web service. Upon invocation, the published business service returns either a value object that contains data and warning messages, or it throws a BusinessServiceException that contains all errors and warnings that occurred during business processing. The published business service throws BusinessServiceException if any messages of the type error occur in the collection of messages that are returned from the call to the business service method. System errors and database failures are thrown as runtime exceptions. A runtime exception is not handled, but it will cause the published business service to fail and return to the original caller. Throwing an exception causes any database operations that were performed between the default transaction boundaries to roll back, and an error message is sent to the log files.



So with that in mind......how in blazes name do I let the calling program read the confirm response successfully and get the messages back out to them in a stable way if the code called threw a 2 type error along the way.

I did actually leave a note in a previous NER I'd exposed to my .NET team in that it was debatable if I should throw the COM error to 2 or not. I think it WAS causing issues.

I think by default the reponse ends up in java.message anyway.
So all that's good.

What I may need to do is do as you suggested and catch the exception and add them to E1MessageList in a loop.

Just confused as my java isn't very good and I'm learning as we type. I can write a BSSV fine, (as the wizard does most of the work) but all these little tricks are beyond me as my java is pants :)
 
Last edited:
I would, as you say, catch the exception and NOT throw an exception. The same thing happens if you try to send in a character into a integer parameter in the publishedVO. It will exit and not return the returnVO as it throws an exception trying to int.parse
 
Thanks.
There are several exceptions to catch though, right? InvalidArgExp, SystemExp etc. Is there a global one to catch?

What do you do to speed up your tests? I was thinking of building our own virtual BSSV server. As at the moment I have to finish my java changes, ask CNC to promote/deploy and then wait for the email it's on the server....

Do you think I could build my own that the developers here control the specs of and do tests on that. As SOAP is fine but it can only point to the E1 BSSV server.
Id like it pointing to our own. So I can get the specs updated far quicker
 
When I get home tonight, I'm throwing all my Iron Man and Batman toys out. You're my new hero :)

Thank you!
 
Back
Top