Smart questions
Smart answers
Smart people

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Newbie: Help with webservice request.

ROSER72 (TechnicalUser) (OP)
8 Sep 11 16:34

 I have very little programming skills and I'm willing to create my first first service request.

The Webservice method I'm trying to invoke is as follows:
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /ccmmwebservices/CIUtilityWs.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: ""

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
    <GetServerTime xmlns="" />

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
    <GetServerTimeResponse xmlns="">
        <milliseconds xmlns="">long</milliseconds>

I've created the follwing code:

    protected void Login_Click(object sender, EventArgs e)
        MyServices.CIUtilityWs gs = new MyServices.CIUtilityWs();
        long result = gs.GetServerTime();


However Visual Studio kepps on telling me that cannot implicitly convert type "MyServices.CIDateTime CIUtilityWs.GetServerTime" to Long.

Can anyone tell me what am I doing wrong?

Thanks in advance,
Qik3Coder (Programmer)
15 Sep 11 10:43
Go Find SoapUI, it's a free download and will save you many headaches. Put in the endpoint for the webservice, send a new request. Ensure that you are getting milliseconds and not a date back.

You can just do a debug.print(gs.GetServerTime()) to see what it's returning.

When you type out the service method it should tell you what the expected return type is.


You've got questions and source code. We want both!

Webwzrd (Programmer)
10 Oct 11 15:36
You need to change it to this:

protected void Login_Click(object sender, EventArgs e)
        MyServices.CIUtilityWs gs = new MyServices.CIUtilityWs();
        var result = gs.GetServerTime();

  Set you a break point on the bottom bracket and hover over "result" to see what is being returned.

That should help you!


Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close