Shred XML and select XML column as multiple columns

Hi,
Kindly assist me.
I need to split XML Column(XSD defined) and select as different columns.
CREATE
XML
SCHEMA
COLLECTION [dbo].[Groupers]
AS
N'<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="grouper">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:sequence />
<xsd:attribute name="payorid" type="xsd:anySimpleType" use="required" />
<xsd:attribute name="version" type="xsd:anySimpleType" />
<xsd:attribute name="type" type="xsd:anySimpleType" />
<xsd:attribute name="payortag" type="xsd:anySimpleType" use="required" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="groupers">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:sequence>
<xsd:element ref="grouper" minOccurs="0" maxOccurs="4" />
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:schema>'
GO
CREATE
TABLE TestTable1
Groupers
XML
(CONTENT [dbo].[Groupers])
NULL,
Description
varchar(255),
insert
into TestTable1
values('<groupers><grouper
payorid="1" version="30" type="A" payortag="36" /></groupers>','TestDescriptio1')
/* This is NOT working , Please help here*/
SELECT
Groupers
.value('(/groupers/grouper/@version)[1]',
'varchar(50)')
FROM TestTable1
/* This way it is working */
Declare
@GroupersXML XML
SELECT
@GroupersXML
= Groupers
FROM TestTable1
select @GroupersXML.value('(/groupers/grouper/@version)[1]',
'varchar(50)')

Hi Singh,
Thanks for your solution, it is working good.
But i stuck with different problem now, say my XML has three elements, then it is showing me records thrice, since we've done cross apply.
Now what i need is to show only 1 record, and display the three elements from the XML as three columns.
Kindly assist me.
I assume you have ran my earlier scripts, please execute this
Update
testtable1 set groupers='<groupers>
<grouper payorid="1" version="30" type="A" payortag="36" />
<grouper payorid="3" version="20" type="C" payortag="9" />
<grouper payorid="4" version="10" type="D" payortag="4" />
</groupers>'
where
description='TestDescriptio1'
For that use the same suggestion and apply PIVOT over it
ie like
;With CTE
AS
SELECT tbl.Description,
t.c.value('string(@version)', 'varchar(50)') as Version,
t.c.value('@payorid', 'varchar(50)') as payorid
FROM TestTable1 tbl
CROSS APPLY Groupers.nodes('/groupers/grouper') as t(c)
SELECT *
FROM (SELECT ROW_NUMBER() OVER (PARTITION BY Description ORDER BY payorid) AS Seq,Description,Version
FROM CTE)c
PIVOT(MAX(Version) FOR Seq IN ([1],[2],[3],[4],[5]))p
To make it dynamic see
http://beyondrelational.com/modules/2/blogs/70/posts/10840/dynamic-pivot-in-sql-server-2005.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • I've upgraded my firefox into 6.0 version.. when i want to play cityville from facebook it missing the en-US.xml and gameSettings.xml.. how can i fix this problem..??

    when i started my cityville from facebook the loading progress stopped at 73%.. when it stop i need to download file en-US.xml and gameSettings.xml
    this is the download URL for gameSettings.xml : http://cityvillefb.static.zgncdn.com/54988/gameSettings.xml.z
    and this is the download URL for en-US.xml :
    http://cityvillefb.static.zgncdn.com/54988/en_US.xml.z
    when i used version 5.0.1 i never met any problem like this..!!
    and i already use adobe flash player higher than version 10
    so how can i fix this problem..??

    Hi Scott,
    in SDIXML_DATA_TO_DOM you can only pass the name of root node, so you can not assign attribute xmlns to root node (<Data xmlns="ServiceNet">) ... unless you build the xml document from scratch (without SDIXML_DATA_TO_DOM)
    when using your sample code (without sale) I get xml without <item>
    SDIXML_DATA_TO_DOM => SDIXML_DOM_TO_SCREEN::
    <?xml version="1.0" encoding="utf-8" ?>
    - <Data>
      <LV_XMINS>xmlns="DUMMY FIELD</LV_XMINS>
      <BATCHDATETIME>2009-11-13T12:05:58</BATCHDATETIME>
      </Data>
    regards, Karsten

  • Porting data from Oracle8i to XML and from XML  to Oracle 10g

    Hai
    I have a client database (using oracle 8i) and a server database (oracle 10g).
    Due to lack of leased line connectivity i want to port these offline data from 8i to 10g
    using a modem(dial up connection).Is there is any way to port data from 8i to XML
    and from XML to 10g.
    thanks in advance
    dejies

    Thanks Nicolas,
    As per documentation, it seems to be difficult for export/import from Oracle8i to 10g. Is that any way to achieve this? I have to append the newly imported data with old or exisiting data into Oracle10g.
    Regards
    Nikhil

  • Need server.xml and web.xml for connection pooling

    hi guys,
    I am having lots of problem implementing the Connection Pool. I want to use the Tomcat's Connection pool classes and not my connection pool.
    I have gone through lots of problem trying to configure it.
    I got the range of errors. Has someone worked on this. Does it work with Tomcat 4.1 and Oracle 8i. Can anyone provide any links or previous posts to help me out.
    If someone can paste their working server.xml and web.xml then that would be really grt.
    Any kind of help would be really helpful.
    Amit

    Tomcat does not have a connection pooling mechanism. I've used Apache Commons DBCP with Tomcat although with PostgreSQL. It works great.
    Nothing in my web.xml gets modified. Only server.xml needs to be updated for DBCP. The Tomcat JNDI Datasource documentation is very good and should get you through.

  • How to Modify Server.xml and web.xml inTomcat

    Hii
    i am very new to tomcat..and using servlets..so plx tell me hw i can modify the server.xml and web.xml....
    if my installables are in c:\program files\apache group\tomcat4.1
    ok...i have my servlets file in c:\program files\apache group\tomcat4.1\webapps\ap1\WEB-INF\classes..so plz advice me on modifying the server.xml and web.xml....also tell me how and what we do in mapping
    Plz tell me soon...
    thanking u in advance.
    rahul
    Take care.:)

    for web.xml you need something like this, i took this from the web.xml under the examples directory in tomcat:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>
    servletToJsp
    </servlet-name>
    <servlet-class>
    servletToJsp
    </servlet-class>
    </servlet>
    <servlet>
    <servlet-name>
    CompressionFilterTestServlet
    </servlet-name>
    <servlet-class>
    compressionFilters.CompressionFilterTestServlet
    </servlet-class>
    </servlet>
    </web-app>
    basically you need to map the servlet with a class, for servlet-name call it whatever you like, you'll be using this name in the url to access you servlet, for the class give it the name of the class, java complied class, that's it.
    server.xml is used to configure tomcat.

  • Renaming Validation-rule.xml and Validation.xml

    Hi
    Is it possible to rename Validation-rule.xml and validation.xml files in the Struts Validation framework.
    will the validation work both the files are renamed to say abc-rule.xml or xyz.xml.
    please provide your feedback on this.
    Thanks
    Vikeng

    vikeng wrote:
    please provide your feedback on this.I think that it would be better if you asked that on an Apache Struts forum (or mailing list).

  • Can anyone tell me the difference between the rss.xml and podcast.xml?

    I have the Podcast maker program. Can anyone tell me the difference between the rss.xml and podcast.xml? How do they differ? What do I use each of them for? Where should I put them in my directory?

    Podcast Maker sets up your podcast from media files you enter into it; you enter the summary and description. It then publishes to your iDisk or other server, and in the process created the podcast.xml file which you can submit to iTunes.
    It doesn't create an rss.xml file: it sounds as if you are also creating the podcast in iWeb, which does. This has the advantage of creating a web page; it will also create the rss.xml file.
    Both are valid - of course if there are any differences between the version in Podcast Maker and the version in iWeb then the xml files will be different. But basically you seem to be creating two versions of the same podcast - if you are making it in iWeb then the Podcast maker version is really redundant (though I prefer it for podcast creation). If you want to go on using both I should use the podcast.xml feed it creates.

  • How can I separate one column into multiple column?

    How can I separate one column into multiple column?
    This is what I have:
    BUYER_ID ATTRIBUTE_NAME ATTRIBUTE_VALUE
    0001 PHONE_NUMBER 555-555-0001
    0001 EMAIL [email protected]
    0001 CURRENCY USD
    0002 PHONE_NUMBER 555-555-0002
    0002 EMAIL [email protected]
    0002 CURRENCY USD
    0003 PHONE_NUMBER 555-555-0003
    0003 EMAIL [email protected]
    0003 CURRENCY CAD
    This is what I would like to have:
    BUYER_ID PHONE_NUMBER EMAIL CURRENCY
    0001 555-555-0001 [email protected] USD
    0002 555-555-0002 [email protected] USD
    0003 555-555-0003 [email protected] CAD
    Any help would be greatly appreciated.

    This is another solution. Suppose your actual table's name is test(which has the redundant data). create a table like this:
    CREATE TABLE test2 (BUYER_ID number(10),PHONE_NUMBER varchar2(50),EMAIL varchar2(50),CURRENCY varchar2(50));
    then you will type this procedure:
    declare
    phone_number_v varchar2(50);
    EMAIL_v varchar2(50);
    CURRENCY_v varchar2(50);
    cursor my_test is select * from test;
    begin
    for my_test_curs in my_test loop
    select ATTRIBUTE_VALUE INTO phone_number_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='PHONE_NUMBER';
    select ATTRIBUTE_VALUE INTO EMAIL_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='EMAIL';
    select ATTRIBUTE_VALUE INTO CURRENCY_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='CURRENCY';
    INSERT INTO test2
    VALUES (my_test_curs.person_id,phone_number_v,EMAIL_v,CURRENCY_v);
    END LOOP;
    END;
    Then you will create your final table like this:
    create table final_table as select * from test2 where 1=2;
    After that write this code:
    INSERT ALL
    into final_table
    SELECT DISTINCT(BUYER_ID),PHONE_NUMBER,EMAIL,CURRENCY
    FROM TEST2;
    If you have a huge amount of data in your original table this solution may take a long time to do what you need.

  • Performance of update query for single column vs multiple column

    Hi All,
    I could not find any answer for this, does it ever matter in terms of performance updating single column versus multiple column in a single update query.
    For eg. table consisting of 15 columns, what would be the difference in performance when one column is update in the single query against another update query where 15 columns are updated.
    Please do keep in mind my table columns in actually could be around 150+.
    Thanks for any information provided.

    If updated columns aren´t on where clause , then the only impact of 15 columns will be a increase on redo generation, and a possible chainning row.
    So since the redo is one of the things that have a large impact, the answer is yes.
    The performance will be slower.
    Regards
    Helio Dias.
    http://heliodias.com
    OCE SQL, OCP 9i

  • Help listing and selecting xml object

    Hi there
    I am having problems with "see the forrest" with this code. I am trying to sort a my xml elements by listing them , sorting them and moving them.
    My problem is :
    How do i make a list of all my elements in the "story" like a collection of indesign elements ?
    How do i select the element and move it after "myXMLOld" ?
    And if this is a "BAD" way to to this i will be interested to learn a better way ?
    Regards
    T'
    var myDocument = app.documents.item(0);
        var myXML = myDocument.xmlElements.itemByName("Root").xmlElements.itemByName("Story")
          var myXmlList = new Array;
        var bb = myXML.xmlElements.length;
    for(var myCounter = 0; myCounter < bb; myCounter++){
         var  myXmlElement= myXML.xmlElements.item(myCounter)
         var myXM_id = myXML.xmlElements.item(myCounter).id;
         var myXML_con = myXML.xmlElements.item(myCounter).contents;
         myXmlList[myCounter] = [[myXML_con , myXM_id]];
    var ok = myXmlList;
    myXmlList.sort ()
    var myXMLOld=myXmlList[0][0][1];
      var myXMLElementA = myXML.xmlElements.itemByID(myXmlList[0][0][1]);
    myXMLElementA.move(LocationOptions.atBeginning);
    for(var myCounter = 1; myCounter < bb; myCounter++){
    var test = myXmlList[myCounter][0][1];
    var myXMLElementA = myXML.xmlElements.itemByID(test);
         myXMLElementA.move(LocationOptions.after, myXML.xmlElements.xmlElements.itemByID(myXMLOld));
          var myXMLOld=myXmlList[myCounter][0][1];
    XML file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
    <Story>
    <Vidlex>Alger: En stor gruppe </Vidlex>
    <Vidlex>Basalt: Sort finkornet /Vidlex>
    <Vidlex>Cyanobakterier: Bakterier, </Vidlex>
    <Vidlex>Dna: (Deoxyribonukleinsyre). Organisk molekyle, </Vidlex>
    <Vidlex>Etolog: Person, der </Vidlex>
    </Story>
    </Root>

    Unfortunately in my real scenario I don't know what the
    element will be called. It could be in <foo> or <bar>
    etc, so I need to be able to use a variable (in which the element
    name is set beforehand). With "::" I can't use a variable, so
    textXML.ns::findParis looks for a "findParis" element and not "b".
    That's why I'm trying to use testXML.child(findParis) because
    I can use a variable. I just can't figure out how to make it
    incorporate the namespace as well.

  • Select function that returns multiple columns.

    Currently I have a function that will return 1 column and I can use that in a select statement. What I need is to return multiple columns from a table. In the function I have I return the street address from a table that holds information about dealers, I need to be able to also return the columns that contain the city, state, and zip code so it can be used in an sql select statement. How would I do this?
    My function:
    FUNCTION GET_ADDRESS(dealer_id IN number)
    RETURN tbl_dealer_info.c_street%TYPE AS
    v_rc tbl_dealer_info.c_street%TYPE;
    CURSOR get_dealer_cur IS
    SELECT c_street
    FROM tbl_dealer_info
    WHERE n_dealer_id = dealer_id;
    BEGIN
    v_rc := NULL;
    OPEN get_dealer_cur;
    FETCH get_dealer_cur INTO v_rc;
    IF get_dealer_cur%NOTFOUND THEN
    NULL;
    END IF;
    CLOSE get_dealer_cur;
    RETURN v_rc;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END GET_ADDRESS;
    My select statement:
    select GET_ADDRESS(1205) Street, DI.n_inactive_flag, DI.n_onhold_flag
    from tbl_dealer_info DI
    where DI.n_dealer_id = 1205;
    I would like to be able to select the street, city, state, and zip all in this select statement from the GET_ADDRESS function.
    Thanks,
    Lori Neirynck

    "The reality is you've probably already put your blinders on and you won't learn the best approach to solving your problem because you insist on asking a courtroom style question (just "yes" or "no" please)."
    Actually, I asked this question because I was looking for the best approach to my problem. I have an SQL statement that correctly selects everything it needs to from all 15 tables. The thing of it is it is very long and difficult to read. I wanted to try using functions so that I could change 12 AND/OR statements into 3 IF statements so everything is easier to read. I have received a couple of different ways to do this from other forums that assumed I knew what I was doing. I have gotten one to work, the other I'm still working on. I'll post the one that worked for others that want to know.
    SQL> insert into dealer_info values (1,'Me','13 success street', 'Wonder Town','Wonderland','1313');
    SQL> commit;
    SQL> create type t_address as object (
    2 street varchar2(100),
    3 city varchar2(30),
    4 state varchar2(30),
    5 zip varchar2(10));
    6 /
    Type created.
    SQL> create or replace function get_address (p_id number) return t_address
    2 is
    3 ret t_address := t_address(null,null,null,null);
    4 rec dealer_info%rowtype;
    5 begin
    6 select * into rec from dealer_info where id=p_id;
    7 ret.street := rec.street;
    8 ret.city := rec.city;
    9 ret.state := rec.state;
    10 ret.zip := rec.zip;
    11 return ret;
    12 end;
    13 /
    Function created.
    SQL> col name format a10
    SQL> col address format a70
    SQL> select name, get_address(id) address from dealer_info;
    NAME ADDRESS(STREET, CITY, STATE, ZIP)
    Me T_ADDRESS('13 success street', 'Wonder Town', 'Wonderland', '1313')
    1 row selected.
    -Lori

  • Selectively Format Groups with Multiple Columns

    I have a bit of an obscure task I've been trying to hammer out to no avail.  I've searched quite a bit but can't seem to find anyone else who has attempted this.  I have two group by statements, one is a category and the other is a rank.  What I'm trying to do is organize the report so that there are category rows and below each category row is a set of columns for each rank with their associated values as such:
    category1
    rank1     rank2     rank3     rank4
    value1   value1    value1   value1
    value2   value2    value2   value2
    category2
    rank1     rank2     rank3
    value1   value1    value1
    value2   value2    value2
    I've tried using details>Section Expert>>Layout>Format Groups with multiple column.  Unfortunately, this applies to both groups putting the categories into columns instead of rows, making a mess.  Does anyone know of a way to selectively put groups into columns and ensure alignment?  In the above example the user would be able to compare rank values from multiple categories since they all line up.  Any help with this would be very much appreciated.

    Hi,
    Have you tried using a crosstab? Give this a shot:
    1) Group the report on Category
    2) Create a new group header section. Group Header b
    3) Place a crosstab in this section
    4) The columns would be the Rank field, I'm not sure about what you would like to show in the rows
    5) The summarized field would be the Value field ofcourse
    Let me know how this goes.
    -Abhilash

  • Taking data from one column and spread it out into multiple columns

    I have a table that I wish to take the multiple values out of one column and stick each into its own column..
    The data looks like this:
    subscriber id benefit plan
    12345 Med
    12345 Drg
    98765 Med
    98765 Drg
    I want it to look like:
    subscriber_id pc_med
    12345
    select distinct subscriber_id,
    (select grp07_benefit_plan from martin_7265_anoc
    where grp07_benefit_plan_type = 'MEDICAL ') pc_med,
    (select grp07_benefit_plan from martin_7265_anoc
    where grp07_benefit_plan_type = 'DRUG ') pc_drg
    from martin_7265_anoc

    user12296489 wrote:
    I have a table that I wish to take the multiple values out of one column and stick each into its own column..Multiple values in a single column is a violation of relational design. Makes it very difficult to implement data integrity. And there is the inevitable complexity and performance knock when trying to extract distinct values from the single column.
    Thus your attempt at fixing it is hopefully a permanent solution and not a a hack trying to make a broken db design to work?
    As Daniel said, it is very hard to make any sense of the example you have posted. But this is not the first time here that a poster wants to extract multiple values from a string column - so the basic principles of how to do it, remains the same.
    You need to have a means to identify each distinct value. This is usually done by identifying the separator character used between values. Such as a space or a comma.
    If the values are fixed length, then you can use sub-strings with explicit positions and lengths to extract the values from the string.
    The typical case is the former, which means you need to tokenise (split) the string. There are a number of ways to do this. I posted an example in {message:id=1807978} that shows how to do it via a PL/SQL function. There are numerous other ways, such as using SQL only. If you search for a keywords like "+splitting string+", it should turn up these examples.

  • Use Sign.xml and Encrypt.xml for both request AND response within WSDL?

    Hi,
    ALSB: 2.6
    I was wandering if it's possible to use abstract outof the box WS-Policy file within WSDL file to specify encryption
    (Encrypt.xml) and digital signature(Sign.xml) with X509 for both request and response???
    So far, it only works for either request or response BUT not both. i.e. within WSDL file
    <!-- following WSDL works for encrypting and signing request with X509 in test console -->.....
    <wsdl:binding name="DexService2Soap" type="tns:DexService2Soap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
        <wsdl:operation name="Message">
                <soap:operation soapAction="urn:moe:dex:dexservice:2.0.0/Message" style="document" />
                              <wsdl:input>
                               <!-- WS-Policy file applied here -->
                             <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                     <soap:body use="literal" />
                               </wsdl:input>
                             <wsdl:output>
                                  <soap:body use="literal" />
                               </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
               Or
    <!-- following WSDL works for encrypting and signing response with X509 in test console -->
    <wsdl:binding name="DexService2Soap" type="tns:DexService2Soap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
        <wsdl:operation name="Message">
                <soap:operation soapAction="urn:moe:dex:dexservice:2.0.0/Message" style="document" />
                              <wsdl:input>
                                     <soap:body use="literal" />
                               </wsdl:input>
                             <wsdl:output>
                                       <!-- WS-Policy file applied here -->
                                       <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                  <soap:body use="literal" />
                               </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
    But not both
    <!-- following WSDL doesn't work for encrypting and signing both response and request with X509 in test console -->
    <wsdl:binding name="DexService2Soap" type="tns:DexService2Soap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
        <wsdl:operation name="Message">
                <soap:operation soapAction="urn:moe:dex:dexservice:2.0.0/Message" style="document" />
                              <wsdl:input>
                                        <!-- WS-Policy file applied here -->
                                       <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                     <soap:body use="literal" />
                               </wsdl:input>
                             <wsdl:output>
                                       <!-- WS-Policy file applied here -->
                                       <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                  <soap:body use="literal" />
                               </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
    ...      Instead, I got error message like
    <15/01/2008 10:15:04 AM NZDT> <Error> <ALSB Security> <BEA-387023> <An error ocurred during web service security inbound response processing [error-code: Fault
    , message-id: 3917705281899426819-4368b1eb.117762cff6e.-7fdb, proxy: DexServiceX509-Stub/Proxy Services/DexServiceX509-ProxyService, operation: Message]
    --- Error message:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode>
    <faultstring>Failed to get token for tokenType: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3</faultstring></soapenv:Fa
    ult></soapenv:Body></soapenv:Envelope>
    weblogic.xml.crypto.wss.WSSecurityException: Failed to get token for tokenType: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#
    X509v3
    at weblogic.xml.crypto.wss.SecurityBuilderImpl.addEncryption(SecurityBuilderImpl.java:308)
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processConfidentiality(SecurityPolicyDriver.java:280)
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:75)
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:64)
    at weblogic.wsee.security.WssServerHandler.processOutbound(WssServerHandler.java:86)
    Truncated. see log file for complete stacktrace
    >
    <15/01/2008 10:15:24 AM NZDT> <Error> <com.bea.weblogic.kernel> <000000> <Failed to build CertPath
    java.security.cert.CertPathBuilderException: [Security:090603]The certificate chain is invalid because it could not be completed. The trusted CAs did not inclu
    de CN=x509,OU=x509,O=x509,L=Wellington,ST=Wellington,C=NZ.
    at weblogic.security.providers.pk.WebLogicCertPathProviderRuntimeImpl$JDKCertPathBuilder.engineBuild(WebLogicCertPathProviderRuntimeImpl.java:669)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
    at com.bea.common.security.internal.legacy.service.CertPathBuilderImpl$CertPathBuilderProviderImpl.build(CertPathBuilderImpl.java:67)
    at com.bea.common.security.internal.service.CertPathBuilderServiceImpl.build(CertPathBuilderServiceImpl.java:86)
    at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
            Truncated. see log file for complete stacktrace
    >
    <15/01/2008 10:15:24 AM NZDT> <Error> <ALSB Security> <BEA-387022> <An error ocurred during web service security inbound request processing [error-code: Fault,
    message-id: 3917705281899426819-4368b1eb.117762cff6e.-7fd8, proxy: DexServiceX509-Stub/Proxy Services/DexServiceX509-ProxyService, operation: null]
    --- Error message:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><soapenv:Fault xmlns:wsse="http://docs.oasis-open.or
    g/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><faultcode>wsse:InvalidSecurityToken</faultcode><faultstring>Security token failed to validate. weblo
    gic.xml.crypto.wss.SecurityTokenValidateResult@3c5347b[status: false][msg [
      Version: V1
      Subject: CN=x509, OU=x509, O=x509, L=Wellington, ST=Wellington, C=NZ
      Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
      Key:  Sun RSA public key, 1024 bits
      modulus: 13052787793731294943682394984664645854838424340012907077330623....
      The 'System Error Handler' from 'Invocation Trace' in ALSB test console is something like
    [pre]     
    $fault:
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-386201</con:errorCode>
         <con:reason>
              A web service security fault
              occurred[{http://schemas.xmlsoap.org/soap/envelope/}Server][Failed
              to get token for tokenType:
              http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3]
         </con:reason>
         <con:details>
              <err:WebServiceSecurityFault
                   xmlns:err="http://www.bea.com/wli/sb/errors">
                   <err:faultcode
                        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                        soapenv:Server
                   </err:faultcode>
                   <err:faultstring>
                        Failed to get token for tokenType:
                        http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3
                   </err:faultstring>
              </err:WebServiceSecurityFault>
         </con:details>
         <con:location>
              <con:path>response-pipeline</con:path>
         </con:location>
    </con:fault>
    So is this a feature not supported in ALSB 2.6 yet or am I missing something dead simple?
    Thanks in advance
    Sam

    Instead of specifying policies for input and output separately you could place the policy reference only once in the operation element. Maybe will this solve your problem...
    http://e-docs.bea.com/alsb/docs26/security/ws_policy.html#wp1061166

  • Split the result of one column to multiple columns

    Hi Experts,
    Could you please help me to split the result of below query into multiple columns:
    EXEC master..xp_cmdshell 'wmic service where "Caption Like ''%sql%''" get Caption , StartName, state'
    I needs result of this query something like below but in tabular format:
    Caption
    StartName
    State
    SQL Server Integration Services 11.0
    NT Service\MsDtsServer110
    Running
    SQL Full-text Filter Daemon Launcher (MSSQLSERVER)
    NT Service\MSSQLFDLauncher
    Running
    SQL Server (MSSQLSERVER)
    NT Service\MSSQLSERVER
    Running
    SQL Server Analysis Services (MSSQLSERVER)
    NT Service\MSSQLServerOLAPService
    Running
    --------------------------------- Devender Bijania

    Refer below query,
    DROP TABLE #TEMP
    CREATE TABLE #TEMP(COLS NVARCHAR(300))
    INSERT INTO #TEMP
    EXEC master..xp_cmdshell 'wmic service where "Caption Like ''%sql%''" get Caption , StartName, state'
    SELECT *,
    PATINDEX('% %',COLS) C1,
    LEFT(COLS, PATINDEX('% %',COLS)) Caption,
    LTRIM(RIGHT(COLS,LEN(COLS)-PATINDEX('% %',COLS))) ServiceName,
    PATINDEX('% %',LTRIM(RIGHT(COLS,LEN(COLS)-PATINDEX('% %',COLS)))) C2,
    LTRIM(RIGHT(LTRIM(RIGHT(COLS,LEN(COLS)-PATINDEX('% %',COLS))), LEN(LTRIM(RIGHT(COLS,LEN(COLS)-PATINDEX('% %',COLS)))) - PATINDEX('% %',LTRIM(RIGHT(COLS,LEN(COLS)-PATINDEX('% %',COLS)))))) State
    FROM #TEMP
    WHERE COLS IS NOT NULL AND RTRIM(LEFT(COLS, PATINDEX('% %',COLS))) <> 'Caption'
    Regards, RSingh

Maybe you are looking for