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

howto: code soap header security?

Hi all,

I'm developing an asp.net app that connect to a webservice.
- I've installed an P7k certificate in the IIS-website configuration.

When running my code, I have following error:
System.Web.Services.Protocols.SoapHeaderException:
com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
policy [ SignaturePolicy(P) TimestampPolicy(S) ]: No Security Header found;
nested exception is com.sun.xml.wss.XWSSecurityException:
com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
policy [ SignaturePolicy(P) TimestampPolicy(S) ]: No Security Header found
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

My guess is that I need to insert a SOAP header in my code.
After googleing for 2 days, I see a lot of answers about WSE 3.0. Other
posts are saying this is not working with VS2008...

When using the SOAPUI.org app, it all works fine:
- import certificate
- in signature configuration: insert the password from certificate, key
identifier type: binary security token, single certificate: checked and the
added 2 parts: Body and Timestamp with there namespace urls and
encode=element.

Someone with a suggestion?

Thanks a lot!

my code:

Dim ws As New TESTwebservice.Service
Dim request As New TESTwebservice.bRequest
Dim response As New TESTwebservice.bResponse

Try
Dim x509cert As X509Certificate =
X509Certificate.CreateFromCertFile("c:\cert\theCer tificate.der")
ws.ClientCertificates.Add(x509cert)
ws.Url = "URL REMOVED"

response = ws.check(request)

Label1.Text = response.Items.ToString
Catch ex As Exception
Label1.Text = ex.ToString
End Try


Aug 21 '08 #1
1 5086
You should use WCF, which handles WS-Security. It replaces the older ASMX
technology that you are using, which does not support WS-Security.

--
John Saunders | MVP - Connected System Developer
Aug 22 '08 #2

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

Similar topics

8
by: Topper | last post by:
Hello. I have simple web folders structure: -ROOT - BIN WebService.dll WebService.asmx I need to use my WebService.dll not in bin folder - for example, in ROOT. How do i this? How can i do...
0
by: Softwaremaker | last post by:
Sorry for this shamless plug. I thought I share with this group a tool I just released into the wild. It is great for show-n-tell and testing http and tcp SOAP Services. It can post manual crafted...
0
by: IT Drone | last post by:
I suspect what I want to do is simple, but after hours of googling I can't come up with an answer. I'm consuming a Java-based web service from an ASP.NET app. I want a request that includes 3...
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
6
by: John | last post by:
I'm trying to call a Webservice (Non-.NET) That requires the insertion of security credentials into the SOAP header. Up until know I've been creating Dynamic proxy classes to call web services and...
0
by: =?Utf-8?B?ZWQ=?= | last post by:
I had this exact problem using a vb.net client accessing a Java web service. The solution takes 3 steps: 1.) Create custom ClientOutputFilter 2.) Create a custom Assertion that uses filter from...
0
by: dalh | last post by:
Hi all, How can I add the security header? see my error below: com.sun.xml.wss.XWSSecurityException: Message does not conform to configured policy : No Security Header found; nested exception...
0
by: sskvp | last post by:
There are millions of samples in the internet explain how to insert a multi node SOAP Header. What I mean is that there are plenty of examples in the internet show how to do the following:...
0
by: sskvp | last post by:
There are millions of samples in the internet that explains how to insert a multi node SOAP Header. What I mean is that there are plenty of examples in the internet show how to do the following:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.