469,900 Members | 1,698 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,900 developers. It's quick & easy.

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 3373
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Thomas S. Trias | last post: by
1 post views Thread by Joseph Geretz | last post: by
2 posts views Thread by DBC User | last post: by
reply views Thread by Mike Schilling | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.