473,406 Members | 2,619 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,406 software developers and data experts.

WSE 2.0 WS-Addressing problem

Hi people,
I am playing with the WSE 2.0 SP3 and am trying to get use the
ReplyTo WS-Addressing header to send a response to a different machine
than where the request came from. However, in my web service the
RequestSoapContext.Current command is returning a null.

Here is what I've got so far.

My client sends the following SOAP message:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
<soap:Header>
<wsa:MessageID>
uuid:8d471bc9-2d78-4483-bf94-65ff90df1be6
</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>
http://uop-project:13000/
</wsa:Address>
</wsa:ReplyTo>
<wsa:To>
http://192.168.0.10/WebService2/Service1.asmx
</wsa:To>
<wsa:Action>
http://tempuri.org/Add
</wsa:Action>
</soap:Header>
<soap:Body>
<Add xmlns="http://tempuri.org/">
<x>1</x><y>3</y>
</Add>
</soap:Body>
</soap:Envelope>

With the web service defined as:

[WebMethod]
public int Add(int x, int y)
{
return x + y;
}

I have used the WSE Configuration Editor on the web server to enable
the WSE in the services web.config file. IIS 6.0 is sending back the
following SOAP Response to the above request:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://tempuri.org/AddResponse</wsa:Action>
<wsa:MessageID>
uuid:84877358-b542-4d04-8ffe-9446e8c27735
</wsa:MessageID>
<wsa:RelatesTo>
uuid:8d471bc9-2d78-4483-bf94-65ff90df1be6
</wsa:RelatesTo>
<wsa:To>http://uop-project:13000/</wsa:To>
<wsse:Security>
<wsu:Timestamp
wsu:Id="Timestamp-57fd1a93-96f1-4a04-8f5f-ce19ebaf4f3c">
<wsu:Created>2005-07-26T18:43:24Z</wsu:Created>
<wsu:Expires>2005-07-26T18:48:24Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<AddResponse xmlns="http://tempuri.org/">
<AddResult>4</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>

With all the additional headers and everything this implies to me
that the WSE 2.0 SP3 is installed correctly on the web server and is
working. However, when I change the web service to the code below the
SoapContext object is null:

[WebMethod]
public int Add(int x, int y)
{
SoapContext ctxt = RequestSoapContext.Current;
return x + y;
}

I can't find much in the WSE documentation other than a sample that
gives the following reason if the SoapContext is zero:

"Either a non-SOAP request was received or the WSE is not properly
installed for the Web application hosting the XML Web service"

From what I can tell the SOAP message is valid because the Web
Service gets called and returns the correct result, and the WSE is
installed properly because I get back the appropriate SOAP headers.
Any thoughts?

I am running IIS 6.0 on Windows Advanced Server 2003 Standard
Edition which has WSE 2.0 SP3 installed.
Thanks in advance
Jimbo (different from the other Jimbo)

P.S. sorry for the cross post but the webservices group doesn't seem
very active.
Nov 17 '05 #1
1 3244
Jimbo wrote:
Hi people,
I am playing with the WSE 2.0 SP3 and am trying to get use the
ReplyTo WS-Addressing header to send a response to a different machine
than where the request came from. However, in my web service the
RequestSoapContext.Current command is returning a null.


FYI. I don't know what I've done, but today it's suddenly working :-)

Cheers
Jimbo.
Nov 17 '05 #2

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

Similar topics

1
by: Ken | last post by:
hi I have an Async WS updating my SQLserver DB 80 clients are connecting to the WS all day updating the DB I have only ONE UPDATE instruction in the WS I dont want to have conflicts with the...
2
by: SB | last post by:
Can someone please tell me Microsoft .NET's position on this WS-Notification specification that includes the pub/sub model? Is there something in the pipeline or already available as part of the...
11
by: kiln | last post by:
I am starting a project that may be suitable for vb.net, using windows forms. I want a rich client, thus win forms vs web forms. Most users will access the app data over a LAN, but some will be...
6
by: Cramezul | last post by:
I’m new to WS. I have two MS Press books in front of me : XML Web Services Step by Step and Understanding Web Services Specifications and then WSE. The prior suggests to secure WS by using IIS...
6
by: Jimmy | last post by:
Hi, I need to develop a secure Web Service that requires a username and password. One of the requirements is that the WS supports Windows Authentication, meaning accepts the username and...
0
by: Ido Flatow | last post by:
As it seems, if I define a nested class in the WS, the client that references the WS get's a generated code where the nested class is defined outside the class. I can say - "Ok, I'll play along"...
1
by: Morten71 | last post by:
I'm fairly new to web services in .net/vs. I'm wondering about a few ws things: - should I create a new ws project for every ws? - how do I best ensure that only selected consumers can use a ws?...
1
by: dburkinshaw | last post by:
I have a strange issue here. I created an exe that calls a Web Service that I also created. When I run in debug mode the WS is called and does its thing. When I run in release mode (through Visual...
4
by: mathieu | last post by:
Hi, I am having a hard time understanding how to use std::ws. I am trying to parse a simple string (*). My goal would be that 'st' contains 'Hello World'. I thought that using std::ws would...
3
by: eschneider | last post by:
Just some common issues with WS: Using custom objects: When objects change, seems you are always fixing some issue. Update references, which sometimes does not work. Deployment: Weird errors...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.