SOAP messages through xmlports

shettarvikasshettarvikas Member Posts: 106
Hi,

I need to build a xmlport, which will be passed to sms gateway for sending messages. I am trying on the same, but not getting the required result.
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <process xmlns="http://message.samples">
     <part>
        <mcc>
            <transactionID>POS12345</transactionID>
           <details>
	        <name>ABCD</name>
	        <mobile>91xxxxxxx</mobile>
	        <template>SMS Integration testing - Vikas</template>
            </details>             
        </mcc>
     </part>
    </process>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This is working fine, if i use Http POST and xml file. But I need to send the values from the table(in template tag).

Please suggest.

Thanks in advance.

Rgds,

Comments

  • jlandeenjlandeen Member Posts: 524
    What table are you trying to insert data from? Should there be multiple <template> elements or should there be 1 element that has a very long string value?
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • shettarvikasshettarvikas Member Posts: 106
    Hi Jeff,

    Basically I am trying to send a SOAP message to SMS gateway. In this template, I need to send some calculated values. The template element will contain, 1 long string like, Total amount, PO No., Vendor etc.
    I need to build the SOAP message and send it over Http link.

    I am not able to produce the SOAP message in desired way.

    Thanks & Regards,
    Vikas
  • jlandeenjlandeen Member Posts: 524
    You should be able to do this with either an XML Port or using automation and the XML DOM Object. Do you have an XML port sample or some code that demonstrate how far you've gotten?
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • ta5ta5 Member Posts: 1,164
    Hi Vikas
    Although it needs a bit more coding we normally prefer to build the xml with xmldom. You have the full control, especially when it comes to choice-elements, name spaces and such things.
    Here's a very good example showing the basic usage.
    http://www.mibuso.com/dlinfo.asp?FileID=539
    Hope this helps.
    Thomas
  • jlandeenjlandeen Member Posts: 524
    I agree that building complex XML files/structures really does require using the full XML Dom. As XML Ports in the older versions don't work with namespaces and other common XML structures it does make things a little tricky in these more complex scenarios.

    However for exporting simple XML data that representing things like customers, sales orders I find XML ports are great tools for getting objects built very quickly to get that data out of Navision.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.