Skip to main content
Level 2
Mar 31, 2017 4:24 PM UTC
Solved

Need a little help with queryDefMethodsSoapClient - using the SOAP client

Through the forum, I've been able to formulate working ExecuteQuery examples in SOAP U/I.  However, when trying to get the same to work in c#, it isn't clear to me how to get the response data.

Here's a snippet of my code:

XmlElement response = null;
            try
            {
                XmlElement xml = buildQuery();
                response = client.ExecuteQuery(secureToken, xml);
                client.Close();
            } catch (FaultException f) {

The ExecuteQuery runs without exception, but when I look at the returned XmlElement, it only contains the empty structure of a response without any data in it.

For example, <service-collection xmlns=\"urn:xtk:queryDef\"><service /><service /><service />....

Where's the data?  Could someone share a working code snippet of getting the returned data -  in any language.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Amit_Kumar
Amit_KumarAccepted solution
Level 10
May 5, 2017 1:36 AM UTC

Hi Blair,

Can you share your the share, what you are passing as xml because i can think of only three things.

1. you are missing correct SOAPAction

2. you are not passing correct sessionToken

3. you are using a incorrect urn:entity.

It would be great if you can  share these details here.

Regards,

Amit

4 replies

Amit_Kumar
Level 10
Apr 3, 2017 12:27 AM UTC

This looks Incomplete to me. Can you post the complete code including the one you used for buildQuery. please refer to the following stackoverflow link. 

Translate
Amit_Kumar
Amit_KumarAccepted solution
Level 10
May 5, 2017 1:36 AM UTC

Hi Blair,

Can you share your the share, what you are passing as xml because i can think of only three things.

1. you are missing correct SOAPAction

2. you are not passing correct sessionToken

3. you are using a incorrect urn:entity.

It would be great if you can  share these details here.

Regards,

Amit

Translate
Level 2
May 5, 2017 2:42 PM UTC

Thanks for the response Amit.  I came back to this and now it is working and I'm not sure what changed.

Translate
florentlb
Level 10
May 8, 2017 10:20 AM UTC

Hi Blair,

Thanks for the update. If you find what did change do not hesitate to share it here so it can eventually help other community members. I guess any manual action that you took could also have helped (restarted server for example).

Florent.

Translate