If the webservice is running under .NET 1.1, you're out of luck. You only
have SOAPAction HTTP header or RoutingStyle of RequestElement. In SOAP 1.1
SOAPAction was mandatory.

[Looking at the System.Web.Services code:]
If the webservice is running under .NET 2.0, and is written for SOAP 1.1,
you're out of luck.

If the webservice is running under .NET 2.0, and is written for SOAP 1.2,
you can use the soap:Action instead of the SOAPAction HTTP header (and it
should also fallback to using the RequestElement if it can't find a
soap:Action).

It's been a while since I've had to dig into this myself (since .NET 1.1),
but as long as the webservice you're calling was written in .NET 2.0, has
been marked as using SOAP 1.2, then you should be able to do so.

Adam..

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Fruhling
Sent: Thursday, August 14, 2008 2:15 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Problem with SOAPAction HTTP Header

Adam,

I don't think I explained myself very well.  I don't control the web
service, and the software that sends the data to that web service is
the legacy piece I'm talking about.  I was wondering if I could
construct a Soap Envelope that could embed the SOAPAction inside of
it.  I know there is a SoapHeader element in the specification, but I
don't see any documentation that would make me think I could pass this
action inside of it.  So if my customer's web service is expecting an
HTTP Header, am I stuck?

Thanks,
Mark

On Thu, Aug 14, 2008 at 2:03 PM, Adam Sills <[EMAIL PROTECTED]> wrote:
> Legacy software sending XML to your web service and because it's not
sending
> the SOAPAction header it's receiving an error from the server?
>
> Add this attribute to your web service:
> [System.Web.Services.Protocols.SoapDocumentService(
> RoutingStyle=SoapServiceRoutingStyle.RequestElement )]
>
> This imposes a few restrictions on your web service, but allows your
> webservice to route via the first element in the soap:Body instead of
> relying on the SOAPAction header.
>
> This imposes a few restrictions on your web service, but it's not likely
> you'll run into them unless you change the ParameterStyle to Bare with a
> SoapDocumentMethodAttribute on each method.
>
> Adam..
>
> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Fruhling
> Sent: Thursday, August 14, 2008 12:20 PM
> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
> Subject: [ADVANCED-DOTNET] Problem with SOAPAction HTTP Header
>
> I'm dealing with a piece of legacy software that does automated HTTP
> Posts for Customer Integrations.  I've looked through the source code
> and found that it has no mechanism for adding the "SOAPAction" Http
> Header.  I was wondering if anyone knows if this Header can somehow be
> passed through the URL instead.
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at
http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentorR  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to