Problem while Testing the Mapping in SOA_CH07_ChapterComplement_PartOne.pdf

2,922 views
Skip to first unread message

Surya

unread,
Oct 22, 2010, 1:48:50 AM10/22/10
to The Oracle SOA Suite 11g Handbook
Hi,

I'm working on SOA_CH07_ChapterComplement_PartOne.pdf & got stuck at
Testing the Mapping section on page 41. When I click to test the
mapping, getting below error:
"Failed to transform source XML. Start of root element expected."

The source XML is fine, the XSL created is also fine. The target XML
is getting generated with nothing except -
<?xml version = '1.0' encoding = 'UTF-8'?>
& above error.

I re-verified all the mappings & they also seem proper as per the pdf.
There's no option to attach screenshot here. :-(

Please suggest.

Surya

unread,
Oct 22, 2010, 4:32:13 AM10/22/10
to The Oracle SOA Suite 11g Handbook
Hi,

I've got the problem solved. Basically while testing the mappings in
JDeveloper, it doesn't support:
<ns1:DoctorId>
<xsl:value-of
select='mhdr:getProperty("in.property.jca.file.FileName")'/>
</ns1:DoctorId>

So after commeting it out, it's working. But now after deploying the
application successfully, when I try to provide .txt file input it's
throwing below error:


Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding
execute of Refe
rence operation 'WriteAppointmentRequestInLogFile' failed due to:
Translation Er
ror.
Translation Error.
Error while translating message to native format.
".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a
resolution.

at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionI
nvoker.executeJcaInteraction(JCAInteractionInvoker.java:433)
at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionI
nvoker.invokeJcaReference(JCAInteractionInvoker.java:542)
at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionI
nvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:502)
at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInte
raction.performAsynchronousInteraction(JCAEndpointInteraction.java:
491)
at
oracle.integration.platform.blocks.adapter.AdapterReference.post(Adap
terReference.java:247)
... 54 more
Caused by: BINDING.JCA-11017
Translation Error.
Translation Error.
Error while translating message to native format.
Please make sure that the payload for the outbound interaction
conforms to the s
chema.

at oracle.tip.adapter.file.FileUtil.translate(FileUtil.java:
1268)
at
oracle.tip.adapter.file.outbound.OutboundTranslationStrategy.translat
e(OutboundTranslationStrategy.java:131)
at
oracle.tip.adapter.file.outbound.OutboundTranslationStrategy.translat
e(OutboundTranslationStrategy.java:88)
at
oracle.tip.adapter.file.outbound.FileSender.sendNonBatchedSerializedX
late(FileSender.java:298)
at
oracle.tip.adapter.file.outbound.FileInteraction.executeFileWrite(Fil
eInteraction.java:619)
at
oracle.tip.adapter.file.outbound.FileInteraction.execute(FileInteract
ion.java:426)
at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionI
nvoker.executeJcaInteraction(JCAInteractionInvoker.java:303)
at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionI
nvoker.invokeJcaReference(JCAInteractionInvoker.java:542)
at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionI
nvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:502)
at
oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInte
raction.performAsynchronousInteraction(JCAEndpointInteraction.java:
491)
at
oracle.integration.platform.blocks.adapter.AdapterReference.post(Adap
terReference.java:247)
at
oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.do
Post(AsynchronousMessageHandler.java:142)
at
oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRou
ter.java:194)
at
oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:2
15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:307)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:182)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:149)
at
oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEven
tAspect.java:71)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:204)
at $Proxy250.post(Unknown Source)
at
oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post2Mesh(Med
iatorServiceEngine.java:1133)
at
oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActi
onHandler.java:200)
at
oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActi
onHandler.java:94)
at
oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActi
onHandler.java:74)
at
oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionH
andler.java:47)
at
oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor
.java:64)
at
oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDis
patcher.java:140)
at
oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(Ini
tialMessageDispatcher.java:495)
at
oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(In
itialMessageDispatcher.java:393)
at
oracle.tip.mediator.dispatch.InitialMessageDispatcher.processNormalCa
ses(InitialMessageDispatcher.java:276)
at
oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(In
itialMessageDispatcher.java:251)
at
oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(Initia
lMessageDispatcher.java:148)
at
oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(Media
torServiceEngine.java:860)
at
oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(Mediator
ServiceEngine.java:631)
at
oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.do
Post(AsynchronousMessageHandler.java:142)
at
oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRou
ter.java:194)
at
oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:2
15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:307)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:182)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:149)
at
oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEven
tAspect.java:59)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:204)
at $Proxy250.post(Unknown Source)
at
oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceM
DB.onMessage(AdapterServiceMDB.java:606)
at
oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage
(MessageEndpointImpl.java:462)
at
oracle.tip.adapter.file.inbound.Publisher.onMessageDelegate(Publisher
.java:460)
at
oracle.tip.adapter.file.inbound.Publisher.publishMessage(Publisher.ja
va:398)
at
oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.xlate(Inbou
ndTranslatorDelegate.java:476)
at
oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.doXlate(Inb
oundTranslatorDelegate.java:118)
at
oracle.tip.adapter.file.inbound.ProcessorDelegate.doXlate(ProcessorDe
legate.java:377)
at
oracle.tip.adapter.file.inbound.ProcessorDelegate.process(ProcessorDe
legate.java:175)
at
oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:349)

at
oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run
(WorkManagerExecutor.java:106)
... 2 more
Caused by: ORABPEL-11101

Translation Failure.
Translation to native failed. Element 'PatientName' not expected..
The data does not conform to the NXSD schema. Please correct the
problem.

at
oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.do
OutboundTranslation(NXSDTranslatorImpl.java:1109)
at
oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.tr
anslateToNative(NXSDTranslatorImpl.java:957)
at oracle.tip.adapter.file.FileUtil.translate(FileUtil.java:
1263)
... 64 more
Caused by: org.xml.sax.SAXException: Element 'PatientName' not
expected.
at
oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.st
artElement(NXSDTranslatorImpl.java:3121)
at
oracle.xml.parser.v2.XMLMultiHandler.startElement(XMLMultiHandler.jav
a:159)
at
oracle.xml.parser.schema.XSDValidator.startElement(XSDValidator.java:
648)
at
oracle.xml.parser.v2.XMLElement.reportStartElement(XMLElement.java:36
89)
at
oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3550)

at
oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:
3562)
at
oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3552)

at
oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:
3562)
at
oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3552)

at
oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:
3562)
at
oracle.xml.parser.v2.XMLDocument.reportSAXEvents(XMLDocument.java:173
9)
at
oracle.tip.pc.services.translation.xlators.nxsd.XMLTokenizer.tokenize
(XMLTokenizer.java:172)
at
oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.do
OutboundTranslation(NXSDTranslatorImpl.java:1099)
... 66 more
>
<Oct 22, 2010 10:23:38 AM CEST> <Error> <oracle.soa.adapter>
<BEA-000000> <JCABi
nding=> ReadFileDoctorsAppointmentRequests onBatchFailure: Batch
'4U4iAG8-Ml-r3
7ZpampDGmXoAo6K-2_futZCS_Ut1lU.' (C:\oracle\temp\logs
\IncomingDoctorsAppointment
Requests\Doctor871321_20101112_DailyAppointmentRequestFile.txt) has
failed due t
o: null>



Please suggest.


Regards,
Shailendra Suryawanshi

Lucas

unread,
Dec 5, 2010, 1:20:48 AM12/5/10
to The Oracle SOA Suite 11g Handbook
Dear Shailendra,

I am currently unable to take a closer look at this problem. I will
come back to address the situation in more detail just before
Christmas. I am sorry for the inconvenience.

kind regards

Lucas Jellema

Kumar

unread,
Nov 30, 2011, 8:55:50 AM11/30/11
to Lucas, the-oracle-soa-su...@googlegroups.com
Hi,

I have been seeing the same problem. Can you tell me how to fix this?

Error during invoking 1-way operation
"WriteAppointmentRequestInLogFile" on target service
"LogDoctorsAppointmentRequests"


Exception occured when binding was invoked. Exception occured during

invocation of JCA binding: "JCA Binding execute of Reference operation
'WriteAppointmentRequestInLogFile' failed due to: Translation Error.


Translation Error. Error while translating message to native format.
Please make sure that the payload for the outbound interaction

conforms to the schema. ". The invoked JCA adapter raised a resource


exception. Please examine the above error message carefully to
determine a resolution.

This post is an year old, probably there is a resolution but I
couldn't find out.

Thanks in advance,
Kumar

Efrain Velazquez

unread,
Oct 13, 2013, 7:54:33 PM10/13/13
to the-oracle-soa-su...@googlegroups.com
The answer to this problem is the following:

The instructions in the Chp7 web compliment did not include a mapping for the AppointmentIdentifier element in the Logged_DoctorsAppointmentRequestFile.xsd.  All of the lements in that schema are required.  Also, the AppointmentIdentifier is an int.  I made the assumption that the date after the Doctor871321 part of the file name is supposed to be used as the AppointmentIdentifier.  Below is a snippet of the code:

        <ns1:DoctorId>
          <xsl:value-of select="substring-before(mhdr:getProperty(&quot;in.property.jca.file.FileName&quot;),'_')"/>
        </ns1:DoctorId>
        <ns1:AppointmentIdentifier>
          <xsl:value-of select="substring-before(substring-after(mhdr:getProperty(&quot;in.property.jca.file.FileName&quot;),'_'),'_')"/>
        </ns1:AppointmentIdentifier>

Hard to see that oversight in the mapping tool.  Also, having to comment out the gepProperty functions really obscures this oversight.  Hard to believe Oracle did not follow up on this.
Reply all
Reply to author
Forward
0 new messages