Method Community

 

Append to Action Result

Last post 08-10-2011 11:12 AM by Method_Paul. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-05-2010 9:55 AM

    Append to Action Result

    I need to pass more than 5 parameters, which seems to be the limit, to a webservice I've written. Is there a way to append to an already assigned variable?

    To be more specific about the problem, maybe alternate solution could help--
            I have a button calling a webservice.
            The webservice needs the following info to work:
                Method Username
                Method Company
                Method Session

                WebService Username
                WebService Password
                WebService Key
                Action
                Contact(s) email address

    I've tried looking into the "Assign Value to Action Result", but of course it overwrites any old values.

    Any help would be appreciated!

    Thanks
    -Brian

  • 05-05-2010 10:06 AM In reply to

    Re: Append to Action Result

    Brian -

    Can you just put the extra info into the 5th parameter as XML, which you would simply parse on your end.

    So your 5th paramater would be:

    <ExtraInfo>

    <WebServicePassword>Pass123</WebServicePassword>

    <WebServiceKey>Key123</WebServiceKey>

    <Action>Whatever Action</Action>

    <ContactEmails>

            <EmailAddress>a@b.com</EmailAddress>

            <EmailAddress>c@d.com</EmailAddress>

            <EmailAddress>e@f.com</EmailAddress>

    </ContactEmails>

    </ExtraInfo>

  • 05-05-2010 10:19 AM In reply to

    Re: Append to Action Result

    That would be perfect.

    How could I do that? Is this a type-in value? The login information comes from textboxes on the Method screen.

  • 05-06-2010 1:41 PM In reply to

    Re: Append to Action Result

    Brian - If you are building that from Method, you'd be using Actions.  

    I would suggest making a template using Assign Value to Action result, and then using Character Functions to replace text in portions of the template with action values.

    For example:

    1. Create an action result using Assign Value To Action Result, like <ExtraInfo><WebServicePassword>EnterPassword</WebServicePassword><WebServiceKey>EnterKey</WebServiceKey></ExtraInfo>

    2. Have a Character Function that replaces EnterPassword with the real password.

    3. Have a Character Function that replaces EnterKey with the real key.

    That's just an example.  But that should give you an idea. 

    Paul

     

  • 08-10-2011 6:48 AM In reply to

    Re: Append to Action Result

    HI Paul,

    I am trying to call a webservice from Method, but I am getting 500 Internal server error.

    The webservice URL is http://sd.2xprime.com

    And giving all the five parameters. On calling the webservice I am getting Internal server error.

    When I tried to execute the webservice from the browser it is working fine.

    May I requst you to please let me know if I am missing anything..

     

    Thanks in Advance.

    Rajni Kumar

  • 08-10-2011 11:12 AM In reply to

    Re: Append to Action Result

    Rajni - 

    Check out this forum post for debugging help:

    http://www.methodintegration.com/cs/forums/t/1964.aspx

     

    Namely, Val's post on July 27th, 

    "The output we produce is basically:

    Https://www.yourwebserviceurl.com/servicewhatever.asmx?parameter1=parameter1value&parameter2=parameter2value.....

    So you should be able to type in this into a regular browser and see the response in the browser.  Doing this will help you troubleshoot."

     

    Paul

Page 1 of 1 (6 items)