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

RE: using the response from one service to make another request- need a little Guidance



Ok, I just a little searching and I found the "web:" listed below is the namespace

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Harold Blevins
Sent: Monday, May 11, 2009 12:23 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: using the response from one service to make another request- need a little Guidance

I am using HTTPAPI to write an interface between our system (i5 V5R4) and Cityworks by Azeteca (running on  Windows 2003 MS-SQL 2005) (Thanks Scott and the 'group' for the api and all the examples)

I have completed several steps successfully for the interface using examples , soapUI( 2.5.1), and the debug file to work out the RPGLE code

The last step is to update a 'service request' (changing the status to 'close' or 'cancel').  At first I assumed I could send the service request id (key) and the tags for the fields I need to update.  Apparently the webservice needs all of the data populated for the update (see note from developer below).
According to the developer I should get the xml (using the getRequestByRequestId -see attached) change what needs to be changed and send it back.
Their webservice will allow me to null or blank out fields not referenced and return  "<UpdateRequestResult>true</UpdateRequestResult>"  Then when you try to access the record in their GUI it bombs

Should I use the getrequest and parse out all fields then build the updaterequest from the parsed data?


Side note: So far I've had to prefix the tags with"web:" while the results do not have a prefix

Example:

<web:requestId>0000824748</web:requestId>

<RequestId>824748</RequestId>




>From Software developer:

The correct approach for making an update via the SR API is to do the following:


1.       Get a RequestData Object by using GetRequest/GetRequestByRequestId/GetRequestByOtherSystemId, and make sure it exists (RequestData.RequestId > 0)

2.       Modify the attribute fields of the RequestData object (don't  change the RequestId, ProblemSid, IncidentNum fields)

3.       Call  the UpdateRequest method and use the modified RequestData object as argument.


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------