473,378 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

SOAP Question

I am working on a new program that uses a SOAP interface. I have written
a few of these before, but this time it is giving me trouble. I suspect
there is a problem with on the SOAP handler side, but since I'm not an expect
I cannot be sure.

The vendor has provided me a url to the WSDL document for the soap service.
Using the .Net WSDL utility, I generate a c# proxy class. When I'm trying
to use the methods of the soap service, I get an error saying the method
could not be executed.

What I find strange is, looking at my generated soap proxy class, the URL
points back to the WSDL URL, not a URL to a asmx or other page. Does this
make sense. How can a WSDL document handle soap requests?

I asked the vendor and they said that it is correct...

Thanks for any help...
Brian
Nov 17 '05 #1
7 1672
Brian,

It is correct. When you invoke the method, the url that is called is
reconstructed from that base URL (with the WSDL) and then a request is sent
to that.

You might want to consider running a trace, to see what output you are
generating, and send it to the vendor exposing the web service (if you think
it is correct).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
I am working on a new program that uses a SOAP interface. I have written a
few of these before, but this time it is giving me trouble. I suspect
there is a problem with on the SOAP handler side, but since I'm not an
expect I cannot be sure.

The vendor has provided me a url to the WSDL document for the soap
service. Using the .Net WSDL utility, I generate a c# proxy class. When
I'm trying to use the methods of the soap service, I get an error saying
the method could not be executed.

What I find strange is, looking at my generated soap proxy class, the URL
points back to the WSDL URL, not a URL to a asmx or other page. Does this
make sense. How can a WSDL document handle soap requests?

I asked the vendor and they said that it is correct...

Thanks for any help...
Brian

Nov 17 '05 #2


I guess I just don't understand why it doesn't work. This is how I've done
web services before and never had any problems.

When you say run a trace, I'm not clear what that means. It is a very simple
web service, I'm passing a username and password and I get back a token string.
I've stepped through the code up until the point it goes into the System.Web.Services
assembly and the exception is being generated inside there, so I don't know
how I can look to see what is going on.

Thanks,
Brian
Brian,

It is correct. When you invoke the method, the url that is called
is reconstructed from that base URL (with the WSDL) and then a request
is sent to that.

You might want to consider running a trace, to see what output you
are generating, and send it to the vendor exposing the web service (if
you think it is correct).

Hope this helps.

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
I am working on a new program that uses a SOAP interface. I have
written a few of these before, but this time it is giving me trouble.
I suspect there is a problem with on the SOAP handler side, but since
I'm not an expect I cannot be sure.

The vendor has provided me a url to the WSDL document for the soap
service. Using the .Net WSDL utility, I generate a c# proxy class.
When I'm trying to use the methods of the soap service, I get an
error saying the method could not be executed.

What I find strange is, looking at my generated soap proxy class, the
URL points back to the WSDL URL, not a URL to a asmx or other page.
Does this make sense. How can a WSDL document handle soap requests?

I asked the vendor and they said that it is correct...

Thanks for any help...
Brian

Nov 17 '05 #3
Brian,

What I mean by a trace is to look at the XML that is output and sent to
the web service.

What is the exception that is being thrown, btw?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...


I guess I just don't understand why it doesn't work. This is how I've
done web services before and never had any problems.

When you say run a trace, I'm not clear what that means. It is a very
simple web service, I'm passing a username and password and I get back a
token string. I've stepped through the code up until the point it goes
into the System.Web.Services assembly and the exception is being generated
inside there, so I don't know how I can look to see what is going on.

Thanks,
Brian
Brian,

It is correct. When you invoke the method, the url that is called
is reconstructed from that base URL (with the WSDL) and then a request
is sent to that.

You might want to consider running a trace, to see what output you
are generating, and send it to the vendor exposing the web service (if
you think it is correct).

Hope this helps.

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
I am working on a new program that uses a SOAP interface. I have
written a few of these before, but this time it is giving me trouble.
I suspect there is a problem with on the SOAP handler side, but since
I'm not an expect I cannot be sure.

The vendor has provided me a url to the WSDL document for the soap
service. Using the .Net WSDL utility, I generate a c# proxy class.
When I'm trying to use the methods of the soap service, I get an
error saying the method could not be executed.

What I find strange is, looking at my generated soap proxy class, the
URL points back to the WSDL URL, not a URL to a asmx or other page.
Does this make sense. How can a WSDL document handle soap requests?

I asked the vendor and they said that it is correct...

Thanks for any help...
Brian


Nov 17 '05 #4

This is the exception:

System.Web.Services.Protocols.SoapException: WSDLOperation: Executing method
Logon failed
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at LogonService.Logon(String ServiceName, String UserName, String Password)
in C:\dev\Sandbox.CDMS\Sandbox.CDMS.Core\LogonService .cs:line 38
at Sandbox.CDMS.Core.Program.Main(String[] args) in c:\dev\sandbox.cdms\sandbox.cdms.core\program.cs:l ine
18
I'm not sure how to look at the XML generated. In the LogonService class
(which was generated by wsdl.exe), the method Logon calls into the parent
class SoapHttpClientProtocal's Invoke method. From there, to me it's a black
hole. I'm sure there are ways of looking at the XML but I'm not sure how.
I'm not sure if code is revelant, its a fairly simple test class. I suspect
any issues would have to be in the LogonService code, or the web service
itself. Is this at least true? And since the LogonService code is generated
by thw wsdl.exe utility using the web service's wsdl document, then, doesn't
this also make sense that something is wrong with the web service?

string token = null;
LogonService logon = new LogonService;
try
{
token = logon.Logon("UserName", "Password");
}
catch (SoapException ex)
{
Console.Writeline(ex.ToString());
}
Thanks for looking at this...
Brian

Brian,

What I mean by a trace is to look at the XML that is output and
sent to the web service.

What is the exception that is being thrown, btw?

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
I guess I just don't understand why it doesn't work. This is how
I've done web services before and never had any problems.

When you say run a trace, I'm not clear what that means. It is a
very simple web service, I'm passing a username and password and I
get back a token string. I've stepped through the code up until the
point it goes into the System.Web.Services assembly and the exception
is being generated inside there, so I don't know how I can look to
see what is going on.

Thanks,
Brian
Brian,

It is correct. When you invoke the method, the url that is called
is reconstructed from that base URL (with the WSDL) and then a
request
is sent to that.
You might want to consider running a trace, to see what output you
are generating, and send it to the vendor exposing the web service
(if
you think it is correct).
Hope this helps.

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
I am working on a new program that uses a SOAP interface. I have
written a few of these before, but this time it is giving me
trouble. I suspect there is a problem with on the SOAP handler
side, but since I'm not an expect I cannot be sure.

The vendor has provided me a url to the WSDL document for the soap
service. Using the .Net WSDL utility, I generate a c# proxy class.
When I'm trying to use the methods of the soap service, I get an
error saying the method could not be executed.

What I find strange is, looking at my generated soap proxy class,
the URL points back to the WSDL URL, not a URL to a asmx or other
page. Does this make sense. How can a WSDL document handle soap
requests?

I asked the vendor and they said that it is correct...

Thanks for any help...
Brian

Nov 17 '05 #5
Brian,

You will want to look at the XML going over the wire, and the XML
returning from the website.

There is a tool called Fiddler that you can use which is free which will
trace TCP/IP traffic (you will have to change your client around a little,
but not substantially, just the URL of the site). You can use this to view
the XML going out and coming back.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...

This is the exception:

System.Web.Services.Protocols.SoapException: WSDLOperation: Executing
method Logon failed
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at LogonService.Logon(String ServiceName, String UserName, String
Password) in C:\dev\Sandbox.CDMS\Sandbox.CDMS.Core\LogonService .cs:line 38
at Sandbox.CDMS.Core.Program.Main(String[] args) in
c:\dev\sandbox.cdms\sandbox.cdms.core\program.cs:l ine 18
I'm not sure how to look at the XML generated. In the LogonService class
(which was generated by wsdl.exe), the method Logon calls into the parent
class SoapHttpClientProtocal's Invoke method. From there, to me it's a
black hole. I'm sure there are ways of looking at the XML but I'm not
sure how.
I'm not sure if code is revelant, its a fairly simple test class. I
suspect any issues would have to be in the LogonService code, or the web
service itself. Is this at least true? And since the LogonService code
is generated by thw wsdl.exe utility using the web service's wsdl
document, then, doesn't this also make sense that something is wrong with
the web service?

string token = null;
LogonService logon = new LogonService;
try
{
token = logon.Logon("UserName", "Password");
}
catch (SoapException ex)
{
Console.Writeline(ex.ToString());
}
Thanks for looking at this...
Brian

Brian,

What I mean by a trace is to look at the XML that is output and
sent to the web service.

What is the exception that is being thrown, btw?

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
I guess I just don't understand why it doesn't work. This is how
I've done web services before and never had any problems.

When you say run a trace, I'm not clear what that means. It is a
very simple web service, I'm passing a username and password and I
get back a token string. I've stepped through the code up until the
point it goes into the System.Web.Services assembly and the exception
is being generated inside there, so I don't know how I can look to
see what is going on.

Thanks,
Brian
Brian,

It is correct. When you invoke the method, the url that is called
is reconstructed from that base URL (with the WSDL) and then a
request
is sent to that.
You might want to consider running a trace, to see what output you
are generating, and send it to the vendor exposing the web service
(if
you think it is correct).
Hope this helps.

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
> I am working on a new program that uses a SOAP interface. I have
> written a few of these before, but this time it is giving me
> trouble. I suspect there is a problem with on the SOAP handler
> side, but since I'm not an expect I cannot be sure.
>
> The vendor has provided me a url to the WSDL document for the soap
> service. Using the .Net WSDL utility, I generate a c# proxy class.
> When I'm trying to use the methods of the soap service, I get an
> error saying the method could not be executed.
>
> What I find strange is, looking at my generated soap proxy class,
> the URL points back to the WSDL URL, not a URL to a asmx or other
> page. Does this make sense. How can a WSDL document handle soap
> requests?
>
> I asked the vendor and they said that it is correct...
>
> Thanks for any help...
> Brian


Nov 17 '05 #6

I used fiddler to examine the xml and here is something of interest:

SOAPAction: "http://tempuri.org/action/LogonManager.Logon"

This has to be the problem. So, I'm back to thinking something is wrong
with the web server / WSDSL document.
Thanks for your help. I suspected there was an issue, but I couldn't pin
it down. (At least, I'm assuming this is the problem, maybe you can confirm.)

--Brian

Brian,

You will want to look at the XML going over the wire, and the XML
returning from the website.

There is a tool called Fiddler that you can use which is free
which will trace TCP/IP traffic (you will have to change your client
around a little, but not substantially, just the URL of the site).
You can use this to view the XML going out and coming back.

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
This is the exception:

System.Web.Services.Protocols.SoapException: WSDLOperation: Executing
method Logon failed
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(Soa
pClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at LogonService.Logon(String ServiceName, String UserName, String
Password) in
C:\dev\Sandbox.CDMS\Sandbox.CDMS.Core\LogonService .cs:line 38
at Sandbox.CDMS.Core.Program.Main(String[] args) in
c:\dev\sandbox.cdms\sandbox.cdms.core\program.cs:l ine 18
I'm not sure how to look at the XML generated. In the LogonService
class (which was generated by wsdl.exe), the method Logon calls into
the parent class SoapHttpClientProtocal's Invoke method. From there,
to me it's a black hole. I'm sure there are ways of looking at the
XML but I'm not sure how.

I'm not sure if code is revelant, its a fairly simple test class. I
suspect any issues would have to be in the LogonService code, or the
web service itself. Is this at least true? And since the
LogonService code is generated by thw wsdl.exe utility using the web
service's wsdl document, then, doesn't this also make sense that
something is wrong with the web service?

string token = null;
LogonService logon = new LogonService;
try
{
token = logon.Logon("UserName", "Password");
}
catch (SoapException ex)
{
Console.Writeline(ex.ToString());
}
Thanks for looking at this...
Brian
Brian,

What I mean by a trace is to look at the XML that is output and sent
to the web service.

What is the exception that is being thrown, btw?

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
I guess I just don't understand why it doesn't work. This is how
I've done web services before and never had any problems.

When you say run a trace, I'm not clear what that means. It is a
very simple web service, I'm passing a username and password and I
get back a token string. I've stepped through the code up until the
point it goes into the System.Web.Services assembly and the
exception is being generated inside there, so I don't know how I
can look to see what is going on.

Thanks,
Brian
> Brian,
>
> It is correct. When you invoke the method, the url that is called
> is reconstructed from that base URL (with the WSDL) and then a
> request
> is sent to that.
> You might want to consider running a trace, to see what output you
> are generating, and send it to the vendor exposing the web service
> (if
> you think it is correct).
> Hope this helps.
> "Brian P" <no@email.com> wrote in message
> news:b7**************************@news.microsoft.c om...
>> I am working on a new program that uses a SOAP interface. I have
>> written a few of these before, but this time it is giving me
>> trouble. I suspect there is a problem with on the SOAP handler
>> side, but since I'm not an expect I cannot be sure.
>>
>> The vendor has provided me a url to the WSDL document for the
>> soap service. Using the .Net WSDL utility, I generate a c# proxy
>> class. When I'm trying to use the methods of the soap service, I
>> get an error saying the method could not be executed.
>>
>> What I find strange is, looking at my generated soap proxy class,
>> the URL points back to the WSDL URL, not a URL to a asmx or other
>> page. Does this make sense. How can a WSDL document handle soap
>> requests?
>>
>> I asked the vendor and they said that it is correct...
>>
>> Thanks for any help...
>> Brian

Nov 17 '05 #7
Brian,

The soap action being a temp URI could be part of it, but without seeing
the WSDL, it's hard to say.

You should speak with the vendors, and ask them to double check that
their web service works with the WSDL tool, and show them what you have
found.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...

I used fiddler to examine the xml and here is something of interest:

SOAPAction: "http://tempuri.org/action/LogonManager.Logon"

This has to be the problem. So, I'm back to thinking something is wrong
with the web server / WSDSL document.
Thanks for your help. I suspected there was an issue, but I couldn't pin
it down. (At least, I'm assuming this is the problem, maybe you can
confirm.)

--Brian

Brian,

You will want to look at the XML going over the wire, and the XML
returning from the website.

There is a tool called Fiddler that you can use which is free
which will trace TCP/IP traffic (you will have to change your client
around a little, but not substantially, just the URL of the site).
You can use this to view the XML going out and coming back.

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
This is the exception:

System.Web.Services.Protocols.SoapException: WSDLOperation: Executing
method Logon failed
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(Soa
pClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at LogonService.Logon(String ServiceName, String UserName, String
Password) in
C:\dev\Sandbox.CDMS\Sandbox.CDMS.Core\LogonService .cs:line 38
at Sandbox.CDMS.Core.Program.Main(String[] args) in
c:\dev\sandbox.cdms\sandbox.cdms.core\program.cs:l ine 18
I'm not sure how to look at the XML generated. In the LogonService
class (which was generated by wsdl.exe), the method Logon calls into
the parent class SoapHttpClientProtocal's Invoke method. From there,
to me it's a black hole. I'm sure there are ways of looking at the
XML but I'm not sure how.

I'm not sure if code is revelant, its a fairly simple test class. I
suspect any issues would have to be in the LogonService code, or the
web service itself. Is this at least true? And since the
LogonService code is generated by thw wsdl.exe utility using the web
service's wsdl document, then, doesn't this also make sense that
something is wrong with the web service?

string token = null;
LogonService logon = new LogonService;
try
{
token = logon.Logon("UserName", "Password");
}
catch (SoapException ex)
{
Console.Writeline(ex.ToString());
}
Thanks for looking at this...
Brian
Brian,

What I mean by a trace is to look at the XML that is output and sent
to the web service.

What is the exception that is being thrown, btw?

"Brian P" <no@email.com> wrote in message
news:b7**************************@news.microsoft.c om...
> I guess I just don't understand why it doesn't work. This is how
> I've done web services before and never had any problems.
>
> When you say run a trace, I'm not clear what that means. It is a
> very simple web service, I'm passing a username and password and I
> get back a token string. I've stepped through the code up until the
> point it goes into the System.Web.Services assembly and the
> exception is being generated inside there, so I don't know how I
> can look to see what is going on.
>
> Thanks,
> Brian
>> Brian,
>>
>> It is correct. When you invoke the method, the url that is called
>> is reconstructed from that base URL (with the WSDL) and then a
>> request
>> is sent to that.
>> You might want to consider running a trace, to see what output you
>> are generating, and send it to the vendor exposing the web service
>> (if
>> you think it is correct).
>> Hope this helps.
>> "Brian P" <no@email.com> wrote in message
>> news:b7**************************@news.microsoft.c om...
>>> I am working on a new program that uses a SOAP interface. I have
>>> written a few of these before, but this time it is giving me
>>> trouble. I suspect there is a problem with on the SOAP handler
>>> side, but since I'm not an expect I cannot be sure.
>>>
>>> The vendor has provided me a url to the WSDL document for the
>>> soap service. Using the .Net WSDL utility, I generate a c# proxy
>>> class. When I'm trying to use the methods of the soap service, I
>>> get an error saying the method could not be executed.
>>>
>>> What I find strange is, looking at my generated soap proxy class,
>>> the URL points back to the WSDL URL, not a URL to a asmx or other
>>> page. Does this make sense. How can a WSDL document handle soap
>>> requests?
>>>
>>> I asked the vendor and they said that it is correct...
>>>
>>> Thanks for any help...
>>> Brian


Nov 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Guest | last post by:
Hi, I unerstand that if you choose IIS to host your .Net Remotingcomponents with HTTP channel and SOAP formatter, you get thebuilt-in security and configuraion features of IIS. Also we canexpose it...
1
by: Dr. Frankenchurn | last post by:
I have a question regarding SOAP. A basic "Hello World" web service was written then requested from an IIS server via TELNET. When a malformed request was sent, a SOAP exception was returned,...
2
by: Paul Hale | last post by:
I have a vb.net web service and client that are both working fine. If someone wanted to consume our web service using .NET, no problem. Im a little confused on how non .NET clients would use the...
4
by: Christian Wilhelm | last post by:
Hi! I have a Problem understanding the deserialisation of SOAP-Responses. The "normal" way, calling a XML WebService is to use WSDL 1) Send Request 2) Get SOAP-Response 3) With Informations...
0
by: reezaali | last post by:
Hi All I have two problems.... 1. can you please tell me what the response should be from making this method call? <?xml version="1.0" encoding="utf-8"?> <soap:Envelope...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
31
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our...
2
by: lallous | last post by:
Hello, I am new to webservices internals and I used the web service wizard to generate the webservice class and appropriate objects. After issueing a request, I noticed that the SOAP message...
3
by: Enda Manni | last post by:
Hi, I have a gSoap Web Service written using C++, it uses SOAP username and password authentication. I also have a C# form client consuming the web service, all this was working fine until...
0
by: Philluminati | last post by:
I have a Perl SOAP Server which returns this SOAP Message when invoked: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance"...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.