{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by John Wheeler · Oct 11, 2016 at 06:10 PM · 501 Views xmlvariableassignmessage

Using AssignMessage to set Form Parameters based on Variables

Can someone suggest a way for me to add a form parameter to a request in an assign message policy?

Neither of these work (XML violations)

<AssignMessage name="createChallenge">
<DisplayName>createChallenge</DisplayName>
<Properties/>
<Set>
<FormParams>
<FormParam name="">{strutsTokenName}:{strutsTokenValue</FormParam>
<FormParam name=\"{strutsTokenName}\">{strutsTokenValue}</FormParam>
......
Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
0

Answer by Dino   · Oct 11, 2016 at 06:39 PM

Looks like your XML is ok to me, as far as it goes. But I would do what you want with the Payload element.

It looks like this:

<AssignMessage name="AssigmMessage-1">
    <DisplayName>createChallenge</DisplayName>
    <Properties/>
    <Set>
        <!--
        <FormParams>
            <FormParam name="test1">{strutsTokenName}:{strutsTokenValue}</FormParam>
            <FormParam name="{strutsTokenName}">{strutsTokenValue}</FormParam>
        </FormParams>
        -->
        <Payload contentType="application/x-www-form-urlencoded"><![CDATA[
{strutsTokenName}={strutsTokenValue}&test1={strutsTokenName}:{strutsTokenValue}
]]></Payload>
    </Set>
</AssignMessage>

There's a full api proxy attached that includes this policy. it works. jwheeler-rev2-2016-10-11.zip


jwheeler-rev2-2016-10-11.zip (2.0 kB)
Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

41 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Any easy way to encode special characters in flow variables to be inserted into XML Payload? 2 Answers

REST to SOAP Build SOAP Assign Message policy Editor Namespaces Conversion Problem 2 Answers

UTF8 encoding of XSLTransform failes every second time 2 Answers

Extract Namespace using Extract variable policy 2 Answers

Unresolved Variable in JSON 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2019 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges