Mapping Custom datatypes

Hi All,
I am trying to figure out how to map custom datatypes.My scenario is simple.Employee table has address information in a column named addr which is of a custom datatype called Address.I have Employee and Address classes in my object model.
I have mapped all the fields (except address) of employee class to respective fields in employee table and I have used the Descriptor amendment method to map the address field of employee class using StructureMapping
StructureMapping mapping = new StructureMapping();
mapping.setFieldName("ADDR"); // Database Field Name in employee table
mapping.setAttributeName("addr"); //Address field in Employee class
mapping.setReferenceClass(Address.class);
descriptor.addMapping(mapping);
I get the following error when I try to login to the session
Exception [TOPLINK-197] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DescriptorException
Exception Description: The mapping [addr] is not the appropriate type for this descriptor
Please let me know where I am going wrong.
Thanks in advance
Prasanna

The source descriptor also needs to be of type ObjectRelationalDescriptor. If you are using the MW to map the source you can edit the XML or source and change the descriptor type. Or you could create a new ObjectRelationalDescriptor and copy the mappings and properties over from the RelationalDescriptor and replace it in the Session. Or just map the source in code as well.

Similar Messages

  • WSDL, custom datatypes, fault element name issues

    Hello all,
    I am having a LOT of problems with BEAs webservices. I am posting
    this here in the hope that someone can help me and tell me what I am
    doing incorrectly. I am running
    WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753
    WebLogic XMLX Module 7.0 SP1 Mon Sep 9 22:54:41 PDT 2002 206753
    Background:
    My goal is to make my company's product web services aware. I take an
    EJB, try to run it through the standard ant tasks and generate a web
    services accessible EJB. Sounds pretty easy, but complex types seem
    to make this quite difficult.
    I have been able to create a web service accessible EJB (only since
    7.0.1), but I am quite unhappy with the quality of what I am able to
    produce.
    I have a datatype which acts as a key, but it does not follow the
    javabeans idiom - i.e. it does not have a default constructor or
    accessor methods and I am not in the position to change it. I have
    created a codec for this class which works and an xml schema (both by
    hand). Its name is AgentKey. I have also had to use the autotyper to
    create codecs and typemapping entries for java.util.Properties,
    I can connect using the WebLogic classes and I am now trying to
    interact using MS Excel and Apache's Axis as my test clients.
    Issues:
    My first question deals with generating a client. There seem to be
    two ways to generate a client. Firstly via the <client> subtask of
    <servicegen><service>, the second way via <clientgen> task. Since I
    am using a custom data type (AgentKey) I have to manually insert the
    AgentKey schema into the web-services.xml file generated by
    servicegen. When I try to generate a client via the
    servicegen/service/client task there is no opportunity for me to
    insert this datatype schema information and I therefore get the
    following messages (lots of them, but I'm only including one):
    [servicegen] WARNINIG: Unable to find a javaType for the xmlType:['java:net.agentis.apml.runtime']:AgentKey.
    Make sure that you have registered this xml type in the type mapping
    [servicegen] Using SOAPElement instead
    BTW: I am also receiving the same problem with java.util.Properties.
    BTW: WARNING is misspelt
    If I attempt to generate a client class via the <clientgen> task, I
    need to supply either a wsdl or ear file as a parameter. I cannot
    supply a wsdl file because I haven't deployed the EAR yet (and I don't
    want to until the EAR has the client classes in it), and I can't
    supply the EAR because I want the ear to include the client classes.
    It is a bit of a catch 22 situation. Is there a solution I can't see?
    NOTE: it would be very, very nice if you added a schemaMapping
    attribute to the <servicegen/service> task so the web-services.xml
    file didn't have to be manually hacked. Something similar to the
    typemapping attribute already in the servicegen/service task would do
    it.
    My next problem deals with the validity of the WSDL. I am seeing that
    the WSDL created has exceptions defined multiple times. I saw a
    message from Manjo saying that it looked like a bug. I agree and
    would like to get a copy of the patch. On a more significant note,
    when is either SP2 or 7.1 due for release?
    Another problem with the WSDL (once you have cleansed the multiple
    exception messages) is that the fault elements of the
    binding/operation elements require names and they don't have any. For
    example, this is straight from the deployed EJB WSDL file:
    <binding name="ExampleAgentPortSoapBinding" type="tns:ExampleAgentPort">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="serviceWithPrimitiveDatatypes">
    <soap:operation soapAction="" style="rpc"/>
    <input>
    <soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output>
    <soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    <fault>
    <soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </fault>
    </operation>
    <operation ...
    The schema definition at http://schemas.xmlsoap.org/wsdl/ says the
    fault element require a name attribute:
    <complexType name =" tBindingOperationFault">
    <complexContent>
    <extension base="wsdl:tExtensibleDocumented">
    <attribute name="name" type="NCName" use="required"/>
    </extension>
    </complexContent>
    </complexType>
    The name of the fault should be the same name as the fault in the
    portType definition. In my example the name is "AgentisException" as
    evidenced by this snippet:
    <portType name="ExampleAgentPort">
    <operation name="serviceWithPrimitiveDatatypes">
    <input message="tns:serviceWithPrimitiveDatatypes"/>
    <output message="tns:serviceWithPrimitiveDatatypesResponse"/>
    <fault name="AgentisException" message="tns:AgentisException"/>
    </operation>
    Once these changes have been made then the WSDL will validate. Are
    there plans to fix these bugs?
    On a different note, when I try to interact with a method that uses a
    custom data type, such as AgentKey, via the "WebLogic Webservice
    standard testing home page" the custom data type without a default
    constructor cannot be rendered correctly. For instance, the AgentKey
    value is:
    <!-- Do not know how to create a sample instance for this part due to the following
    exception:java.lang.InstantiationException: net.agentis.apml.runtime.AgentKey.
    Pls replace this with the correct XML before invoking the service. --->
    <agentKey/>
    Since I can't deploy a valid WSDL, I can't get either Axis or Excel to
    connect to my web services.
    When I attempt to invoke Axis' (beta 1.1) wsdl2java I recieve the
    following message.
    java.io.IOException: ERROR: Fault is missing a name= attribute in operation
    "serviceWithPrimitiveDatatypes", in binding {http://sillyurl.com/reallysilly}ExampleAgentPortSoapBinding.
    This seems understandable considering the issues I mentioned earlier.
    Unfortunately Excel doesn't really give me anything to go with. If I
    type in the WSDL URI then it will give me a list of methods I can
    invoke, but if I try to add the service I get the very unhelpful "The
    Web Service References Tool could not generate the requested code.
    Any changes that were made to your project have been rolled back."
    Any help with those two issues would be greatly appreciated also.
    One final issue is that I cannot seem to fix is taskdef'ing
    <servicegen> properly from Ant. I can do the actual taskdef but then
    it cannot find classes from within the weblogic.jar. If I run the
    setExamplesEnv.cmd first the I don't need to do the taskdef and
    everything works fine. Has anyone else had this issue? (we can't run
    that command on our clients desktops before we build our build scripts
    - anyway, I've put it down to one of those weird Ant classpath
    issues.)
    In summary:
    Problems I can see and would like some help on are:
    - multiple exception messages
    - fault operations with no name
    - the ability to generate client code with complex data types before
    the EAR is deployed.
    Could the product team add
    - a clean way to add in schema datatypes without having to manually
    hack the web-services.xml file.
    I know this has been quite a long email, but it has been months in the
    making. Anyone's time would be greatly appreciated.
    Mark Mansour
    Agentis Software
    [email protected]

    Hi Mark,
    From your base post:
    My next problem deals with the validity of the WSDL. I am seeing that
    the WSDL created has exceptions defined multiple times. I saw a
    message from Manjo saying that it looked like a bug. I agree and
    would like to get a copy of the patch. On a more significant note,
    when is either SP2 or 7.1 due for release?I would recommend starting here with support since getting valid WSDL seems to be the root of most of
    your issues.
    Concerning the upcoming release, I believe it is scheduled for late this quarter; contact Michael
    ([email protected]) for more information.
    Also, at the bottom of this post:
    I would just like to see an automated way to do this (I've had to write my own
    utility to do this for me :(Does the autotype ant task help in this situation? Have you taken a look at this?
    http://e-docs.bea.com/wls/docs70/webserv/anttasks.html#1080062
    Thanks,
    Bruce
    Mark Mansour wrote:
    Hiya Bruce,
    I will try and get some time to follow this up with the support people too.
    In response:
    Problems I can see and would like some help on are:
    - multiple exception messages
    In your client code, you can set the following property to avoid the exceptionmessages so that the typemapping
    registry can be setup.
    //dont parse wsdl till we set the typemapping
    System.setProperty( "weblogic.webservice.servicenamechecking","false" );
    This is not a client issue. The WSDL is generating incorrect WSDL. Here is a
    little snippet :
    <message name="AgentisException" >
    <part name="AgentisException" xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    <message name="setTraceLevel" >
    <part name="agentKey" xmlns:partns="java:net.agentis.apml.runtime" type="partns:AgentKey"
    />
    <part name="intVal" xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:int"
    />
    </message>
    <message name="AgentisException" >
    <part name="AgentisException" xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    As you can see the AgentisException is defined twice (in my real WSDL it is redefined
    every time a method has the AgentisException in its interface (which in my case
    is 5 times))
    - fault operations with no nameI believe the fault issues that you have raised have been addressed in the upcomingrelease that will be
    available for beta testing shortly. Contact [email protected] if you
    want to participate in the beta.
    great. Is there any ETA on the final release date?
    - the ability to generate client code with complex data types before
    the EAR is deployed.
    There is an example to show how to do this: http://dev2dev.bea.com/direct/webservice/dyncmplx.zip
    Unfortunately this doesn't solve my problem. I still don't have an EAR or WSDL
    file from which I can generate a client to be included in the final EAR file that
    gets deployed to the server. My original post explains this a bit better.
    Could the product team add
    - a clean way to add in schema datatypes without having to manually
    hack the web-services.xml file.
    Take a look at http://dev2dev.bea.com/direct/webservice/wswa.html#qz50 and others
    in this area.
    This was more in reference to the building of the web services in the first place
    rather than registering custom datatypes at runtime. The manual procedure is
    documented at http://edocs.bea.com/wls/docs70/webserv/customdata.html#1058102,
    I would just like to see an automated way to do this (I've had to write my own
    utility to do this for me :(
    Hope this helps,
    Bruce
    Thanks Bruce.
    Mark

  • Can I use custom datatype on a column?

    Can I create a column using custom datatypes?
    Something like this?????????????
    ALTER TABLE ed_fotos ADD foto "ORDSYS.ORDVIR";
    The datatype "ORDSYS.ORDVIR" has been created to replace a virage datatype on my development environment.
    CREATE OR REPLACE TYPE "ORDSYS.ORDVIR" AS OBJECT (
         MEMBER FUNCTION getwidth RETURN NUMBER,
         MEMBER FUNCTION getheight RETURN NUMBER
    CREATE OR REPLACE TYPE BODY "ORDSYS.ORDVIR" AS OBJECT (
         MEMBER FUNCTION getwidth RETURN NUMBER IS
         BEGIN
              return 1000;
         END getwidth;
         MEMBER FUNCTION getheight RETURN NUMBER IS
         BEGIN
              return 1000;
         END getheight;
    /

    Hi, tks for the help.
    It is almost working... I can create a column but I cant select the data:
    select foto from ed_fotos
    ORA-00932: unconsistent data types: NUMBER expected ORDVIR returned
    select foto.getwidth() from ed_fotos
    ORA-00904: "FOTO"."GETWIDTH": invalid identifier
    This is my methods:
    CREATE OR REPLACE TYPE ORDVIR AS OBJECT (
         ID NUMBER,
         MEMBER FUNCTION getwidth RETURN NUMBER,
         MEMBER FUNCTION getheight RETURN NUMBER
    CREATE OR REPLACE TYPE BODY ORDVIR AS OBJECT (
         MEMBER FUNCTION getwidth RETURN NUMBER IS
         BEGIN
              return 1000;
         END getwidth;
         MEMBER FUNCTION getheight RETURN NUMBER IS
         BEGIN
              return 1000;
         END getheight;
    /

  • Custom datatypes in oracle

    hi,
    i need to know about custom datatypes in oracle? Where can i get that. Any good link which explains the topic???
    Thanks,
    Noble

    How about starting with the documentation...
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=user+defined+datatypes&tab_id=&format=ranked

  • Proplem by custom datatype

    hello everyone,
    I want to implement a web service between server and mobile phone, the web service is in dotnet plattform and the client is in java plattform (j2me), now i can only receive a response with simple datatype, i.e., int and string or their arrays. but i have now a custom datatype, Address include name and address etc. and i want to receive an array of such dataype, how can i do it?
    now i have the following exception:
    the server is unable to process the request....
    an error occurs when generating the xml documents.....
    thx in advance
    best regards
    Yaning

    maksim, thanks for ur tips, but now i have such a problem, i send my request, but the content in buffer as response is such exception:
    SoapFault - faultcode: 'soap:Server' faultstring: 'System.Web.Services.Protocols.SoapException:
    the server is unable to process the request
    ---> System.InvalidOperationException:
    an error occurs when generating the xml documents ---> System.InvalidOperationException:
    the type System.Object can not be used in this context
    at System.Xml.Serialization.XmlSerializationWriter.WriteReferencedElement(String name, String ns, Object o, Type ambientType)........
    the soap sample for this function is as following:
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://192.168.1.3/Server2BB_WebService/Server2BBService" xmlns:types="http://192.168.1.3/Server2BB_WebService/Server2BBService/encodedTypes" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <q2:getAddressesResponse xmlns:q2="http://192.168.1.3/Server2BB-WebService/Server2BBService">
          <getAddressesResult href="#id1" />
        </q2:getAddressesResponse>
        <soapenc:Array id="id1" xmlns:q1="http://192.168.1.3/Server2BB_WebService/CAS_Address" soapenc:arrayType="q1:CAS_Address[2]">
          <Item href="#id2" />
          <Item href="#id3" />
        </soapenc:Array>
        <q4:CAS_Address id="id2" xsi:type="q4:CAS_Address" xmlns:q4="http://192.168.1.3/Server2BB_WebService/CAS_Address">
          <CAS_GUID xsi:type="xsd:int">int</CAS_GUID>
    </soap:Body>
    </soap:Envelope>
    so i dont know how can i resolve this problem at the server side or web service side, can you tell me where did i something wrong?
    thanks in advance

  • How do I map custom property from portal api ptsearchresponse?

    I want to map the search results to my datatable.
    I can execute the search fine. But how do I map the property value? My property id is 101.
    In other words which ptSearchResponse method do I use?
                    IPTSession ptSession;
                    IPTSearchRequest ptSearchRequest;
                    IPTSearchResponse ptSearchResponse;
                    IPTSearchQuery ptSearchQuery;
                    string serverConfigDir = ConfigPathResolver.GetOpenConfigPath();
                    IOKContext configContext = OKConfigFactory.createInstance(serverConfigDir, "portal");
                    PortalObjectsFactory.Init(configContext);
                    ptSession = PortalObjectsFactory.CreateSession();
                    ptSession.Connect(1, "", null);
                    // Create a SearchRequest object
                    ptSearchRequest = ptSession.GetSearchRequest();
                    // Set search settings (constraints)
                    // Set maximum results desired (100)
                    ptSearchRequest.SetSettings(
                    PT_SEARCH_SETTING.PT_SEARCHSETTING_MAXRESULTS, 100);
                    // Set the folder in which to search (array to support multiple folders)
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_DDFOLDERS,
                        new int[] { Convert.ToInt32(ConfigurationManager.AppSettings["DocumentFolderId"]) });
                    // Include subfolders of the folder
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_INCLUDE_SUBFOLDERS, true);
                    // Restrict search to just portal documents
                    // (not ALI Collaboration or ALI Publisher)
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_APPS, PT_SEARCH_APPS.PT_SEARCH_APPS_PORTAL);
                    // get documents only
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_OBJTYPES, new int[] { PT_CLASSIDS.PT_CATALOGCARD_ID });
                    // Request the intrinsic PT_PROPERTY_PROVIDERCLSID and custom property 101
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_RET_PROPS,
                        new int[] { PT_INTRINSICS.PT_PROPERTY_PROVIDERCLSID, 101 });
                    //Use IPTFilter to create search filter with clause with two statements
                    IPTFilter ptFilter;
                    IPTPropertyFilterClauses ptFilterClause;
                    IPTPropertyFilterStatement ptFilterStmt1;
                    IPTPropertyFilterStatement ptFilterStmt2;
                    // Create the filter itself
                    ptFilter = PortalObjectsFactory.CreateSearchFilter();
                    // Create the filter clause
                    ptFilterClause = (IPTPropertyFilterClauses)ptFilter.GetNewFilterItem(PT_FILTER_ITEM_TYPES.PT_FILTER_ITEM_CLAUSES);
                    ptFilterClause.SetOperator(PT_BOOLOPS.PT_BOOLOP_OR);
                    // Attach it to the filter itself
                    ptFilter.SetPropertyFilter(ptFilterClause);
                    // Put two statements into the clause
                    ptFilterStmt1 = (IPTPropertyFilterStatement)
                        ptFilter.GetNewFilterItem(PT_FILTER_ITEM_TYPES.PT_FILTER_ITEM_STATEMENT);
                    ptFilterStmt1.SetOperand(101);
                    ptFilterStmt1.SetOperator(PT_FILTEROPS.PT_FILTEROP_CONTAINS);
                    ptFilterStmt1.SetValue(tbSearch.Text.Trim());
                    ptFilterClause.AddItem(ptFilterStmt1, ptFilterClause.GetCount());
                    ptFilterStmt2 = (IPTPropertyFilterStatement)
                        ptFilter.GetNewFilterItem(PT_FILTER_ITEM_TYPES.PT_FILTER_ITEM_STATEMENT);
                    ptFilterStmt2.SetOperand(1);
                    ptFilterStmt2.SetOperator(PT_FILTEROPS.PT_FILTEROP_CONTAINS);
                    ptFilterStmt2.SetValue(tbSearch.Text.Trim());
                    ptFilterClause.AddItem(ptFilterStmt2, ptFilterClause.GetCount());
                    // Make the filter into an actual search query
                    ptSearchQuery = ptSearchRequest.CreateAdvancedQuery(ptFilter);
                    // Run the search and return results
                    ptSearchResponse = ptSearchRequest.Search(ptSearchQuery);               
                    // How many things matched the search?
                    int totalMatches = ptSearchResponse.GetTotalMatches();
                    // How many items were returned? (Not necessarily all)
                    int returnedMatches = ptSearchResponse.GetResultsReturned();
                    // create DataTable and map results to
                    // datatable fields
                    DataTable dtSearchResults = new DataTable("Documents");
                    dtSearchResults.Columns.Add("Name");
                    dtSearchResults.Columns.Add("Excerpt");
                    dtSearchResults.Columns.Add("DocSubject");
                    dtSearchResults.Columns.Add("DocTopic");
                    dtSearchResults.Columns.Add("DocType");
                    dtSearchResults.Columns.Add("DocKeywords");
                    dtSearchResults.Columns.Add("Url");
                    dtSearchResults.Columns.Add("ImageURL");
                    DataRow dr;                                                                                                          
                    // Print the name of each result
                    for (int i = 0; i < returnedMatches; i++)
                        dr = dtSearchResults.NewRow();
                        String strName = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_OBJECTNAME);                  
                        String strText = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_OBJECTSUMMARY);
                        String strURL = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_DOCUMENTURL);
                        String strImageURL = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_OBJECTIMAGEUUID);
                        dr["Name"] = strName;
                        dr["Excerpt"] = strText;
                        dr["Url"] = strURL;
                        dr["ImageURL"] = "pt://images/plumtree/portal/public/img/sml" + strImageURL + ".gif";
                        dtSearchResults.Rows.Add(dr);
    Edited by [email protected] at 04/11/2008 7:26 PM
    Edited by [email protected] at 04/11/2008 7:27 PM

    Problem solved. I should use JsonObject instead of JSONObject :D 

  • Issue in mapping custom user profile property with AD field in SharePoint 2013

    Hello,
    I am trying to map a custom user profile property i created "ADSecurityGroups", type - String, Multivalue with the AD propoerty named "memberOf" via powershell.
    UserProfile Service is up and running, and so is the Synchronization Service. User executing the powershell has full control on the User Profile Service and is the farm administrator.
    Following is the code snippet i grabbed from the internet which i am trying to execute.
    Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction "SilentlyContinue" 
    $url = "http://<servername:port>/" #URL of any site collection that is associated to the user profile service application. 
    $spsProperty = "ADSecurityGroups" #Internal name of the SharePoint user profile property 
    $fimProperty = "memberOf" #Name of the attribute in FIM/LDAP source 
    $connectionName = "UserProfileSyncConnection" #Name of the SharePoint synchronization connection
    $site = Get-SPSite $url
    if ($site) 
        Write-Host "Successfully obtained site reference!"
    else 
        Write-Host "Failed to obtain site reference"
    $serviceContext = Get-SPServiceContext($site)
    if ($serviceContext) 
        Write-Host "Successfully obtained service context!"
    else 
        Write-Host "Failed to obtain service context"
    $upManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($serviceContext)
    if ($upManager) 
        Write-Host "Successfully obtained user profile manager!"
    else 
        Write-Host "Failed to obtain user profile manager"
    $synchConnection = $upManager.ConnectionManager[$connectionName]
    if ($synchConnection) 
        Write-Host "Successfully obtained synchronization connection!"
    else 
        Write-Host "Failed to obtain user synchronization connection!"
    Write-Host "Adding the attribute mapping..." 
    $synchConnection.PropertyMapping.AddNewMapping([Microsoft.Office.Server.UserProfiles.ProfileType]::User, $spsProperty, $fimProperty) 
    Write-Host "Done!"
    The script is failing with the following error - 
    new-object : Exception calling ".ctor" with "1" argument(s): "UserProfileApplicationNotAvailableException_Logging :: 
    UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 2f9bece3-f39a-498d-874f-145b1470e49c"
    At E:\ADSync.ps1:29 char:14
    + $upManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileConfigMa ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
        + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
    Please let me know if i am missing anything.
    Also advise if this is the correct way to map user profile attribute in SP 2013 ?
    Thanks -
    Girish

    ok no worry,
    try to run the below as it is, i m just copying code from your post.
    Add-PSSnapin Microsoft.Sharepoint.Powershell
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.UserProfiles")
    #Function to get servicecontextfunction Get-SPServiceContext([Microsoft.SharePoint.Administration.SPServiceApplication]
    $profileApp)
    $profileApp = @(Get-SPServiceApplication | ?
    {$_.TypeName -eq "MR_DEV_UserProfileServiceApplication"})[0]
    return [Microsoft.SharePoint.SPServiceContext]::GetContext
    ($profileApp.ServiceApplicationProxyGroup,
    [Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default)
    $url = "http://sp-appdev:2013" #URL of any site collection that is associated to the user profile service application.
    $spsProperty = "RoomNumber" #Internal name of the SharePoint user profile property
    $fimProperty = "extensionAttribute2" #Name of the attribute in FIM/LDAP source
    $connectionName = "LDAP Sync" #Name of the SharePoint synchronization connection
    #Get UserProfileManager
    $serviceContext = Get-SPServiceContext
    if ($serviceContext)
    {Write-Host "Successfully obtained service context!"}
    else
    {Write-Host "Failed to obtain service context"}
    $upManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($serviceContext)
    if ($upManager)
    {Write-Host "Successfully obtained user profile manager!"}
    else
    {Write-Host "Failed to obtain user profile manager"}
    $synchConnection = $upManager.ConnectionManager[$connectionName]
    if ($synchConnection)
    {Write-Host "Successfully obtained synchronization connection!"}
    else
    {Write-Host "Failed to obtain user synchronization connection!"}
    Write-Host "Adding the attribute mapping..."
    $synchConnection.PropertyMapping.AddNewMapping([Microsoft.Office.Server.UserProfiles.ProfileType]::User, $spsProperty, $fimProperty)
    Write-Host "Done!"
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • How to map customer field to standard field using BAPI_PO_CREATE1 ?

    Hi,
    i am trying to transfer a customer field from SRM to ECC60 through BAPI_PO_CREATE1;
    In SRM the EAN field does not exist; Thus we have created it.
    While transfering the PO to ECC, we try tu use BBP_PO_INBOUND_BADI to map the SRM field to the EAN11 field in EKPO.
    However, we do not find the EAN11 field in the BAPIPOITEM structure.
    Steps already done :
    BBP_CUFMAP
    How do we map a customer field coming from an external system to an ECC standard field ?
    Kind regards,
    Yann

    interface name is: SalesOrderCreateRequestConfirmation_In
    have a look at this link to get some more details:
    http://help.sap.com/esoa_erp2005/helpdata/en/44/62e384e370311de10000000a155369/frameset.htm
    is that what you need?

  • Data Adapter Configuration Wizard and custom datatype's

    I was wondering if there is planned support for GUI wizards similar to the Microsoft wizards that appear when you add a data adapter to a form at design time. These wizards appear when you use the Microsoft OracleClient, OLEDB or SQL Server client.
    These wizards are great for generating a bases SELECT statement and testing it quickly and it also assists by creating the Insert, Update, and DELETE statements for an adapter which in turn help greatly when filling a dataset. If this is possible or there are other quick was of generating these statements I appreciate any feedback.
    On a second topic, has there been any progress on allowing a custom Oracle datatype to be passed through ODP to .Net? Any planned date this will be supported?
    Thanks in advance,
    -J

    Anyone have any comments on the use of data configuration wizards?
    Thanks,
    -J

  • Can a DTD map custom styles to standard HTML tags?

    Hi,
    Every week the publishing house I work for has to manually copy the entire content of a weekly magazine on an article-by-article basis into an online database, the web version of the magazine. This means copying the styled InDesign content and inserting it into the database as plain text, re-finding all those italics (and any other styling) and putting it all back manually.
    I already know that I can create tags with all the basic HTML styles needed in the 'Tags' palette in InDesign, and then export that.
    The trouble is that when I re-import the XML file, I have to laboriously map the custom house-styles (there are many of them and they're boiler-plate, i.e. consistent, across all the magazine's InDesign styles) to the imported HTML styles.
    So here's my question:
    Am I wrong to believe that it's possible to create a DTD that would import not only the HTML tags but their relationship to the existing, custom-named InDesign tags that are common to all the magazine's documents?
    As an InDesign wish-feature, what's missing from the 'Tags' corner-menu is 'Export DTD' - if that was available, I could map the whole relationship between Indesign Styles/HTML styles just one time and later import the DTD on other articles; which would tell the Structure View how to convert our custom house-styles (both Paragraph Styles and Character Styles) into HTML tags and cut this time-consuming task in half.
    Thanks!
    EDIT: I perhaps should have mentioned that obviously the final stage after this 'dream conversion' is to export the XML from the Structure View. Then I can just open the saved XML file and paste it into the CMS with formatting intact.
    Added extra explanation of the workflow.

    geekbelief wrote:
    Googling XSLT and InDesign, it seems that such a stylesheet, if I were to create it, possibly couldn't handle spaces in the original InDesign style-names..? If anyone knows that for a fact, I'd be glad to be aware of it before starting down a long path to a roadblock.
    That's a good question. Let's find out together, shall we. I just created a text frame with Lorem Ipsum text, and created "a style" (with space) and "bstyle" (without). Now ... Map Style to Tag doesn't work, presumably because the tags don't exist and I assumed this would *create* them. And if you create one, ID complains "tags cannot contain tabs or spaces". (So can you have a Tab in your paragraph style name then? Gosh.)
    ... Forcing in a Non-breaking Space (#160) also doesn't work, this time ID simply says "A tag name cannot contain the character ' '."
    I think that's one you have to do manually.
    geekbelief wrote:
    I'm guessing that if I wanted to change the InDesign style 'Subheader' into 'h2', that snippet of the XSLT would be like this...?
    <xsl:template match="Subheader"><h2><xsl:apply-templates /></h2></xsl:template>
    Yeah, that's the correct syntax. But you cannot use an XSLT for mapping InDesign styles to tags. The process as I described works when importing your XML into InDesign, and changes the tags in the XML file to match InDesign styles. That's the other way around.
    I don't expect anyone to write this for me, but any hints or links to tutes that I haven't yet found would be appreciated!
    For a simple one-to-one translation of tag names, you can use this all the way. You only need any other XSL command if you want to do more than simple translation, such as filtering, moving, combining, or separating tags or their contents.
    There are lots of good tutes on the 'web for XSLT, although it seems interest has diminished lately. Half a decade ago XSLT was "hot"; nowadays the iPad is. Is there any news on improvements for ID's native XSLT support in CS6? I dare bet there are none at all -- it's already been deemed "yesterday's technology" by Adobe's Dev Team, just as Flash was discarded per CS5.5. I'm sure next year DPS will follow; and the year after that EPubs will be gone for good as well, replaced by holograms, transmitted live from your local library.

  • Getting "unique constraint" error while mapping customized jsp

    Hi,
    We are implementing iStore R12 (12.1.3).
    We have customized ibeCCtdMenu.jsp, renamed it as xxibeCCtdMenu.jsp and moved it to $OA_HTML/ folder.
    Now in template manager, we are creating a new source file (xxibeCCtdMenu.jsp) under "Menu generation template".
    However when we select site and language as "All", it gives following error:
    Error in saving logical to physical mapping
    ORA-00001: unique constraint (IBE.IBE_DSP_LGL_PHYS_MAP_U2) violated in Package IBE_PhysicalMap_GRP Procedure save_physicalmap
    All sites and all language exists already exists for deliverable 7670
    How can we overcome this error? Please advise.
    Thanks,
    Vivek

    for a given combination of Site and Language, only one template can exists.
    Default file provided by Oracle is set with combination as All Sites - All Languages, and you will not be able to change it.
    Register your file with combination such as All Sites - English Language
    or <specific site>, All language.
    Then it will work fine.
    Hrishikesh

  • Using font.properties to map custom in-house true type fonts

    Hi all,
    I'm currently attempting to get Forms Server to display a custom fonts called TH Sans Serif which is MS Sans Serif modified for our special needs. We need to show a whole array of fonts which caters for Rumanian, Hungarian, Polish, Slovak, Western European fonts amongst others. Problem is that the font.properties file (loaded with Jinitiator to be found under %Jinitiator_Home%\lib) maps 4 fonts (Monospaced, SansSerif, Serif, Dialog) that are used in the registry.dat file. Apparently reading from newsgroups it is possible to set one of these four mappings to your own custom font. Haven't unfortunately found a success case yet. Can anyone help.
    Any suggested websites or newsgroups dealing with this would be greatly appreciated.
    Thanks in advance.
    Holger

    Please use the Forms forum for best response.
    Ashesh Parekh
    Oracle9iAS Product Management

  • XI PO to SO mapping - Customer values

    Hi,
    I have a PO to SO transformation within one SAP system,
    where if a PO is created in one company comp1, an outbound idoc ORDERS is generated and sent to XI. In XI mapping this message is transformed to ORDERS for SO creation in comp2 and should be sent back to SAP. It is possible that there are several vendor numbers in the  comp1 and to create the idoc back in SAP, the inbound idoc should have a customer number. I am thinking of using EDPAR table in SAP to maintain the customer - vendor references.
    Right now in WE20, we have for LI and KU vendor and customer numbers maintained.
    The scenario works with a straight mapping from PO to SO.
    In XI Configuration identifiers are used for Vendor and customer config.
    What is the best way to get the customer value for vendor reference ?
    Can anyone help me please ?
    Thanks in advance.
    Usha

    Hi Usha,
    you can map the custmer values
    inside the message mapping:
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    and store those values in a Z table on your R3 system
    (very easy to maintain - view)
    and then send the idoc with changed values to the r3
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Map custom image dir on Standalone deployment?

    Is it possible to map a custom images (or other) directory on the Standalone deployment server?
    i.e.: images is mapped to /i/
    corporate images mapped to /ci/
    thanks - Karen
    Edited by: K Cannell on May 10, 2011 1:17 AM

    Hello Karen,
    as for the current release 1.1.1, only +/i/+ is supported directly in standalone mode. I assume you can't just reset the images prefix on your APEX instance. So you'll either have to use a "fullblown" J2EE Container for that purpose, or put a HTTP proxy in front of your standalone APEX Listener. Many proxies, e.g. Apache HTTPD, can be configured to do reverse proxying for a certain URL-path (e.g. +/apex+), but serve locally on others (e.g. +/i/+ and +/ci/+), so you could copy your images into the proxies document root.
    -Udo

  • XI Message Monitoring - Mapping custom fields for search in monitor?

    Is it possible to map a reference field so that searching for a specific message is more user friendly?
    For example, we produce hundreds of outbound SHPMNT04 messages each day.  Would it be possible to map a field such as E1EDT20.TKNUM (Shipment Number) to a field in the monitor (SXMB_MONI) such as "Outbound Reference" so we can easily search on this field?
    Currently we use a combination of WE09 and IDX5 to find a specific message.  Obviously, this is cumbersome and time-consuming.
    Thanks in advance.

    Hi,
    of course it is possible in many ways
    there are at least two ways
    the first one is to use Trex search for xi + standard
    the second one is described in this weblog + but remember that
    without indexing this will take long to search like this
    /people/alessandro.guarneri/blog/2006/02/14/super-message-monitor-for-sap-xi
    Regards,
    michal

Maybe you are looking for