Wednesday, May 24, 2017

Mysterious ORAMED-01007 and the lack of the creativity.

I'm still working on the mega posts regarding Maven and SOA Studio 11g, it will be there in few days. Meanwhile, I have run into stupid rather than a mysterious situation. But let's start from the beginning. I have a composite, which gets master-detail records and transforms them to the normalized message using a mediator component. I've created a service with 2 parts request, resulting message, transformation, and yadda-yadda-yadda. Compile, deploy, test  and bada-boom:
<part name="detail">
<detail>ORAMED-01007:[Header variable declaration not valid]Header variable "" not recognized.
Possible Fix:Header variable should be of the format $in.header.<prefix>_<root-elem>.
Fix the header variable.
</detail>
</part>
SOA Studio doesn't give you any clues, the project is compiled and deployed with no single warning. Finally, I have realized where I've been wrong. Look at this picture, and never do like this. If can't find what is wrong with the WSDL definition, check the answer below:

The solution is simple: Do not use "header" as a message part name. Regarding the Oracle documentation, this name is reserved for the SOAP headers access. And you will not figure it out until your component throws a runtime exception.

The moral is simple: name your variables with some creativity, and don't use reserved words in the SOA Composites. 
Post a Comment