Just starting out with Exchange Web Services and getting a strange error right off the bat.
The Exception I get is "The response received from the service didn't contain valid XML."
The Inner Exception is "DTD is prohibited in this XML document."
So any ideas on what could cause that?
Turns out I was using the wrong url for the web services.
Related
I'm sending an OAuth callout to https://start.exactonline.nl/api/oauth2/token
When the Refresh Token is expired Exact Online returns an invalid messages. The response that is returned contains 2 WWW-Authentication headers (where 1 is blank).
Java request handling does not accept this and throws an exception;
Since Salesforce doesn't handle low-level Java exceptions it is impossible to handle authentication responses with empty WWW-Authentication headers.
A discussion around this issue handling empty WWW-Authentication headers:
http://cxf.547215.n5.nabble.com/jira-Created-CXF-4318-OAuthRequestFilter-generates-an-empty-WWW-Authenticate-header-td5707908.html
What I would like to know is:
Get in touch with someone from the EOL API team to fix this bug
Is there anyone who knows how to handle a Java exception in Apex
Integration Siebel - Google geocoding:
the URL requests sent directly from the browser:
https://maps.googleapis.com/maps/api/geocode/xml?address=Landsdorf%20Strasse,,Gr%C3%BCnewald,01945,Deutschland&key=API_key
where API_key = particular API key provided by Google during first registration
Such request is working correctly, the response with geo codes is returned into the browser screen.
However if the same request is sent via Siebel through BS: EAI HTTP Transport
The error is displayed:
SBL-EAI-04116:HTTP Internet Exception during 'Data Send': 'An error
occurred in the secure channel support', code: '12157'.
Described solutions on official Oracle support Web for that error are related to some missing certificate on external Server , (in our case Google Server)
This is a faily generic occuring at the Wininet layer during the SSL handshake.
And action should be: Throughly check the external webserver logs wih increased SSL tracing level on webserver.
but logically it does not make a sense, why URL request directly from the browser (same network) has been successfully sent and response was received
without using any certifications or similar stuff related to SSL handshake
Can someone help with it ?
Thank you
Best regards
I have a hunch here Siebel is sending data in UTF-16 format, and end point is rejecting it. Please check your outgoing trace messages.
I used to use the XML endpoint because it provided review dates for each review called 'updated'. This is not contained in the JSON endpoint. However, the XML endpoint stopped working. I get the error seen below:
Web Server Error
Description: The host did not return the document correctly.
Has anyone experienced the same issue? Any workarounds? Do you anticipate this will ever be fixed by Apple? Do you think the JSON endpoint might be taken down any time soon?
XML Endpoint (Broken)
https://itunes.apple.com/us/rss/customerreviews/id=1145275343/mostrecent/xml
JSON Endpoint (Working)
https://itunes.apple.com/us/rss/customerreviews/id=1145275343/mostrecent/json
It appears the XML endpoint is up and running again. No more Web Server Error. Hopefully the endpoint stays up.
I am trying to publish a json message using the Amazonsns connector in WSO2 ESB 4.9. I am able to successfully publish a simple string message however when I set the messagestructure to json in order to send different messages to different platforms and attempting to send json as the value of message it will not work. I am using a simple transaction that looks almost exactly like the documentation sample. My Transaction:
content-type: application/json;charset=UTF-8
{
"region":"us-west-2",
"accessKeyId":"MyAccessKey",
"secretAccessKey":"MySecretAccessKey",
"version":"",
"messageStructure":"json",
"subject":"Test",
"message": {"default":"mess","email":"message"},
"targetArn":"arn:aws:sns:us-west-2:977102061874:endpoint/APNS_SANDBOX/mobile_iOS_Sandbox/34ed4324e6-1119-67sd-b7dd-f413c88e4e25",
"topicArn":""
}
My result is an unexpected error sending message out.
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,73]Message: Illegal character: <d>
My service is also like the example:
<amazonsns.init>
<region>{$ctx:region}</region>
<accessKeyId>{$ctx:accessKeyId}</accessKeyId>
<secretAccessKey>{$ctx:secretAccessKey}</secretAccessKey>
<version>{$ctx:version}</version>
</amazonsns.init>
<amazonsns.publish>
<message>{$ctx:message}</message>
<subject>{$ctx:subject}</subject>
<messageStructure>{$ctx:messageStructure}</messageStructure>
<topicArn>{$ctx:topicArn}</topicArn>
<targetArn>{$ctx:targetArn}</targetArn>
</amazonsns.publish>
I did not expect much success but just started trying different things....I attempted xml encoding the json message and get the same message on '&'. Using wire logs I found the content type of the successful messages going to Amazon were application/x-www-form-urlencoded so I also tried url encoding and get same message on the '%'.
I'm running out of ideas. I double checked the connector documentation to make sure I did not miss anything. It does say you can use a JSON transaction for Publish and gives a sample transaction however it does not discuss anything special/different that you would need to set up in order to make this work. Is there something I am missing?
UPDATE: Can see it is using the Builder for application/x-www-form-urlencoded which is stumbling on the json. Have tried setting messageType and ContentType properties to application/json. JSON Builder is enabled. It just seems the connector wants to send it out as application/x-www-form-urlencoded, is there something I am not setting properly to tell the connector this is JSON?
UPDATE: The publish template that comes with the connector is setting the messagetype to applicaiton/x-www-form-urlencoded which is overriding any of the settings I am making in my proxy service. Going to look at changing the template in the connector to use a different messagetype and/or allow me to set it in the proxy dynamically then will be trying again.
Joe
We have created a public JIRA for this issue. Please follow that.
You need to enable message builders for the content types you are sending. make sure following is done.
Enable relevent Message builder for each content-type.
< messageBuilder contentType="application/json"
class="org.apache.synapse.commons.json.JsonStreamBuilder"/>
Make sure Content-Type header property is parsing with the message.
Make sure your Json is wellformed.
I am using the standard Code from: https://mandrillapp.com/api/docs/messages.php.html, require_once 'mandrill.php'; before using it and the directory is also right. But I am getting this exception the whole time, and I dont know why
Fatal error: Uncaught exception 'Mandrill_Error' with message 'We were
unable to decode the JSON response from the Mandrill API: window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function
r(t){if(!n[t]){var
o=n[t]={exports:{}};e[t][0].call(o.exports,function(n){var
o=e[t][1][n];return r(o||n)},o,o.exports)}return
n[t].exports}if("function"==typeof __nr_require)return
__nr_require;for(var o=0;op;p++)u[p].apply(s,t);return
s}function a(e,n){f[e]=c(e).concat(n)}function c(e){return
f[e]||[]}function u(){return t(n)}var
f={};return{on:a,emit:n,create:u,listeners:c,_events:f}}function
r(){return{}}var
o="nr#context",i=e("gos");n.exports=t()},{gos:"7eSDFh"}],ee:[function(e,n){n.exports=e("QJf3ax")},{}],3:[function(e,n)
in
Anyone an idea?
It is possible that you get this error when the mailservice is down or has Internal server errors (500). Embed your sending code in a try/catch block and use the catch block to fall back on another mailing service.