aspose file tools*
The moose likes Web Services and the fly likes how to consume secured axis2 service in .NET Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to consume secured axis2 service in .NET" Watch "how to consume secured axis2 service in .NET" New topic
Author

how to consume secured axis2 service in .NET

ashok ballu
Ranch Hand

Joined: Sep 17, 2007
Posts: 30
Hi! I run the sample axis web service application(implemeted using WS-Security authentication mechanisim) which is given under this link(http://www.javaranch.com/journal/200709/web-services-authentication-axis2.html).

It is running in JAVA fine. We need to access this secured web service in .net.

could you please help me...........


ASHOK BALLU SCJP1.5 SCWCD1.5
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
You can choose between the following approaches, as far as I know:
1) A command line tool called svcutil.
2) In VisualStudio 2008, go to the Project menu and locate the Add Service Reference menu item.

Both the above alternatives work with WSIT web services developed in Java (Metro web service stack), but I don't know if it works with Axis 2.
Best wishes!
ashok ballu
Ranch Hand

Joined: Sep 17, 2007
Posts: 30

HI , Thank you for your reply. I am able to consuming normal JAVA web service(which is not using any authentication mechanism) in .NET application.

But I am not able to consuming JAVA AXIS2 WEB SERVICE which is implemented using authentication in .net, it is giving error that "required security header is not in the request"

Please any link or procedure to consume axis2 web service in .Net
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Sorry, I don't know anything about Axis. Perhaps someone else has some experience to share or you may also want to contemplate switching web service stack: https://wsit.dev.java.net/
Best wishes!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42610
    
  65
This looks like an issue with the client, so switching to a different server stack (like WSIT) won't do much good.

I'd start by using a tool like SOAPUI or tcpmon to examine what does get sent to the service. Does the SOAP include the same (or functionally equivalent) WS-Security information as the one sent by the Java client? That should provide a starting point for further investigation.


Ping & DNS - my free Android networking tools app
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
My thought was that if you switch to Metro, for the client, you get:
- Tooling support in NetBeans which simplifies development.
- A web service stack that has been tested to be compatible with .NET web services.

Of course, you can hand-tweek the client requests, as mr Dittmer suggests, but I'd rather learn something that I can use and rely on in the future.
My 5 cents.
ashok ballu
Ranch Hand

Joined: Sep 17, 2007
Posts: 30
Thank you for your reply.

Ya, I have some idea about SOAPUI tool, I am using this tool with netbeans to analyse how the soap request and soap response 'es are coming through SOAPUI request feature.

I am able to view the soap request and responses of a simple webservice with out implementing security.

For my axis2 secured web service secured through rampart, I am getting the response using SOAPUI tool through request option is:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Receiver</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">WSDoAllReceiver: Incoming message does not contain required Security header</soapenv:Text>
</soapenv:Reason>
<soapenvetail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>


I have 2 questions:
1.How to use this tool to work properly with secured webservice
2.using this tool how can we track the .net clients soap request and our JAVA service response.
ashok ballu
Ranch Hand

Joined: Sep 17, 2007
Posts: 30
Thank you for your reply.

But requirement is to use Axis2 webservice. Help me with any sample code or procedure to implement client in .net to access JAVA axis2 web sevice which is secured through rampart.
 
 
subject: how to consume secured axis2 service in .NET