473,385 Members | 1,655 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,385 software developers and data experts.

PAT, SoapActor and WebServicesClientProtocol

Here's a brief overview of the architecture we have in place:
WSE 2.0 SP2
Web Service on http://localmachine:8080/Service.asmx
PAT Firewall with HTTP fixup at externaladdr 80 => localmachine 8080
Proxy inherited from Microsoft.Web.Services2.WebServicesClientProtocol (also
behind another PAT firewall,but that shouldn't matter)
Automatically Issued SCT, the request / response for which are signed and
encrypted so as to firmly establish the identity of the client and service.

Online research led me to using the SoapActor attribute on the web service.
However, indications were that I would also need to use an EndpointReference
as my Destination, with the SoapActor specified as the Address and the
actual transport URL as the Via. When I setup the Destination = new
EndpointReference(new Uri("urn:test"), new
Uri("http://target/service.asmx")), I get the following error attempting to
connect:

WSE808: The following transport scheme is not supported: urn.

The Url property is "urn:test"! Correct me if I'm wrong, but I thought the
transport information would be copied from the Via portion of the endpoint!
Just to be thorough, I switched the order in the constructor and got the
following. As I expected, I get the following error trying to create the
EndpointReference:

WSE635: An Invalid Transport Address is specified.

I also tried setting the SoapActor to be the external URL and just using the
Url property on the proxy, but I continued to get WSE816 errors, even though
the SoapActor and wsa:To now matched.

Help!

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/

Nov 23 '05 #1
5 3477
Have you tried setting the Via in Addressing headers the with the actual
address?

Thomas S. Trias wrote:
Here's a brief overview of the architecture we have in place:
WSE 2.0 SP2
Web Service on http://localmachine:8080/Service.asmx
PAT Firewall with HTTP fixup at externaladdr 80 => localmachine 8080
Proxy inherited from Microsoft.Web.Services2.WebServicesClientProtocol (also
behind another PAT firewall,but that shouldn't matter)
Automatically Issued SCT, the request / response for which are signed and
encrypted so as to firmly establish the identity of the client and service.

Online research led me to using the SoapActor attribute on the web service.
However, indications were that I would also need to use an EndpointReference
as my Destination, with the SoapActor specified as the Address and the
actual transport URL as the Via. When I setup the Destination = new
EndpointReference(new Uri("urn:test"), new
Uri("http://target/service.asmx")), I get the following error attempting to
connect:

WSE808: The following transport scheme is not supported: urn.

The Url property is "urn:test"! Correct me if I'm wrong, but I thought the
transport information would be copied from the Via portion of the endpoint!
Just to be thorough, I switched the order in the constructor and got the
following. As I expected, I get the following error trying to create the
EndpointReference:

WSE635: An Invalid Transport Address is specified.

I also tried setting the SoapActor to be the external URL and just using the
Url property on the proxy, but I continued to get WSE816 errors, even though
the SoapActor and wsa:To now matched.

Help!

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Nov 23 '05 #2
I tried setting the Via to the externally visible address through

..Destination = New EndpointReference(New Uri(strSoapActorRef), New
Uri(strExternalUrl))

Should I be setting the Via to the internal address? If so,then I must be
REALLY confused about the Via semantics...

Here's the result of the various permutations with the external and internal
addresses:

Dim uriInternal As Uri = New Uri("http://target:8080/MyService.asmx")
Dim uriExternal As Uri = New Uri("http://target/MyService.asmx")

MyBase.Destination = New EndpointReference(uriInternal, uriExternal)
' MyBase.Url = uriInternal
' Connectivity fails

MyBase.Destination = New EndpointReference(uriExternal, uriInternal)
' MyBase.Url = uriExternal
' WSE816

MyBase.Destination = New EndpointReference(uriInternal, uriInternal)
' MyBase.Url = uriInternal
' Connectivity fails

MyBase.Destination = New EndpointReference(uriExternal, uriExternal)
' MyBase.Url = uriExternal
' WSE816

Base Class is Microsoft.Web.Services2.WebServicesClientProtocol. Is there a
bug in the Destination property for this class? When I set the Destination
to uriInternal, uriExternal, shouldn't the Url property be the EXTERNAL (Via)
reference?

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/

"Dilip Krishnan" wrote:
Have you tried setting the Via in Addressing headers the with the actual
address?

Thomas S. Trias wrote:
Here's a brief overview of the architecture we have in place:
WSE 2.0 SP2
Web Service on http://localmachine:8080/Service.asmx
PAT Firewall with HTTP fixup at externaladdr 80 => localmachine 8080
Proxy inherited from Microsoft.Web.Services2.WebServicesClientProtocol (also
behind another PAT firewall,but that shouldn't matter)
Automatically Issued SCT, the request / response for which are signed and
encrypted so as to firmly establish the identity of the client and service.

Online research led me to using the SoapActor attribute on the web service.
However, indications were that I would also need to use an EndpointReference
as my Destination, with the SoapActor specified as the Address and the
actual transport URL as the Via. When I setup the Destination = new
EndpointReference(new Uri("urn:test"), new
Uri("http://target/service.asmx")), I get the following error attempting to
connect:

WSE808: The following transport scheme is not supported: urn.

The Url property is "urn:test"! Correct me if I'm wrong, but I thought the
transport information would be copied from the Via portion of the endpoint!
Just to be thorough, I switched the order in the constructor and got the
following. As I expected, I get the following error trying to create the
EndpointReference:

WSE635: An Invalid Transport Address is specified.

I also tried setting the SoapActor to be the external URL and just using the
Url property on the proxy, but I continued to get WSE816 errors, even though
the SoapActor and wsa:To now matched.

Help!

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

Nov 23 '05 #3
Hello Thomas,
I think the semantics may be confusing. This [0] might be helpful

[0] - http://www.dynamic-cast.com/mt-archi...ddressing.html
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
I tried setting the Via to the externally visible address through

.Destination = New EndpointReference(New Uri(strSoapActorRef), New
Uri(strExternalUrl))

Should I be setting the Via to the internal address? If so,then I
must be REALLY confused about the Via semantics...

Here's the result of the various permutations with the external and
internal addresses:

Dim uriInternal As Uri = New Uri("http://target:8080/MyService.asmx")
Dim uriExternal As Uri = New Uri("http://target/MyService.asmx")

MyBase.Destination = New EndpointReference(uriInternal, uriExternal)
' MyBase.Url = uriInternal
' Connectivity fails
MyBase.Destination = New EndpointReference(uriExternal, uriInternal)
' MyBase.Url = uriExternal
' WSE816
MyBase.Destination = New EndpointReference(uriInternal, uriInternal)
' MyBase.Url = uriInternal
' Connectivity fails
MyBase.Destination = New EndpointReference(uriExternal, uriExternal)
' MyBase.Url = uriExternal
' WSE816
Base Class is Microsoft.Web.Services2.WebServicesClientProtocol. Is
there a bug in the Destination property for this class? When I set
the Destination to uriInternal, uriExternal, shouldn't the Url
property be the EXTERNAL (Via) reference?

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/
"Dilip Krishnan" wrote:
Have you tried setting the Via in Addressing headers the with the
actual address?

Thomas S. Trias wrote:
Here's a brief overview of the architecture we have in place:
WSE 2.0 SP2
Web Service on http://localmachine:8080/Service.asmx
PAT Firewall with HTTP fixup at externaladdr 80 => localmachine 8080
Proxy inherited from
Microsoft.Web.Services2.WebServicesClientProtocol (also
behind another PAT firewall,but that shouldn't matter)
Automatically Issued SCT, the request / response for which are
signed and
encrypted so as to firmly establish the identity of the client and
service.
Online research led me to using the SoapActor attribute on the web
service. However, indications were that I would also need to use an
EndpointReference as my Destination, with the SoapActor specified as
the Address and the actual transport URL as the Via. When I setup
the Destination = new EndpointReference(new Uri("urn:test"), new
Uri("http://target/service.asmx")), I get the following error
attempting to connect:

WSE808: The following transport scheme is not supported: urn.

The Url property is "urn:test"! Correct me if I'm wrong, but I
thought the transport information would be copied from the Via
portion of the endpoint! Just to be thorough, I switched the order
in the constructor and got the following. As I expected, I get the
following error trying to create the EndpointReference:

WSE635: An Invalid Transport Address is specified.

I also tried setting the SoapActor to be the external URL and just
using the Url property on the proxy, but I continued to get WSE816
errors, even though the SoapActor and wsa:To now matched.

Help!

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/

--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com


Nov 23 '05 #4
I've read through Hervey's blog entry on EndpointReference.Via. Here's an
entry that seems pretty unequivocal regarding semantics:

-----------------------------------
* urn:MyService
* soap.tcp://mycomputer/MyService

The first URI becomes the EndpointReference.Address, the second
EndpointReference.Via
-----------------------------------

Since the first URI doesn't specify an actual transport, the Via MUST be the
specifier for the ACTUAL network location to which the proxy will connect.

Out of desperation, I gave up on using the EnpointReference constructor and
set the Via explicitly:

Private Shared Function DumpAddr(ByVal oAddr As Address) As String
If oAddr Is Nothing Then
Return "Addr = NOTHING"
Else
Return "Addr = " & oAddr.Value.ToString()
End If
End Function

Private Shared Function DumpAddr(ByVal oAddr As Via) As String
If oAddr Is Nothing Then
Return "Via = NOTHING"
Else
Return "Via = " & oAddr.Value.ToString()
End If
End Function

Public Sub New()
MyBase.New()

Dim uriInternal As Uri = New Uri("http://target:8080/MyService.asmx")
Dim uriExternal As Uri = New Uri("http://target/MyService.asmx")

MyBase.Url = uriInternal.ToString()
MyBase.Destination.Via = New Via(uriExternal)
MsgBox("URL = " & MyBase.Url & ", " & DumpAddr(MyBase.Destination.Address)
& ", " & DumpAddr(MyBase.Destination.Via))
End Sub

The message box reports:

URL = http://target:8080/MyService.asmx, Addr =
http://target:8080/MyService.asmx, Via = http://target/MyService.asmx

All looks as it should?!? But the actual connection attempt is made to
target:8080 (NOT REACHABLE) and NOT target:80 as specified by the Via? Maybe
WebServicesClientProtocol uses URL above all else? Fine, here's another try:

MyBase.Url = uriExternal.ToString()
MyBase.Destination.Address = New Address(uriInternal)
MyBase.Destination.Via = New Via(uriExternal)
MsgBox("URL = " & MyBase.Url & ", " &
DumpAddr(MyBase.Destination.Address) & ", " &
DumpAddr(MyBase.Destination.Via))

The message box reports:

URL = http://target:8080/MyService.asmx, Addr =
http://target:8080/MyService.asmx, Via = http://target/MyService.asmx

Darn, setting the Address property overwrote the Url property! Connection
failed!

Okay, how about this:

MyBase.Url = uriExternal.ToString()
MyBase.Destination.Address = New Address(uriInternal)
MyBase.Url = uriExternal.ToString()
MyBase.Destination.Via = New Via(uriExternal)
MsgBox("URL = " & MyBase.Url & ", " &
DumpAddr(MyBase.Destination.Address) & ", " &
DumpAddr(MyBase.Destination.Via))

The message box reports:

URL = http://target/MyService.asmx, Addr = http://target/MyService.asmx, Via
= http://target/MyService.asmx

Darn, setting the Url property overwrote the Address property! WSE816!

THERE IS NO WAY TO GET THE URL TO BE THE CORRECT TRANSPORT WITHOUT
DESTROYING THE "TO" HEADER IN THE DESTINATION ADDRESS! THIS IS A BUG IN
Microsoft.Web.Services2.WebServicesClientProtocol!

So, what are my alternatives?

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/

"Dilip Krishnan" wrote:
Hello Thomas,
I think the semantics may be confusing. This [0] might be helpful

[0] - http://www.dynamic-cast.com/mt-archi...ddressing.html
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
I tried setting the Via to the externally visible address through

.Destination = New EndpointReference(New Uri(strSoapActorRef), New
Uri(strExternalUrl))

Should I be setting the Via to the internal address? If so,then I
must be REALLY confused about the Via semantics...

Here's the result of the various permutations with the external and
internal addresses:

Dim uriInternal As Uri = New Uri("http://target:8080/MyService.asmx")
Dim uriExternal As Uri = New Uri("http://target/MyService.asmx")

MyBase.Destination = New EndpointReference(uriInternal, uriExternal)
' MyBase.Url = uriInternal
' Connectivity fails
MyBase.Destination = New EndpointReference(uriExternal, uriInternal)
' MyBase.Url = uriExternal
' WSE816
MyBase.Destination = New EndpointReference(uriInternal, uriInternal)
' MyBase.Url = uriInternal
' Connectivity fails
MyBase.Destination = New EndpointReference(uriExternal, uriExternal)
' MyBase.Url = uriExternal
' WSE816
Base Class is Microsoft.Web.Services2.WebServicesClientProtocol. Is
there a bug in the Destination property for this class? When I set
the Destination to uriInternal, uriExternal, shouldn't the Url
property be the EXTERNAL (Via) reference?

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/


Nov 23 '05 #5
Hello Thomas,
You would need to set the Via in the request soap context. NOT in the
Destination

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
I've read through Hervey's blog entry on EndpointReference.Via.
Here's an entry that seems pretty unequivocal regarding semantics:

-----------------------------------
* urn:MyService
* soap.tcp://mycomputer/MyService
The first URI becomes the EndpointReference.Address, the second
EndpointReference.Via
-----------------------------------
Since the first URI doesn't specify an actual transport, the Via MUST
be the specifier for the ACTUAL network location to which the proxy
will connect.

Out of desperation, I gave up on using the EnpointReference
constructor and set the Via explicitly:

Private Shared Function DumpAddr(ByVal oAddr As Address) As String
If oAddr Is Nothing Then
Return "Addr = NOTHING"
Else
Return "Addr = " & oAddr.Value.ToString()
End If
End Function
Private Shared Function DumpAddr(ByVal oAddr As Via) As String
If oAddr Is Nothing Then
Return "Via = NOTHING"
Else
Return "Via = " & oAddr.Value.ToString()
End If
End Function
Public Sub New()
MyBase.New()
Dim uriInternal As Uri = New
Uri("http://target:8080/MyService.asmx")
Dim uriExternal As Uri = New Uri("http://target/MyService.asmx")
MyBase.Url = uriInternal.ToString()
MyBase.Destination.Via = New Via(uriExternal)
MsgBox("URL = " & MyBase.Url & ", " &
DumpAddr(MyBase.Destination.Address)
& ", " & DumpAddr(MyBase.Destination.Via))
End Sub

The message box reports:

URL = http://target:8080/MyService.asmx, Addr =
http://target:8080/MyService.asmx, Via = http://target/MyService.asmx

All looks as it should?!? But the actual connection attempt is made
to target:8080 (NOT REACHABLE) and NOT target:80 as specified by the
Via? Maybe WebServicesClientProtocol uses URL above all else? Fine,
here's another try:

MyBase.Url = uriExternal.ToString()
MyBase.Destination.Address = New Address(uriInternal)
MyBase.Destination.Via = New Via(uriExternal)
MsgBox("URL = " & MyBase.Url & ", " &
DumpAddr(MyBase.Destination.Address) & ", " &
DumpAddr(MyBase.Destination.Via))

The message box reports:

URL = http://target:8080/MyService.asmx, Addr =
http://target:8080/MyService.asmx, Via = http://target/MyService.asmx

Darn, setting the Address property overwrote the Url property!
Connection failed!

Okay, how about this:

MyBase.Url = uriExternal.ToString()
MyBase.Destination.Address = New Address(uriInternal)
MyBase.Url = uriExternal.ToString()
MyBase.Destination.Via = New Via(uriExternal)
MsgBox("URL = " & MyBase.Url & ", " &
DumpAddr(MyBase.Destination.Address) & ", " &
DumpAddr(MyBase.Destination.Via))

The message box reports:

URL = http://target/MyService.asmx, Addr =
http://target/MyService.asmx, Via = http://target/MyService.asmx

Darn, setting the Url property overwrote the Address property! WSE816!

THERE IS NO WAY TO GET THE URL TO BE THE CORRECT TRANSPORT WITHOUT
DESTROYING THE "TO" HEADER IN THE DESTINATION ADDRESS! THIS IS A BUG
IN Microsoft.Web.Services2.WebServicesClientProtocol!

So, what are my alternatives?

Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/
"Dilip Krishnan" wrote:
Hello Thomas,
I think the semantics may be confusing. This [0] might be helpful
[0] - http://www.dynamic-cast.com/mt-archi...ddressing.html
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
I tried setting the Via to the externally visible address through

.Destination = New EndpointReference(New Uri(strSoapActorRef), New
Uri(strExternalUrl))

Should I be setting the Via to the internal address? If so,then I
must be REALLY confused about the Via semantics...

Here's the result of the various permutations with the external and
internal addresses:

Dim uriInternal As Uri = New
Uri("http://target:8080/MyService.asmx") Dim uriExternal As Uri =
New Uri("http://target/MyService.asmx")

MyBase.Destination = New EndpointReference(uriInternal, uriExternal)
' MyBase.Url = uriInternal
' Connectivity fails
MyBase.Destination = New EndpointReference(uriExternal, uriInternal)
' MyBase.Url = uriExternal
' WSE816
MyBase.Destination = New EndpointReference(uriInternal, uriInternal)
' MyBase.Url = uriInternal
' Connectivity fails
MyBase.Destination = New EndpointReference(uriExternal, uriExternal)
' MyBase.Url = uriExternal
' WSE816
Base Class is Microsoft.Web.Services2.WebServicesClientProtocol. Is
there a bug in the Destination property for this class? When I set
the Destination to uriInternal, uriExternal, shouldn't the Url
property be the EXTERNAL (Via) reference?
Thomas S. Trias
Senior Developer
Afni Insurance Services
http://www.afniinc.com/


Nov 23 '05 #6

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

Similar topics

6
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at...
4
by: Thomas S. Trias | last post by:
If you specify a Destination with both an Address and a Via, the Address is used as both the Url property (transport) AND the "To" SOAP header. The Via portion is effectively ignored, making it...
4
by: Thomas S. Trias | last post by:
Anyone know how I can set the SoapActor for the WSE SecurityContextToken issuer on my web service? I have the following setup: <tokenIssuer> <autoIssueSecurityContextToken enabled="true" />...
1
by: Tim Reynolds | last post by:
Team, From a windows service, we consume a web service on another server and occasionally receive System.Net.WebException: The underlying connection was closed:. For some clients we call, we do...
0
by: r | last post by:
Hello All, I am working on a desktop application using C#. The application connects to a remote webservice to update and retrieve data from a database. I also have a settings Tab in the...
3
by: Joseph Geretz | last post by:
System.InvalidOperationException: WebServiceBindingAttribute is required on proxy classes. My environment: Visual Studio 2005, targeting FX 2.0; I've developed a Web Service which uses DIME to...
1
by: Joseph Geretz | last post by:
I have a web service page which uses WSE 2.0 SP3 to return a file attachment on one of its method calls. All web service methods are functioning properly, except for this one method which uses WSE...
2
by: DBC User | last post by:
Hi All, I am using VS2005/wse3.0 in winform application and using web services. When I try to write a large file say about 5 to 10 MB file (large for me) I get an error something like the...
0
by: Mike Schilling | last post by:
I'm trying to access a WCF service via an intermediary that accepts and forwards the request. This works fine using the basic http binding, but using WsHttpBinding turns on WS-Addressing. Since...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.