none
Trouble with consuming a Java RPC web service using .Net client RRS feed

  • Question

  • We seem to be struggling with consuming a Java web Service that is using RPC style. The wsdl has comments in it about being generated by Apache Axis Version 1.2.1

    Using VS 2012, we are able to generate a proxy class with methods that match the operations in the WSDL.  The methods, however, are all returning void and not taking any parameters which is not what the WSDL is showing.

    We've tried using the asmx web reference option in the service refernence and that has the same results.  When we use a tool like SOAPUI, we are able to see the method parameters and return types and the call to the web service works.

    Has anyone been able to call a rpc web service from a .net client using WCF?

    Thanks,


    JT Reynolds

    Tuesday, April 9, 2013 10:30 PM

Answers

All replies

  • Hi,

    From your description, I would suggest you take a look at a thread below to check if it can help you.

    #Consuming JSON-RPC web services in .NET

    http://stackoverflow.com/questions/1061788/consuming-json-rpc-web-services-in-net

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, April 10, 2013 9:57 AM
    Moderator
  • Thanks for the reply.

    We tried to implement this but had some trouble.  Found out the service is XML-RPC.  Is there a solution that can work with XML-RPC?  We are able to get a wsdl.  Not being too familiar with JSON, we are not having any success implementing the suggestions.


    JT Reynolds

    Wednesday, April 10, 2013 4:10 PM
  • Hi,

    You may need to write/use some WCF extensions to do so:

    http://stackoverflow.com/questions/2878447/tutorial-simple-wcf-xml-rpc-client

    Allen Chen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 11, 2013 7:12 AM
    Moderator
  • Thanks guys for the responses.  Since this is the first time I've encountered consuming RPC web services, I had this all wrong.  I apologize for messing up the questions.  The web service is RPC/encoded and not XML-RPC.

    I'm looking to be able to consume a web service that is RPC encoded from a .Net 4.5 client.  The binding in the WSDL looks like this -

     <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

    I really appreciate the help and again apologize for the misinformation.

    Thanks


    JT Reynolds

    Thursday, April 11, 2013 9:29 PM
  • The solutions mentioned above didn't resolve my issue.  Is there a .net client sample I could see that consumes a RPC/Encoded web service.  Thanks.

    JT Reynolds

    Friday, April 12, 2013 1:17 PM
  • Hi,

    There should be no issue to communicate with RPC/Encoded web services via .NET client. The problem might be the service is not compatible/generates wrong WSDL. Please send me the WSDL so that I could tell you what the problem is. My email is allenc at microsoft.com


    Allen Chen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Monday, April 15, 2013 1:55 AM
    Moderator
  • Hi JTReynolds,

    Could you please post the WSDL file for analysis?

    Monday, April 15, 2013 2:29 AM
  • Hi, Thanks for the replies.  I wasn't able to respond earlier due to no internet over the weekend.  I've sent you an email this morning with the wsdl I'm struggling with.  It was too large to post here earlier.

    If I target my project to .Net 2.0 (pre WCF), I'm able to see the parameters and method responses ok when I add a web reference.  I understand this is using WSDL.exe to generate the proxy.  What I don't understand is if I choose the Add Web Reference option to generate the proxy in .Net 4, I don't see the same results at all.

    Thanks again for everyone's time on this.


    JT Reynolds

    Monday, April 15, 2013 12:09 PM
  • I need to correct my statement about the Add Web Reference option for .Net 4.0 projects.  I was looking in the wrong spot.  There is no difference so you can disregard that statement.

    I guess I was hoping we could do something with WCF but it looks like I'll have to make the call the old fashion way instead.

    Thanks


    JT Reynolds

    Monday, April 15, 2013 12:27 PM
  • Hi,

    I've reproduced this issue. Please follow the instructions provided by Zafar in below thread to resolve this issue:

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/51babae5-26e5-4405-b03c-4301710854c0/


    Allen Chen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by JTReynolds Tuesday, April 16, 2013 4:08 AM
    Tuesday, April 16, 2013 2:46 AM
    Moderator
  • Awesome, this has resolved my issue.  You rock!  Thanks so much for taking the time to help me on this.

    I went into my project and did the steps and now I can see the correct operations.  Would have been nice if this was an option on the wizard but manually changing the Reference.svcmap is a heck of a lot easier than the other options we faced.

    Thank you very much!


    JT Reynolds

    Tuesday, April 16, 2013 4:08 AM