Topic
  • 5 replies
  • Latest Post - ‏2013-04-19T20:04:50Z by hclewelad
hclewelad
hclewelad
24 Posts

Pinned topic MPG with dynamic backend from URIs

‏2013-04-19T16:00:28Z |

This should be a a simple thing, but for some reason my lack of exprience is making this harder than I expected.

I basically just need to route a service based on the URI parameters: something like

http://my.url.net/test.jsf?OpenAgent&id=THIS

I am having two problems, one is the simple match and the other is no matter what settings I have ( even a match
all style rule ) I still get the "Dynamic backend host not specified" error.

I set my MPG Gateway Policy to match anything and have tried both transforms and routes to get the policy to redirect
and I keep getting the host noet specified error.

I got this working with the SOAP and Xpath, but the Route rule with Use Variable or Use Stylesheet doesn't keeps
giving me the same error.

There has to be some simple fundamental I am missing here.

Thanks,

dale

Updated on 2013-04-19T16:03:49Z at 2013-04-19T16:03:49Z by hclewelad
  • hclewelad
    hclewelad
    24 Posts

    Re: MPG with dynamic backend from URIs

    ‏2013-04-19T17:54:25Z  

    Here are the debug messages:

    mpgw (MPG_TEST): Response Finished: memory used 60748
    mpgw (MPG_TEST): No match from processing policy 'MPG_Dynamic' for code '0x01130009'
    mpgw (MPG_TEST): Dynamic backend host not specified
    mpgw (MPG_TEST): No backside route was selected
    mpgw (MPG_TEST): The one way exchange pattern will bypass the execution of the selected request rule
    mpgw (MPG_TEST): Request Started: memory used 56996

     

  • kenhygh
    kenhygh
    1569 Posts

    Re: MPG with dynamic backend from URIs

    ‏2013-04-19T18:00:23Z  
    • hclewelad
    • ‏2013-04-19T17:54:25Z

    Here are the debug messages:

    mpgw (MPG_TEST): Response Finished: memory used 60748
    mpgw (MPG_TEST): No match from processing policy 'MPG_Dynamic' for code '0x01130009'
    mpgw (MPG_TEST): Dynamic backend host not specified
    mpgw (MPG_TEST): No backside route was selected
    mpgw (MPG_TEST): The one way exchange pattern will bypass the execution of the selected request rule
    mpgw (MPG_TEST): Request Started: memory used 56996

     

    What's your rule look like? how are you trying to set the destination?

  • hclewelad
    hclewelad
    24 Posts

    Re: MPG with dynamic backend from URIs

    ‏2013-04-19T18:13:26Z  

    Public humiliation is the best fix to any problem.

    The error, and reason none of my rules were matching was the Request Type
    and Response type were not set properly.

    I had the request type set to Pass-Thru which seems to make it ignore Policy Rules.
    The proper setting is to use Non-XML as the Request Type.

    The Response type can be set to Pass-Thru in this case since the results will  not
    be processed.

    Beginners Luck. Any pointers on this scenario will still be much appreciated.

    Thanks,

    dale

  • DShute
    DShute
    2 Posts

    Re: MPG with dynamic backend from URIs

    ‏2013-04-19T19:34:54Z  
    • hclewelad
    • ‏2013-04-19T18:13:26Z

    Public humiliation is the best fix to any problem.

    The error, and reason none of my rules were matching was the Request Type
    and Response type were not set properly.

    I had the request type set to Pass-Thru which seems to make it ignore Policy Rules.
    The proper setting is to use Non-XML as the Request Type.

    The Response type can be set to Pass-Thru in this case since the results will  not
    be processed.

    Beginners Luck. Any pointers on this scenario will still be much appreciated.

    Thanks,

    dale

    Now that the rule matches, kenhygh's question applies: How are you planning to use the URI query strings? 

    You have two ways to get at them: use a Convert-HTTP action to turn them into XML, which you can then use a Route action to match destination to query string; or you can write a stylesheet that parses out the string and sets the destinations.  the first method requires much less knowledge of XML and XSLT.

  • hclewelad
    hclewelad
    24 Posts

    Re: MPG with dynamic backend from URIs

    ‏2013-04-19T20:04:50Z  

    The good thing about this is I can "Use Variable to Select Destination" since the only part of the URI
    that matters is the part I am using for the route check. A simple Route ( using Variable ).

    http://my.url.net/test.jsf?OpenAgent&id=THIS 

    goes to a different destination with a static URI than

    http://my.url.net/test.jsf?OpenAgent&id=THAT

    This is a pretty trivial example, but it wasn't clear in any resources I could find on how to do this.

    The next step is

    http://my.url.net/test.jsf?OpenAgent&id=ALL

    That merges THIS and THAT which I am sure is going to be complicated.

    I appreciate your help and I see how the convert-HTTP to SOAP would be useful in the future.

    dale