XML RPC Wrapper handling HTML formatted return message

I have a vendor service that we POST an XML document to and they return an HTML document that states whether the transaction was accepted by their application.

Outbound message:

<Account_Id>12345
<First_Name>Michael</First_Name>

Return message:

Transaction accepted
Original XML 12345 Michael

I’ve tried defining an OUT parameter in the XMM file named HTML (size A2000) to handle this return data, but I’m getting the following error: ET=33, Incoming XML document is invalid.

Thanks in advance.

-Michael

Hello Michael,

you can use the XML Wrapper only if both the request and the reply document is XML. The XML Wrapper will convert from (RPC-) structure to XML both ways.

In your case the reply document is HTML. The HTML document of your example is not well-formed XML because of the
tag which does not have a closing tag.

Thank you 8=) . I expected that would be the answer, but was hoping there was some hidden workaround.

The vendor is really fighting passing back XML. I’ve tried explaining to them how limited their service is - maybe they’ll look outside the box someday.

I would probably use the Java RPC wrapper and handle the rather strange “vemdor web service” directly in Java.

I’ve convinced the vendor to reply in XML format. Now, I’m getting the following error in my trace file:

Worker-1…> 12:51:38.672 …( CP:RootTagHandler.retrieveInformation() I:Could not found a matching program in mapping description. )
Worker-1…> 12:51:38.688 …( CP:RootTagHandler.retrieveInformation() I:Exception: 77 )

Here is the trace of the data received:

Worker-1…> 12:51:38.672 …( CP:HTTPTransport.sendReceive() I:Received document:

<?xml version="1.0" encoding="UTF-8"?>FAILURECould not create direct tranfer record 20050624125138212345abcdefMRMICHAELAHARRISOVERLAND PARK )

Any ideas? My IDL file for OUT fields looks like this:

library ‘SYSTEM’:‘allconnect’ is
/* check and rename this generated program name
program ‘XSOALCN’:‘PartnerExchange’ is
define data parameter
1 Account_Number (A64) In
1 Partner_Name (A32) In
1 Partner_Password (A10) In
1 Prefix (A25) In
1 First_Name (A25) In
1 Middle_Name (A25) In
1 Last_Name (A25) In
1 Service_Address In
2 City_Name (A25)
2 State_Code (A25)
2 Zip_Code (A5)
2 Street1 (A65)
1 DirectTransfer Out
2 Result (A7) Out
2 Result_Message (A100) Out
2 Data_Received (A1000) Out
end-define

-Michael

The mapping file (.xmm) file is of importance, not the idl file. You can try to make a schema for your return read it in in the workbench and then map the IDL to the associated tags in the read schema.

I’ve done what you suggested, but I’m still getting the same error. I’ve attached a zip of my IDL, XMM (customized), and trace file.

Sorry to be a burden :cry:, I’ve tried everything I can think of!

Could the inside the <Data_Received> element be causing the problem? Or should EntireX just map this to <Data_Received>?
allconnect.zip (8.71 KB)

Problem fixed.

SoftwareAG Support assisted on this.

It required fix 7.2.1.11c (to entirex.jar) to handle the CDATA section.

Additionally, my OUT mapping was incorrect. The change involved unmapping the “PartnerExchange” node and remapping the “DirectTransfer” node to the program.

Thanks for everyone that helped on this topic.

-Michael