[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Soap message with xml as string



   Thanks Rusty,

   I get an answer from the web service now....it's an error
   message....but that's better than nothing ;-)

   Regards,

   Magne



   >-----Original Message-----
   >From: Rgad@xxxxxxxxxxxxxxxxxxxxx [mailto:Rgad@xxxxxxxxxxxxxxxxxxxxx]
   >Sent: Thursday, December 14, 2006 03:13 PM
   >To: 'HTTPAPI and FTPAPI Projects'
   >Subject: Re: Soap message with xml as string
   >
   >
   >
   >
   >
   >
   >If the SOAP variable in this email was cut from your program, then I
   think
   >you need a blank separator after <SendMeldinger (see revised below).
   >
   >SOAP =
   >'<?xml version="1.0" encoding="utf-8"?>'
   >+'<soap:Envelope xmlns:xsi="http://www.w3.org/'
   >+'2001/XMLSchema-instance"'
   >+' xmlns:xsd="http://www.w3.org/2001/XMLSchema";'
   >+' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>'
   >+'<soap:Body>'
   >+'<SendMeldinger '
   >+'xmlns="https://naturskadekoordinering.no/NaturKoordWebService/";>'
   >+'<dataxml>'
   >+'<SkadeData>'
   >+'<Nummer>0001006</Nummer>'
   >+'<HendelseNummer>0000001</HendelseNummer>'
   >+'<ForsSelskapRekvAv>nnnnnnnn</ForsSelskapRekvAv>'
   >+'<SkadeDato>2005-05-06</SkadeDato>'
   >+'</SkadeData>'
   >+'</dataxml>'
   >+'<selskapskode>xx</selskapskode>'
   >+'<passord>xxxxxxx</passord>'
   >+'</SendMeldinger>'
   >+'</soap:Body>'
   >+'</soap:Envelope>';
   >
   >Rusty Gadberry
   >Arkansas Data Services, Inc.
   >Makers of DOCS/400
   >501-327-8000 office
   >www.ark-data-services.com
   >
   >This message (including any attachments) contains confidential
   information
   >intended for a specific individual and purpose, and is protected by
   law. If
   >you are not the intended recipient, you should delete this message.
   Any
   >disclosure, copying, or distribution of this message, or the taking
   of any
   >action based on it, is strictly prohibited.
   >
   >
   >
   > magne@xxxxxxxxx
   > Sent by:
   > ftpapi-bounces@li To
   > sts.scottklement. ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > com cc
   >
   > Subject
   > 12/14/2006 05:24 Soap message with xml as string
   > AM
   >
   >
   > Please respond to
   > HTTPAPI and
   > FTPAPI Projects
   > <ftpapi@xxxxxxxxx
   > ttklement.com>
   >
   >
   >
   >
   >
   >
   >Hi,
   >
   >first of all.....Scott..thanks for nice work on httpapi!
   >Httpapi with expat is working great!
   >
   >I'm communicating to a number of webservices and there is a problem
   with
   >one of them.
   >
   >Its a webservice with 3 arguments where one is the dataxml which is
   type
   >string.
   >The dataxml tag is holding more xml data.
   >
   >The question is how to build the Soap variable in http_url_post_xml?
   >
   >Here is the webservice description:
   >POST /NaturKoordWebService/NPService.asmx HTTP/1.1Host:
   >naturskadekoordinering.noContent-Type: text/xml;
   >charset=utf-8Content-Length: lengthSOAPAction: "
   >https://naturskadekoordinering.no/NaturKoordWebService/SendMeldinger";
   <?xml
   >version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="
   >http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="
   >http://www.w3.org/2001/XMLSchema"; xmlns:soap="
   >http://schemas.xmlsoap.org/soap/envelope/";> <soap:Body>
   <SendMeldinger
   >xmlns="https://naturskadekoordinering.no/NaturKoordWebService/";>
   ><dataxml>string</dataxml> <selskapskode>int</selskapskode>
   ><passord>string</passord> </SendMeldinger>
   </soap:Body></soap:Envelope>
   >Here is some of the rpg code:
   >
   >SOAP =
   >'<?xml version="1.0" encoding="utf-8"?>'
   >+'<soap:Envelope xmlns:xsi="http://www.w3.org/'
   >+'2001/XMLSchema-instance"'
   >+' xmlns:xsd="http://www.w3.org/2001/XMLSchema";'
   >+' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>'
   >+'<soap:Body>'
   >+'<SendMeldinger'
   >+'xmlns="https://naturskadekoordinering.no/NaturKoordWebService/";>'
   >+'<dataxml>'
   >+'<SkadeData>'
   >+'<Nummer>0001006</Nummer>'
   >+'<HendelseNummer>0000001</HendelseNummer>'
   >+'<ForsSelskapRekvAv>nnnnnnnn</ForsSelskapRekvAv>'
   >+'<SkadeDato>2005-05-06</SkadeDato>'
   >+'</SkadeData>'
   >
   >+'</dataxml>'
   >+'<selskapskode>xx</selskapskode>'
   >+'<passord>xxxxxxx</passord>'
   >+'</SendMeldinger>'
   >+'</soap:Body>'
   >+'</soap:Envelope>';
   >
   >http_xproc( HTTP_POINT_ADDL_HEADER
   > : %paddr(Add_SOAPACTION) );
   >
   >HTTP_setCCSIDs(1208: 0); // CCSID 1208 = UTF-8
   >
   >rc = http_url_post_xml(
   >'https://naturskadekoordinering.no/NaturKoordWebService/'
   >+'NPService.asmx'
   > : %addr(SOAP) + 2
   > : %len(SOAP)
   > : *NULL
   > : %paddr(Incoming)
   > : *NULL
   > : HTTP_TIMEOUT
   > : HTTP_USERAGENT
   > : 'text/xml');
   >
   >The problem seem to be that I'm sending real xml in the <dataxml>
   tag.
   >I've tried to convert all the '<' and '>' to &lt; &gt; in the
   <dataxml> tag
   >but all my tries has resulted in expat message"no elements found".
   >When I remove the xml data in <dataxml> tag (empty dataxml) I receive
   a
   >soap response from the web service (just says that there was no data
   in the
   >dataxml tag). Anyone knows how to build string xml within xml?
   >
   >Another question (just quorious):
   >Why the +2 in %addr(SOAP) + 2 ?
   >
   >And is is possible to use this (add_soapaction) 2 times (or more) in
   the
   >same program/rc?
   > http_xproc( HTTP_POINT_ADDL_HEADER
   > : %paddr(Add_SOAPACTION) );
   >
   >
   >Best regards
   >Magne
   >
   >
   >
   >
   >
   >
   >
   >
   >
   >
   >---------------------------------------------------------------------
   --
   >This is the FTPAPI mailing list. To unsubscribe, please go to:
   >http://www.scottklement.com/mailman/listinfo/ftpapi
   >---------------------------------------------------------------------
   --
   >
   >
   >---------------------------------------------------------------------
   --
   >This is the FTPAPI mailing list. To unsubscribe, please go to:
   >http://www.scottklement.com/mailman/listinfo/ftpapi
   >---------------------------------------------------------------------
   --
   >
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------