Remove Server response header IIS10 from Factory configuration - header

I am using Outsystems tool to develop the web sites. Trying to remove server header IIS10.0 from Factory configuration. I went through the various document but I couldn't get the right solution for this.
<xsl:template match="/configuration/system.webServer/httpProtocol/customHeaders">
<xsl:copy>
<remove name="Server"/>
</xsl:copy>
</xsl:template>
Also tried
<xsl:template match="/configuration/system.webServer/security/requestFiltering">
<xsl:copy>
<add name="removeServerHeader" value="true"/>
</xsl:copy>
</xsl:template>
none of them are working, please suggest how to remove the Server header from Factory configuration.

Related

Is there any way how to ensure basic authentication for REST services deployed in latest wso2ei 6.4.0?

I want to use WSO2EI 6.4.0 as a proxy for SOAP and REST services authentication platform (later maybe authorization).
I found solution in documentation of wso2 (https://docs.wso2.com/display/EI640/Applying+Security+to+an+API), but unfortunately it is not working.
Adding "handler" element into service definition
<handlers>
<handler class="org.wso2.carbon.integrator.core.handler.RESTBasicAuthHandler"/>
</handlers>
results into exception in design time (eclipse):
Invalid mediator <handler class="org.wso2.carbon.integrator.core.handler.RESTBasicAuthHandler"/> 1d6bbce1-08e3-42d5-b550-6a4e224b0028.xml /.tmp/.org.wso2.developerstudio.eclipse.esb line 15 org.wso2.developerstudio.eclipse.gmf.esb.diagram.synapseerror
Ignoring and deploying such API, makes the API stop working.
Could anyone help please?
The way you are trying to add the Basic authentication for API in WSO2EI 6.4.0 is correct. Developer studio will give a warning as you mentioned, but it should not be an issue. Developer studio will allow setting the handler regardless of the warning and you should be able to create a Composite Application which includes the API and deploy it to ESB. Following is a sample API with the RESTBasicAuthHandler.
<?xml version="1.0" encoding="UTF-8"?>
<api context="/testapi" name="testapi" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST" protocol="https" url-mapping="/*">
<inSequence>
<send>
<endpoint name="testapi_EP">
<http uri-template="http://localhost:8080/testapi"/>
</endpoint>
</send>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
<handlers>
<handler class="org.wso2.carbon.integrator.core.handler.RESTBasicAuthHandler"/>
</handlers>
</api>

Unimrcp server sending 100 and 200 to a wrong port

<?xml version="1.0" encoding="UTF-8"?>
<!-- UniMRCP server document -->
<unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0">
<properties>
<ip type="auto"/>
</properties>
<components>
<!-- Factory of MRCP resources -->
<resource-factory>
<resource id="speechsynth" enable="true"/>
<resource id="speechrecog" enable="true"/>
<resource id="recorder" enable="true"/>
<resource id="speakverify" enable="true"/>
</resource-factory>
<!-- SofiaSIP MRCPv2 signaling agent -->
<sip-uas id="SIP-Agent-1" type="SofiaSIP">
<sip-port>8060</sip-port>
<sip-transport>udp</sip-transport>
<ua-name>UniMRCP SofiaSIP</ua-name>
<sdp-origin>UniMRCPServer</sdp-origin>
</sip-uas>
<!-- UniRTSP MRCPv1 signaling agent -->
<rtsp-uas id="RTSP-Agent-1" type="UniRTSP">
<rtsp-port>1554</rtsp-port>
<!-- <force-destination>true</force-destination> -->
<resource-map>
<param name="speechsynth" value="speechsynthesizer"/>
<param name="speechrecog" value="speechrecognizer"/>
</resource-map>
<max-connection-count>100</max-connection-count>
<sdp-origin>UniMRCPServer</sdp-origin>
</rtsp-uas>
<!-- MRCPv2 connection agent -->
<mrcpv2-uas id="MRCPv2-Agent-1">
<mrcp-port>1554</mrcp-port>
<max-connection-count>100</max-connection-count>
<force-new-connection>false</force-new-connection>
<rx-buffer-size>1024</rx-buffer-size>
<tx-buffer-size>1024</tx-buffer-size>
</mrcpv2-uas>
<!-- Media processing engine -->
<media-engine id="Media-Engine-1">
<realtime-rate>1</realtime-rate>
</media-engine>
<!-- Factory of RTP terminations -->
<rtp-factory id="RTP-Factory-1">
<rtp-port-min>5000</rtp-port-min>
<rtp-port-max>6000</rtp-port-max>
</rtp-factory>
<!-- Factory of plugins (MRCP engines) -->
<plugin-factory>
<engine id="Demo-Synth-1" name="demosynth" enable="true"/>
<engine id="Demo-Recog-1" name="demorecog" enable="true"/>
<engine id="Demo-Verifier-1" name="demoverifier" enable="true"/>
<engine id="Recorder-1" name="mrcprecorder" enable="true"/>
</plugin-factory>
</components>
<settings>
<!-- RTP/RTCP settings -->
<rtp-settings id="RTP-Settings-1">
<jitter-buffer>
<adaptive>1</adaptive>
<playout-delay>50</playout-delay>
<max-playout-delay>600</max-playout-delay>
<time-skew-detection>1</time-skew-detection>
</jitter-buffer>
<ptime>20</ptime>
<codecs own-preference="false">PCMU 8000</codecs>
<!-- enable/disable RTCP support -->
<rtcp enable="false">
<rtcp-bye>1</rtcp-bye>
<!-- rtcp transmission interval in msec (set 0 to disable) -->
<tx-interval>5000</tx-interval>
<!-- period (timeout) to check for new rtcp messages in msec (set 0 to disable) -->
<rx-resolution>1000</rx-resolution>
</rtcp>
</rtp-settings>
</settings>
<profiles>
<!-- MRCPv2 default profile -->
<mrcpv2-profile id="uni2">
<sip-uas>SIP-Agent-1</sip-uas>
<mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas>
<media-engine>Media-Engine-1</media-engine>
<rtp-factory>RTP-Factory-1</rtp-factory>
<rtp-settings>RTP-Settings-1</rtp-settings>
</mrcpv2-profile>
<!-- MRCPv1 default profile -->
<mrcpv1-profile id="uni1">
<rtsp-uas>RTSP-Agent-1</rtsp-uas>
<media-engine>Media-Engine-1</media-engine>
<rtp-factory>RTP-Factory-1</rtp-factory>
<rtp-settings>RTP-Settings-1</rtp-settings>
</mrcpv1-profile>
<!-- more profiles might be added here -->
</profiles>
</unimrcpserver>
Hello,
I'm trying to connect a VBVoice application to a Unimrcp server for TTS. Application sends Invite successfully to a server, and then server replies with 100 and 200, however they all go to a wrong port (5060 instead of 8060). Am I missing anything in the config file?
VBVoice can be configured to change the port used for the MRCP connection, as it applies to the VBVMRCPClient. To modify the port used by the VBVoice MRCP Client open the Pronexus Control Panel, then access the VBVConfig utility. Along the left of VBVConfig access the MRCP section. Here you will see options for ASRServerPort and TTSServerPort. The default port is 5060. You can set this to any port number that is available. After making the change needed, use the File dropdown to select "Save All Keys" and close VBVConfig. The config change will be applied the next time you start the VBVoice MRCP Client.
Of note - Changing the MRCP port number is typically required when the VBVoice IVR is running VOIP telephony protocol because the default VOIP port VBVoice uses is 5060.
Also of note - Verify if the Speech Server running your ASR/TTS system will use TCP or UDP for the MRCP connection. By default VBVoice is configured to use TCP. This can be modified in the VBVConfig utility in the MRCP section, just look for the ASRServerPortIsTCP and the TTSServerPortIsTCP options.

can you use a variable in the message logging policy for host and port?

can you use a variable in the message logging policy for host and port? for example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="splunk">
<Syslog>
<Message>Message. id = {request.header.id}</Message>
<Host>{variable}</Host>
<Port>{variable}</Port>
</Syslog>
</MessageLogging>
At this time, the Host and Port entries cannot be variables.
An alternative to using variables at runtime is to set those attributes at build time using a build tool like maven.

wso2 esb xslt transformation

I want to do xslt transformation in wso2 esb using xslt mediator I wrote a xslt and tried it in a browser it worked fine but I am not able to call my xslt in xslt mediator in wso2 esb
A: I'm always using a local-entry to reference my XSLT
<?xml version="1.0" encoding="UTF-8"?>
<localEntry xmlns="http://ws.apache.org/ns/synapse" key="myXSLTlocalEntry" src="file:repository/resources/my.xslt"/>
B: The XSLT file is under following path %WSO2_HOME%/repository/resources
C: And then I call the XSLT mediator inside of a sequence with this command:
<xslt key="myXSLTlocalEntry"/>
More documentation about the XSLT Mediator can be found on the WSO2 ESB Documentation Site:
D: The XSLT must of course also map the Soap envelope and body (which is also passed to the XSLT). Then body element then contains your effective data:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="ws.wso2.org/dataservice">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="soapenv:Envelope|soapenv:Body">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="ds:Entries">
<!-- DO YOUR TRANFORMATION HERE -->
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="*|text()|#*">
<xsl:copy>
<xsl:apply-templates select="*|text()|#*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
WSO2 ESB uses AXIS2 as its underlying SOAP engine..Here you are trying to eliminate soap tags, which will be present in the message lifecycle within axis2 scope. If you need to get only the message body, try to write a custom class mediator to get access for the synapse messagecontext and use following code snippet, which will return the child element of the soapbody.
messageContext.getEnvelope().getBody().getFirstChildWithName(**)

jboss-5.1.0.GA SSL localhost/client Connection

I have a problem with Jboss SSL connection. When I try to connect to the JBOSS by using changing client's windows host file (192.168.80.115 zimbrax.com) with my browser, I cant access. I am getting "Unable to connect" error. But when I try to connect on the server by using 127.0.0.1 zimbrax.com so I can access.
There is no firewall or other tool between my client and jboss server.
Below is my SSL configurations. (by the way there is no same problem with http:// but only https://)
server.xml :
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="443" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="D:\jboss-5.1.0.GA\server\zimbrax\conf\zimbrax.com.jks"
keystorePass="6v4xse32a096be4x" useBodyEncodingForURI="true" sslProtocol = "TLS" />
binding-jboss-beans.xml
<!-- For services like those listed above that need to know the
port of the HTTPS connector -->
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">jboss.web:service=WebServer</property>
<property name="bindingName">HttpsConnector</property>
<property name="port">443</property>
<property name="description">JBoss Web HTTPS connector socket</property>
</bean>
<xsl:variable name="portHttps" select="443"/>
<xsl:when test="(name() = 'port' and . = '443')">
<xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute>
</xsl:when>
and this is my jboss startup :
d:
cd D:\JBoss-5.1.0.GA\bin
run.bat -b 0.0.0.0 -c zimbrax -Djavax.net.ssl.keyStore="D:/jboss-5.1.0.GA/server/zimbrax/conf/zimbrax.com.jks"
where should I check?
Could you please help me?
Are you saying it works over http ? What url do you use for that ?
Please try https://ipaddress/ and let us know what you find.