cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with xml variant in OCI 4.0

Former Member
0 Kudos
524

Hello,

I'm trying to create an OCI external catalog for my company's website and I'm having trouble with the shopping cart return to SRM (OCI version 4.0). The cart data is submitted as base64 encoded xml data in the field ~xmlDocument. The type is ESAPO3.5, but I'm unsure what the name of this field should be. I've seen 4 different variations. The OCI 4.0 documentation lists it as xmltype and xmlType. But the only example of an xml return form I saw uses ~xmlType with a leading tilde. In the forums I've seen ~xmltype (all lower case). Which should I use?

Normally I'd just try all 4 versions, but I don't have access to the SRM end which makes that troubleshooting approach tedious. I'm told that no data is being returned to SRM. Before my last test I discovered that my xml was malformed (one of the tags was not closed out with /). The next test I was told that the return window got stuck. At least that was a change in behavior. But I've also been hard wrapping the base64 data as suggested by RFC 2045. The following thread describes similar behavior when a field contains a line break:

[Long text with line break "freezes" return to shopping cart|;

I've since removed the line breaks from the data, but before I beg for another test, I'd like to be sure I'm using the right input fields. Here's what I'm currently using:

xmlType => ESAPO3.5

~target => top (received from SRM in returntarget and also inserted as target attribute of HOOKURL form)

~OkCode => ADDI

~caller => CTLG

Here are the initial parameters posted by SRM:

BYPASS_OUTB_HANDLER => X

~OkCode => ADDI

~caller => CTLG

OCI_VERSION => 4.0

OPI_VERSION => 1.0

returntarget => _top

HOOK_URL => http://path-to-srm.

Thanks for any guidance. Hope this is the right place for this. Quite a few formums to chose from.

--

Cole

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use ~xmltype=ESAPO-3.5 and ~xmlDocument=cXML

Former Member
0 Kudos

Thanks for your reply. To be sure I understand, do I replace cXML with base64 encoded xml?

Former Member
0 Kudos

Correct. You need to send the following two name value pairs.

~xml_type=ESAPO-3.5

~xmlDocument="BASE64 ENCODED XML RESULT"

Former Member
0 Kudos

Thanks very much for your help. But ~xml_type now has an underscore. Which do I use? ~xml_type or ~xmltype

Former Member
0 Kudos

you should use the one with underdscore. I have tested with that successfully in the past.

SG

Former Member
0 Kudos

I'll give it a try. Thanks again for your help.

Answers (1)

Answers (1)

Former Member
0 Kudos

I am facing same situation. I am using base64 encoding.

~xmltype=ESAPO-3.5

~xmlDocument="BASE64 ENCODED XML RESULT"

But its not transferring any data to SRM.

I am not sure my XML template and tag is right as per SRM requirements. does anybody has sample XML template for SRM.

My XML generated file from Shopping cart is

Example:

<?xml version='1.0'?>

<BusinessDocument>

<CatalogHeader> </CatalogHeader>

<Catalog>

<CatalogID>64030</CatalogID>

<Product>

<CatalogKey></CatalogKey>

<ParentCategoryID></ParentCategoryID>

<OciMapping>

<NEW_ITEM-DESCRIPTION>"BOUFFANT CAPS WHITE 21" 1000/CS**"</NEW_ITEM-DESCRIPTION>

<NEW_ITEM-UNIT>"CS"</NEW_ITEM-UNIT>

<NEW_ITEM-QUANTITY>"1"</NEW_ITEM-QUANTITY>

<NEW_ITEM-PRICEUNIT>"1"</NEW_ITEM-PRICEUNIT>

<NEW_ITEM-PRICE>"30.4600"</NEW_ITEM-PRICE>

<NEW_ITEM-CURRENCY>"USD"</NEW_ITEM-CURRENCY>

<NEW_ITEM-LEADTIME>"3"</NEW_ITEM-LEADTIME>

<NEW_ITEM-VENDORMAT>"ANS1234"</NEW_ITEM-VENDORMAT>

<NEW_ITEM-MANUFACTMAT>"ANS1234"</NEW_ITEM-MANUFACTMAT>

</OciMapping>

</Product>

</Catalog>

</BusinessDocument>

Please guide me.

Thanks in advance.

-Sneha