Websphere portal server - Accessing portal admin through the WAS console - websphere-portal

I removed my login portlet by mistake and now cannot login to view the wps admin console. Can this be accessed through the WAS console?

Assuming you just removed the portlet from the page, the easiest way to add it back to the page would be to export the login page from a different portal if available and import using xmlaccess command line. If another portal isn't available, you could export the current portal Login page using xmlaccess command line, manually edit the xml file to add the portlet and import using xmlaccess command line.
Here is the login page export from a default portal installation:
<?xml version="1.0" encoding="UTF-8"?>
<!-- IBM WebSphere Portal/8.5 build 20170616-0410 exported on Sat Dec 21 10:43:08 EST 2019 from ICPortal01/172.30.15.43 virtual portal: none (default virtual portal) -->
<!-- 1 [skin ZK_00000000000000A0BR2B300670] -->
<!-- 2 [skin ZK_00000000000000A0BR2B300672] -->
<!-- 3 [skin ZK_00000000000000A0BR2B300674] -->
<!-- 4 [skin ZK_00000000000000A0BR2B300676] -->
<!-- 5 [theme ZJ_00000000000000A0BR2B300QC6] -->
<!-- 6 [content-node Z6_000000000000000000000000A0] -->
<!-- 7 [content-node Z6_00000000000000A0BR2B300G80] -->
<!-- 8 [content-node Z6_00000000000000A0BR2B300GC4] -->
<!-- 9 [component Z7_00000000000000A0BR2B300I82] -->
<!-- 10 [component Z7_00000000000000A0BR2B300I86] -->
<!-- 11 [component Z7_00000000000000A0BR2B300I81] -->
<!-- 12 [web-app Z1_00000000000000A0BR2B300IG4 uid=login.war.webmod] -->
<!-- 13 [portlet-app Z2_00000000000000A0BR2B300IG6 name=wp.ap.login uid=login.war] -->
<!-- 14 [servlet ZV_00000000000000A0BR2B300IG2] -->
<!-- 15 [portlet Z3_00000000000000A0BR2B300094 name=Login Portlet] -->
<!-- 16 [portletinstance Z5_00000000000000A0BR2B300I85] -->
<request build="20170616-0410" type="update" version="8.5.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_8.5.0.xsd">
<portal action="locate">
<skin action="locate" domain="rel" objectid="ZK_00000000000000A0BR2B300670" uniquename="ibm.portal.85Hidden"/>
<skin action="locate" domain="rel" objectid="ZK_00000000000000A0BR2B300672" uniquename="ibm.portal.85Standard"/>
<skin action="locate" domain="rel" objectid="ZK_00000000000000A0BR2B300674" uniquename="ibm.portal.85HiddenPlus"/>
<skin action="locate" domain="rel" objectid="ZK_00000000000000A0BR2B300676" uniquename="ibm.portal.85NoSkin"/>
<theme action="locate" domain="rel" objectid="ZJ_00000000000000A0BR2B300QC6" uniquename="ibm.portal.85Theme"/>
<web-app action="locate" domain="rel" objectid="Z1_00000000000000A0BR2B300IG4" uid="login.war.webmod">
<servlet action="locate" domain="rel" name="Login Portlet" objectid="ZV_00000000000000A0BR2B300IG2"/>
<portlet-app action="locate" domain="rel" name="wp.ap.login" objectid="Z2_00000000000000A0BR2B300IG6" uid="login.war">
<portlet action="locate" domain="rel" name="Login Portlet" objectid="Z3_00000000000000A0BR2B300094" uniquename="wps.p.Login"/>
</portlet-app>
</web-app>
<content-node action="locate" domain="rel" objectid="Z6_000000000000000000000000A0" uniquename="wps.content.root"/>
<content-node action="locate" domain="rel" objectid="Z6_00000000000000A0BR2B300G80" uniquename="ibm.portal.HiddenPages"/>
<content-node action="update" active="true" allportletsallowed="true" content-parentref="Z6_00000000000000A0BR2B300G80" create-type="explicit" domain="rel" objectid="Z6_00000000000000A0BR2B300GC4" ordinal="10" themeref="undefined" type="page" uniquename="wps.Login">
<supported-markup markup="html" update="set"/>
<localedata locale="ar">
<title>بدء الاتصال</title>
</localedata>
<localedata locale="ca">
<title>Inici de sessió</title>
</localedata>
<localedata locale="cs">
<title>Přihlášení</title>
</localedata>
<localedata locale="da">
<title>Logon</title>
</localedata>
<localedata locale="de">
<title>Anmeldung</title>
</localedata>
<localedata locale="el">
<title>Σύνδεση</title>
</localedata>
<localedata locale="en">
<title>Login</title>
</localedata>
<localedata locale="es">
<title>Inicio de sesión</title>
</localedata>
<localedata locale="fi">
<title>Kirjaudu sisään</title>
</localedata>
<localedata locale="fr">
<title>Connexion</title>
</localedata>
<localedata locale="hu">
<title>Bejelentkezés</title>
</localedata>
<localedata locale="it">
<title>Login</title>
</localedata>
<localedata locale="iw">
<title>התחברות</title>
</localedata>
<localedata locale="ja">
<title>ログイン</title>
</localedata>
<localedata locale="ko">
<title>로그인</title>
</localedata>
<localedata locale="nl">
<title>Aanmelden</title>
</localedata>
<localedata locale="no">
<title>Logg på</title>
</localedata>
<localedata locale="pl">
<title>Logowanie</title>
</localedata>
<localedata locale="pt">
<title>Iniciar sessão</title>
</localedata>
<localedata locale="pt_BR">
<title>Efetuar Login</title>
</localedata>
<localedata locale="ro">
<title>Logare</title>
</localedata>
<localedata locale="ru">
<title>Вход в систему</title>
</localedata>
<localedata locale="sk">
<title>Prihlásiť</title>
</localedata>
<localedata locale="sl">
<title>Prijava</title>
</localedata>
<localedata locale="sv">
<title>Inloggning</title>
</localedata>
<localedata locale="th">
<title>ลงชื่อเข้าใช้</title>
</localedata>
<localedata locale="tr">
<title>Oturum Aç</title>
</localedata>
<localedata locale="uk">
<title>Вхід до системи</title>
</localedata>
<localedata locale="zh">
<title>登录</title>
</localedata>
<localedata locale="zh_TW">
<title>登入</title>
</localedata>
<localedata locale="hr">
<title>Prijava:</title>
</localedata>
<localedata locale="kk">
<title>Кіру</title>
</localedata>
<parameter name="RenderMode" type="string" update="set"><![CDATA[force_ssa]]></parameter>
<parameter name="com.ibm.portal.Hidden" type="string" update="set"><![CDATA[true]]></parameter>
<parameter name="com.ibm.portal.PageIcon" type="string" update="set"><![CDATA[icons/page/login.gif]]></parameter>
<parameter name="com.ibm.portal.ThemePolicy" type="string" update="set"><![CDATA[theme/NoTheme]]></parameter>
<parameter name="param.sharing.scope.{http://www.ibm.com/xmlns/prod/datatype/content/resource-collections}" type="string" update="set"><![CDATA[ibm.portal.sharing.scope.page]]></parameter>
<parameter name="param.sharing.scope.{http://www.ibm.com/xmlns/prod/datatype/content}" type="string" update="set"><![CDATA[ibm.portal.sharing.scope.page]]></parameter>
<parameter name="param.sharing.scope.{http://www.ibm.com/xmlns/prod/websphere/portal/publicparams}path-info" type="string" update="set"><![CDATA[ibm.portal.sharing.scope.page]]></parameter>
<parameter name="resourceaggregation.profile" type="string" update="set"><![CDATA[profiles/profile_deferred.json]]></parameter>
<access-control externalized="false" owner="undefined" private="false">
<role actionset="User" update="set">
<mapping subjectid="anonymous portal user" subjecttype="user" update="set"/>
<mapping subjectid="all authenticated portal users" subjecttype="user_group" update="set"/>
</role>
</access-control>
<content-mapping-info>
<content-mapping content-id="gxsywmg-dxsywmgvtkqzcustgoailgykonin" default="false" delegated-access-level="User" system="true"/>
</content-mapping-info>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_00000000000000A0BR2B300I82" ordinal="100" orientation="H" skinref="undefined" type="container" width="undefined">
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_00000000000000A0BR2B300I86" ordinal="99" orientation="V" skinref="undefined" type="container" width="700">
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_00000000000000A0BR2B300I81" ordinal="99" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_00000000000000A0BR2B300I85" portletref="Z3_00000000000000A0BR2B300094"/>
</component>
</component>
</component>
</content-node>
</portal>
<status element="all" result="ok"/>
</request>
You can use command similar to the below to import:
xmlaccess.bat -user PORTALADMINUSER -pwd PORTALADMINPWD -url http://localhost:10040/wps/config -in path_to_import_file.xml
Another solution would be to login to a Virtual portal if you have one available on that same portal and then switch the url to the base portal.
Hope that helps.

One easy solution is login with query parameter as per below:
http://server:port/wps/portal/cxml/04_SD9ePMtCP1I800I_KydQvyHFUBADPmuQy?userid=userid&password=password
Example:
http://myportalserver.example.com:10039/wps/portal/cxml/04_SD9ePMtCP1I800I_KydQvyHFUBADPmuQy?userid=wpsadmin&password=wpsadmin
Further you can just map the portlet again to page from Administration.
Hope this will help you.

Related

Position Outlook Add-In button on the `AppointmentOrganizerCommandSurface`

I am trying to add a button to the AppointmentOrganizerCommandSurface in Outlook just like Giphy is added in this image, but instead, my My Office Add-in is added to the menu.
I would like to add an action button with my custom icon next to the Giphy action.
I tried manipulating manifest.xml. I went through the documentation and followed the steps, but I was unable to figure out what is going on.
Here is the manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>61262617-dad8-4e84-a9e4-89b1bab3e6e7</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="My Office Add-In"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="GroupLabel"/>
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
<Control xsi:type="Button" id="ActionButton">
<Label resid="ActionButton.Label"/>
<Supertip>
<Title resid="ActionButton.Label"/>
<Description resid="ActionButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Contoso Add-in"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
<bt:String id="ActionButton.Label" DefaultValue="Perform an action"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
<bt:String id="ActionButton.Tooltip" DefaultValue="Perform an action when clicked."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Thank you in advance.
You need to pin your add-in in the outlook to acheive the same.
You can pin an add-in so it's easily available when you're composing an email message.
Select Settings> View all Outlook settings > Mail > Customize actions.
Select the check box for the add-in that you want to see when you’re composing a message.

how to deploy apachel cxf to websphere application server

i created a sample apache cxf SOAP webservices, following the tutorial here
i'm able to run on tomcat 9 via eclipse neon and access it at http://localhost:8080/camel-example-reportincident/webservices/incident?wsdl.
i installed and started it on websphere, but i can't access it on the same url. i also tried all other ports listed in default host alias.
my maven libraries:
here is my wsdl:
<?xml version="1.0" encoding="ISO-8859-1"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://reportincident.example.camel.apache.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://reportincident.example.camel.apache.org">
<!-- Type definitions for input- and output parameters for webservice
--> <wsdl:types> <xs:schema targetNamespace="http://reportincident.example.camel.apache.org"> <xs:element name="inputReportIncident">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="incidentId" />
<xs:element type="xs:string" name="incidentDate" />
<xs:element type="xs:string" name="givenName" />
<xs:element type="xs:string" name="familyName" />
<xs:element type="xs:string" name="summary" />
<xs:element type="xs:string" name="details" />
<xs:element type="xs:string" name="email" />
<xs:element type="xs:string" name="phone" />
</xs:sequence>
</xs:complexType> </xs:element> <xs:element name="outputReportIncident">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="code" />
</xs:sequence>
</xs:complexType> </xs:element> </xs:schema> </wsdl:types>
<!-- Message definitions for input and output --> <wsdl:message name="inputReportIncident"> <wsdl:part name="parameters" element="tns:inputReportIncident" /> </wsdl:message> <wsdl:message name="outputReportIncident"> <wsdl:part name="parameters" element="tns:outputReportIncident" /> </wsdl:message>
<!-- Port (interface) definitions --> <wsdl:portType name="ReportIncidentEndpoint"> <wsdl:operation name="ReportIncident"> <wsdl:input message="tns:inputReportIncident" /> <wsdl:output message="tns:outputReportIncident" /> </wsdl:operation> </wsdl:portType>
<!-- Port bindings to transports and encoding - HTTP, document literal encoding is used --> <wsdl:binding name="ReportIncidentBinding" type="tns:ReportIncidentEndpoint"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="ReportIncident"> <soap:operation
soapAction="http://reportincident.example.camel.apache.org/ReportIncident"
style="document" /> <wsdl:input>
<soap:body parts="parameters" use="literal" /> </wsdl:input> <wsdl:output>
<soap:body parts="parameters" use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding>
<!-- Service definition --> <wsdl:service name="ReportIncidentService"> <wsdl:port name="ReportIncidentPort" binding="tns:ReportIncidentBinding"> <soap:address location="http://reportincident.example.camel.apache.org" /> </wsdl:port> </wsdl:service>
</wsdl:definitions>
here is my ibm-web-bnd.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://websphere.ibm.com/xml/ns/javaee"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_0.xsd" version="1.0"> <virtual-host name="default_host"/> </web-bnd>
here is my cxf-config.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- implementation of the webservice -->
<bean id="reportIncidentEndpoint"
class="org.apache.camel.example.reportincident.impl.ReportIncidentEndpointImpl" />
<!-- export the webservice using jaxws -->
<jaxws:endpoint id="reportIncident" implementor="#reportIncidentEndpoint"
address="/incident" wsdlLocation="/WEB-INF/wsdl/report_incident.wsdl"
endpointName="s:ReportIncidentPort" serviceName="s:ReportIncidentService"
xmlns:s="http://reportincident.example.camel.apache.org" />
</beans>
here is my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>Archetype Created Web Application</display-name>
<!-- the listener that kick-starts Spring -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- CXF servlet -->
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- all our webservices are mapped under this URI pattern -->
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/webservices/*</url-pattern>
</servlet-mapping>
<!-- location of spring xml files -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:cxf-config.xml</param-value>
</context-param>
</web-app>
====================
Update
strangely, the last update for SystemOut.log and SystemErr.log were two days ago. i found some logs in C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc
logs:
FFDC Exception:org.springframework.beans.factory.BeanCreationException SourceId:com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated ProbeId:1341 Reporter:com.ibm.ws.webcontainer.webapp.WebAppImpl#bdd2e142
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw exception; nested exception is org.apache.cxf.bus.extension.ExtensionException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985)
.....
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw exception; nested exception is org.apache.cxf.bus.extension.ExtensionException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1032)
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/apache/camel/component/cxf/transport/CamelTransportFactory, offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:273)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_24638c34_17.05.05_01.11.23.0597458986526819616127.txt com.ibm.ws.webcontainer.servlet.ServletInstance.init 181
com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module Archetype Created Web Application has been bound to default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443].
WSVR0221I: Application started: camel-example-reportincident_war
WSVR0191I: Composition unit WebSphere:cuname=camel-example-reportincident_war in BLA WebSphere:blaname=camel-example-reportincident_war started.
An UnsupportedClassVersionError means that the class (in this case, CamelTransportFactory) was compiled against a higher level of Java than the JVM that you're running on. If you have a version of WebSphere that supports higher Java spec levels, you'll need to pick up a higher-level JDK; if not, then you'll need a version of the Camel package that supports Java 6.

Log4j generate different files with the same content

I'm working with a Java application that integrates log4j. For a new development I would need that instead of generating a file I will generate two, one per country that is accessed from the application web. Both would have the same log records that are found throughout my application.
I configured the configuration using an .xml file:
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="jeveris: %d{dd MMM yyyy HH:mm:ss,SSS} %-5p %c - %m%n" />
</layout>
</appender>
<appender name="One-Console" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="Console.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="2MB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{dd MMM yyyy HH:mm:ss,SSS} %-5p %c - %m%n" />
</layout>
</appender>
<category name="com.example.one.web">
<level value="debug" />
<appender-ref ref="One-Console" />
</category>
<root>
<appender-ref ref="console" />
<level value="debug" />
</root>
</log4j:configuration>
Could someone guide me, tell me if it is possible or help me find the solution?
Thank you.
If you want 2+ log files that will print the same content, then you could fine 2 different files in your tag like so:
<configuration status="OFF">
<Properties>
<Property name="log-path">/your/file/path/</Property>
<Property name="log-country-name1">Country1</Property>
<Property name="log-country-name2">Country2</Property>
<!-- more if necessary -->
<Property name="log-pattern">%d{ISO8601} %-5p [%t|%c{1}] %m\n</Property>
<Property name="rollover-strategy-max">5</Property>
<Property name="rolling-size-based">10 MB</Property>
</Properties>
<appenders>
<!--uncomment following if want to print to console as well -->
<!-- <Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
</Console> -->
<RollingFile name="INFO" fileName="${log-path}/${log-country-name1}-logger.log" filePattern="${log-path}/${log-project-name}-debug-%d-%i.log.zip">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="${rolling-size-based}" />
</Policies>
<DefaultRolloverStrategy max="${rollover-strategy-max}" />
</RollingFile>
<RollingFile name="INFO" fileName="${log-path}/UpdaterLocal-logger.log" filePattern="${log-path}/${log-country-name2}-debug-%d-%i.log.zip">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="${rolling-size-based}" />
</Policies>
<DefaultRolloverStrategy max="${rollover-strategy-max}" />
</RollingFile>
</appenders>
<Loggers>
<logger name="io.switchfour" level="trace" additivity="false">
<AppenderRef ref="INFO" level="info" />
</logger>
</Loggers>
The above will create /your/file/path/Country1-logger.log and /your/file/path/Country2-logger.log and will write all entries that are INFO or higher to both files. Your log file should be identical.

How to run test classes one by one inside <test> tag using maven

I have below testng xml but its not working. Every time running by maven it strat execution on three browsers. I want to run all classes one by one.
<?xml version="1.0" encoding="UTF-8"?>
<parameter name="browser" value="${browser}" />
<parameter name="execution" value="${execution}" />
<test name="POC Test" preserve-order="true" thread-count="1" >
<classes>
<class name="com.testscript.OurPurposeTest" />
<class name="com.testscript.ContactUsTest" />
<!-- <class name="com.testscript.ChevronTest" /> -->
<class name="com.testscript.SearchTest" />
<class name="com.testscript.FinancialRegulatoryReportsTest" />
<class name="com.testscript.CompanyHistoryTest" />
<class name="com.testscript.HomePageTest" />
</classes>
</test> <!-- POC Test -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>

How To Generate SAML2Response Specified By Destination

I am very new to SAML and am very confused at this point. I am using Kentor to generate a Saml2Response, but it is not looking anything like my relying party is expecting. They are specifically looking for the certificate to be embedded in the response.
I need to generate this.
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" ID="_09f6a725ecf844128a5f7ef8cc1e7620"
IssueInstant="2013-12-11T03:52:21.770Z" Version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Reference URI="#_09f6a725ecf844128a5f7ef8cc1e7620" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs" />
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:SignatureValue>
<ds:KeyInfo>
<ds:KeyName>[removed]</ds:KeyName>
</ds:KeyInfo>
</ds:Signature>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
</saml2p:Status>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_cadd3488f62c6d3b9933fdb56d9e8ddc"
IssueInstant="2013-12-11T03:52:21.770Z" Version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">[removed]</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Reference URI="#_cadd3488f62c6d3b9933fdb56d9e8ddc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs" />
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:SignatureValue>
<ds:KeyInfo>
<ds:KeyName>CN=, O=, C=US</ds:KeyName>
</ds:KeyInfo>
</ds:Signature>
<saml2:Subject xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" NameQualifier="com.sms">0500555</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData NotBefore="2013-12-11T03:47:21.770Z" NotOnOrAfter="2013-12-11T03:57:21.770Z" />
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions NotBefore="2013-12-11T03:52:21.770Z" NotOnOrAfter="2013-12-11T03:57:21.770Z"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" />
<saml2:AuthnStatement AuthnInstant="2013-12-11T03:52:21.770Z" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
<saml2:AttributeStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Attribute Name="AppData" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">A_Party_PI.Person.FirstName =John& A_Party_PI.Person.LastName =Smith</saml2:AttributeValue>
</saml2:Attribute>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>
What I am getting from Kentor is this:
<?xml version="1.0"?>
<saml2p:Response
Destination="https://[destinationUrl]"
ID="ide5470d1f5a9a48d1822f71ea5a5363f2"
IssueInstant="2015-05-28T13:35:44Z"
Version="2.0" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
ritterim.com
</saml2:Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#ide5470d1f5a9a48d1822f71ea5a5363f2">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>7YmTpqZR6Ba4/eDrEqQt7BGit0A=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
</SignatureValue>
</Signature>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</saml2p:Status>
<saml2:Assertion ID="_77b39d8e-bcc4-48c2-b6c7-fe6e87414461"
IssueInstant="2015-05-28T13:35:44Z" Version="2.0"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Issuer>ritterim.com</saml2:Issuer>
<saml2:Subject>
<saml2:NameID>0500555</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"/>
</saml2:Subject>
<saml2:Conditions NotOnOrAfter="2015-05-28T13:37:44Z"/>
<saml2:AttributeStatement>
<saml2:Attribute Name="AppData">
<saml2:AttributeValue>A_Party_PI.Person.FirstName =John& A_Party_PI.Person.LastName =Smith</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>
Any help would be appreciated, as I'm not even sure I'm in the right arena.
I'll answer by commenting on the differences in the responses.
There's no encoding in the xml declaration. Probably won't matter.
Issuer, which is optional is added.
I assume you've removed the SignatureValue from the AuthServices response.
AuthServices currently does not include the KeyInfo in the signature (it's optional)
AuthServices does not sign the assertion, only the response.
XML namespaces declarations are put in one place by AuthServices and not repeated all over.
There's no Format on the Subject NameId (it's optional)
There's no NameQualifier on the Subject NameId (it's optional)
There's no NameFormat on the Attribute (it's optional)
There's no xml type (xsi:string) on the AttributeValue (it's optional)
Basically Kentor.AuthServices leaves out a bunch of optional stuff, but otherwise the messages are equivalent.
You'll have to provide more details on what things are causing problems to get help on those.

Resources