Post

3 followers Follow
0
Avatar

Anybody got any examples of SOAP requests

Hi,

Am trying to bring back task information including the resources assigned. Unfortunately can't quite locate where or what it should look like when formed.

Example we are using to bring back Task info already including custom fields is below. Any help or examples would be appreciated.

Thanks.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">soap:Header<Session xmlns="http://clarizen.com/api"><ID>54f02330-698d-4fcd-894e-b1d52bb9fbbd</ID></Session>/soap:Headersoap:Body<Query xmlns="http://clarizen.com/api"><queryExpression xmlns:q1="http://clarizen.com/api/projectManagement" xsi:type="q1:MyWorkItemsQuery"><Paging xsi:nil="true" xmlns="http://clarizen.com/api/queries" /><Fields xmlns="http://clarizen.com/api/queries"><string xmlns="http://clarizen.com/api">Name</string><string xmlns="http://clarizen.com/api">C_TaskID</string><string xmlns="http://clarizen.com/api">C_BusinessUnit</string><string xmlns="http://clarizen.com/api">C_Customer</string><string xmlns="http://clarizen.com/api">C_ApprovalFor</string><string xmlns="http://clarizen.com/api">C_BookingStatus</string><string xmlns="http://clarizen.com/api">C_CESProduct</string><string xmlns="http://clarizen.com/api">C_Customer</string><string xmlns="http://clarizen.com/api">C_Customer_City</string><string xmlns="http://clarizen.com/api">C_DailyRate</string><string xmlns="http://clarizen.com/api">C_Distancebetween</string><string xmlns="http://clarizen.com/api">C_Hours</string><string xmlns="http://clarizen.com/api">C_NewandExisting</string><string xmlns="http://clarizen.com/api">Work</string><string xmlns="http://clarizen.com/api">Manager</string><string xmlns="http://clarizen.com/api">OrderID</string><string xmlns="http://clarizen.com/api">StartDate</string><string xmlns="http://clarizen.com/api">State</string><string xmlns="http://clarizen.com/api">DueDate</string><string xmlns="http://clarizen.com/api">Duration</string><string xmlns="http://clarizen.com/api">Project</string></Fields><Orders xmlns="http://clarizen.com/api/queries"><OrderBy><FieldName>Name</FieldName></OrderBy></Orders>q1:ItemsFilterAll/q1:ItemsFilterq1:ItemsTypeTask/q1:ItemsType</queryExpression></Query>/soap:Body/soap:Envelope

Import from old forum Answered

Please sign in to leave a comment.

7 comments

0
Avatar

I's not possible to bring the Resources in the same message but wat you could do is send another message called "GetWorkItemResourcesMessage". In this message you pass a list of Work Item IDs and you get back the resources of each work item

Clarizen Team 0 votes
Comment actions Permalink
0
Avatar

Thanks Eyal, is there a way to bring back all WorkItem ID's and the resources without having to pass back the WorkItem ID as we would use our ETL Tool to build it.

Thanks 

Andrew

Import from old forum 0 votes
Comment actions Permalink
0
Avatar

No, we currently don't support "Joins" in the web services API. Which ETL tool are you using?

Clarizen Team 0 votes
Comment actions Permalink
0
Avatar

[quote=Eyal Post]

No, we currently don't support "Joins" in the web services API. Which ETL tool are you using?[/quote]

Hi Eyal,

Using our own inhouse one.  We would do the join after the data was brought down, so was hoping to just bring back the resource and workitemid.

Thanks

Andrew

Import from old forum 0 votes
Comment actions Permalink
0
Avatar

Does anyone have an example of a SOAP Envelope for creating a Task?  any assistance would be appreciated.

Pamela Asamoah 0 votes
Comment actions Permalink
0
Avatar

Pamela,

I used wizdler for chrome https://chrome.google.com/webstore/detail/wizdler/oebpmncolmhiapingjaagmapififiakb?hl=en

You can open https://api2.clarizen.com/v2.0/Clarizen.svc?WSDL in a new tab and then use wizdler to run soap calls (see attachment)

Note: I recommend using REST over SOAP for simplicity sake, but there may be valid reasons besides that to use SOAP over REST... your call in the end.  You can get postman for playing with REST calls here: https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en

 

 

Phil Romov 0 votes
Comment actions Permalink
0
Avatar

Hi Pamela,  (thanks again Phil!)

I'll add to that:

The SOAP API has a more complex message structure and it is recommended over the REST API if you have a SOAP library that handles messages for you, particularly if you use Microsoft.NET. 

I recommend you check the SOAP & REST API manuals (on this forum and also on chapter 16 on http://usermanual.clarizen.com/home ). The manuals contain samples for common  task. Then choose the API that best suits the platform you use. 

Hope this helps,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink