Interoperable Secured Web Service

Discussion in 'ASP.NET WebServices' started by Vineeth, Apr 7, 2010.

  1. Hello All,

    i have a Java SSL enabled web service. I am trying to consume the web service by using a Asp.Net(VB) Web application by simply adding the wsdl web reference of the Java web service. This doesnot seem to work..any thoughts or comments on this one. i am new to programming environment and any suggestions would be highly appreciated


    regards,
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    more details needed. what exactly is the problem?
     
  3. Hi,
    thanks for the reply and sorry for my late post...well i have a JAX-WS(Java) web service that is SSL enabled.I would like to know how i can consume this using Asp.Net client using wsdl web reference. I tried simply addeding the web reference and calling it, but it says forbiddend. I am totally new to programming enviroment. Its Asp.Net in Visual Basic..any thoughts or good links

    regards,
    Vineeth
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    I have not added any web reference to a Java service but it should work as long as the wsdl is generated.

    Forbidden error usually means some sort of problem w/ username & password
     
  5. Hi Bruce,

    thanks for the quick reponse. well as far my knowledge tells me there is no credentials that is getting passed in the Java web service. So i guess even the Client would also not require any credential passes. Any how do you have any idea on how to pass credentials from the client side. Do you have some good links that i can follow up on interoperability between Secured Java and Asp.Net in Visual basicWeb services


    regards,
    Vineeth
     
  6. ??

    Any ideas on the post yet???


    regards,
    Vineeth
     
  7. Bruce

    Bruce DiscountASP.NET Staff

    sorry man.. i don't have any useful advice to provide on this topic.
     
  8. I don't think that 'add webservice reference' transparently works from Visual Studio to Java webservice remote URLs. That was my experience when I tried this a couple of months back with VS2008 to one of our clients' Java web services on SAP and I think our problem was related to the fact that it did not seem possible to retrieve the WSDL file over the wire from a Java webservice by adding ?wsdl onto the end of the URL.

    Perhaps it was due to the way the Java WS had been created and maybe it lacked some support for automatic wsdl generation but the people we had to work with at the time on the Java/SAP side were not in the MS camp so were not very helpful when we mentioned we couldn't get this working. They were however able to directly supply a wsdl file from their side somehow (and send this to us by email) and then VS add webservice reference was able to generate the client side proxy using this. After that it worked as expected over SOAP without any issues.
     
  9. Code:
    Server Error in '/' Application.
    --------------------------------------------------------------------------------
    
    Security Requirements not met - No Security header in message 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.Web.Services.Protocols.SoapException: Security Requirements not met - No Security header in message
    
    Source Error: 
    
    
    Line 79:         <System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="http://SSL/", ResponseNamespace:="http://SSL/", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>  _
    Line 80:         Public Sub Printing()
    Line 81:             Me.Invoke("Printing", New Object(-1) {})
    Line 82:         End Sub
    Line 83:         
     
    
    Source File: C:\Users\Prakruthi\Documents\Visual Studio 2008\Projects\SSLWebServiceClient-JavaNew\SSLWebServiceClient-JavaNew\Web References\Prakruthi\Reference.vb    Line: 81 
    
    Stack Trace: 
    
    
    [SoapException: Security Requirements not met - No Security header in message]
       System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431714
       System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
       SSLWebServiceClient_JavaNew.Prakruthi.SSLWebServicesService.Printing() in C:\Users\Prakruthi\Documents\Visual Studio 2008\Projects\SSLWebServiceClient-JavaNew\SSLWebServiceClient-JavaNew\Web References\Prakruthi\Reference.vb:81
       SSLWebServiceClient_JavaNew._Default.Page_Load(Object sender, EventArgs e) in C:\Users\Prakruthi\Documents\Visual Studio 2008\Projects\SSLWebServiceClient-JavaNew\SSLWebServiceClient-JavaNew\Default.aspx.vb:7
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    
     
    
    
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 



    This is where i am stuck any ideas???
     
  10. You have managed to successfully generate a client side proxy for this web service; very good. The next questions are:
    • Is the web service managed by you or some external 3rd party?
    • If some third party, what have they advised about the security requirements for consuming this service?
    • If you have valid username/password credentials for use with this service, have you tried to specify these credentials in the Credentials property of the service client proxy? More info about this one here: http://msdn.microsoft.com/en-us/lib....webclientprotocol.credentials(v=VS.100).aspx
     
  11. Hello,

    thanks for the quick reply...well the service is not any third party..its deveoped by me in Java using NeBeans IDE 6.8 and secured using SSL. Well as far as i can see there are no crdentials attached with the web serivce. I want to know

    1) if there are any defualt credentials attached , when i create the web service.

    2) Assumig there are no credentials attchached whats the next step

    thanks for the continued support

    regards,
    Vineeth
     
  12. Java/Netbeans development is out of my area of knowledge but you can be sure that your .NET service proxy client is not sending any credentials unless you specifically write code to do so as I mentioned above. The exception you're seeing does seem to indicate that the Java WS is expecting the client side to pass credentials..but I'm afraid I don't know why.
     
  13. thnaks for the reply, appreciate if anyone can give me anymore suggestions

    regards,
     
  14. Hi,

    i am stick stuck on this problem..can anyone helpme out

    regards,
    Vineeth
     
  15. hi,

    enclosed is the latest error message that i got..any ideas on this one..i am really stuck and any help would be appreciated.

     
  16. Just a note...I for one am not ignoring you..simply have no idea.
    All the best,
    Mark
     
  17. Hi,

    well thanks for the reply...this is supposed to be one of the best forums and is ter no one who can give any insight into secured inteoperability between Java and Asp.net????
     
  18. Bruce

    Bruce DiscountASP.NET Staff

    I wish i have an answer for you but I doubt that many people have tried consuming Java service with asp.net.

    Try post it to the asp.net (http://www.asp.net) forum, you can probably get someone who has experience with this.
     
  19. Hi,
    thanks for the reply...Well i have not gt replies frm them also :(
     
  20. My take on this is that this is probably a Netbeans issue in so far as the Netbeans IDE has been used to develop a Java web service and this service appears to have some security requirements that are not being fulfilled by the .NET web service client proxy and the client calling code. Based on the information provided so far, this could also be a Java web server / application server configuration problem.

    I'm not saying that this setup will never work but I'm sure that to successfully solve this problem, it's going to require an understanding of the Java host platform and what these security requirements mean so that the client side code can fulfill these requirements.

    Unfortunately I don't think you're likely to get much quality Netbeans/Java support around here because this is largely a community of developers solidly / solely in the Microsoft camp. I think that's going to be true for forums.asp.net also.

    My suggested support channels would be:
    http://netbeans.org/kb/docs/websvc/jax-ws.html
    http://forums.netbeans.org/
     
  21. hi,

    thnks for the reply..i was doin this as a par of my college program..and the deadline is almost over..so the security part has been skipped...thank u everyone for ur valid opnions and suggestions...but i really wanna find out the answer...in case anyone finds it pleased do post it..ciao
     
  22. Hi Vineeth,

    did you find out a solution of your problem? I have exactly the same problem.

    Regards.
     

Share This Page