This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to consume secured axis2 service in .NET

 
ashok ballu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...........
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic