[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HTTPAPI Incoming values blank? Please help
Hm, based on the input you provided so far, "errorString" looks like a
standard attribute to me:
<InitiateConnectDisconnectResult>
<errorObject
objectID="Unknown ... Id"
errorString="A previously .... (serial_port=0)."
eventTime="2012-10-25T13:56:58.1293269-05:00" />
</InitiateConnectDisconnectResult>
You should be able to get it with http_nextXmlAttr(). Here is a concrete
example taken from EXAMPLE11.MBR of HTTPAPI v1.25beta2:
P Incoming B
D Incoming PI
D userdata * value
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)
D count s 10I 0
D attrname s 1024A varying
D attrval s 65535A varying
// sometimes an element will have attributes. In the example
// XML shown above, the only attribute is the VERSION attrib
// of the RSS tag.
//
// The following searches through the attribute list of the
// rss tag to extract the version number.
if (name = 'rss');
count = 1;
dow http_nextXmlAttr(attrs: count: attrname: attrval);
if (attrname = 'version');
PrintLine = 'RSS version ' + attrval;
except;
endif;
enddo;
endif;
For you it should be:
if (name = 'errorObject');
count = 1;
dow http_nextXmlAttr(attrs: count: attrname: attrval);
if (attrname = 'errorString');
// dsply %subst(attrval: 1: 52);
endif;
enddo;
endif;
Of course the value of "errorObject" is blank because it does not have a
value. But it has three attributes.
I recommend to post the debug log if you do not agree with me.
Thomas.
Am 26.10.2012 17:56, schrieb Kenny Keifer:
I think the problem is the format of what is being returned. It is not
like <Name>text</Name> and field "VALUE" would = text
It is like <Name><errorObject...../></Name>
HTTPAPI Incoming procedure:
Can anybody help me retrieve the errorString data? "A previously
submitted state change
request for meter number "" has not yet completed.
(serial_port=0)."
What I found in debug mode:
Field "NAME" = InitiateConnectDisconnectResult, Field "VALUE" = blank
Field "NAME" = errorObject, Field "VALUE" = blank
This what is being returned to Incoming procedure (From
httpapi_debug.txt):
<InitiateConnectDisconnectResult>
<errorObject objectID="Unknown Object Id" errorString="A previously
submitted state change
request for meter number "" has not yet completed.
(serial_port=0)."
eventTime="2012-10-25T13:56:58.1293269-05:00"
/>
</InitiateConnectDisconnectResult>
This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received it by mistake, please let us know by e-mail reply and delete
it from your system; you may not copy this message or disclose its
contents to anyone. Please send us by fax any message containing
deadlines as incoming e-mails are not screened for response deadlines.
The integrity and security of this message cannot be guaranteed on the
Internet.
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------