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

Action header and WSE 2.0

Hello all

I’m securing a web service using WSE 2.0. One of the potential client’s of
the web service is a Java client using Sun JWSDP 1.5. The problem is that
the java client gets the error “Server did not recognize the value of HTTP
Header SOAPAction:”, and when I look at the trace the error is:
WSE841: An error occured processing an outgoing fault response. --->
System.Web.Services.Protocols.SoapHeaderException: Header
http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate
recipient is required but not present in the message.

The soap the java client is sending has no Action header and I’m told it can
not be changed. Therefore I have been trying to tell my service that
actionheader is not required but without success.

This is a actionheader the webservice accepts:

<wsa:Action
wsu:Id="Id-29db7046-313a-4675-9bf8-6446b9463aeb">http://tempuri.org/send</wsa:Action>

What I have tried is to change the policy file

This is the default:

<!--MessagePredicate is used to require headers. This assertion should
be used along with the Integrity assertion when the presence of the signed
element is required. NOTE: this assertion does not do anything for
enforcement (send-side) policy.-->

<wsp:MessagePredicate wsp:Usage="wsp:Required"
Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">wsp:Body()
wsp:Header(wsa:To) wsp:Header(wsa:Action) wsp:Header(wsa:MessageID)
wse:Timestamp()</wsp:MessagePredicate>

Here I tried to tell the service that only body and timestamp was required

<wsp:MessagePredicate wsp:Usage="wsp:Required"
Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">wsp:Body()
wse:Timestamp()</wsp:MessagePredicate>

I have also tried to tell the web service everything was optional:

<wsp:MessagePredicate wsp:Usage="wsp:Optional"
Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part">wsp:Body()
wsp:Header(wsa:To) wsp:Header(wsa:Action) wsp:Header(wsa:MessageID)
wse:Timestamp()</wsp:MessagePredicate>

I have also tried to skip the policy file and check on the the bodyparts in
code but the error occurs before the webmethod is even invoked.

It is my understanding that WS-specifications are optional and that the way
to define which ones I want to use is via a policy file. Is that the correct
understanding? I find it difficult to find good documentation on how to use
different WS-specifications with WSE 2.0 enabled web service. Does anyone
know of good documentation on WS-security using X509 certificates for signing?

Does anyone have solution to this problem or ideas that might lead to
solution?

Regards,
- Bjarki B.

Jun 12 '06 #1
4 6956
ingibjark napsal(a):
Hello all

I’m securing a web service using WSE 2.0. One of the potential client’s of
the web service is a Java client using Sun JWSDP 1.5. The problem is that
the java client gets the error “Server did not recognize the value of HTTP
Header SOAPAction:”, and when I look at the trace the error is:
WSE841: An error occured processing an outgoing fault response. --->
System.Web.Services.Protocols.SoapHeaderException: Header
http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate
recipient is required but not present in the message.


Look at "Accessing C# Web Service using JWSDP" on
http://myjavablog.blogspot.com/2005_...g_archive.html .

Zdenek Drlik, MCAD
Jun 13 '06 #2


"Zdenek Drlik" wrote:
ingibjark napsal(a):
Hello all

I’m securing a web service using WSE 2.0. One of the potential client’s of
the web service is a Java client using Sun JWSDP 1.5. The problem is that
the java client gets the error “Server did not recognize the value of HTTP
Header SOAPAction:”, and when I look at the trace the error is:
WSE841: An error occured processing an outgoing fault response. --->
System.Web.Services.Protocols.SoapHeaderException: Header
http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate
recipient is required but not present in the message.


Look at "Accessing C# Web Service using JWSDP" on
http://myjavablog.blogspot.com/2005_...g_archive.html .

Zdenek Drlik, MCAD


Thanks Zdenek Drlik,

I will point this out to the java developers. However I would still like to
know if it is possible to have the .NET WewService not require the action
header. Can someone tell me that? This header is defined in WS-Addressing
which is to my understanding a subset of WS-Reliable Messaging, what if I
don't want to use WS-Reliable Messaging? Is that even possible?
Jun 13 '06 #3
Trying changing the java program to specify the action attributes

call.setProperty(call.SOAPACTION_USE_PROPERTY, new Boolean(true));

call.setProperty(call.SOAPACTION_URI_PROPERTY,"htt p://tempuri.org/send");

---
Posted via www.DotNetSlackers.com
Jun 21 '06 #4
Hello Kishore,

This is indeed what is suggested in Zdenek Drlik's blog. I think the Java
developers tried something else so I can't say if this worked or not. FYI I
posted this questions on a java forum as well. It can be found here:

http://forum.java.sun.com/thread.jsp...44277&tstart=0

Regards,
- Bjarki B.

"Kishore" wrote:
Trying changing the java program to specify the action attributes

call.setProperty(call.SOAPACTION_USE_PROPERTY, new Boolean(true));

call.setProperty(call.SOAPACTION_URI_PROPERTY,"htt p://tempuri.org/send");

---
Posted via www.DotNetSlackers.com

Jun 22 '06 #5

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

Similar topics

5
by: Phil Powell | last post by:
I created a page that will be doing image resizing and manipulation, which seems to work (using GD library). However, upon returning to the page where the image has been changed, I still see the...
10
by: iam247 | last post by:
Hi In my prototype asp page (with no javascript and no password validation, I have a registration form with the following action: <form name="form" method="post" action="RegDetails.asp"> ...
2
by: sheldonlg | last post by:
I have used the action= statement to send the form to a new page which can get the posted variables. I have used the header("Location: foo.php) statement after testing on the submit with isset....
0
by: Dean Hallman | last post by:
Hello, I am developing a BHO that should add a custom HTTP header on a specific domain only. Don't want the header globally, otherwise I could just add a registry key. So, on...
12
by: Jerim79 | last post by:
I have created a verification script to verify information and redirect the customer to the appropriate error page. For example: if ($FName=""){ header('Location:/verify_fname.htm'); } else{...
0
by: =?Utf-8?B?b2xkVkIzcg==?= | last post by:
I get HTTP status 400 - Bad Request when I send the following Soap envelope to a local WCF web service. If I either remove both the To and Action elements or the whole Header element, I get a good...
2
rajiv07
by: rajiv07 | last post by:
Hi to all I have a script to get geo IP which is successfully running on Linux server.but when i run this script on windows server it gives some header error #!C:/Perl/bin/perl.exe use CGI...
2
by: rythmic | last post by:
Problem: I am trying to do a header("location: $url"); call. Here is the error message: The header location call is the line 53 in the error message. Below is the code for the NewsItem...
1
by: munkee | last post by:
All, I am trying to place an image overlayed on top of another div. My knowledge of html and css is quite basic and I am currently using the script editor within access 2003 (creating a data...
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: 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...
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
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 projectplanning, coding, testing,...

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.