locked
Webservice reference problem in Workflow Service Application RRS feed

  • Question

  • I have a webservice, with one operation (just for testing) which basically doubles the inpute param. So I have an serivice-operation named 'CalculatePrice' with one integer input param named 'Amount'.

    In my workflow application, I want to use that webservice tot calculate the price. So I added a webservice reference to my project. First this didn`t work, but after adding the system.data.Entity reference it worked. After adding this reference an activity named CalculatePrice (the webservice operation) appeared in my workflow designer toolbox. So I dragged this activity into a sequence, and checked the properties. That was when I encounterd a problem, the activty has just 2 parameters, one is authentication and the other is _CalculatePrice. The _CalculatePrice param excpects an CalculatePrice type value..

    What is the problem, why don`t I have the Amount param. Or do I have to create a CalculatePrice object, and then add the CalculatePrice.Amount property or something? 

    Thanks

    Monday, May 7, 2012 11:17 AM

Answers

  • Hi,

    To use the generated activity, you'll need to create a CalculatePrice object. You should be able to initialize it by using VB expression, it looks like:

    new CalculatePrice() with {.Amount =1}

    You can also add the service reference in other project type(not WF project template), it will generate normal client proxy code. Then you can create a custom activity to accept Amount as in argument and use the client proxy code call Java webservice.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by lifesound1991 Monday, May 14, 2012 12:00 PM
    Thursday, May 10, 2012 9:01 AM

All replies

  • Hi,

    Did you call an ASP.NET Web Service from your workflow application? If this is your case, I'd suggest you create a WCF service instead of ASP.NET Web Service. With WCF service, you'll be able to see the Amount parameter in property grid. You can click the "Show All files" on top of the Solution Explorer, then open the generated xaml file under Service Reference to check the in/out argument.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, May 9, 2012 5:10 AM
  • Hi,

    Did you call an ASP.NET Web Service from your workflow application? If this is your case, I'd suggest you create a WCF service instead of ASP.NET Web Service. With WCF service, you'll be able to see the Amount parameter in property grid. You can click the "Show All files" on top of the Solution Explorer, then open the generated xaml file under Service Reference to check the in/out argument.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Hi, thanks for your answer. It is a Java webservice...

    Any other suggestions?

    Thursday, May 10, 2012 8:02 AM
  • Hi,

    To use the generated activity, you'll need to create a CalculatePrice object. You should be able to initialize it by using VB expression, it looks like:

    new CalculatePrice() with {.Amount =1}

    You can also add the service reference in other project type(not WF project template), it will generate normal client proxy code. Then you can create a custom activity to accept Amount as in argument and use the client proxy code call Java webservice.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by lifesound1991 Monday, May 14, 2012 12:00 PM
    Thursday, May 10, 2012 9:01 AM
  • Awesome, thanks!
    Monday, May 14, 2012 12:00 PM