473,804 Members | 4,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Axis / WSS4J / Interop

Hello,

Anyone succeed to make work a .Net WebService client WSE
with WSS4J (I always get the error message 'Signature Verification
failed') ?

On the server my WSDD config is:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="htt p://xml.apache.org/axis/wsdd/providers/java">
<globalConfigur ation>
<parameter name="enableNam espacePrefixOpt imization" value="false" />
<parameter name="disablePr ettyXML" value="true"/>
<requestFlow>
<handler type="java:org. apache.ws.axis. security.WSDoAl lReceiver">
<parameter name="passwordC allbackClass"
value="com.hp.o v.temip.ws.hand ler.PWCallback"/>
<parameter name="action" value="Username TokenSignature UsernameToken Encrypt
Timestamp"/>
<parameter name="decryptio nPropFile" value="security .properties" />
</handler>
</requestFlow>
</globalConfigura tion>
</deployment>

On client's side, I developped with WSE 3.0 Policy framework
The following SecureMessage overriden function:

public override void SecureMessage(S oapEnvelope envelope, Security security)
{
//Must Understand Headers
security.MustUn derstand = true;
security.Timest amp.TtlInSecond s = 60;

//User Name Token
UsernameToken userToken = new UsernameToken(m _strUsername, m_strPassword,
PasswordOption. SendPlainText);
security.Tokens .Add(userToken) ;

X509SecurityTok en token = null;
try
{
token = GetSecurityToke n("CN=10.67.212 .35");
}
catch (Exception ex)
{
throw new Exception("Cert ificate not found : " + ex.Message);
}

//Define a custom X509 token
ISecurityTokenM anager stm =
SecurityTokenMa nager.GetSecuri tyTokenManagerB yTokenType(WSTr ust.TokenTypes. X509v3);
X509SecurityTok enManager x509tm = stm as X509SecurityTok enManager;
x509tm.DefaultK eyAlgorithm = "RSA15";
x509tm.DefaultS essionKeyAlgori thm = "TripleDES" ;

//security.Elemen ts.Add(new EncryptedData(t oken)); //De-comment this line
will encrypt the Body
// Add the token to the SOAP header.
security.Tokens .Add(token); //Insert the token being used into header

//Add Message Signature
MessageSignatur e sig = new MessageSignatur e(userToken);
sig.SignatureOp tions = SignatureOption s.IncludeSoapBo dy;
security.Elemen ts.Add(sig);

//Insert the encrypted UsernameToken
security.Elemen ts.Add(new EncryptedData(t oken, "#" + userToken.Id));
}

Into TOMCAT logs, I can notice that WSS4J is able to:
- retrieve my certificate with its public key
- Decrypt the UserNameToken
But the signature verification fails, some say that it could be due
to a pretty-print component that alters the SOAP message after
the signature, if so, how to deactivate such pretty-printer ?

_______________ ___
Benjamin BALET
http://bbalet.free.fr/
Feb 24 '06 #1
0 1491

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

Similar topics

3
2708
by: Jacky Zhu | last post by:
Hi all, I am having a problem trying to consume a webservice that is developed on ..Net. I can access it without any problem using a .net client, but when I use a java client (based on Axis 1.1), some methods work, some don't. The error message I got is "org.apache.axis.types.URI$MalformedURIException: No scheme found in URI..."
3
9797
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the response. As a result of seraching news groups I guessed that the SOAP response defines an array element in a way that causes the dotnet deserialization routines to put the content in a generic object array (object) BUT the content is supposed to...
7
4092
by: Danny Tuppeny | last post by:
Hi All, I've been going through Google Groups, but nothing seems to quite match my problem. It's hard to post a WSDL or anything at the moment (it's not my service, I'm just using it), but maybe someone will be able to make suggestions anyway. I'm using .NET, the server is using Axis. The web method I'm calling returns a simple complex type with two properties - a string and an int. In the soap envelope, these are set to values fine,...
3
2518
by: Lilly | last post by:
I was testing a very simple web services written in Axis (1.2RC2) with just a single method, returning a string "test". The method doesn't need any parameters. when I tested it using .Net client, it returns null. Could anyone please tell me what could ne wrong? I've beening fighting this problem for days now, but still no luck.. Could anyone tell me what could be wrong? Where can I find sample code for Axis/.Net combination? Thanks.
7
8901
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method which returns an object with the following characteristics: public class MMPerson { public string firstName; public string surname; public int age; public MMAddress address;
4
12312
by: Lucvdv | last post by:
I have to connect to a server set up by the government, where they used Apache Axis to create a webservice. The code I use to interface to the webservice is generated by wsdl.exe, based on a .wsdl file they sent me. Now a problem turns up with a date field they implemented as xsd:dateTime, even though it only contains a date.
1
6610
by: bbalet.free.fr | last post by:
Hello, Anyone succeed to make work a .Net WebService client WSE with WSS4J (I always get the error message 'Signature Verification failed') ? On the server my WSDD config is: <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration>
5
4164
by: vthakur | last post by:
Hello: I have a Axis Web Service that sets the sessionid in the SOAP header for persisting the session. The client is a .Net client that processes the header as an Unknown Header. It sets the session id received from the Service request on subsequent requests to the service. However the Axis Web service does not process the SOAP header received from the .Net client and creates a new session id for each request from the .Net client. Below...
0
2232
by: cjharrelson | last post by:
I am trying to consume a .NET web service using UsernameToken plain text password authentication. Here is my .wsdd configuration file: <!-- Using the WSDoAllSender security handler in request flow --> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
2
3779
by: smith.mariya | last post by:
hi, i am mariya. i am working on vb.net. i have created the powerpoint addin. i have inserted the chart on the slide through vb.net code. now, i want to remove the gridlines on the chart and want to remove the y axis. i am not able to get the exact object and properties of the axis . can u plz tell me, what should i do? the code is as, Private oChart As Microsoft.Office.Interop.Graph.Chart Private oaxis As...
0
10332
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10077
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9150
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.