SAAJ0532: Absent Content-Type

I am using SAAJ in J2EE 1.4 Beta2 to call a web service from a java client. There following is a snap shot of the client code,
SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnectionFactory.createConnection();
java.net.URL endpoint = new URL("http://localhost:3456/ws_attachment/ImageService");
SOAPMessage response = connection.call(message, endpoint);
I got the following error. Note that message object has the content-type set correctly.
Thanks.
Siming
Aug 22, 2003 5:23:55 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>
SEVERE: SAAJ0532: Absent Content-Type
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Absent Content-Type
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
29)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at testwebservice.attachment.saaj.Client.main(Client.java:57)
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptio
nImpl: Absent Content-Type
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOA
PConnection.java:126)
at testwebservice.attachment.saaj.Client.main(Client.java:57)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Absent Content-Type
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:1
29)
at
com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1
_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.crea
teMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOA
PConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedP
ost.run(HttpSOAPConnection.java:156)

Hi friends,
I have written a servlet to process request and write the XML response.
I set the content-type of the servlet as "TEXT/XML".
After running the client program I am getting the following exception.
SEVERE: SAAJ0532: Absent Content-Type
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Absent Content-Type
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:129)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:45)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:32)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:361)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:156)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:126)
at com.griffin.server.manager.processor.cardmarte.CardmarteConnector.call(CardmarteConnector.java:298)
at com.griffin.server.manager.processor.cardmarte.CardmarteConnector.balanceInquiry(CardmarteConnector.java:199)
at com.griffin.server.manager.CardManager.executeObtainBalance(CardManager.java:595)
at com.griffin.server.manager.CardManager.obtainBalance(CardManager.java:534)
at com.griffin.server.api.http.GetBalanceActor.execute(GetBalanceActor.java:128)
at com.griffin.server.api.http.RequestActorBase.go(RequestActorBase.java:130)
at com.griffin.server.api.http.HttpApiController.delegateRequest(HttpApiController.java:239)
at com.griffin.server.api.http.HttpApiController.doCommon(HttpApiController.java:193)
at com.griffin.server.api.http.HttpApiController.doPost(HttpApiController.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
Please help....
thanks in advance.

Similar Messages

  • Getting an Invalid or absent Content-Type exception with soap attachment

    Hi,
    I am trying to send an attachment using Saaj API. As soon as I use the attaachment object and attach it to message I get an exception . If I remove it the over all webservice communication works successfully. Even if I set the content type in the mimeheader explicetely it gives the same error. Any Suggestion how what could be wrong here or how can I fix it please ?
    ++com.inqmy.lib.jaxm.soap.SAPSoapException: javax.xml.soap.SOAPException: Invalid or absent Content-Type++
    ++     at com.inqmy.lib.jaxm.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:169)++
    ++     at com.philips.cms.Main.main(Main.java:261)++
    ++Caused by: javax.xml.soap.SOAPException: Invalid or absent Content-Type++
    ++     at com.inqmy.lib.jaxm.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:69)++
    ++     at com.inqmy.lib.jaxm.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:40)++
    ++     at com.inqmy.lib.jaxm.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:160)++
    ++     ... 1 more     ++
    Below is what the program looks like .
    public static void main(String[] args) {
              String nameSpace = "ns";
              String nameSpaceURI = "http://schemas.hp.com/SM/7";
              String comNameSpace = "com";
              String comNameSpaceURI = "http://schemas.hp.com/SM/7/Common";
              String xmNameSpace = "xm";
              String xmNameSpaceURI = "http://www.w3.org/2005/05/xmlmime";
              String endPoint = "http://GBRLONTSYSVW106.code1.emi.philips.com:13088/SM/7/ws";
              try {
                        SOAPConnection soapConnection = SOAPConnectionFactory.newInstance().createConnection();
                        SOAPFactory soapFactory = SOAPFactory.newInstance();
                        MessageFactory messageFactory = MessageFactory.newInstance();
                        // Create a message from the message factory.
                        SOAPMessage soapMessage = messageFactory.createMessage();
                   // start: setting HTTP headers - optional, comment out if not needed
                        String username = "BLAH";
                        String password = "****";
                        String authorization = new sun.misc.BASE64Encoder().encode((username+":"+password).getBytes());
                        MimeHeaders hd = soapMessage.getMimeHeaders();
                        hd.removeAllHeaders();
                        hd.addHeader("Authorization", "Basic " + authorization);
                        hd.addHeader("SOAPAction", "Create");
                        // creat a SOAP part have populate the envelope
                        SOAPPart soapPart = soapMessage.getSOAPPart();
                        SOAPEnvelope envelope = soapPart.getEnvelope();
                        envelope.addNamespaceDeclaration(nameSpace, nameSpaceURI);
                        envelope.addNamespaceDeclaration(comNameSpace, comNameSpaceURI);
                        envelope.addNamespaceDeclaration(xmNameSpace, xmNameSpaceURI);
                        // create a SOAP body
                        SOAPBody body = envelope.getBody();
                        Name query = soapFactory.createName("query");
                        Name attachmentInfo = soapFactory.createName("attachmentInfo");
                        Name attachmentData = soapFactory.createName("attachmentData");
                        Name attachments = soapFactory.createName("attachments");
                        Name attachment = soapFactory.createName("attachment");
                        Name model = soapFactory.createName("model");
                        Name keys = soapFactory.createName("keys");
                        Name instance = soapFactory.createName("instance");
                        Name cmsRequestName = envelope.createName( "CreateCaseRequest", nameSpace, nameSpaceURI);
                        SOAPElement soapRequest = body.addBodyElement(cmsRequestName);
                        soapRequest.addAttribute(attachmentInfo, "true");
                        soapRequest.addAttribute(attachmentData, "true");
                        soapRequest.addAttribute(ignoreEmptyElements, "true");
                        SOAPElement soapModel = soapRequest.addChildElement("model",nameSpace, nameSpaceURI);
                        soapModel.addAttribute(query,"?");
                        SOAPElement soapKeys = soapModel.addChildElement("keys",nameSpace, nameSpaceURI);
                        soapKeys.addAttribute(query,"?");
                        SOAPElement soapinstance = soapModel.addChildElement("instance",nameSpace, nameSpaceURI);
                        soapinstance.addAttribute(query,"?");
                        soapinstance.addAttribute(uniquequery,"?");     
                        soapinstance.addAttribute(recordid,"?");
                        SOAPElement soapDescription = soapinstance.addChildElement("Description",nameSpace, nameSpaceURI);
                        SOAPElement soapDescriptionEle = soapDescription.addChildElement("Description",nameSpace, nameSpaceURI);
                        soapDescriptionEle.addTextNode("Test via Saaj");          
                        SOAPElement soapOwnerEle = soapinstance.addChildElement("Owner",nameSpace, nameSpaceURI);
                        soapOwnerEle.addTextNode("INTERFACE");
                        SOAPElement soapTechStatusEle = soapinstance.addChildElement("TechStatus",nameSpace, nameSpaceURI);
                        File file = new File("C:\\Bati\\Phillips\\test case.txt");
                        System.out.println(file.getAbsolutePath());
                        System.out.println(file.getName());
                        System.out.println(file.getPath());
                        FileDataSource ds = new FileDataSource(file);
                        DataHandler dataHandler = new DataHandler(ds);
                        AttachmentPart attachmentPart = soapMessage.createAttachmentPart(dataHandler);
                        attachmentPart.setContentType(dataHandler.getDataSource().getContentType());
                        attachmentPart.setContentId("test");
                        soapMessage.addAttachmentPart(attachmentPart);
                        // set the saves into the structure
                        soapMessage.saveChanges();
                        // output the message
                        System.out.println( "\n============= start request msg ==========\n" );
                        soapMessage.writeTo( System.out );
                        URLEndpoint urlEndpoint = new URLEndpoint(endPoint);
                        System.out.println( "\nSending message to URL: " + urlEndpoint.getURL() );
                        // now make that call over the SOAP connection
                        SOAPMessage reply = soapConnection.call( soapMessage, urlEndpoint );
                        // output the message reply
                        System.out.println( "\n============= start reply ==========\n" );
                        reply.writeTo( System.out );
                        System.out.println( "\n============= end reply ==========\n" );
                        // close down the connection
                        soapConnection.close();
              } catch (Exception ex) {
                   ex.printStackTrace();
    Thanks,
    Bati.

    I suppose I should also include the bit where the Servlet actually SENDs the resulting SOAPMessage
    SOAPMessage msg = ProcessXML.buildXML(outMessage);
    // try to send it
    try {
         response.setContentType("text/xml");
         msg.writeTo(response.getOutputStream());

  • Site content types and site columns were absent

    hi,
    i have seved a  sub site as a template which includes 20+ doc libs with 20+ site content ctypes which includes  15+ site columns  and then i have used this savedsite template in one site collection and implemented my
    custom web parts and upload document fun. successfully.
    now i have created another new site collection and forgot to create site content types and site columns as  we have seen the  site columns in the saved site template already.
    now i realized that those  site content types and site columns were not there but the strange thing is that i am able to uplaod the documents  into those document libraries  which are not associated with site content types, without any error.
    Can I create  the same in my new site collection ? since i have already created  many many sub sites based on the  saved site templates tested the functionality ,i dont wanna delete the template recreate all the sites  again in order
    to save the time.
    Now pls advice:
    1) if site columns / site contents  were not existing at the site collection level, will this affect my func. in future?
    2)   is there any automated way fo creating site columns, site content types, associateing these site content types with doc libs programmatically like power shell/ sp object model API.
    3) would like to any programmatic way of creating hundreds of sub sites based on the saved site templates in myw eb application/ site collection.

    Hi,
    We can create site columns, site content types or sub-sites using SharePoint Server Object Model.
    The following articles for your reference:
    SharePoint 2010: Create Site Columns and Content Types using C#.Net
    http://social.technet.microsoft.com/wiki/contents/articles/20267.sharepoint-2010-create-site-columns-and-content-types-using-c-net.aspx
    How to: Add a Content Type to a SharePoint List
    http://msdn.microsoft.com/en-us/library/office/aa543576(v=office.14).aspx
    Create Sites Using Custom Site Templates in SharePoint 2010
    http://www.c-sharpcorner.com/UploadFile/63e78b/create-sites-using-custom-site-templates-in-sharepoint-2010/
    How to create sub site with custom site template through PowerShell
    http://fangdahai.blogspot.com/2012/08/how-to-create-sub-site-with-custom-site.html
    Best regards
    Dennis Guo
    TechNet Community Support

  • 2013 Exchange, Can't connect to Exchange Management Shell. It cannot determine the content type of the HTTP response from the destination computer.

    The following error occurs.
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #0:
    Did you know that the Identity parameter is a "positional parameter"? That means you can use:
     Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
    It's a neat usability shortcut!
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
    At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
    +     $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: mail1.dorothy.local
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Randy Cheek

    Good Morning,
    Log into the server with an account that has appropriate Exchange rights, not a local account.  
    Note: By default - Domain Admins don't have Exchange rights.
    Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
    My Technical Blog: http://thelifestrategist.wordpress.com
    Discipline is the Difference between Goals and Accomplishments
    If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer"

  • How to know whether the Content Type at Library level is Inheriting Parent Content type or not Using Powershell?

    Hi,
    How to know whether the Content Type at Library level is Inheriting Parent Content type or not using Powershell?
    Is there any property for that? Or Do I need to compare the Content type Id's at Site collection level and Library level?
    Any help would be greatly appreciated.
    Thank you,
    AA.

    Hi Ashok,
    For a content type, there is an attribute called Inherits, the value of this attribute determines whether the content type inherits fields from its parent content type when it is created.
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was
    installed. The child content type does not have any fields that users have added to the parent content type.
    More information, please refer to the link:
    https://msdn.microsoft.com/en-us/library/office/aa544268.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Video Content Type Welcome Page

    For most document sets, you can determine which fields show on the welcome page by going to Document Set settings - Welcome Page Columns, but the Welcome Page Columns section does not show on the OOB Video Content Type. How do I change which fields show
    on the welcome page for a video?
    Specifically, I want to be able to display a custom field and remove the owner field.

    Hi,
    According to your post, my understanding is that you got an error while creating custom document set content type.
    The issue is that you set the Inherits=”FALSE” in the element. If you set the Inherits=”TRUE”, the content type would work.
    Based on the article form MSDN:
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was installed.
    The child content type does not have any fields that users have added to the parent content type.
    If Inherits is FALSE or absent and the parent content type was provisioned by a sandboxed solution, the child does not inherit any fields from the parent.
    It means if you set the Inherits to true, we would lose all our customization there.
    If we set Inherits="FALSE", which means you then have to remember to explicitly add into the definition all the stuff you should be inheriting, like the default Doc Set event receivers. 
    More reference:
    http://morefunthanapokeintheeye.blogspot.com/2012/10/how-to-successfully-provision-and.html
    http://ybbest.wordpress.com/2012/07/04/how-to-deploy-document-set-using-caml-in-sharepoint2010-solution-package/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Document Set custom content type - welcome page missing

    Sharepoint 2013. 404 error on welcome page for a following content type based on document
    set:
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Field ID="{B9B7D98D-A2D3-4191-9B30-C516C8EDD9F4}" DisplayName="Fieldpr41" Name="Fieldpr41" Type="Note" RichText="false" NumLines="3" Group="pr41" Overwrite="TRUE" />
    <!-- Parent ContentType: Document Set (0x0120D520) -->
    <ContentType ID="0x0120D5200062FEFD4873814585B3EFD57010F1F8AE"
    Name="ContentType41"
    Group="Custom Content Types"
    Description="My Content Type"
    Inherits="FALSE"
    ProgId="SharePoint.DocumentSet"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{B9B7D98D-A2D3-4191-9B30-C516C8EDD9F4}" DisplayName="Fieldpr41" Name="Fieldpr41" />
    </FieldRefs>
    <XmlDocuments>
    <XmlDocument
    NamespaceURI=
    "http://schemas.microsoft.com/office/documentsets/welcomepagefields">
    <wpFields:WelcomePageFields
    xmlns:wpFields=
    "http://schemas.microsoft.com/office/documentsets/welcomepagefields"
    LastModified="1/1/2010 08:00:00 AM">
    <WelcomePageField id="83729202-DCA7-4BF8-A75B-56DDDE53189C" />
    </wpFields:WelcomePageFields>
    </XmlDocument>
    </XmlDocuments>
    </ContentType>
    </Elements>
    Here's
    what i did after changing Inherits parameter to FALSE: 1) added ProgId parameter 2) added wpFields section 
    Any ideas?

    Hi,
    According to your post, my understanding is that you got an error while creating custom document set content type.
    The issue is that you set the Inherits=”FALSE” in the element. If you set the Inherits=”TRUE”, the content type would work.
    Based on the article form MSDN:
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was installed.
    The child content type does not have any fields that users have added to the parent content type.
    If Inherits is FALSE or absent and the parent content type was provisioned by a sandboxed solution, the child does not inherit any fields from the parent.
    It means if you set the Inherits to true, we would lose all our customization there.
    If we set Inherits="FALSE", which means you then have to remember to explicitly add into the definition all the stuff you should be inheriting, like the default Doc Set event receivers. 
    More reference:
    http://morefunthanapokeintheeye.blogspot.com/2012/10/how-to-successfully-provision-and.html
    http://ybbest.wordpress.com/2012/07/04/how-to-deploy-document-set-using-caml-in-sharepoint2010-solution-package/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Application Error while activating the feature - for creating list content type, list definition and list instance

    Dear all,
    I am getting application error while enabling the feature. if any body can point out the issue - that will be helpful.
    content type
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Field ID="{4C1B0A21-FCE0-4CFE-8742-A250672AFE4F}" Type="Note" Name="CourseDesc" DisplayName="Course Description" Required="TRUE" Group="Training Site Columns"/>
    <!-- Parent ContentType: Item (0x01) -->
    <ContentType ID="0x0100d57ecc53fde34177b096abd0ec90a8f9"
    Name="TrainingCourses"
    Group="Training Content Types"
    Description="Defines a Course"
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{4C1B0A21-FCE0-4CFE-8742-A250672AFE4F}" Name="CourseDesc" DisplayName="Course Description" Required="TRUE"/>
    </FieldRefs>
    </ContentType>
    </Elements>
    List definition
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List Definition project item, an error will occur when the project is run. -->
    <ListTemplate
    Name="TrainingCourses"
    Type="10100"
    BaseType="0"
    OnQuickLaunch="TRUE"
    SecurityBits="11"
    Sequence="410"
    DisplayName="TrainingCourses"
    Description="Training Courses List Definition"
    Image="/_layouts/images/itgen.png"/>
    </Elements>
    List instance
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <ListInstance Title="TrainingCourses"
    OnQuickLaunch="TRUE"
    TemplateType="10100"
    Url="Lists/TrainingCourses"
    Description="Training Course List Instance">
    </ListInstance>
    </Elements>
    schema
    <?xml version="1.0" encoding="utf-8"?>
    <List xmlns:ows="Microsoft SharePoint" Title="TrainingCourses" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/TrainingCourses-LD_TrainingCourses" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
    <MetaData>
    <ContentTypes>
    <ContentType ID="0x0100d57ecc53fde34177b096abd0ec90a8f9" Name="TrainingCourses" Group="Training Content Types" Description="Defines a Course" Inherits="TRUE" Version="0">
    <FieldRefs>
    <FieldRef ID="{4C1B0A21-FCE0-4CFE-8742-A250672AFE4F}" Name="CourseDesc" DisplayName="Course Description" Required="TRUE" />
    </FieldRefs>
    </ContentType>
    </ContentTypes>
    <Fields>
    <Field ID="{4c1b0a21-fce0-4cfe-8742-a250672afe4f}" Type="Note" Name="CourseDesc" DisplayName="Course Description" Required="TRUE" Group="Training Site Columns" />
    </Fields>
    <Views>
    <View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">30</RowLimit>
    <ViewFields>
    <FieldRef Name="LinkTitleNoMenu">
    </FieldRef>
    <FieldRef Name="CourseDesc">
    </FieldRef>
    </ViewFields>
    <Query>
    <OrderBy>
    <FieldRef Name="Modified" Ascending="FALSE">
    </FieldRef>
    </OrderBy>
    </Query>
    <ParameterBindings>
    <ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" />
    </ParameterBindings>
    </View>
    <View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">30</RowLimit>
    <ViewFields>
    <FieldRef Name="Attachments">
    </FieldRef>
    <FieldRef Name="LinkTitle">
    </FieldRef>
    <FieldRef Name="CourseDesc">
    </FieldRef>
    </ViewFields>
    <Query>
    <OrderBy>
    <FieldRef Name="ID">
    </FieldRef>
    </OrderBy>
    </Query>
    <ParameterBindings>
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    </ParameterBindings>
    </View>
    </Views>
    <Forms>
    <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    </Forms>
    </MetaData>
    </List>
    I am applying the feature to SPWeb level.
    cheers
    Sathya

    redeployed a new solution; since I was getting this error. I would have done typo errors etc.
    https://naveengopisetty.wordpress.com/2011/09/10/error-occurred-in-deployment-step-activate-features-invalid-file-name-the-file-name-you-specified-could-not-be-used-it-may-be-the-name-of-an-existing-file-or-directory-or-you-may-not-have-pe/
    Cheers
    Sathya

  • Not able to crawl all items from External content type

    Hello All,
    "All the records in my external content source are not getting crawled, only 1/3 rd of the data are getting crawled."
    Steps:
    I created "External content type" using sharepoint designer which connects to a SQL Server database.
    Have written a SQL View joining 2 tables, which return 9,00,000 rows when executed using the SQL Server management studio.
    I used the default "Business Data Connectivity Service" and "Search Service Application" and made sure the necessary permissions are set.
    Created a External Content source for the search service application and selected the "Business Data Connectivity Service" -> "Crawl selected External datasource" -> <my external datasource i created in sharepoint designer>
    Issue
    When i ran the full crawl for the first time it crawled "3,49,923" records in 01 hour and 07 seconds. And returned 1 error "Error crawling LOB Contents.(Error caused by exception: System.InvalidOperationException. There is an error in XML
    document...)
    Later i removed the below item from the index and started a full recrawl, this time it crawled "3,49,924" records 1 record extra from my previous crawl
    and no errors were returned.
    Please let me know what could be the issue. It doesn't look like the permission related issues as i am able to crawl the 1/3rd of my total data. Also i am able to search the crawled data. I also set the throtteling limit for the "Business data catalog"
    to -maximum 10000000 -default 1000000 which is less than the data it has to crawl.
    SRIRAM

    Hi ,
    I started the change suggested in the link shared by you, but got stuck at a point,
    The field which i set as identifier in BCS earlier is not having unique values. Total rows returned by the sql view is 899000, but the unique values present in the column that is set as identifier is
    3,49,923, which is equal to the number of rows crawled. - Is this the reason why it didnt crawl all records?
    The table that is used in the sql view has composite key, - Is it possible to have multiple identifier in BCS as well?
    Is it possible to make BCS to ignore the identifier? i mean creating BCS without an identifier column?
    Please let me know your suggestions on this.
    Thanks,
    SRIRAM
    Yes, BCS needs a UID. This is so it can figure out changes over time to a single record. Otherwise all changes to a row could be a potential new row without BCS knowing any better.
    Yes, or just have it run off the composite key instead of the field you're using now.
    Nope, BCS needs a UID field like in answer 1 :)
    Good luck!
    My CodePlex -
    My Blog - My Twitter
    Join me at the San Francisco SharePoint User Group!
    If this post helped you or answered your question please remember to mark it! :)

  • Cannot add hub-managed content type with external list lookup columns to a list -- Error:Id field is not set on the external data field

    This is a variation on the issue mentioned in this
    post
    We are using SP 2010 Content Hub to manage our content types.  On the content hub we've created a couple of exteranl lists, and then created some site columns as lookups against these lists.  We then added the columns to one of our content types
    and set it to publish.
    After the publishing job executed, I tried adding the content type (which now appears on the subscriber sites) to one of the document libraries on one of the subscriber sites.  When I did that it threw the following error:
    Microsoft.SharePoint.WebControls.BusinessDataListConfigurationException: Id field is not set on the external data field    
    at Microsoft.SharePoint.SPBusinessDataField.CreateIdField(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op)     
    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldOnList(SPField field, Boolean bRecurAllowed)     
    at Microsoft.SharePoint.SPContentType.ProvisionFieldsOnList()     
    at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType)     
    at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean updateResourceFileProperty, Boolean checkName, Boolean setNextChildByte)     
    at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType)     
    at Microsoft.SharePoint.ApplicationPages.AddContentTypeToListPage.Update(Object o, EventArgs e)     
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    b55297ed-717f-466d-8bdc-297b20344d3f
    I checked the external  content type configuration and it did specify an "id column".  Anyone know if what I am attempting to do is possible and if so, what special configurations are required?
    Thanks

    The issue is not External Content type or external list but the look up column.
    It's not possible to publish a look up column via the Content Type Hub.
    If you need to do this then an alternate way is to use a Managed Metadata column instead, otherwise you will have to implement this via a feature.
    Varun Malhotra
    =================
    If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.

  • Problem with content type

    Hi All,
    I have set the content type to text/html by using the following statement in jsp
    <%@page contentType=�text/html�%>And if I give
    out.println("<a href="aaa.do">Click here</a>"); it is showing me a link to click here that's fine.
    But my problem here is that I am using struts <bean:write name="user1" property="subject"/> tag and the data in the subject field is Click here i.e the output from the database, now its not showing the link instead displaying every thing even if the content type is set. How can I achieve this? please help me out.

    in your bean:write tag try setting the filter attribute to false, like so
    <bean:write name="xxx" property="xxx" filter="false"/>
    http://struts.apache.org/1.2.9/userGuide/struts-bean.html#write

  • Look up column in Content Type Hub

    Hi,
     Would like to know whether look up columns are  supported /not supported in content type hub.
     Currently I am having few columns in my doc.libs which uses look up column and i want to implement content type hub.
    heard that this is a limitation in CTH.
    Can anyone from MS pls confirm.
     and at the same  time if I want to use the look up column functionality and implement CTH, any alternatives available.
    help is  highly appreciated!

    Hi,
    Please refer to the following article, it might help
    Content Type Hub Sync & Lookup lists
    And also refer to the following post.
    Content Type Hub Syndication and lookup site column within a content type
    Please mark it answered, if your problem resolved.

  • Sharepoint 2013 (Danish): Deploying site from a custom template fails with error "Duplicate content type"

    I cannot create a site-template in my own language (danish) and deploy a site based on the template.
    I created a template from a "fresh" SharePoint project site with no tampering.
    When trying to deploy a new site based on the templat I get the following error:
    In Danish:
    Beklager, men noget gik galt
    Det blev fundet et navn på en dubletindholdstype "billede".
    Tekniske oplysninger
    Fejlfinding af problemer med Microsoft SharePoint Foundation.
    Korrelations-id: 96646c9c-3213-a088-c6c4-537b0815313c
    Dato og klokkeslæt: 21-06-2014 10:23:36
    In English:
    Sorry, something went wrong
    A duplicate content type name "billede" was found.
    Technical Details
    Troubleshoot issues with Microsoft SharePoint Foundation.
    Correlation ID: 0b656c9c-52ee-a088-c6c4-5132070e3c4e
    Date and Time: 21-06-2014 10:31:35

    Need details from ULS logs about Correlation ID: 0b656c9c-52ee-a088-c6c4-5132070e3c4e
    Check below:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/e955e737-e12e-4afa-b446-bb6e0f05e9b1/duplicated-content-type-error-creating-a-sharepoint-2010-site-from-a-custom-site-template?forum=sharepointgeneralprevious
    http://aramacciotti.wordpress.com/2012/04/04/the-case-of-the-duplicated-contenttype/
    http://community.office365.com/en-us/f/154/t/69416.aspx
    If this helped you resolve your issue, please mark it Answered

  • Versioning and Video Content type does not work.

    Hello,
    I have out of the box sharepoint installed.
    When I apply versioning to a library. And try to see "Document set version history" (as I suggest Video content type actually inherits from Document Set). I don't see any version.
    Can you tell me how can i see versions of the "Video" content type item in this Version History window?

    Document set versions are slightly different than item versions. Document sets can be managed by a separate ribbon tab called Document Set and group called Manage.
    Check below link for detail go through:
    How to retrieve document set version history
    Manage versions for Document Set
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)

  • Crystal Report Preview vs. SAP B1 Report Preview  as a Layout under Content Type

    Hello good day i'm trying to create a report that will be preview under A/R Invoice but the details need is under delivery module for example i create a serialize Item and set the Management Method on Every Transaction Under Item master data, so the transaction flow will be like this SO -> Delivery -> A/R Invoice. So under delivery transaction i will choose the serial that i will deliver so that under A/R Invoice Transaction i will no longer choose again the said serial that i choose on Delivery Transaction. There for on my Report i will Based on Delivery Transaction to get the chosen Serial But the Report will be Preview under A/R Invoice.
    The main concern on This is why when i preview the said Report under Crystal Report the serial is showing but when i Import it on SAP B1 as a Layout under Content type it is no longer showing the serial on the preview?

    Please post to the SAP Business One Application forum
    - Ludek
    SCN Moderator

Maybe you are looking for