This project is read-only.

Client example

Apr 21, 2009 at 4:20 PM
Hi,
I have added the Service Reference in a Windows Forms client project, but I'm new to WS and I have no idea how to consume the service...

Do we have to add the reference with:
Right click in project -> "Add Service Reference" -> Address=http://[servername]/ogc/Swe.svc?wsdl -> Ok
or with
Right click in project -> "Add Service Reference" -> Advanced -> "Add Web Reference..." ->  URL=http://[servername]/ogc/Swe.svc?wsdl -> Ok
? (Both ways create different proxy classes in the project).
Can please someone write an quick example (just some code lines) of a client written in C# which consumes the service offered by this project?

Thank you in advance
Apr 21, 2009 at 6:59 PM
VS2008Try:
http://[servername]/ogc/Swe.svc/

In VS2005 Add Web Service:
http://[servername]/ogc/Swe.svc?wsdl

On Tue, Apr 21, 2009 at 8:20 AM, [email removed] wrote:
> From: aykito
>
> Hi,
> I have added the Service Reference in a Windows Forms client project, but
> I'm new to WS and I have no idea how to consume the service...
>
> Do we have to add the reference with:
>
> Right click in project -> "Add Service Reference" ->
> Address=http://[servername]/ogc/Swe.svc?wsdl -> Ok
>
> or with
>
> Right click in project -> "Add Service Reference" -> Advanced -> "Add Web
> Reference..." ->  URL=http://[servername]/ogc/Swe.svc?wsdl -> Ok
>
> ? (Both ways create different proxy classes in the project).
> Can please someone write an quick example (just some code lines) of a client
> written in C# which consumes the service offered by this project?
>
> Thank you in advance
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
Apr 22, 2009 at 3:58 PM
Ok I have added the web reference (VS2008) with
Right click in project -> "Add Service Reference" -> Advanced -> "Add Web Reference..." ->  URL=http://[servername]/ogc/Swe.svc -> Ok

I have also added the reference to Renci.Ogc.dll (I guess I need it)

How can I now interoperate with the SOS service?

        private void buttonFoo_Click(object sender, EventArgs e)
        {
            Swe swe = new Swe();
            [???]
        }

Do you test the service with a .Net client? It would be nice adding it to the sources.
Apr 22, 2009 at 4:43 PM
We have not yet developed a .Net SOS "Client."

Any client that runs on widows and handles OGC SOS should work, but
not always. We have found an issue with the 52 north client that is
being fixed.

Sorry, for the service reference, I think we were going down the wrong track.
OGC SOS is a URL based system, so you really don't need the service
reference. You can just use a URL, or post to a URL, as specifed in
the OGC SOS spec.

You will need to parse the XML in the response yourself, and that is
where the OGC.dll will come in handy.

Oleg,
May we should draw up a spec for a test client?

aykito,
Would you be able to help us?

On Wed, Apr 22, 2009 at 7:58 AM, [email removed] wrote:
> From: aykito
>
> Ok I have added the web reference (VS2008) with
> Right click in project -> "Add Service Reference" -> Advanced -> "Add Web
> Reference..." ->  URL=http://[servername]/ogc/Swe.svc -> Ok
>
> I have also added the reference to Renci.Ogc.dll (I guess I need it)
>
> How can I now interoperate with the SOS service?
>
>         private void buttonFoo_Click(object sender, EventArgs e)
>         {
>             Swe swe = new Swe();
>             [???]
>         }
>
> Do you test the service with a .Net client? It would be nice adding it to
> the sources.
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
Apr 22, 2009 at 4:51 PM
Of course I will help, as much as I can.
Apr 22, 2009 at 4:58 PM
Yes,
I think its a good idea

I think I could make some basic client which will consume any SWE web service and will utilize library for serialization  request and deserialization response so users dont have to parse XML.

I`ll see if I can do that by the end of the week

Oleg