Skip to Content
0

B1if CallHTTP POST Missing Status Part Of XML Payload

Nov 01, 2016 at 08:20 PM

161

avatar image

I need to include the following two lines in the XML payload using CallHTTP POST. The message log shows this to be correct but the receiver is not receiving part of the string in the second line. I am looking for a way to send it in it's entirety or send it using a different method. See below:

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

<!DOCTYPE SyncInventoryBalance SYSTEM "SyncInventoryBalance_v2_2.dtd">

It may not be the correct way to do this but, I was able to include these in the first two lines of the payload using variables and concatenation. See below:

<xsl:template name="transform">

<xsl:variable name="XML">

<xsl:value-of select="concat('<','?xml version=','"1.0" encoding=','"UTF-8"?','>')"/>

</xsl:variable>

<xsl:variable name="DTD">

<xsl:value-of select="concat('<','!DOCTYPE SyncInventoryBalance SYSTEM ','"SyncInventoryBalance_v2_2.dtd"','>')"/>

</xsl:variable>

<call xmlns="">

<connect>

<!--the connect section is optional - you can also define a reference to the sld-->

<destProtocol/>

<destHost/>

<destPort/>

<destPath/>

<query/>

<proxyHost/>

<proxyPort/>

<method/>

<authentification/>

<user/>

<password/>

<user2query/>

<password2query/>

<trustStoreURI/>

<keyStoreURI/>

</connect>

<dtd>

<!--optional - document type definition-->

</dtd>

<pltype>

<!--optional - default is xml-->

</pltype>

<payload>

<xsl:value-of select="$XML"/>

<xsl:value-of select="$DTD"/>

<xsl:variable name="GMT">

<xsl:call-template name="b1ilib.timestampGMT">

</xsl:call-template>

</xsl:variable>

<xsl:variable name="GMTFormat">

<xsl:value-of select="concat(substring($GMT,1,4),'-',substring($GMT,5,2),'-',substring($GMT,7,2),'T',substring($GMT,9,2),':',substring($GMT,11,2),':',substring($GMT,13,2),'-05:00')"/>

</xsl:variable>

<SyncInventoryBalance xmlns="" revision="8.0" tororevision="2.2" environment="Testing" lang="en-US">

<ApplicationArea>

<Sender>

<LogicalId>

<xsl:value-of select="$vpToroBPID"/>

This appeared to work looking at the message log. See below:

payload>

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE SyncInventoryBalance SYSTEM "SyncInventoryBalance_v2_2.dtd">

<SyncInventoryBalancerevision="8.0" tororevision="2.2" environment="Testing"lang="en-US">

<ApplicationArea>

<Sender>

<LogicalId>444</LogicalId>

<Task>INVENTORY</Task>

The issue is that DOCTYPE element is dropping string in BOLD below somewhere along the way. The receiver is not getting the string in BOLD.

<!DOCTYPE SyncInventoryBalance SYSTEM " SyncInventoryBalance_v2_2.dtd">

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Thomas Arnold Mar 30, 2017 at 05:31 PM
0

Was able to successfully populate the dtd parameter below in the HTTP template. The HTTP atom takes care of the rest.

<xsl:template name="transform">

<call>

<connect>

<!--the connect section is optional - you can also define a reference to the sld-->

<destProtocol/>

<destHost/>

<destPort/>

<destPath/>

<query/>

<proxyHost/>

<proxyPort/>

<method/>

<authentification/>

<user/>

<password/>

<user2query/>

<password2query/>

<trustStoreURI/>

<keyStoreURI/>

</connect>

<dtd>

<!--optional - document type definition-->

<xsl:value-of select="'SyncInventoryBalance SYSTEM "SyncInventoryBalance_v2_2.dtd"'"/>

</dtd>

<pltype>

<!--optional - default is xml-->

</pltype>

Share
10 |10000 characters needed characters left characters exceeded