How to get the request xml string in Business service.

Hi
I have following requirement
1) XAI inbound service will get a input xml request feed and call the Business Service.
2) Business service will do some validation and do the insert in the database.
My BS schema is as below
<schema pageAction="change">
<personId mapField="PER_ID"/>
<personOrBusiness mapField="PER_OR_BUS_FLG"/>
<name mapField="ENTITY_NAME" mdField="C1_ENTITY_NAME"/>
<emailAddress mapField="EMAILID"/>
<city mapField="CITY"/>
<county mapField="COUNTY"/>
<postal mapField="POSTAL"/>
<houseType mapField="HOUSE_TYPE"/>
<taxVendorGeographicalCode mapField="GEO_CODE"/>
<isInCityLimit mapField="IN_CITY_LIMIT"/>
<state mapField="STATE"/>
<version mapField="VERSION"/>
<division mapField="CIS_DIVISION"/>
<accessGroup mapField="ACCESS_GRP_CD"/>
<address1 mapField="ADDRESS1"/>
<personCharacteristic type="list" mapList="CI_PER_CHAR">
<personId mapField="PER_ID"/>
<characteristicType mapField="CHAR_TYPE_CD"/>
<characteristicValue mapField="CHAR_VAL"/>
<effectiveDate mapField="EFFDT"/>
<adhocCharacteristicValue mapField="ADHOC_CHAR_VAL"/>
<characteristicValueForeignKey1 mapField="CHAR_VAL_FK1"/>
<characteristicValueFK2 mapField="CHAR_VAL_FK2"/>
<characteristicValueFK3 mapField="CHAR_VAL_FK3"/>
<characteristicValueFk4 mapField="CHAR_VAL_FK4"/>
<characteristicValueFK5 mapField="CHAR_VAL_FK5"/>
</personCharacteristic>
</schema>
The request XML to BS is as below_
(support.schema.AbstractSchemaBasedDispatcher) Performing page:change of BusinessService CM_SPRDSHT_BS' (service='CMSPRDHSHTUPLD'), with input request
<?xml version="1.0" encoding="UTF-8"?>
<CM_Person>
<personOrBusiness>P</personOrBusiness>
<name>Marsh,Corporate</name>
<emailAddress>[email protected]</emailAddress>
<city>Tampa</city>
<country>USA</country>
<postal>2131</postal>
<houseType/>
<taxVendorGeographicalCode/>
<isInCityLimit/>
<state>CA</state>
<version>1</version>
<division>930</division>
<accessGroup>***</accessGroup>
<address1>Address of Khan</address1>
</CM_Person>
I can access the values of each xml node in BS with the help of data item.
I wanted to know how can I get the above request xml string in my Business Service in Java.

{color:#0000ff}http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String){color}

Similar Messages

  • How to get the value of String in integer type

    how to get the value of String in integer

    {color:#0000ff}http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
    http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String){color}

  • How to get the resulting XML as string

    Hello,
    I think my question is very simple but i'm new in this area.
    What i'm try to do is to parse a XML document with the DOM parser. Then i manipulate the DOM tree. After finishing the process i want to get the resulting XML document as an InputStream to give to another application for storing back into the database.
    Until know i print the resulting XML to System.out or I write it to a file.
    Do you know where i can find more information about this? Sample code??
    Thanks!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    You can try following code. It is not the simplest way, but it works for me:
    // Print to temp buffer
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream output = new DataOutputStream(baos);
    Xml_doc.print(output);
    String outtemp=baos.toString();
    System.out.println(outtemp);
    include following line for the lib:
    import java.io.*;<HR></BLOCKQUOTE>
    Many thanks for the reply. It works!

  • How to get Soap Request xml in application.cfc

    Hi
    if api getting soap request using cfhttp like below:
    <cfxml variable="mydata">
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Header />
       <soapenv:Body>
           <ns:service_soap_call soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <login>test</login>
            <password>test</password>
          </ns:service_soap_call>
       </soapenv:Body>
    </soapenv:Envelope>
    </cfxml>
      <cfhttp url="http://sm.iclp-dubai.ae/research/wsdl/MyPointsBank.cfc?wsdl" method="post" charset="utf-8" result="myresult">
           type" value="text/xml">
            <cfhttpparam type="header" name="SOAPAction" value="">
           <cfhttpparam name="soapInput" type="xml" value="#trim(mydata)#"/>
    </cfhttp>
    then how to get Soap Request in application cfc.
    like :
    <cfif IsSOAPRequest() >
      <cfset soapreq = GetSOAPRequest() />
    </cfif>
    I want to validate the soap xml Request before calling targeted CFC.
    Any suggestion!.

    Let me see whether I understand. Are you attempting to achieve something like this:
    test.cfc
    <cfcomponent output="no">
    <cffunction name="testFunction" returntype="any" access="remote">
    <cfargument name="soapInput">
    <cfset var inputXML = arguments.soapInput>
    <cfset var soapBodyText="">
    <cfset var noBodyTextError="">
    <cftry>
        <cfset soapBodyText = xmlSearch(inputXML,"//soapenv:Body/text()")[1].xmlValue>
        <cfsavecontent variable="noBodyTextError"><?xml version="1.0" encoding="utf-8"?><soapenv:Envelope     xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>java.lang.Exception: Body not found.</faultstring></cfsavecontent>
        <cfif trim(soapBodyText) is "">
        <cfthrow>
        </cfif>
        <cfreturn inputXML>
    <cfcatch type="any">
    <cfreturn noBodyTextError>
    </cfcatch>
    </cftry>
    </cffunction>
    </cfcomponent>
    tester.cfm
    <cfxml variable="mydata">
            <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wor="https://www.worldmilesafrica.com">
       <soapenv:Header/>
       <soapenv:Body>
       </soapenv:Body>
    </soapenv:Envelope>
    </cfxml>
    <cfinvoke webservice = "http://127.0.0.1:8500/workspace/wsTest/test.cfc?wsdl"
              method = "testFunction"
               returnVariable = "result">
           <cfinvokeargument name="soapInput" value="#trim(mydata)#" >
    </cfinvoke>
    <cfdump var="#result#">

  • How to get the request scope values?

    Hi,
    I have one question about Struts validate framework question is How can i get the request scope values when the validate method throws an exception?
    My scenario is I have some values in the request scope in one page. After submitting the page the validate method throws an exception, then the errors were displayed in the page and it ask for provide correct information. However, at this time the values in the first request will become null. How can I get those request values?
    Request.setAttribute(�con�, conn);Link after click this link user will display with user reg. form with user details input fields. After submitting he user details form if user provide some invalid information then validate method in Action form will throw errors and displayed the User details form with errors. However, the request attribute �con� will become null at this point of time. How can I get the user request attribute in user details form?
    Assume request have more than 100 values.
    Waiting for answer...
    Regards,
    Bhaskar Reddy

    Your code is probably fine, and you are probably running into http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6497210
    See also http://forum.java.sun.com/thread.jspa?messageID=9419890
    SUN needs to fix a few bugs for this to work...

  • How to get the request in a SearchComponent

    Hello,
    I developed a search component and want to implement a language specific logic.
    Therefore I tried to get the component request to get the user to get the users language.
    But unfortunatly I'm not able to get the request. In a normal AbstractPortalComponent there's no problem to get the request, but my interface ISearchComponent, which I have to use, does not provide any kind of request...
    Please help,
    Regards,
    Axel

    Hi Axel,
    Did you just implement an ISearchComponent interface? If yes, then you have implemented setDynPage(dynPage) which is called by the framework passing a DynPage object. On that you can call getRequest(). See http://media.sdn.sap.com/html/submitted_docs/nw_kmc/javadoc/com/sapportals/wcm/control/util/search/ISearchComponent.html and https://media.sdn.sap.com/javadocs/NW04/SPS15/hb/com/sapportals/htmlb/page/DynPage.html for details.
    If the answer to the initial question is "no", please provide details which class you may have extended etc.
    Hope it helps
    Detlev

  • How to get the UDDI Key to publish a service provider system in SR?

    Hi,
    I am following instruction in appendix 1 & 2 of the white paper at https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1079b1af-dcb7-2b10-9ebb-eafcaa3cbbea?overridelayout=true
    trying to publish a service provider system into the service registry. One thing not clear to me is how to get the uddikey as needed in step 6 in appendix 1.
    My service registry is in a PI 7.1 SP4 system. I followed the instruction in appendix 2 but there is no uddi key displayed in the General tab. Please help.
    Regards,
    Jiannan
    Paragraph extracted from the whitepaper:
    There may be cases in which the NWA logical settings do not match the Services Repository
    settings when Visual Composer is trying to locate the enterprise services. Such cases can occur
    when there is no SLD ID definition of the physical system in the Services Repository.
    Currently, Visual Composer cannot search for services on a physical system with an empty SLD ID
    (which is not a valid one).
    To obtain this capability, the following steps should be performed to generate the necessary data
    for each system with a non-valid SLD ID, so that Visual Composer can search for services over it.
    1.Log on to http://<serverName>:<serverPort>/WSNavigator.
    2.Select the Services Registry radio button.
    3.In the Find field, enter sr and choose Go.
    4.Select the ServicesRegistrySi line and choose Next.
    5.Under the Operation Name, search for the publishPhysicalSystems operation, select it and choose Next.
    6.Fill the service information parameters with the following (see Appendix 2 for details on how to get this information) :
      6.1.Click the + icon in the physical system[].
      6.2.Deselect the Classifications checkbox.
      6.3.Click the + icon in the classificationReferenceGroups[].
      6.4.Click the + icon in the classificationReferences[].
      6.5.Deselect the classificationSystemKey checkbox.
      6.6.Deselect the uddiKey checkbox and enter the value <localUddiKey>.
      6.7.Deselect the value checkbox and enter the value <localSystemHostName>.
      6.8.Deselect the host checkbox and enter the value <localHostName>.
      6.9.Deselect the physicalSystemKey checkbox.
      6.10.Deselect the logical key checkbox and enter the value <System name>.<SystemHome>.<host name>.
      6.11.Deselect the systemName checkbox and enter the value <system name>.
      6.12.Deselect the type checkbox and enter the value 2.

    Hi Jiannan,
    No worries, you can go to UDDI client from the main page of PI  i.e. http://<serverName>:<serverPort>/
    And you use the search function for  the TModel for your Physical System. Search parameters can use the % wildcard.
    Hit the search and you find the UDDI Key for the Physical System.
    Cheers.
    Hemant Chahal

  • How to get the original query string in an event receiver when dialogs are enabled

    I have scenario where I am adding a document to a document library which has an external data column on it. My goal for this column is to have it automatically populated with an appropriate value based on original query string to the page. The general
    idea is that I am on a custom page that has various webparts on it including a view of my document library that is context sensative based on the query string, and I want to use that context sensitivity not just to filter the list but also when adding documents.
    I have been searching around for solutions to this problem all day and have gotten this far:
    I have an event receiver attached to my document library that handles the ItemAdded event syncronously (as such I have the new list item available to me). In that event receiver I am able to set the column values as required. Where I am stuck is on getting
    the value from the query string that I need to actually set as the column value.
    Based on:
    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/8cfcb299-9a55-4139-86ec-0b53b2922a54 and several similar articles/posts I have been able to get the original source Url with the query string I want via the following
    code in my event receiver:
    private HttpContext context;
    public EventReceiver1()
    context = HttpContext.Current;
    public override void ItemAdded(SPItemEventProperties properties)
    var originalQueryString = context.Request.QueryString["Source"];
    // Parse the query string and use the value ...
    The problem is that this solution breaks down if the dialogs are turned on under the advanced settings for the list. The reason the solution fails is because the "Source" query string parameter goes away and is replaced by "IsDlg" set to a value of "1".
    Does anyone know how to get past this hurdle? Any help would be greatly appreciated.

    Hi Stuart,
    The reason I'm looking for "Source" in the query string is because that is something I found to be reliable when the Dialogs are turned off. I've dug around pretty deep in the Request object to see if anything had the data I was looking for and unfortunately
    it doesn't appear to be there. The
    context.Request.QUeryString.ToString()
    returns a rather simple one of:
    List=%7b43ECDCB0-8440-4652-B067-AA20481779D7%7d&RootFolder=&IsDlg=1
    and the
    context.Request.UrlReferrer.Query.ToString()
    has the same value.
    I suspect this is due to the dual step process that takes place in adding an item to a document library where the first modal popup (which I suspect likely has the information I need) gives you the opportunity to browse to your file and then the second
    dialog (maybe this is getting brought up as a result of another request which is now referring back to the original request that brought up the first dialog?) where you edit your properties.
    Thanks for the try though, if you've got anything else I'd love to hear it.

  • How to get the GTRID in string form

    Hello,
    I would like to include the Global Transaction Identifier (GTRID) in my
    application level logs. Preferrably it will be in the same format as it is
    in the ULOG.
    Is there a function to get the GTRID?
    Once retrieved, is there a function to convert the GTRID into a string
    equivalent to how it is presented in the ULOG?
    We are using WLE 5.x (Corba).
    Thanks...
    Roger
    Roger W. Fischer
    North Vancouver, BC

    Tuxedo uses GTRIDs internally, but externally documented functions make use
    of XIDs, which is the official transaction ID format used in the XA
    standard. (tpsuspend() and tpresume() make use of TPTRANID, which is
    another internal data structure.)
    The best approach would be to use userlog() for your application logging, in
    which case you will get the GTRID as part of your log message whenever it is
    present.
    If you want to use XIDs, you can call
    tx_info(&traninfo);
    to get a binary XID and you can format this XID to a string format using
    tpconvert(string_xid, &traninfo.xid, TPTOSTRING|TPCONVXID);
    It is possible to pass this string_xid as a key field in a call to the
    T_TRANSACTION MIB class, and TA_GTRID will be among the returned FML fields,
    but the TA_GTRID MIB attribute is not officially documented.
    "Roger W. Fischer" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I would like to include the Global Transaction Identifier (GTRID) in my
    application level logs. Preferrably it will be in the same format as it is
    in the ULOG.
    Is there a function to get the GTRID?
    Once retrieved, is there a function to convert the GTRID into a string
    equivalent to how it is presented in the ULOG?
    We are using WLE 5.x (Corba).
    Thanks...
    Roger
    Roger W. Fischer
    North Vancouver, BC

  • Is there a way to get the actual XML string when using the JAXP SAX Parser?

    Hi All,
    I am using a JAXP SAX xml parser and am looking for a way to get the actual line of xml that is being parsed from within a content handler.
    Here's my scenario. Consider the following example xml document.
    <formCollection>
       <form name="myForm">
          <text/>
          <selection/>
       </form>
       <form name="anotherForm">
          <text/>
       </form>
    </formCollection>My hope is to validate the entire document and then insert an xml string containing each "form" element (and its sub-elements) into a map for later use. My thought was to create a String as each "form" element is being parsed (begining with the form's startElement event and concatenating until the form's endElement event is reached) and then inserting this string into the map. Is there a way to get the actual line of xml that is being parsed, rather than just the element name and attribute values?

    DrClap wrote:
    YouRang wrote:
    2. The first handler would validate the entire XML document, extract the "type" attribute from each <form> element, and place each <form> element and its sub-elements into the map of Strings, using the "type" attribute as the key. The second handler would take a <form> element and parse it into a Form object for the display. This option was the impetus for my question because it relies on the first handler being able to access the entire <form> element XML String and write it to a map.I don't see why you need the raw data from the XML document here. You should already be abstracting your data into Java classes in the first handler, instead of making the second handler do the parsing all over again.Correct, I am not referring to XForms. In this case, it happens that I am using the XML to generate an SWT ScrolledForm object and, thus, the XML element name happens to be named "form." However, the concept/design problem could apply to any type of object and the XML element could be appropriately renamed.
    My experience with XSLT is limited and I haven't done anything with it for several years. With that said, it seems that it is primarily used for generating web content, which wouldn't apply in this case because this is for a client-server application. I could be off base on this one -- if XSLT applies to much broader translations and would be more appropriate for generating Java objects than my current methodology, I could certainly look into it further.
    I apologize that option two didn't make more sense; it is difficult to explain. Yes, optimally the data should be abstracted into Java classes in the first handler. This is really an elaboration that I failed to specify when explaining option one. The problem is that the user can choose to create any number of "forms" of any type. For instance, let's say that from the File -> New menu there are options for seven different types of forms and each form is used to send completely different data. The user can select form1, select form1 again, select form4, and select form7 (or any other combination) and bring up tabs that display the different forms. The user can then enter data and submit each form separately. When the user selects File -> New -> FormX, a SWT ScrolledForm object that corresponds with FormX must be given to the display. Because SWT ScrolledForm objects do not allow a deep copy, I cannot simply read the XML <form> elements at initialization, parse them into ScrolledForm objects, and pass deep copies of the ScrolledForm objects to the display each time the user clicks File -> New -> FormX. The only simple way I see of getting a new copy of a ScrolledForm object is to reparse the appropriate XML <form> element in order to create one each time the user selects File -> New -> FormX. As such, one handler would need to read the entire XML document and parse the <form> elements into a map (or some other data structure) and another handler would need to parse individual <form> elements into SWT ScrolledForm objects. The first handler would be called at initialization and the second handler would be called each time a user clicked on File -> New -> FormX. Once again, this isn't exactly my favorite implementation... but seems the simplest given that there is no way to do a deep copy of an SWT ScrolledForm object. Hopefully that makes a little more sense. No worries if it doesn't -- I just figured I'd throw this out there and see if anyone had a better idea.

  • How to parse the result xml string in BPEL

    Hi,
    This is Ishmayel.v new to BPEL and hava experience in xml parsing, java and webservices.
    Now I am getting the XML file as a result string in BEPL.
    now I want to parse the XML string and insert into the database... If any one has the idea let me know.
    my email id is [email protected]
    Thanks in Advance,
    Regards,
    Ishmayel.

    Your question is not clear.
    You have a client applicaton which invokes a BPEL process and receives XML response from BPEL. Then you want to parse this response XML in your client application?
    Or you are running a BPEL process which invokes a service and receives an XML response. Then you want to parse this XML response in BPEL before your process can proceed?
    I have to assume that you are working with a string and then you want to convert the string into XML, and then parse the XML. If this is the case, then take a look at the ora:parseEscapedXML(contentString) function. You can use this in the expression editor in JDev.

  • How to get the data for last 3rd business day and also include saturday and sunday if its a wednesday?

    Hi All,
    I have a simple query which is below:-
    Declare @reportdate date
    set @reportdate= (DATEADD(dd,-5,getdate()))
    select * from dbo.Table
    where date IN (@reportdate)
    I need this query to pull the data for the last 3rd business day .So lets say today is monday then i need the data for last week wednesday which is 3 business days back from monday, if today is a tuesday it would be for last thursday ( as 3 business days for
    tuesday would be thursday). But if today is wednesday then i need to be last 3rd business day which is last friday and i also need to get the data for saturday and sunday.
    Can someone please help me how cani change my filter to do this?
    Please let me know if i am still unclear.
    Thanks

    Hi SqlDev12,
    Based on my understanding on your requirement, you can reference the below sample.
    CREATE TABLE BusinessTable
    Bdate DATE,
    Wd VARCHAR(10)
    ;WITH Cte(DT,WD) AS
    SELECT CAST('20150401' AS DATE),DATENAME(WEEKDAY,CAST('20150401' AS DATE))
    UNION ALL
    SELECT DATEADD(DAY,1,DT),DATENAME(WEEKDAY,DATEADD(DAY,1,DT)) FROM Cte
    WHERE DT<GETDATE()
    INSERT INTO BusinessTable SELECT * FROM Cte
    SELECT * FROM BusinessTable
    SET DATEFIRST 7 -- Set Sunday as the first day of a week
    DECLARE @givenDay DATE ='20150415' --Wednesday
    SELECT * FROM BusinessTable
    WHERE Bdate BETWEEN
    --For Monday and Sunday, select last wednesday
    (CASE WHEN DATEPART(WEEKDAY,@givenDay) IN(1,2) THEN DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay)-1,0))
    --For Tuesday and Wednesday, last week's Thursday and Friday
    WHEN DATEPART(WEEKDAY,@givenDay) IN(3,4) THEN DATEADD(DAY,-5,@givenDay)
    --For Thursday and Friday, current week's Monday and Tuesday
    WHEN DATEPART(WEEKDAY,@givenDay) IN(5,6) THEN DATEADD(DAY,-3,@givenDay)
    --For Saturday, current week's Wednesday
    ELSE DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay),0)) END)
    AND
    (CASE WHEN DATEPART(WEEKDAY,@givenDay) IN(1,2) THEN DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay)-1,0))
    WHEN DATEPART(WEEKDAY,@givenDay) IN(3) THEN DATEADD(DAY,-5,@givenDay)
    WHEN DATEPART(WEEKDAY,@givenDay) IN(4) THEN DATEADD(DAY,-3,@givenDay)
    WHEN DATEPART(WEEKDAY,@givenDay) IN(5,6) THEN DATEADD(DAY,-3,@givenDay)
    ELSE DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay),0)) END)
    DROP TABLE BusinessTable
    If you have any feedback on our support, you can click
    here.
    Eric Zhang
    TechNet Community Support

  • How to get the Memory Utilization Data for Cloud Service

    Hi,
    We are planning to monitor the Performance of Cloud Services hosted onto Azure through VisualStudioOnline [TFS]. However, I couldn't find any performance metric for Memory utilization on individual Cloud Service.
    So please help how can we monitor Memory utilization on individual Cloud Service hosted through VSO.
    Thanks.
    Regards,
    Subhash Konduru
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    If you are using the VSO then you can take a look at azure application insights which is a service hosted on azure which will help you to detect issues, solve problems and continuously improve your web applications.
    Read more about Application insights here - 
    http://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/
    https://msdn.microsoft.com/en-us/library/dn793604.aspx
    Bhushan | Blog |
    LinkedIn | Twitter

  • How to get the WHOLE xml document inside a string using XSLT mapping

    Hi folks,
    I have a deep xml structure that I want to embed as body, tags included, in a mail message (not as an attachment).
    I'm trying to use Michal's method in this blog
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    However, I can't get it to deliver the entire structure instead of just specific elements.
    Any help is greatly appreciated,
    Thanks,
    Guy

    Ashok,
    I was able to work it out for my case.
    This XSL......
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <inside>
    <namestring>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
    <xsl:copy-of select="outside/name/*"/>
    <xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </namestring>
    </inside>
    </xsl:template>
    </xsl:stylesheet>
    ...will transform this input....
    <?xml version="1.0" encoding="UTF-8"?>
    <outside>
    <name>
    <nameone>name1</nameone>
    <nametwo>name2</nametwo>
    <namethree>name3</namethree>
    </name>
    </outside>
    ...and put the whole lot into the CDATA element.
    Hope this helps you,
    Guy

  • How to get the closest match strings

    Hello All,
    I am looking for a select statement that will compare the alphanumeric value of my input string and return the closest matching alphanumeric value from my Cache table.
    The Cache table has 2 columns.
    CREATE TABLE Cache (
    ID int identity primary key,
    SearchWord char(10)
    INSERT INTO Cache
    VALUES ('20');
    INSERT INTO Cache
    VALUES ('20A')
    INSERT INTO Cache
    VALUES ('20B')
    INSERT INTO Cache
    VALUES ('20A-1')
    INSERT INTO Cache
    VALUES ('20AB-223')
    INSERT INTO Cache
    VALUES ('20" Mainline')
    INSERT INTO Cache
    VALUES ('WEP3-SEG-1')
    INSERT INTO Cache
    VALUES ('WEP3-SEG-1A')
    INSERT INTO Cache
    VALUES ('WEP3-SEG-1B')
    INSERT INTO Cache
    VALUES ('WEP3')
    I am trying to use Difference function, but it is not working properly.
    select c.*,Difference(SearchWord, '20') from Cache c
    where SearchWord like '%20%' ORDER BY Difference(SearchWord, '20') DESC
    When I search for 20 in this table, I have to get all the closest matches i.e., 20, 20A,20B BUT NOT 20a-1,  20AB-223 and 20" MAINLINE and when I am searching for WEP3-SEG-1, I have to get WEP3-SEG-1, WEP3-SEG-1A but not WEP3 in the resultset.
    How can I achieve this?.
    Thanks for your assistance.

    Develop your own user-defined scalar difference function. You can name it udfDifference.
    BOL: Create User-defined Functions (Database Engine)
    UDF blog:
    http://www.sqlusa.com/bestpractices/training/scripts/userdefinedfunction/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

Maybe you are looking for

  • Printing: The outputs print on a printer other than that specified on the u

    We are using activity profile on the shipment to trigger outputs at different statuses set on the shipment document. In order to have the output trigger based on activity profile we need to have the timing for these output types set to “3”. Now the o

  • Can't connect with new SSID to my HP Officejet 6700

    I recently changed internet services and suddenly I cannot connect to my printer. When I enter the Settings then the Network areas on the printer, everything is locked and it does not show my new SSID (or ANY SSID, actually). I'm stuck and I have a p

  • THINK CENTRE E73 SERIES MT-M 10AS AFTER RESTAR NO DISPLAY

    Hi Friends, I have three Desktop PC. The Model nomber is THINK CENTRE E73 SERIES MT-M 10AS. These pc working fine but these all PC after restar not coming display in windows and bios.I was upadate the Bios But due to same problem.. What is the proble

  • Curiosity: How to use a table for input when testing a functionmodule?

    actually I am sick of writing test programs for every function I want to test using ABAP. So why it is (made) impossible to generate input data for a table as input parameter of a functionmodule? Has really nobody ever tested this stuff when the test

  • Matchcode object

    Hi ,   I have a match code object, that was converted to a collective search help during subsequent upgrades. The collective search help has one elementry search help. In the selection metod i have the name of the pool table created for the match cod