I am trying to access saveCampaign API for testing purpose.
I followed the instructions provided, formed URL to create a plain campaign with URL :
https://testandtarget.omniture.com/api?client=user&email=user1#acme.com&password=pword&version=1&operation=saveCampaign&thirdPartyId=extID501&version=1&campaign=NNNNCampaign-Name
ofcourse, by editing proper email,clientID and password.
I get below mentioned error message :
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<error>
<message> A generic Exception has occurred. </message>
<code> 500 </code>
</error>
However the operation listCampaign works fine and returns a list of campaigns.
It would be a great help if someone could help.
thanks in advance.
The campaign parameter needs to contain a valid XML representation of the campaign you want to create/save as stated in the Test&Target's API docs. The error message you get points to a problem parsing the campaign XML parameter which is most likely caused by sending invalid data.
the XML document was not valid.
I modified it and created offer and could crate campaign.
thanks florin for pointing me in correct direction
Related
Trying to do something which is very simple but am getting strange results.
I have an image stored as an attachment which I want to display in a VF Page.
If I do this it works fine
<apex:image url="{!URLFOR($Action.Attachment.Download,'00PR0000008Q3YmMAK')}"/>
However that was for testing purposes that I hardcoded the id. If I try reference the Id in the object then it fails. Even though the value contained in the object is exactly the same as above.
<apex:image url="{!URLFOR($Action.Attachment.Download,model.PreviewImageAttachId)}"/>
When I load the page I get an error in URLFOR param!!!
I thought my problem was because model.PreviewImageAttachId was a String and not an Id so I created a wrapper to return it as an Id - same error.
I then decided Salesforce must have some strange requirement that you can only pass in the REAL object so I did that and passed in model.Attach.Id and it still fails!!
Please can someone explain this to me and more importantly suggest a solution??!?
Once again if I output to the page
{!model.PreviewImageAttachId} i get 00PR0000008Q3YmMAK
So I just cant explain this!
Thanks!
My bad...
Was using apex:repeat and turns out SOME of the id values were null.
Hence the error
The XSD allows to specify customId="true" id="foo" in the route elements. But when reading the route using Spring you get a parse error in Spring. I can't able to understand this bug. Can you please clarify me?
You should not use customId but only id.
The customId is for internal usage when updating routes from XML that the id is auto assigned or assigned by the end user.
What is an appropriate name for the URI part which is before the parameters part, I mean the full bolded part in the following example?
foo://username:password#example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose
I have a column in my database which contains such a part and I got stucked while finding correct name for this.
That is the authority and the path.
There is no name for that part as a whole.
Shouldn't that be?
http://username:password#example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose
or https:// if you're using secured url
Hey I am trying to create some object into salesforce. I have:
SObject myobj = new SObject();
myobj.setType("MyType");
...
But I got:
exceptionMessage='sObject type 'string' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.'
I didn't just put a 'string' there.
Anyone please give some suggestions?
Thanks a lot.
You don't say what you're trying to do by assigning the type, but it looks like you cannot set the type of an sObject in this way. The "string" the error is complaining about is the string "MyType" that you are trying to use to set the type of the sObject.
If you look at the page that describes the methods for sObjects,
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_methods_system_sobject.htm|StartTopic=Content%2Fapex_methods_system_sobject.htm|SkinName=webhelp
you will see that there is no "setType" method, only a "getType" method.
Why do you want to do this ? do you have the type in a variable that you want to use to create an object ?
There is a setType() method when using the Partner API. Is this what you are doing?
In this case you just need to follow the exception message. All custom objects have a API name that end with "__c".
Try
myObj.setType("MyType__c");
The error you see can also happen in a completely different way. I found your question while trying to solve my problem with InvalidSObjectFault. In my case, it was not in how I specified the sObject's type. No. It was permissions. One user (Admin) could run the query but another (my API user) couldn't. Turns out the user's profile needs to have permissions set to see the object. If not then you get this fault message!
Posted more about this on my blog:
http://sforcehacks.blogspot.ca/2013/11/invalidsobjectfault-invalidtype.html
We have a user that our corporate portal cannot fetch the groups for from AD.
On the portal logs we see this error:
javax.naming.PartialResultException: Unprocessed Continuation Reference(s) remaining name ''
I've Googled for the error and the best symptoms that seem to describe this case and how to resolve it are here: http://www-01.ibm.com/support/docview.wss?uid=swg21232921
Assuming we don't want to change the configuration just because of one user but to amend the data of this specific user can someone please explain me how can recognize this when examining the user's record in the AD? Is this something to do with his groups assignments and if yes then what should I look for?
I just ran into this.
I got around it by setting your InitialDirContext environment to have the Context.REFERRAL key set to "follow".
According to the Javadocs, that key can be "follow", "ignore", or "throw". The default is determined by the provider you use, which is probably "throw".
Check out this link for a bit more data on what your API is telling you: http://www.jspwiki.org/wiki/ActiveDirectoryIntegration
I'm not an expert on this API but can explain at least what I think is going on based upon that doc & knowledge of what AD is doing. :)
AD returns what are called "referrals" when you do searches that have naming contexts outside of this local server/search but in the logical scope of your request. This is per RFC request. Think of a referral as a hint to you the app that there might be more data out there...ie, that is, the AD server is saying "here are the results I have for you but, you should know, there is someone else that might have more...go here to find out."
Referrals aren't an "error" they are a hint to the app.
It seems that your LDAP API is throwing an exception when encountering them. Per the docs I referenced above, it looks like you can either swallow them or chase the referral to find out if there is more data.
add this for env properties
env.put(Context.REFERRAL,"follow");
Also one of the issues that i found was that the incorrect search query string in ldapContext. The incorrect query formed due to wrong format of parameter throws:
javax.naming.PartialResultException: Unprocessed Continuation Reference(s) remaining name ''
But if we add the parameter Context.REFERRAL="follow", then it does not throw an exception but neither does it return result.
The parameter to ldap query string should also match the that is being accepted by LDAP else it will throw the same error.