Groups | Blog | Home
all groups > dotnet web services enhancements > november 2007 >

dotnet web services enhancements : Calling Java Web Service with Security


BigJohn
11/14/2007 7:36:08 AM
From a VB.Net COM using VS2005, I need to call a Java web service with
ID/password. I currently am successfully calling the service but am
rejecting because the security object is not available in SOAP.

A preliminary scan showed the direction of SOAP Toolkit 3.0 which was
unsupported April 2005, but I am not quick to use unsupported interfaces.

I am trying to use WSE 3.0, but cannot find a way to send the security object.

I assume I need to send a Username Token.

BigJohn
11/14/2007 8:44:00 AM
For more clarification, Java service is running on WebLogic 8.1.

I read through the Interoperbility page and it references WSE3 with WebLogic
10 but I was unable to find samples of userName tokens. The other WSE2
discussions reference methods not available to my application
(wsJava.Security.Tokens.Add).

BigJohn
11/14/2007 12:38:12 PM
After a full day of wasted investigation, here are a few more items which may
be of interest:

Exact error: "WSDoAllReceiver: Request does not contain required Security
header"

I did run the wsdl through wsdl.exe. I do have WSE 3.0 installed and
configured. I do not see my normal UsernameToken methods available (e.g.
SetProxy, SetClientCredentials).

I may need to add a security item to the SOAP header, but I thought WSE
would do that for me.

stcheng@online.microsoft.com
11/15/2007 3:58:11 AM
Hi BigJohn,

Yes, WSE 3.0 provide many existing implementation of webservice WS-*
security specification, however, I think you should first verify what's the
security authentication rules your JAVA webservice uses and then consider
how to configure the ASP.NET or WSE secured .NET client to communicate with
it.

As you mentioned Usernametoken, can you ensure that the JAVA webservice is
demanding a usernametoken? BTW, after you installed WSE 3.0 for VS 2005, in
the project, you can select the project node in "solution explorer" and
choose "WSE Settings 3.0..." item in context menu, after that, in the popup
WSE setting dialog, check the "Eable this project for WSE " option in
"General" tab. Thus, when you use "Add Web Reference" to add the webservice
proxy, it will generate two proxy class, one is the standard one, and the
other is the WSE specifcy one(with "Wse" suffix in its class name).

For detailed info on the security assertions of WSE 3.0, you can refer to
the WSE local document or the following web reference:

#What's New in Web Services Enhancements (WSE) 3.0
http://msdn2.microsoft.com/en-us/library/ms977317.aspx

#Turnkey Security Assertions
http://msdn2.microsoft.com/en-us/library/aa528756.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.






--------------------
From: =?Utf-8?B?QmlnSm9obg==?= <bigjohn@newsgroup.nospam>
References: <0A60C439-4D54-48AC-AFA3-53017AF35D85@microsoft.com>
Subject: RE: Calling Java Web Service with Security
Date: Wed, 14 Nov 2007 12:38:12 -0800

After a full day of wasted investigation, here are a few more items which
may
be of interest:

Exact error: "WSDoAllReceiver: Request does not contain required Security
header"

I did run the wsdl through wsdl.exe. I do have WSE 3.0 installed and
configured. I do not see my normal UsernameToken methods available (e.g.
SetProxy, SetClientCredentials).

I may need to add a security item to the SOAP header, but I thought WSE
would do that for me.

BigJohn
11/15/2007 4:48:00 AM
Thank you for the response.

I added the web reference, then applied WSE, so I don't get the ...WSE
service which is probably my problem. I tried adding the web reference a
second time and the server is throwing an error. I tried using wsdl.exe
against the vendor provided wsdl file and it threw an error.

I am beginning to feel the wsdl has problems which need to get corrected
before I can move on.

I have used WSE3.0 on ASP for a brief period, but this is the first time I
stcheng@online.microsoft.com
11/19/2007 4:01:04 AM
Hi BigJohn,

Thanks for your reply.

So when you try adding webreference against a external webservice in VS
2005 client project(with WSE 3.0 enabled), you can not find the Wse
specific generated proxy? Have you tried "Add WebReference" against a
simple local webservice to see whether it can producted both standard and
WSE specific proxy?

Also, for commandline approach, you need to use the "WseWsdl3.exe" tool in
the WSE install folder:


"C:\Program Files\Microsoft WSE\v3.0\Tools"

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: =?Utf-8?B?QmlnSm9obg==?= <bigjohn@newsgroup.nospam>
Subject: RE: Calling Java Web Service with Security
Date: Thu, 15 Nov 2007 04:48:00 -0800

Thank you for the response.

I added the web reference, then applied WSE, so I don't get the ...WSE
service which is probably my problem. I tried adding the web reference a
second time and the server is throwing an error. I tried using wsdl.exe
against the vendor provided wsdl file and it threw an error.

I am beginning to feel the wsdl has problems which need to get corrected
before I can move on.

I have used WSE3.0 on ASP for a brief period, but this is the first time I
BigJohn
11/19/2007 7:10:01 AM
thank you. I now have a policy which I can use. doesn't provide a
UserNameToken object usage, but I found the vendor doesn't allow for it. The
AddThis Social Bookmark Button