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

RE: RPC webservice



Those look like attributes. See EXAMPLE11.


> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David Baugh
> Sent: Wednesday, March 23, 2011 7:39 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: RE: RPC webservice
> 
> Further to the same web-service, I am now getting a response, however
> it's a string of tags under one name. I want to parse out several of
> these tags values from this string. Can anyone help?
> 
> Here's what is returned in the 'value' field in my 'Incoming'
> procedure. I need to get the calculatedvalue. Is there a function
> available to parse this XML to get the tags and their associated
> values?
> 
> 
> 
> ....5...10...15...20...25...30...35...40...45...50...55...60
> '<CONTEXT>    <RESIDENTIAL_REPORT createdByLabel="Created By"'
> ' valuationType="7" schemaVersion="20110115" '
> 'recalculated="0" hasMinimalPushPinInfo="'
> '0" priceListName="CAPEXV_JAN11" htmlWindowTitle="360Value Re'
> 'placement Cost Valuation  (v.1)" seismicZone="4" iteration="'
> '1" ownerLastName="user" locale="en_US" localeCountry="US" '
> 'localeLanguage="en" rangeHigh="578305.44" calculatedValu'
> 'e="543987.28" ownedByLabel="Owner" trainingMode="0" detached'
> 'StructuresCalculatedValue="0.0" priceListArea="Peninsula, Ca'
> 'lifornia" dateCalculated="03/23/2011" createdByLastName="use'
> 'r" reportVersion=" (v.1)" logoUrl="https://training.36'
> '0-value.com/iv/images/360Valuepoweredby.gif"
> 
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Loek Maartens
> Sent: Wednesday, March 23, 2011 3:09 AM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: RPC webservice
> 
> Hi David,
> 
> The SOAP error says it all: The XML reader of the service provider can
> not process your xml sting. The result string you created can be seen
> in the httpapi debug file, as the string that is send.
> 
> To start off you need to add spaces between attributes; that is between
> <soapenv:Envelope' and its following attributes being xmlns.
> Also take out the spaces between the leading quote and the opening
> brackets.
> For indentation you can leave the leading spaces directly following the
> plus sign.
> 
> SOAP=
>   '<soapenv:Envelope'
>  +' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";'
>  +' xmlns:web="http://webservices.360Value.com";>'
>  +'<soapenv:Header/>'
>  + '<soapenv:Body>'
>  +  '<web:calculateRCV>'
> etc.
> 
> Once you successfully changed your code you can look at the debug file
> to see what you created, and possibly also copy/pase the sting in a
> temp file that you open with a browser. That will clearly show you the
> possible errors.
> 
> Kind regards,
> 
> Loek Maartens.
> 
> ----- Original Message -----
> From: "David Baugh" <davidb@xxxxxxxxxxxxxx>
> To: <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Wednesday, March 23, 2011 12:41 AM
> Subject: RPC webservice
> 
> 
> I'm attempting a connection to the following web-service,
> 
> http://training.360-value.com/apps/iv/webservices/RCV?WSDL
> 
> Any help to the un-initiated much appreciated.
> 
> (Note the Incoming procedure is bare-bones - cut down from a copied
> service
> program on another web-service)
> 
> I get the following error:
> 
> SetError() #13: HTTP/1.1 500 Internal Server Error
> recvdoc parms: identity 225
> header_load_cookies() entered
> cookie_parse() entered
> cookie =  JSESSIONID=63A1159053CA50032908F9715086D9FE.xvtapp1-demo;
> Path=/apps/iv
> cookie attr jsessionid=63A1159053CA50032908F9715086D9FE.xvtapp1-demo
> cookie attr path=/apps/iv
> recvdoc(): entered
> SetError() #0:
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body>
> <soap:Fault><faultcode>soap:Client</faultcode> <faultstring>Error
> reading
> XMLStreamReader.</faultstring></soap:Fault>
> </soap:Body></soap:Envelope>
> SetError() #13: HTTP/1.1 500 Internal Server Error
> http_close(): entered
> 
> Here's my source:
> 
> SOAP=
>   '<soapenv:Envelope'
>  +'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";'
>  +'xmlns:web="http://webservices.360Value.com";>'
>  +' <soapenv:Header/>'
>  +' <soapenv:Body>'
>  +'  <web:calculateRCV>'
>  +'     <groupId>XXXXXXXX</groupId>'
>  +'     <password>XXXXXXXX</password>'
>  +'     <userId>XXXXXXXXXXXXXXXX</userId>'
>  +'     <!CDATA[<xml>'
> +'        <CONTEXT>'
> +'        <RESIDENTIAL usedefaults="YES" prefillonly="YES">'
> +'        <OWNER name="PREFERRED EXAMPLE" '
> +'               zipcode="84097" '
> +'               state="UT" '
> +'               country="USA" '
> +'               city="OREM" '
> +'               street="1015 N 1560 E" />'
> +'        </RESIDENTIAL>'
> +'        </CONTEXT>'
> +'     </xml>]]>'
>  +'     <detailedReport>false</detailedReport>'
>  +'     <version>0</version>'
>  +'  </web:calculateRCV>'
>  +'</soapenv:Body>'
>  +'</soapenv:Envelope>';
> 
> 
> rc = http_url_post_xml(
> 'http://training.360-value.com/apps/iv/webservices/RCV'
>                   : %addr(SOAP) + 2
>                   : %len(SOAP)
>                   : *NULL
>                   : %paddr(Incoming)
>                   : %addr(resp)
>                   : HTTP_TIMEOUT
>                   : HTTP_USERAGENT
>                   : 'text/xml; charset=utf-8');
> 
> P Incoming        B
> D Incoming        PI
> D   r                                 likeds(resp)
> D   depth                       10I 0 value
> D   name                      1024A   varying const
> D   path                     24576A   varying const
> D   value                    65535A   varying const
> D   attrs                         *   dim(32767)
> D                                     const options(*varsize)
>   // Local variables
> D rtncde          s              7A
> D Actn            s              1A
> D Idx             s              5P 0
> 
>  /free
>   // http_comp('incoming');
>         select;
>      when name = 'a:Message';
>         //Err = value;
>      endsl;
> 
>  /end-free
> P                 E
> 
> 
> 
> 
> 
> -----------------------------------------------------------------------
> ---------
> 
> 
> > ---------------------------------------------------------------------
> --
> > 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
> -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------