I need to add an encrypted parameter, lets say 'isAdd' in a URL
www.example.com/aTestPage?isAdd=123
but I am failed to do so, though the parameter is not mentioned in following section of wc-server.xml
<NonEncryptedParameters display="false">
<Parameter name="storeId"/>
<Parameter name="langId"/>
<Parameter name="catalogId"/>
<Parameter name="categoryId"/>
<Parameter name="productId"/>
</NonEncryptedParameters>
but it is still apparent in URL. What should I do to make 'isAdd' encrypted?
I tried to add it in following section of wc-server.xml but it didn't work.
<ProtectedParameters>
<Parameter display="false" name="isAdd"/>
</ProtectedParameters>
UPDATE: URL generation
<wcf:url var="aTestPage" value="aTestPage" type="Ajax">
<wcf:param name="isAdd" value="${isAdd}" />
</wcf:url>
Is your URL using HTTPS/SSL?
"if the command is to use SSL, then the parameters are encrypted" and all parameters not in the NonEncryptedParameters list will get encrypted [as a single value] and appear as the "krypto" parameter.
Related
I have a stylesheet using a for each loop over the XML doc but when it comes accross using the document() method it fails.
<td >
<xsl:value-of select="document('Departments.xml')/Departments/Department[#Id=dep]/Name"/>
</td>
The variable has a value each loop which prints out
Execution of the "document()" function was prohibited. Use the
"XsltSettings.EnableDocumentFunction" property to enable it.
I think if XslCompiledTransform is used by the asp:xml control instead of XslTransform it means that the environment you are working in has set aspnet:RestrictXmlControls to true (https://learn.microsoft.com/en-us/previous-versions/aspnet/hh975440(v=vs.120))
<appSettings>
<add key="aspnet:RestrictXmlControls" value="true" />
</appSettings>
so you might need to try/check whether your locale web.config can set it back to
<appSettings>
<add key="aspnet:RestrictXmlControls" value="false" />
</appSettings>
to have XslTransform being used where you are not restricted by default XsltSettings.
I'm using the message-properties component in mule. I need to set a dynamic key name as this is used to add custom headers to a http-request.
<message-properties-transformer doc:name="Message Properties" scope="session">
<add-message-property key="#[flowVars.name]" value="#[payload.split(":")[1]]"/>
</message-properties-transformer>
When logging the output, it shows that the key has not evaluated the MEL expression contained inside:
SESSION scoped properties: #[flowVars.name]=Basic pokpogytg788t878
Is there any way of setting a dynamic key name for a property in this component?
I have faced similar situation,where I had to set dynamic message properties.
I tried several things to set it with message-properties-transformer , but to no luck.
There is some bug filed for similar issue,below is the link
Cannot use MEL expression as key in Message Properties transformer
After trying for sometime I got that working with some workaround.
You can try working it around with Expression component.
<expression-component doc:name="Expression">
<![CDATA[message.outboundProperties[flowVars.name]=payload.split(':')1];]]>
</expression-component>
Not only you can read dynamic values from payload/variables.But you can also call your custom java/groovy methods in it.
Try below code snippet,and let us know if that works for you.
<flow name="testFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/test" doc:name="HTTP" allowedMethods="POST" />
<set-variable variableName="name" value="#["test"]"
doc:name="name" />
<expression-component doc:name="Expression">
<![CDATA[message.outboundProperties[flowVars.name]=payload.split(':')1];]]>
</expression-component>
</flow>
I want to remove this because i dont need it on my project.
<rule ref="Squiz.Commenting.FileComment">
<properties>
<property name="subpackage" value="false"/>
</properties>
</rule>
See you
The way to exclude that specific error message in your ruleset.xml file is to use:
<exclude name="Squiz.Commenting.FileComment.MissingSubpackageTag" />
Use the -s command line argument to determine the code for a specific error message. You'll see something like this:
Missing #subpackage tag in file comment
(Squiz.Commenting.FileComment.MissingSubpackageTag)
If you want to exclude the whole sniff, you'd instead use:
<exclude name="Squiz.Commenting.FileComment" />
There are a lot of other things you can do in a ruleset file. See the docs for more examples: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
I am trying to access getListItems method of the Lists service of Sharepoint from Flex using WebService.
It is working fine when I omit the query and the viewFields nodes in the request xml.
But if I add any query or FieldRef in Viewfields it is throwing error from the service.
Below is the code.
<mx:WebService id="ws2" wsdl="{url}/_vti_bin/Lists.asmx?WSDL" result="ws2result(event)" fault="ws2fault(event)" showBusyCursor="true">
<mx:operation name="GetListItems" resultFormat="e4x">
<mx:request xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>{listId}</listName>
<viewName>{viewId}</viewName>
<ViewFields><FieldRef Name='Locations'/></ViewFields>
</mx:request>
</mx:operation>
</mx:WebService>
It is working fine without the ViewFields.
Can we use the ViewFields and query from flex?
Also is there any way to get the sum of items satisfying a specific condetions using this service?
Applied the new format. But still its throwing error.
The SOAP message captured from fiddler.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<tns:GetListItems xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/"> <tns:listName>{0A1C8CDA-E738-46B7-923D-1D2C599D960F}</tns:listName>
<tns:viewFields>
<tns:Name>ID</tns:Name>
</tns:viewFields>
</tns:GetListItems>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But the message in the operation tag is passed as below.
<mx:operation name="GetListItems" >
<mx:request xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>\{0A3C3DCA-E744-46C7-916D-1D2C539A960F\}</listName>
<viewFields>
<ViewFields>
<FieldRef Name="ID" />
</ViewFields>
</viewFields>
</mx:request>
</mx:operation>
I can't tell for sure without seeing a sample of the actual SOAP message going over the wire, but I believe you're missing some containing elements in the request.
For your query, it needs to be structured as:
<query>
<Query>
<{CAML QUERY HERE}>
</Query>
</query>
Note the case of the containing <query>. Same song, different verse for ViewFields:
<viewFields>
<ViewFields>
<FieldRef Name="foo" />
</ViewFields>
</viewFields>
QueryOptions must also be contained in a <queryOptions> element. Crazy SharePoint!
I haveasp:GridView displaying client requests using asp:SqlDataSource. I want to limit displayed information by client:
View.aspx has to display everything, View.aspx?client=1 has to display only requests from client ID #1.
So I'm using <asp:QueryStringParameter Name="client" QueryStringField="client" /> for query "EXEC getRequests #client".
Everything works properly when some client is specified. But don't - if not.
I tested my SP using SSMS - it works properly in both cases - when parameter is specified and when it isn't (NULL passed explicitly).
What have I do?
SqlDataSource won't fire if any of it's parameters are null, unless you specify otherwise:
<asp:SqlDataSource CancelSelectOnNullParameter="False" />
It might also be necessary to add a null default value to your querystring parameter:
<asp:QueryStringParameter Name="client" QueryStringField="client" DefaultValue="" ConvertEmptyStringToNull="True" />
You need to define a Default value to the parameter for those situations, for example:
<asp:QueryStringParameter Name="client" QueryStringField="client" DefaultValue="0"/>
and then in the SP you need verify if the client is 0, return all the clients, otherwise the specific one.