I have created a really simple xml file for testing plivo:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Speak>Hello, Input your 4-digit pin number</Speak>
<GetDigits action="https://example.com/voice/plivo/renderVoiceCallDirective/wGather" method="POST">
<Speak>Enter your 4-digit pin number, followed by the hash key</Speak>
</GetDigits>
<Speak>Input not received. Thank you</Speak>
<Redirect>/voice/plivo/timeoutRedirect/xxx</Redirect>
</Response>
In theory, plivo will read the content of and gather the input digits
but it seems like the Speak and GetDigits doesn't work, because after getting this xml, plivo directly goes to the redirect url. The call will last several second and hangup. Any one know why this happens? Thanks
The XML is validated first before executing it. The URL given in "Redirect" tag is not a valid URL. So the XML fails the validation and the call hangs up.
Try using a valid URL in Redirect XML.
Related
I wrote a code as follows in JSF facelet(xhtml file)
${cookie}
If I run the xhtml file on a web app server. The below is displayed on the screen.
{JSESSIONID=javax.servlet.http.Cookie#faf91d8}
However, it seems to be the address of where the cookie instance is stored.
I want to see the value(sessionid) in the cookie.
I tried this code, but it did not work.
${cookie[value]}
I tried reading the following specifications in JCP, but I could not find the answer.
https://jcp.org/en/jsr/detail?id=372
Could you please tell me how to properly write a code to display a value in a cookie? I would appreciate your help.
As you can see from what is printed, it looks like a key-value pair and since the spec says it maps to a single cookie,
#{cookie['JSESSIONID']}
is what returns an actual single cookie. But you still need the value of it so
#{cookie['JSESSIONID'].value}
is most likely what you need
See also
http://incepttechnologies.blogspot.com/p/jsf-implicit-objects.html
https://docs.oracle.com/javase/7/docs/api/java/net/HttpCookie.html
I want to send a POST request on Google Contacts API. It works well at the moment.
But I wonder why I get a 400 Bad Request Error if I don't specify a phone number.
<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>invalid</code>
<internalReason>Phone number must not be empty</internalReason>
</error>
</errors>
If someone knows if I can bypass it ?
Notice that when you add a contact on Google Contacts, there's not this restriction.
You're getting that error because it's stated in the docs that these extension elements need to be provided a rel attribute or a label attribute:
In the Contacts Data API, several elements are slightly more
restrictive than indicated in the documentation for the Contact kind.
In particular, a client must supply either a rel attribute or a label
attribute, but not both, for the following elements:
gd:email gd:im gd:organization gd:phoneNumber gd:postalAddress
In short, you really need to provide the phone number.
I have a raw xml file on Gist:
https://gist.githubusercontent.com/EmDubeu/196d95b561fa83a4ef360654ed919fe5/raw/9e2dde8d08a2ea4e45871bf8c55693334f8a69e1/NEIPA.xml
I store the above url in a cell in my Google spreadsheet (Settings!E27).
I'm trying to use importxml from my google sheet with the following formula:
=IMPORTXML(Settings!E27, "//HOP/NAME"), but it returns "Error Imported Xml content can not be parsed."
My formula works with this url:
http://www.beerxml.com/recipes.xml
Why is it not working with my Gist hosted xml file?
GitHub is not for file-hosting and Content-Type headers is not set properly. If you type http://www.beerxml.com/recipes.xml in the browser, it will render the page as XML contents, but not for your https://gist.githubusercontent.com/EmDubeu/... since it cannot recognize it as a XML page.
In this case, people(at least, I) usually use sites like https://rawgit.com/. For your gist file, rawgit URL is https://rawgit.com/EmDubeu/196d95b561fa83a4ef360654ed919fe5/raw/fcb019a0db249ea90a9512f9162725547f4a43b5/NEIPA.xml.
But when I type this URL, my browser says it cannot parse the page because of characters like &. It should be HTML(XML) character encoded. You can verify this by viewing the source of http://www.beerxml.com/recipes.xml, in which & is encoded to & properly. You should html-encode your gist too.
Insert a break line between <?xml version="1.0" encoding="ISO-8859-1"?> and <RECIPES>
Well I am quite new to datapower(IBM Websphere xi50) and i have got struck as to how to route dynamically.Suppose we have configured dynamic backend then a client asks for some service so how to route it .
Is it through XSLT or yhrough certain policy creation I am not getting any clear idea regarding it?
Thanks
Normally you use "var://service/routing-url" and not as Ajitabh answered "dp:url-open".
You can also use the "Set variable" action instead of XSLT.
dp:url-open is used to "fork" a message, not to route it. If you use dp:url-opento route you must also set "skip-backside = 1"!
See sample for XSLT:
<xsl:variable name="destURL" select="concat('http://127.0.0.1:',$Transformer-port,'/', $usrTransformer)" />
<!-- Set backend URL -->
<dp:set-variable name="'var://service/routing-url'" value="$destURL" />
I create an XSLT that looks at the different elements in the incoming message to help determine the destination. I then invoked the DataPower extension method <dp:set-variable('var://service/routing-url') select="yourUrlHere"/>. I put that XSLT into a routing action.
You can do it through XSLT . The steps to do it is as following (logically)
Step 1: Determine the criteria based on which you want routing [it could be URI or any part of message]
Step 2: Use datapower built in function dp:open-url to send traffic to target.
Step 3: Get the response and process it.
There are other ways to do it as well but this is the most straight forward way.
I am trying to send data to my jsp via:"xhr.send(projectCode);"
but apparently the parameter is not received when I am trying to realise it with System.out.print it is a null displayed.
so the story from the begining. my javascript function send the parameter to the jsp whitch construct an xml file and resend to the first one.
this will reconstruct my second dropdownList with the xml code constructed and received.
so the problem that the parameter dosent sent at all.
What should I do.
Just note in case the syntax whatever you have sent is like this:
url="postjob2.jsp?param=" + param;
After param=" keep a space and then the parameter. My issue got resolved as soon as I entered the space.
The simplest all-round solution is to run your application with a HTTP-tracer, such as fiddler for windows or wireshark. In that way you can see if the proper data is being submitted from your client to the server Given the amount of details you provide, I think this is the best starting point