I have custom list which i need to display in webPartPage using XSLT. I create view, where just one field Title and set scope="recursive", but on the page displays only the folder title.
<View BaseViewID="2" Type="HTML" TabularView="FALSE" Scope="Recursive">
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Title"/>
</ViewFields>
<RowLimit Paged="TRUE">10</RowLimit>
</View>
i have feature that link it
<File Path="MainPage/default.aspx" Url="default.aspx">
<View WebPartOrder="1" WebPartZoneID="Main" BaseViewID="2" List="$Resources:core,lists_Folder;/RequestList">
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Невозможно импортировать эту веб-часть.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="InitialAsyncDataFetch" type="bool">False</property>
<property name="ChromeType" type="chrometype">Default</property>
<property name="Title" type="string" />
<property name="Height" type="string" />
<property name="CacheXslStorage" type="bool">True</property>
<property name="ListDisplayName" type="string" />
<property name="AllowZoneChange" type="bool">True</property>
<property name="AllowEdit" type="bool">True</property>
<property name="XmlDefinitionLink" type="string" />
<property name="DataFields" type="string" />
<property name="Hidden" type="bool">False</property>
<property name="ListName" type="string">{39C129CE-1800-48EB-A8ED-1C304C1FE457}</property>
<property name="NoDefaultStyle" type="string" null="true" />
<property name="AutoRefresh" type="bool">False</property>
<property name="ViewFlag" type="string">8388621</property>
<property name="Direction" type="direction">NotSet</property>
<property name="AutoRefreshInterval" type="int">60</property>
<property name="AllowConnect" type="bool">True</property>
<property name="Description" type="string" />
<property name="AllowClose" type="bool">True</property>
<property name="ShowWithSampleData" type="bool">False</property>
<property name="ParameterBindings" type="string">
<ParameterBinding Name="dvt_sortdir" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_sortfield" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/>
<ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
<ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" />
<ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" />
<ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" />
<ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" />
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
</property>
<property name="Xsl" type="string" null="true" />
<property name="CacheXslTimeOut" type="int">86400</property>
<property name="WebId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">00000000-0000-0000-0000-000000000000</property>
<property name="ListUrl" type="string" />
<property name="DataSourceID" type="string" />
<property name="FireInitialRow" type="bool">True</property>
<property name="ManualRefresh" type="bool">False</property>
<property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Html, TabularView, Hidden, Mobile</property>
<property name="ChromeState" type="chromestate">Normal</property>
<property name="AllowHide" type="bool">True</property>
<property name="PageSize" type="int">-1</property>
<property name="SampleData" type="string" null="true" />
<property name="BaseXsltHashKey" type="string" null="true" />
<property name="AsyncRefresh" type="bool">False</property>
<property name="HelpMode" type="helpmode">Modeless</property>
<property name="ListId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">39c129ce-1800-48eb-a8ed-1c304c1fe457</property>
<property name="DataSourceMode" type="Microsoft.SharePoint.WebControls.SPDataSourceMode, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">List</property>
<property name="AllowMinimize" type="bool">True</property>
<property name="TitleUrl" type="string">default.aspx</property>
<property name="CatalogIconImageUrl" type="string">/_layouts/images/itgen.png</property>
<property name="DataSourcesString" type="string" />
<property name="GhostedXslLink" type="string">main.xsl</property>
<property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
<property name="DisplayName" type="string" />
<property name="UseSQLDataSourcePaging" type="bool">True</property>
<property name="Width" type="string" />
<property name="ExportMode" type="exportmode">All</property>
<property name="XslLink" type="string">/_layouts/[]/xsl/archive.xsl</property>
<property name="ViewContentTypeId" type="string">0x</property>
<property name="HelpUrl" type="string" />
<property name="XmlDefinition" type="string" />
<property name="Default" type="string" />
<property name="TitleIconImageUrl" type="string" />
<property name="MissingAssembly" type="string">Невозможно импортировать эту веб-часть.</property>
<property name="SelectParameters" type="string" />
</properties>
</data>
</webPart>
</webParts>
]]>
</View>
</File>
and simple xsl like there
http://msdn.microsoft.com/en-us/library/ff604024(v=office.14).aspx
You need to add Scope="Recursive" into second View (where you define WebPartZone and etc.)
Let's try:
<File Path="MainPage/default.aspx" Url="default.aspx">
<View WebPartOrder="1" WebPartZoneID="Main" BaseViewID="2" List="$Resources:core,lists_Folder;/RequestList" Scope="Recursive">
...
Related
I have a proxy service inlclued a sequence.
I process for authentication for proxy service with tag
<policy key="gov:/testPolicy"/>
<enableSec/>
In this sequence contain iterate mediator.
When call proxy service with authentication by soapUI then not reponse for client and have a error Unexpected error sending message back {org.apache.synapse.core.axis2.Axis2Sender} org.apache.axis2.AxisFault: No password supplied by the callback handler for the user : "wso2carbon"
If have not iterate mediator then have not error
This sequence
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="SendReceiveQueue" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<property expression="get-property('Edxml_Organ_Id')" name="senderUnitId" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="get-property('Edxml_Type')" name="applicationType" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="get-property('Edxml_Record_Code')" name="recordCode" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="$ctx:data_original" name="messagePl" scope="default" type="STRING" xmlns:edXML="http://www.mic.gov.vn/TBT/QCVN_102_2016" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="$body" name="messagePlBody" scope="default" type="STRING" xmlns:edXML="http://www.mic.gov.vn/TBT/QCVN_102_2016" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="QUEUE_ACTION_TYPE" scope="default" type="STRING" value="SENDER"/>
<log level="custom">
<property expression="get-property('messagePl')" name="messagePllogging" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="get-property('messagePlBody')" name="messagePlloggingBody" xmlns:ns="http://org.apache.synapse/xsd"/>
</log>
<iterate expression="$ctx:abc//edXML:To" id="abc" sequential="true" xmlns:edXML="http://www.mic.gov.vn/TBT/QCVN_102_2016" xmlns:ns="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<target>
<sequence>
<log level="custom">
<property name="goi DSS" value="-------------------------------------------"/>
<property expression="//edXML:To/edXML:OrganId/text()" name="queue name"/>
</log>
<payloadFactory media-type="xml">
<format>
<p:getQueueId xmlns:p="http://ws.wso2.org/dataservice">
<xs:in_unitId xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:in_unitId>
<xs:in_b2bType xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:in_b2bType>
</p:getQueueId>
</format>
<args>
<arg evaluator="xml" expression="//edXML:To/edXML:OrganId/text()"/>
<arg evaluator="xml" expression="syn:get-property('Edxml_Type')"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint>
<address uri="http://cqdt-app3:8280/services/validateData"/>
</endpoint>
</call>
<property expression="//x:returnCode/x:MessageQueueId/text()" name="queue_name" scope="default" type="STRING" xmlns:x="http://ws.wso2.org/dataservice"/>
<log level="custom">
<property name="lay xong tu dss" value="-------------------------------------------"/>
<property expression="$ctx:queue_name" name="ten queue lay ra"/>
</log>
<class name="com.vsc.ReceiveQueue">
<property name="password" value="admin"/>
<property name="queueName" value="testQueue1"/>
<property name="CF_NAME_PREFIX" value="connectionfactory."/>
<property name="CF_NAME" value="QueueConnectionFactory"/>
<property name="QPID_ICF" value="org.wso2.andes.jndi.PropertiesFileInitialContextFactory"/>
<property name="CARBON_DEFAULT_HOSTNAME" value="cqdt-app3"/>
<property name="QUEUE_NAME_PREFIX" value="queue."/>
<property name="userName" value="admin"/>
<property name="CARBON_CLIENT_ID" value="carbon"/>
<property name="CARBON_DEFAULT_PORT" value="5675"/>
<property name="CARBON_VIRTUAL_HOST_NAME" value="carbon"/>
</class>
<log level="custom">
<property name="put xong vao queue" value="-------------------------------------------"/>
<property expression="$ctx:queue_name" name="ten queue ban xong"/>
</log>
<payloadFactory media-type="xml">
<format>
<response>
<result>SUCCESS</result>
</response>
</format>
<args/>
</payloadFactory>
<property name="RESPONSE" scope="default" type="STRING" value="true"/>
<property name="messageType" scope="axis2" type="STRING" value="application/xml"/>
<property action="remove" name="NO_ENTITY_BODY" scope="axis2"/>
<header action="remove" name="To" scope="default"/>
<send/>
</sequence>
</target>
</iterate>
<property name="RESPONSE" scope="default" type="STRING" value="true"/>
<header action="remove" name="To" scope="default"/>
<log level="custom">
<property expression="get-property('messagePl')" name="1111555555555555555555555555551111111111111111111111111111111-------------------------------" xmlns:ns="http://org.apache.synapse/xsd"/>
</log>
</sequence>
Please help me!
Have you tried applying the policy on the endpoint directly?
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="TQBsEndpoint">
<address uri="http://cqdt-app3:8280/services/validateData" format="soap11">
<enableSec policy="gov:testPolicy"/>
</address>
</endpoint>
I am working with wso2esb 4.8.1. I wish to authenticate my client against wso2 esb Primary user store with Plain text password.So i have done below changes and its working fine.
I have commented the PasswordDigest element.
<UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
<Property name="TenantManager">org.wso2.carbon.user.core.tenant.JDBCTenantManager</Property>
<Property name="ReadOnly">false</Property>
<Property name="MaxUserNameListLength">100</Property>
<Property name="IsEmailUserName">false</Property>
<Property name="DomainCalculation">default</Property>
<!-- <Property name="PasswordDigest">SHA-256</Property> -->
<Property name="StoreSaltedPassword">true</Property>
<Property name="ReadGroups">true</Property>
<Property name="WriteGroups">true</Property>
<Property name="UserNameUniqueAcrossTenants">false</Property>
<Property name="PasswordJavaRegEx">^[\S]{5,30}$</Property>
<Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
<Property name="UsernameJavaRegEx">^[^~!#$;%^*+={}\\|\\\\<>,\'\"]{3,30}$</Property>
<Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</Property>
<Property name="RolenameJavaRegEx">^[^~!#$;%^*+={}\\|\\\\<>,\'\"]{3,30}$</Property>
<Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
<Property name="UserRolesCacheEnabled">true</Property>
<Property name="MaxRoleNameListLength">100</Property>
<Property name="MaxUserNameListLength">100</Property>
<Property name="SharedGroupEnabled">false</Property>
<Property name="SCIMEnabled">false</Property>
</UserStoreManager>
and wrote the proxy like this
<?xml version="1.0" encoding="UTF-8"?><proxy xmlns="http://ws.apache.org/ns/synapse" name="authent" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<property name="username" value="admin" scope="default" type="STRING"/>
<property name="password" value="admin" scope="default" type="STRING"/>
<dblookup>
<connection>
<pool>
<dsName>jdbc/WSO2CarbonDB</dsName>
</pool>
</connection>
<statement>
<sql>select UM_USER_NAME from UM_USER where UM_USER_NAME=? and UM_USER_PASSWORD= ?</sql>
<parameter value="faisal" type="CHAR"/>
<parameter value="faisal" type="CHAR"/>
<result name="IsUserExisted" column="UM_USER_NAME"/>
</statement>
</dblookup>
<log level="full">
<property name="IsUserExisted" expression="get-property('IsUserExisted')"/>
</log>
</inSequence>
<outSequence/>
</target>
<description/>
</proxy>
I created faisal user in my console. So its working fine.
whenever my offset is 0 that time its working fine.If i change the offset its not working.
Its returning null.
Basically i wish to use this query as my username and password validation.
So please let me know what is the issue.
Thanks in Advance.
I have an xml document with nodes that look like this:
<SQLIndexUsage>
<Property Name="database_name">ClearTrace</Property>
<Property Name="Object_Name">CTTraceSummary</Property>
<Property Name="Schema_name">dbo</Property>
<Property Name="Index_name">IX_CTTraceSummary_Date</Property>
<Property Name="Type_Desc">NONCLUSTERED</Property>
<Property Name="user_seeks" />
<Property Name="user_scans" />
<Property Name="user_lookups" />
<Property Name="user_updates" />
<Property Name="usage_ratio">0.00</Property>
<Property Name="RowError" />
<Property Name="RowState">Detached</Property>
<Property Name="Table" />
<Property Name="ItemArray">
<Property>ClearTrace</Property>
<Property>CTTraceSummary</Property>
<Property>dbo</Property>
<Property>IX_CTTraceSummary_Date</Property>
<Property>NONCLUSTERED</Property>
<Property />
<Property />
<Property />
<Property />
<Property>0.00</Property>
</Property>
<Property Name="HasErrors">False</Property>
</SQLIndexUsage>
How do I write a for-each select that will filter on multiple fields, I was working on something like this:
<xsl:for-each select="/objects/SQLIndexUsage/Property[#Name ='user_seeks'][1]!='' or /objects/SQLIndexUsage/Property[#Name ='user_scans']!='' or /objects/SQLIndexUsage/Property[#Name ='user_updates']!=''">
Or am I looking at this wrong?
In general, you should keep the conditions in a single predicate:
/objects/SQLIndexUsage/Property[
(#Name ='user_seeks' or #Name='user_scans' or #Name='user_updates') and .!='']
This is even shorter:
/objects/SQLIndexUsage/Property[
#Name[.='user_seeks' or .='user_scans' or .='user_updates'] and .!='']
This is complicated a bit by your position condition, but you can still do this (with union):
/objects/SQLIndexUsage/Property[#Name='user_seeks' and .!=''][1] |
/objects/SQLIndexUsage/Property[
(#Name='user_scans' or #Name='user_updates') and .!='']
Note: I've left /objects on the expression, even though your sample XML doesn't show it. I'm guessing you're actually working with a larger document.
I am trying to use c3p0 as connection pool provider in my application (jpa 2 and hibernate core 3.3.2) but c3p0 getting too much connection from database.This is same problem but answer not helped.I am getting entitymanager from entitymanager factory and storing entitymanager in a thread local variable,thus a am using a fresh entiymanager for each request.(by the way if i use hibernate default pool no problem)
<property name="hibernate.connection.provider_class"
value="org.hibernate.connection.C3P0ConnectionProvider" />
<property name="hibernate.c3p0.min_size" value="1" />
<property name="hibernate.c3p0.max_size" value="10" />
<property name="hibernate. c3p0.initialPoolSize" value="3" />
<property name="hibernate.c3p0.numHelperThreads" value="3" />
<property name="hibernate.c3p0.maxPoolSize" value="10" />
<property name="hibernate.c3p0.minPoolSize" value="1" />
<property name="hibernate.c3p0.maxIdleTime" value="3600" />
<property name="hibernate.c3p0.maxIdleTimeExcessConnections" value="300" />
<property name="hibernate.c3p0.unreturnedConnectionTimeout" value="3600" />
<property name="hibernate.c3p0.acquire_increment" value="1" />
<property name="hibernate.c3p0.idle_test_period" value="3000" />
<property name="hibernate.c3p0.max_statements" value="0" />
<property name="hibernate.c3p0.timeout" value="300" />
<property name="hibernate.c3p0.breakAfterAcquireFailure" value="false" />
<property name="hibernate.c3p0.acquireRetryAttempts" value="1" />
<property name="hibernate.c3p0.acquireRetryDelay" value="100" / >
Can you ensure that you are not defining pool at both datasource and sessionFactory level.
I'm trying create a web service capable server using Apache CXF, Spring and an embedded Jetty server. When I run my project the server seems to initialize correctly, however when I navigate to http://localhost:8080/SomeService expecting to see the service WSDL, instead I get the following exception:
SEVERE: /SomeService
java.lang.NullPointerException
at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:163)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
Any ideas?
Here's the Java main()
public static void main(String[] args) throws Exception {
new ClassPathXmlApplicationContext(new String[] {"beans-jetty.xml"});
}
beans-jetty.xml
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="file:conf/server.properties" />
</bean>
<bean id="server"
class="org.mortbay.jetty.Server"
init-method="start"
destroy-method="stop">
<property name="connectors">
<list>
<bean id="connector" class="org.mortbay.jetty.nio.SelectChannelConnector">
<property name="host" value="${server.address}"/>
<property name="port" value="${server.port}"/>
</bean>
</list>
</property>
<property name="handlers">
<list>
<ref bean="context-cxf"/>
</list>
</property>
</bean>
<bean name="context-cxf" class="org.mortbay.jetty.servlet.Context">
<property name="contextPath" value="/" />
<property name="handler">
<bean class="org.mortbay.jetty.servlet.ServletHandler">
<property name="servlets">
<list>
<bean class="org.mortbay.jetty.servlet.ServletHolder">
<property name="name" value="cxf-servlet-holder" />
<property name="servlet">
<bean class="org.apache.cxf.transport.servlet.CXFServlet" />
</property>
</bean>
</list>
</property>
<property name="servletMappings">
<list>
<bean class="org.mortbay.jetty.servlet.ServletMapping">
<property name="servletName" value="cxf-servlet-holder" />
<property name="pathSpec" value="/*" />
</bean>
</list>
</property>
</bean>
</property>
</bean>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import resource="classpath:/beans-cxf.xml" />
beans-cxf.xml
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<jaxws:endpoint
id="someService"
implementor="com.awebster.gitta.services.SomeServiceImpl"
address="${server.address}" />
I should mention that I'm using the Maven one-jar plugin, although I doubt that makes any difference to this problem.
Many Thanks in advance!
Anthony