NET web service from C#

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NET web service from C#

Matias Nicolas Sommi
Hello, I'm new in this group, recently I has been started with flex,
and I've a some questions.
I'm a C# developer mainly, and i triying to make the business model in
C# and the client in flex 2.
The problem is, i develop a web service, and "run" it in Visual
studio. I think that is enought to consume it from flex... it's
enough? Because, when I try to consume it, everytime i get an
exception because "the wsdl not found"... i tryied with
"http://tempuri/operation" and
"http://localhost/web/webservice.asmx?wsdl" with no solution... it's
the debug mode of visual studio a limitation to consume it? (I can
consume it from visual studio)
Anybody can help me? The flex documentation hasn't enough help for me :(
Thanks a lot.
PD: sorry for my poor english.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: NET web service from C#

John C. Bland II
Did you try using localhost:(port number)? Whenever I test .NET WS locally I
always have to use the port number (while in debug mode).

If in IIS locally, I don't know. I've only tested in debug mode.

On 10/2/06, elzumbasefue <[hidden email]> wrote:

>
>   Hello, I'm new in this group, recently I has been started with flex,
> and I've a some questions.
> I'm a C# developer mainly, and i triying to make the business model in
> C# and the client in flex 2.
> The problem is, i develop a web service, and "run" it in Visual
> studio. I think that is enought to consume it from flex... it's
> enough? Because, when I try to consume it, everytime i get an
> exception because "the wsdl not found"... i tryied with
> "http://tempuri/operation" and
> "http://localhost/web/webservice.asmx?wsdl" with no solution... it's
> the debug mode of visual studio a limitation to consume it? (I can
> consume it from visual studio)
> Anybody can help me? The flex documentation hasn't enough help for me :(
> Thanks a lot.
> PD: sorry for my poor english.
>
>  
>



--
John C. Bland II
Chief Geek
Katapult Media, Inc. - www.katapultmedia.com
---
Biz Blog - http://blogs.katapultmedia.com/jb2
Personal Blog - http://blog.blandfamilyonline.com
http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to
Wear Them"
Home of FMUG.az - http://www.gotoandstop.org
Home of AZCFUG - http://www.azcfug.org
Reply | Threaded
Open this post in threaded view
|

Re: NET web service from C#

Matias Nicolas Sommi
Yes, I tryed with :port, but nothing happen. But then, when I create a
WebService object in ActionScript, te constructor parameter is the url
"http://localhost:3451/web/webservice.asmx?wsdl"? This is the mainly
confusion that I've. Tonight I'm going to do more tests.
You've got a actionscript class that consume a webservice from .net?
If you have and if you like to share it with me, please send me it.
Thanks!!!

--- In [hidden email], "John C. Bland II"
<johncblandii@...> wrote:
>
> Did you try using localhost:(port number)? Whenever I test .NET WS
locally I

> always have to use the port number (while in debug mode).
>
> If in IIS locally, I don't know. I've only tested in debug mode.
>
> On 10/2/06, elzumbasefue <nicosommi@...> wrote:
> >
> >   Hello, I'm new in this group, recently I has been started with flex,
> > and I've a some questions.
> > I'm a C# developer mainly, and i triying to make the business model in
> > C# and the client in flex 2.
> > The problem is, i develop a web service, and "run" it in Visual
> > studio. I think that is enought to consume it from flex... it's
> > enough? Because, when I try to consume it, everytime i get an
> > exception because "the wsdl not found"... i tryied with
> > "http://tempuri/operation" and
> > "http://localhost/web/webservice.asmx?wsdl" with no solution... it's
> > the debug mode of visual studio a limitation to consume it? (I can
> > consume it from visual studio)
> > Anybody can help me? The flex documentation hasn't enough help for
me :(

> > Thanks a lot.
> > PD: sorry for my poor english.
> >
> >  
> >
>
>
>
> --
> John C. Bland II
> Chief Geek
> Katapult Media, Inc. - www.katapultmedia.com
> ---
> Biz Blog - http://blogs.katapultmedia.com/jb2
> Personal Blog - http://blog.blandfamilyonline.com
> http://www.lifthimhigh.com - "Christian Products for Those Bold
Enough to
> Wear Them"
> Home of FMUG.az - http://www.gotoandstop.org
> Home of AZCFUG - http://www.azcfug.org
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: Re: NET web service from C#

John C. Bland II
<mx:WebService id="MyWS" showBusyCursor="true" wsdl="http://whatever">
           <mx:operation name="MyFunc" result="onMyFaultResult(event)"
fault="onMyFuncFault(event)" />
</mx:WebService>

That's all you need to do to connect.You can use AS but the mxml makes it so
easy I have yet to try the AS. :-)

Also, ServiceCapture is your friend. It will show you Flash Remoting calls,
WS calls, HTTPS calls, etc. This thing is magic when dealing with RPC's.

http://kevinlangdon.com/serviceCapture/

On 10/2/06, elzumbasefue <[hidden email]> wrote:

>
>   Yes, I tryed with :port, but nothing happen. But then, when I create a
> WebService object in ActionScript, te constructor parameter is the url
> "http://localhost:3451/web/webservice.asmx?wsdl"? This is the mainly
> confusion that I've. Tonight I'm going to do more tests.
> You've got a actionscript class that consume a webservice from .net?
> If you have and if you like to share it with me, please send me it.
> Thanks!!!
>
> --- In [hidden email] <flexcoders%40yahoogroups.com>, "John C.
> Bland II"
> <johncblandii@...> wrote:
> >
> > Did you try using localhost:(port number)? Whenever I test .NET WS
> locally I
> > always have to use the port number (while in debug mode).
> >
> > If in IIS locally, I don't know. I've only tested in debug mode.
> >
> > On 10/2/06, elzumbasefue <nicosommi@...> wrote:
> > >
> > > Hello, I'm new in this group, recently I has been started with flex,
> > > and I've a some questions.
> > > I'm a C# developer mainly, and i triying to make the business model in
> > > C# and the client in flex 2.
> > > The problem is, i develop a web service, and "run" it in Visual
> > > studio. I think that is enought to consume it from flex... it's
> > > enough? Because, when I try to consume it, everytime i get an
> > > exception because "the wsdl not found"... i tryied with
> > > "http://tempuri/operation" and
> > > "http://localhost/web/webservice.asmx?wsdl" with no solution... it's
> > > the debug mode of visual studio a limitation to consume it? (I can
> > > consume it from visual studio)
> > > Anybody can help me? The flex documentation hasn't enough help for
> me :(
> > > Thanks a lot.
> > > PD: sorry for my poor english.
> > >
> > >
> > >
> >
> >
> >
> > --
> > John C. Bland II
> > Chief Geek
> > Katapult Media, Inc. - www.katapultmedia.com
> > ---
> > Biz Blog - http://blogs.katapultmedia.com/jb2
> > Personal Blog - http://blog.blandfamilyonline.com
> > http://www.lifthimhigh.com - "Christian Products for Those Bold
> Enough to
> > Wear Them"
> > Home of FMUG.az - http://www.gotoandstop.org
> > Home of AZCFUG - http://www.azcfug.org
> >
>
>  
>



--
John C. Bland II
Chief Geek
Katapult Media, Inc. - www.katapultmedia.com
---
Biz Blog - http://blogs.katapultmedia.com/jb2
Personal Blog - http://blog.blandfamilyonline.com
http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to
Wear Them"
Home of FMUG.az - http://www.gotoandstop.org
Home of AZCFUG - http://www.azcfug.org
Reply | Threaded
Open this post in threaded view
|

Re: NET web service from C#

passive_thoughts
In its simplest form.

C# Asp.Net Webservice:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;

namespace Director
{
     public class Hello : System.Web.Services.WebService
     {
         public Hello()        {
             InitializeComponent();
         }

         #region Component Designer generated code
         private IContainer components = null;
         private void InitializeComponent()   {  }

         protected override void Dispose( bool disposing )        {
             if(disposing && components != null)
             {
                 components.Dispose();
             }
             base.Dispose(disposing);                }
         #endregion

         [WebMethod]
         public string HelloWorld(string variable)        {
             return "Hello " + variable;
         }
     }
}

MXML Application:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
         <mx:WebService id="myService"
         wsdl="http://localhost/Director/Hello.asmx?WSDL"
         load="myService.HelloWorld('Peter')"
         showBusyCursor="true"/>
     <mx:Label text="{myService.HelloWorld.lastResult}"/>
</mx:Application>

If you're not accessing a webservice on the same machine don't forget
your crossdomain.xml file in your IIS webroot folder:
<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
     <allow-access-from domain="*"/>
</cross-domain-policy>