cancel
Showing results for 
Search instead for 
Did you mean: 

Mixed mode message

Former Member
0 Kudos

Hi.

I have a scenario where we use a http adapter to post the message to a catalog system.This a syncronous call.

The response however is a mixed mode message.It has some html and then the actual xml.We thought of writing a adapter module to strip off the html, but you cannot impliment a http adapter module.The tab in the Configuration is disabled. Any ideas?

Here is an example of the message:

<html>

<head>

<title>Load Results</title>

</head>

<body>

<pre>

Items added=0

Items deleted=0

Items updated=3

Items no update necessary=0

Items moved=0

Items copied=0

Items failed=0

Attributes added=0

Attributes deleted=0

Attributes updated=0

Attributes no update necessary=0

Attributes failed=0

Categories added=0

Categories deleted=0

Categories updated=0

Categories no update necessary=0

Categories failed=0

</pre>

</body>

</html>

<?xml version="1.0" encoding="UTF-8" ?>

<CATALOG xml:lang="en-US">

<ADMIN>

<NAME>SRM Contract Management</NAME>

<INFORMATION>

<DATE>2006-02-13T13:37:40Z</DATE>

<NAMEVALUE>

<NAME>RUSSTATUS</NAME>

<VALUE>Non RUS</VALUE>

</NAMEVALUE>

</INFORMATION>

</ADMIN>

</CATALOG>

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Use SOAP adapter in no-soap mode, then you can apply adapter modules.

Or use Java Mapping to extract the xml.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan.

I cannot use any mapping to extract the data. The call fails before the mapping step in the pipeline. This is because the message the interface is expecting is not the same as defined in the IR. Make sense?

If I use a soap adapter, how would I specify the Content type and the prologue?

The receiving system expects the content type to be:

application/x-www-form-urlencoded.

Is this possible with the soap adapter?

stefan_grube
Active Contributor
0 Kudos

> I cannot use any mapping to extract the data. The

> call fails before the mapping step in the pipeline.

Can you tell me, which error occurs?

> This is because the message the interface is

> expecting is not the same as defined in the IR. Make

> sense?

No, the message processing does not care about interface structures, they are not aware of it. Only the message mapping needs a valid structure, but not Java Mapping.

> If I use a soap adapter, how would I specify the

> Content type and the prologue?

Sorry, no. You cannot specify a prologue.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan.

My problem is how do I define the message I want to impliment the java mapping on? The message mapping needs a source message. Problem is my source message has this bunch of html in front.

Thanks for the effort.

I get this error:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_Catalog_Sync_MM_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>During the application mapping com/sap/xi/tf/_Catalog_Sync_MM_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>

<SAP:Retry>N</SAP:Retry>

</SAP:Error>

Former Member
0 Kudos

Hi Stefan.

My problem is how do I define the message I want to impliment the java mapping on? The message mapping needs a source message. Problem is my source message has this bunch of html in front.

Thanks for the effort.

I get this error:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_Catalog_Sync_MM_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>During the application mapping com/sap/xi/tf/_Catalog_Sync_MM_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>

<SAP:Retry>N</SAP:Retry>

</SAP:Error>

stefan_grube
Active Contributor
0 Kudos

You cannot use graphical mapping tool or XSLT.

You can only use Java Mapping or ABAP mapping.

Your Java Program should reduce the incoming string to the xml. Then this xml can be processed in a further mapping steps.

Look out for weblogs concerning java mapping for further information.

Regards

Stefan

Former Member
0 Kudos

I got some interesting blogs on java mapping:

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

Unfortunately I am still a little in the dark on how to define the source interface in the IR.I have to do this before I can use any mapping program, whether Abap, java or xslt.

I am going to define it as the message without the html and then write the java code and see what happens.

Thanks for all the help.

stefan_grube
Active Contributor
0 Kudos

Hi Rodney,

When you are not sure about the data structure of the interface, you can create a dummy data type and apply this to the interface.

For testing purpose you can apply mappings to interface names, which do not exist in IR. In configuration time you receive a warning, but you can use interface names and mappings anyway.

When you want to have a 2-phase mapping 1. Java mapping 2. graphical mapping tool, you have to define an message type which represents the state after step 1, but before step 2.

Regards

Stefan

Former Member
0 Kudos

Oh my shattered nerves!

Stefan you are a star, scholar and gentleman!

Thanks for the help.

Rod

Answers (0)