Overriding SPMetal Defaults by Using a Parameters XML File

hi everybody,
I have a datatable
Employee below :
FullName Single line of text
Age
Number
After use SPMetal to generate entities, i have
EmployeeItem below:
FullName string
Age
double?
I want Age is Integer so i use "Overriding SPMetal Defaults by Using a Parameters XML File" :
<?xml version="1.0" encoding="utf-8"?>
<Web AccessModifier="Public" xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal">
<List Name="Employee" Type="Employee">
<ContentType Name="Employee" Class="Employee">
<Column Name="FullName" />
<Column Name="Age" Type="Integer" />
<ExcludeOtherColumns/>
</ContentType>
</List>
<ExcludeOtherLists />
</Web>
When generate it have error "There is an error in XML doc" at :
<Column Name="Age" --error here-- Type="Integer" />
Would you like help me?

Hi,
I came across the same error when testing your code in my environment.
Anyway, if we convert the Number field to Integer, there will be a risk of damaging our data due to the conversion accuracy.
So if you want to use the Integer type of data, a workaround is that you can convert the double type of data to Integer type programmatically after retrieving the data you want.
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • WebDeployPackage: Parameters.xml file

    I use the following command to create the web deploy package:
    msdeploy -verb:sync -source:metakey="Default Website" -dest:package=D:\WT\test2.zip > msdeployarchive.log
    But this doesn't create a parameters.xml file!!! Can someone tell me how to create Web Deploy package using msdeploy command and it should contain parameters.xml file.

    I think you are supposed to provide the parameters.xml file yourself.
    http://msdn.microsoft.com/en-us/library/ff398068(v=vs.110).aspx
    To use deployment parameters for Web.config file settings
    1.Create an empty text file, name it parameters.xml, and save it in the project folder (the same folder that contains your project's .csproj or .vbproj file).
    2.Add a root element named parameters to the file, as shown in the following example:
    and
    http://vishaljoshi.blogspot.co.uk/2010/07/web-deploy-parameterization-in-action.html

  • How to define the style for JTextArea using synth style xml file.

    Hi all,
    How can we align the text inside the JTextArea using synth style xml file.
    We defined a style for the TextArea. But the text is displayed immediately after the border. So we want to provide some space between the border and the text.We specified the insets as given below. But it is not reflecting during runtime.
    <insets top="3" left="3" bottom="3" right="3"/>
    Please help me if any one knows

    Hi Anju,
    This may help you.
    http://www.xenta.nl/blog/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
    Preferrence Variable can be updated either thorugh EM console or ConfigPlan
    Regards,
    Richa

  • How to specify the webLogic server startup script to use different config.xml  file ??

    Hi,
    I have 2 weblogic startup scripts (startWebLogic.sh and
    startWebLogic_recovery.sh) for the same domain.
    startWebLogic.sh uses config.xml file.
    I would like to use config_recovery.xml as the configuration file for startWebLogic_recovery.sh
    How would I do this ?
    I am using WebLogic Server 6.1 on SunOS 5.8 / HP-UX 11.0.
    Appreciate any help.
    Regards
    Gunaseelan Venkateswaran

    I guess you're using Weblogic 6.1 with WLCS 3.5. I think you're supposed to work with one config.xml for the same domain, and not have a different config.xml.
    To start up different applications or EJBs, use the "target" property to control which applications to start up for the particular instance.
    YY

  • Use length of XML file to tween movieclip?

    Hello,
    I'm creating a horizontal scrolling gallery in which the content is loaded through xml. So far the xml loads fine and the content is easily nested within movieclips and positioned within a larger movieclip containing each of the movieclips containing the content. With that said, I am able to move this main movieclip left and right with no problem using a tween and a fixed position but I have no way of stopping the movieclip according to how much content is in the xml file. I'm attempting to use the length of the xml file to move this main movieclip but either it can't be done or my coding is wrong.
    Thank you in advance!
    Here is my code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import  fl.transitions.TweenEvent;
    var currentContentIndex:uint = 0;
    var  currentContent:MovieClip;
    // container movieclip
    var container:MovieClip = new  MovieClip();
    container.y = 120;
    addChild(container);
    var imageLoader:Loader;
    var xml:XML;
    var xmlList:XMLList;
    var xmlLoader:URLLoader =  new URLLoader();
    xmlLoader.load(new URLRequest("gallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    var x_count:Number = 0;
    var y_count:Number = 0;
    // Everything in the function below loads and positions fine
    function  xmlLoaded(event:Event):void
         xml = XML(event.target.data);
         xmlList  = xml.children();
         for(var i:int = 0; i < xmlList.length(); i++)
              //  contentContainer
              var contentContainer:MovieClip = new  MovieClip();
              contentContainer.graphics.beginFill(0xFFFFFF);
              contentContainer.graphics.drawRect(0,  0, 1000, 500);
              contentContainer.graphics.endFill();
              contentContainer.width  = 1000;
              contentContainer.height = 500;         
              contentContainer.x  = (contentContainer.width+400)*x_count;
              contentContainer.y  = 0;
              // thumbInfo
              var  imageInfo:MovieClip = new MovieClip();
              imageInfo.graphics.beginFill(0x000000);
              imageInfo.graphics.drawRect(0,  0, 150, 100);
              imageInfo.graphics.endFill();
              imageInfo.x  = 400;
              imageInfo.width = 150;
              imageInfo.height  = 100;
              addChild(imageInfo);
              imageLoader  = new Loader();
              imageLoader.load(new  URLRequest(xmlList[i].attribute("source")));
              x_count++;
              y_count = 0;
              contentContainer.addChild(imageLoader);
              contentContainer.addChild(imageInfo);
              container.addChild(contentContainer);
    function tweenCurrentImageF(){
         currentContent=MovieClip(xmlList[currentContentIndex]);  // PROBLEM CODE?
         var targetX:Number = stage.stageWidth/2 -  currentContent.x - currentContent.width/2;
         var  myTween:Tween = new Tween(container, "x", Strong.easeInOut, container.x,  targetX, 1, true);
    rightArrow.buttonMode = true;
    rightArrow.addEventListener(MouseEvent.CLICK,  right);
    function right(e:MouseEvent):void {
         currentContentIndex++;
         if(currentContentIndex<xmlList.length){
              tweenCurrentImageF();

    Hey again,
    I understand what you are saying and I've omitted that problem code because it's code I'm trying to carry over from a gallery using an array of movieclips and, to me, it seems irrelevant to this code. I have moved some code around and the movieclip scrolls now but its scrolling directly to the last nested movieclip even though the "currentContentIndex" variable traces 0.
    I moved the button and it's function code inside of the xmlLoaded function because it was recognizing "contentContainer.x" as an undefined term when it was outside of it (I just stated this in case this is the problem).
    Thank you again!
    Here is my new code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import  fl.transitions.TweenEvent;
    var currentContentIndex:uint = 0;
    // container movieclip
    var container:MovieClip = new  MovieClip();
    container.y = 120;
    addChild(container);
    var imageLoader:Loader;
    var xml:XML;
    var xmlList:XMLList;
    var xmlLoader:URLLoader =  new URLLoader();
    xmlLoader.load(new URLRequest("gallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    var x_count:Number = 0;
    var y_count:Number = 0;
    function xmlLoaded(event:Event):void {
           xml = XML(event.target.data);
            xmlList  = xml.children();
            for(var i:int = 0; i < xmlList.length(); i++)
                //  contentContainer
                var contentContainer:MovieClip = new  MovieClip();
                contentContainer.graphics.beginFill(0xFFFFFF);
                contentContainer.graphics.drawRect(0,  0, 1000, 500);
                contentContainer.graphics.endFill();
                contentContainer.width  = 1000;
                contentContainer.height = 500;        
            contentContainer.x  = (contentContainer.width+400)*x_count;
            contentContainer.y  = 0;
              container.addChild(contentContainer);
                imageLoader  = new Loader();
             imageLoader.load(new  URLRequest(xmlList[i].attribute("source")));
              contentContainer.addChild(imageLoader);
                x_count++;
                y_count = 0;
              var imageText:TextField = new TextField();
              imageText.x = 400;
              imageText.y = 30;
              imageText.text = xmlList[i];
              imageText.autoSize = TextFieldAutoSize.LEFT;
              contentContainer.addChild(imageText);
         function tweenCurrentImageF(){
              var targetX:Number = stage.stageWidth/2 -  contentContainer.x - contentContainer.width/2;     
               var  myTween:Tween = new Tween(container, "x", Strong.easeInOut, container.x,  targetX, 2, true);
         rightArrow.buttonMode = true;
         rightArrow.addEventListener(MouseEvent.CLICK,  right);
         function right(e:MouseEvent):void {
              currentContentIndex++;
              if(currentContentIndex<xmlList.length()){
                 tweenCurrentImageF();

  • Using Additional parameters in file receiver

    Hello all,
    I'm trying to use additional parameters the following way:
    In my receiver adapter:
    File Name Scheme : %var%.txt
    Additional Parameters:  
    %var%     |   myvalue
    Checked "Set Adapter Specific Message Attributes" and "FileName" in both sender and receiver adapters.
    XI doen't pay attention to my variable and outputs the file name as is (exactly as the original name).
    Can anyone please help me solve the problem?
    Thanks in advance

    Hi,
    since you are using both variable substitution & Set Adapter Specific Message Attributes, the second one has highest preference. So only Adapter Specific Message Attribute works in this case.
    So use either Variable Substitution (or) Set Adapter Specific Message Attributes according to your scenario requirement.
    - Gujjeti.

  • How to set customized wallpaper using MDT unattended.xml file

    hello
    I need to set own wallpaper  with OSD using MDT.
    I have edited the unattended.xml file  as added below component to it, other customization with answer file worked except not getting set the wallpaper set and wallpaper  image is available at specified location.Please help to resolved this issue.
    <settings pass="oobeSystem">
           <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <Themes>
                    <DesktopBackground>\\MDTSERVER\DeploymentShare$\pics\images.jpeg</DesktopBackground>
                    <ThemeName>\\MDTSERVER\DeploymentShare$\pics\images.jpeg</ThemeName>
                    <ScreenSaver></ScreenSaver>
                </Themes>
            </component>
        </settings> 

    Putting the JAR files in WEB-INF/lib and using the standard URIs in the taglib directives are all that's needed; the container locates the TLDs in the JAR files at startup.
    If this doesn't work, it's a bug in the container. You may want to upgrade to a later version of Tomcat; 4.0.6 is ancient, and may very well be buggy in this area.

  • Using a local XML file for parsing - iPhone

    Good afternoon everyone. I am trying to create an application for the iPhone that will use an XML file for it's data source. I have been attempting to convert the SeismicXML application from the dev center to use a locally stored file, but to no avail. I have it building and running fine, but no data is appearing. Is there anyone that can give me an example of parsing with a locally stored file? Thanks!

    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"myFile" ofType:@"xml"];
    NSData *myData = [NSData dataWithContentsOfFile:filePath];
    if ( myData ) {
    NSXMLParser *parser = [[NSXMLParser alloc] initWithData:myData];
    [parser setDelegate:myObject];
    [parser setShouldProcessNamespaces:NO];
    [parser setShouldReportNamespacePrefixes:NO];
    [parser setShouldResolveExternalEntities:NO];
    [parser parse];
    NSError *parseError = [parser parserError];
    if ( parseError && error) {
    *error = parseError;
    // Do post load activity

  • Dreamweaver - using CDATA in xml file

    Greetings, I am a designer, not much of a coder... trying to bring in an xml file into an html file using the Spry Menu.  I went through creating the .xml file, inserting a Spry table, all working with success. EXCEPT that the CData link I have referenced is coming up as text, not a link.  I thought a CDATA attribute would be read as html.
    Here's the TEST.xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <orgs>
    <org>
                <name><![CDATA[<a href="http://www.animaltribes.com">Animal Tribes</a>]]></name>
                <type>Sanctuary</type>
                <animal>Horses</animal>
                <animaltype>Wild Horses</animaltype>
                <city>Reno</city>
                <state>NV</state>
            </org>
    </orgs>
    And here's my page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TEST XML</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsTest1 = new Spry.Data.XMLDataSet("TEST.xml", "orgs/org",{sortOnLoad:"name",sortOrderOnLoad:"ascending",distinctOnLoad:true,useCache:fa lse});
    //-->
    </script>
    </head>
    <body>
    <div spry:region="dsTest1">
      <table>
        <tr>
          <th spry:sort="name">Name</th>
          <th spry:sort="type">Type</th>
          <th>Animal</th>
          <th spry:sort="animaltype">Animaltype</th>
          <th spry:sort="city">City</th>
          <th spry:sort="state">State</th>
        </tr>
        <tr spry:repeat="dsTest1">
          <td>{name}</td>
          <td>{type}</td>
          <td>{animal}</td>
          <td>{animaltype}</td>
          <td>{city}</td>
          <td>{state}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    I did not think I needed a .xsl page for a simple table like this.  I feel like I am missing something basic!  Please help.  Much appreciated.
    Kimberly

    Thanks for your quick response!
    So all I need to do is change the html file to add the line you suggested.  The html file looks like this now:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TEST XML</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsTest1 = new Spry.Data.XMLDataSet("TEST.xml", "orgs/org",{sortOnLoad:"name",sortOrderOnLoad:"ascending",distinctOnL oad:true,useCache:false});
    dsTest1.setColumnType("name", "html");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="dsTest1">
      <table>
        <tr>
          <th spry:sort="name">Name</th>
          <th spry:sort="type">Type</th>
          <th>Animal</th>
          <th spry:sort="animaltype">Animaltype</th>
          <th spry:sort="city">City</th>
          <th spry:sort="state">State</th>
        </tr>
        <tr spry:repeat="dsTest1">
          <td>{name}</td>
          <td>{type}</td>
          <td>{animal}</td>
          <td>{animaltype}</td>
          <td>{city}</td>
          <td>{state}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    I am getting FAILED TO RETRIEVE DATA SET (dsTest1) FOR SPRY REPEAT.
    Or do should I start over and re-insert the Spry region?
    Sorry for being a neophyte and thank you for your patience!
    Kimberly

  • Correct adapter to use for an XML file

    Hi,
    My current scenario for our business partner is that we are sending them an 850 and 856 then an XML file.
    For 850 and 856, we are using AS2 adapter. For the XML file, could I still use the same adapter?  Or I need to use File adapter instead?
    My scenario for the xml file is that an IDoc is converted to an XML file.  This XML file is then sent to the business partner.
    Please advise.
    Thanks very much.
    Regards,
    Lex

    Hi VJ,
    I just found out that I could also use the AS2 adapter to send the xml file to the trading partner.
    Thanks for your kind response.
    Regards,
    Lex

  • Using an online XML file v. a local copy

    I'm working on a web project that reads in XML data and processes it accordingly. The system seems to work as it should except that it will only read the XML file if it is stored on a local drive and not through a URL. When trying to access it through a web address I get file not found alerts. Is there a different way I need to reference online files vs. ones stored locally? Thanks for any advice.

    I would use a URL to reference both local and remote resources. (Don't call them "files" or you may be tempted to use a File object for both, and of course that doesn't work.)
    But you do have to have valid URLs that point to actual resources, and you do have to have a network configuration that allows you to get to those resources, and so on.
    Sorry if that seems vague, but it matches the question.

  • What is the default app used to open ZIP files in OS X?

    What is the default app used to open ZIP and PDF's files in OS X?

    The Archive Utility and Preview.
    (105905)

  • XML - 0112 Error on parsing using SAX and xml file in InputSource object.

    I need to parse a XML string and extract some information. I have to use SAX parser. I'm converting hte string to InputSource and then trying to parese.
    i'm getting XML-0112 error, my guess is that it is not able to locate DTD file but i tried hardcoding the whole path in DOCTYPE tag.
    i tried doing setSystemId also but no luck.
    null

    Can you post a simple test case to look at?

  • File to RFC (create Project Def in R# using data from XML file)

    I configured the scenario as follows:
    Step 1.
    Created data type and message type suitable for file data.
    Createtd async outbound message interface
    Defined message mapping between Messge type defined and BAPI
    Defined Interface mapping between Message interface & BAPI
    Definf file sender communicational & RFC receiver communicational
    and completed the rest of configuration id and activated all.
    File is being read successfully but Project creation is not happening.
    error "no sender or receiver interface definition " shown in SXMB_MONI.
    Plesase through light on this problem.
    Regards,
    Venkat

    Hi Seshagiri,
    it is not cleare to me where to look for Service Simulation active or not.
    In SICF "/default_host/sap/bc/bsp/sap/net200_otr_d1 " against it is showing that Service Reference(active)
    again I tested.
    error is still comming.
    Error different at different times. However the most frequent error is as follows:
    When payload is not given
    "Interface Mapping ... (109 lines)  "
    Any further suggestion please?
    Regards,
    Venkat

  • Import of XML file failed in portal using XML Content and Action

    Hi Friends,
    I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS  which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND ACTIONS > IMPORT.
    The reason for using this import tool is to upload the backend Business roles, which is not not working on our corporate portal. To test the import functionality I used the following xml file (I got this XML file by exporting the test folder in the portal using the same tool)
    <GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
    <Context name="portal_content" objectClass="com.sap.portal.pcd.gl.GlContext"></Context>     <Property name="parent1" value="pcd:portal_content"/>
         <Context name="com.dri.fldr.im" objectClass="com.sap.portal.pcd.gl.GlContext" create_as="0" parent="$">
              <Attributes>
                   <Attribute name="com.sap.portal.pcm.Description" type="text">
                        <AttributeValue value="" locale=""/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
                   <Attribute name="com.sap.portal.pcm.Title" type="text">
                        <AttributeValue value="test" locale=""/>
                        <AttributeValue value="test" locale="en"/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="mandatory" type="string">
                             <AttributeValue value="true"/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
              </Attributes>
         </Context>
    </GenericCreator>
    SDN BLOCKED THE XML The above XML file works fine in other portal in the landscape but not in corporate portal ( which is freshly build recently).Following error message is display when i am trying to upload the file
    Status Name Action Type Comment
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Failed to extract root node
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Parsing failed .
    Dont know is there a service/ configurations needs to be done to enable this feature?.
    Thanks
    Edited by: hammad on Sep 4, 2009 5:48 PM
    Edited by: hammad on Sep 4, 2009 5:49 PM

    The problem statement is not very clear.
    Try following this how to guide [https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207a2141-c870-2910-e080-90c920b24f47&overridelayout=true|How-To]
    Best Regards,
    Prasanna K

Maybe you are looking for

  • Having problems using mail merge from address book to word for labels

    I've downloaded and opened avery labels to word and would now like to merge an address book from my mac. When I get to the Mail Merge Manager and go to 'get list', my address book is not accessible. I'm sure there's a simple way to do this but have n

  • Swapping internal HDD from MacBook to MacBook Pro

    Is it possible to take a hard drive from a MacBook and put it in a MacBook Pro without reformatting or making any other modifications to the disk? Obviously, the dimensions are the same. But, are there likely to be software complications? Has anyone

  • Sync to ipod nano

    I see all my songs in library. They won't sync to ipod. Why not??

  • ISetup new custom interface using BC4J/java class

    Hi, I am able to create new custom interface using the link :- How to setup an user to be Oracle iSetup Super user ? but I have not seen anything for BC4J filter set, as per oracle iSetup developer guide clearly explains step by step process how to c

  • Creating a subsite in hostweb from sharepoint hosted App

    Hello All, While creating a subsite in host web from sharepoint app, i am getting error the in the below line of code "   this.NewWebsite = hostweb.get_webs().add(webCreateInfo);"..unable to get the property "get_webs"; My code is as below $(document