- -Dorg.apache.cxf.common.util.Compiler-fork=true: use javac.
- -Dorg.apache.cxf.common.util.Compiler-fork=asdfasdfafd or nothing: use Java 6 compiler API.
viernes, 5 de abril de 2013
Choosing the compiler to use in CXF's DynamicClientFactory
lunes, 25 de febrero de 2013
Configuring Subversion (SVN) in IBM Integration Designer (IID, formerly WID) 8
I just used the "normal" steps I'd use for installing Subversion support in Eclipse Helios (3.6) which is the underlying Eclipse which Websphere Integration Developer (WID) 8 is based on.
SVN Team Provider:
- Help ▶ Install new software ▶ Available software sites ▶ download.eclipse.org/releases/helios ▶ Work with ▶ Helios ▶ type filter text: svn ▶ check: Subversive SVN Team Provider ▶ Next ▶ Next ▶ Accept, Finish ▶ Restart Now
SVN Connector:
- Open perspectve ▶ Other ▶ SVN Repository Exploring ▶ "Subversive Connector Discovery" should automatically appear ▶ SVN Kit 1.3.5 ▶ Finish ▶ Next... ▶ Finish ... ▶ Warning: OK ▶ Restart Now
sábado, 16 de febrero de 2013
Configuración del Softphone (teléfono VoIP) de Une en iPad, iPhone o Android
Para usar el softphone (teléfono VoIP) de Une en iPad (o iPhone) se puede usar la siguiente app: Media5-fone SIP VoIP Mobile Softphone. Una vez instalada, para configurarla, debes disponer solo de tu número telefónico de VoIP y tu contraseña. Suponiendo que te asignaron el número 1234567, la configuración sería la siguiente:
Title: (cualquiera, por ejemplo Une)
Username: 1234567
Password: (tu password)
Servers:
Y listo.
Ejemplo:
Para Android, se puede usar la misma aplicación: Media5-fone. Los pasos son muy similares:
Ver también Configuración alternativa del Softphone (teléfono VoIP) de Une en Windows 7 (64 bits).
Title: (cualquiera, por ejemplo Une)
Username: 1234567
Password: (tu password)
Servers:
- SIP Server/Domain/Realm
- Address: une.net.co
- Port: 5060 (por defecto)
- Outbound proxy:
- Enable Proxy: (si, activar)
- Address: epmvoip1.une.net.co
- Port: 5060 (por defecto)
- Remove Route header: (si, activar)
- Advanced:
- Display name: 1234567
- Auth. Name: toip1234567
Y listo.
Ejemplo:
Para Android, se puede usar la misma aplicación: Media5-fone. Los pasos son muy similares:
Ver también Configuración alternativa del Softphone (teléfono VoIP) de Une en Windows 7 (64 bits).
viernes, 8 de febrero de 2013
Example of JAX-WS handler for accesing WS-Security UsernameToken info
//I really need to configure syntax highlighting and formatting again in my blog :(
package test;
import java.util.Iterator;
import java.util.Set;
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.soap.SOAPFaultException;
public class XSecurityJaxWsHandler implements SOAPHandler
private class Credentials {
public String username = null;
public String password = null;
}
public Set
return null;
}
public void close(MessageContext arg0) {
}
public boolean handleFault(SOAPMessageContext arg0) {
return true;
}
public boolean handleMessage(SOAPMessageContext messagecontext) {
Boolean outbound = (Boolean)messagecontext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (!outbound) {
try {
SOAPMessage message = messagecontext.getMessage();
SOAPHeader header = message.getSOAPHeader();
Credentials credentials = null;
if (header != null) {
credentials = extractCredentialsFromSOAPHeader(header);
} else {
generateSOAPFault("No se recibieron credenciales de autenticaci\u00F3n (elemento UsernameToken en SOAP header");
return false;
}
//do something with sec info...
} catch (SOAPException e) {
generateSOAPFault(e.getMessage());
e.printStackTrace();
return false;
}
}
return true;
}
private void generateSOAPFault(String reason) {
try {
SOAPMessage msg = MessageFactory.newInstance().createMessage();
SOAPBody soapBody = msg.getSOAPPart().getEnvelope().getBody();
SOAPFault soapFault = soapBody.addFault();
soapFault.setFaultString(reason);
throw new SOAPFaultException(soapFault);
}
catch(SOAPException e) {
// uh?
}
}
private Credentials extractCredentialsFromSOAPHeader(SOAPHeader header) {
Credentials credentials = new Credentials();
Iterator headersIt = header.getChildElements();
while (headersIt.hasNext()) { //
Object nextHeader = headersIt.next();
if(nextHeader instanceof SOAPHeaderElement) {
SOAPHeaderElement soapHeader = (SOAPHeaderElement)nextHeader;
if(soapHeader.getLocalName().equals("Security")) { //
Iterator secIt = soapHeader.getChildElements();
while (secIt.hasNext()) {
Object nextSecurityElement = secIt.next();
if(nextSecurityElement instanceof SOAPElement) {
SOAPElement securitySoapElement = (SOAPElement)nextSecurityElement;
if(securitySoapElement.getLocalName().equals("UsernameToken")) { //
Iterator untSecIt = securitySoapElement.getChildElements();
while (untSecIt.hasNext()) {
Object nextUsernameTokenElement = untSecIt.next();
if(nextUsernameTokenElement instanceof SOAPElement) {
SOAPElement usernameTokenSoapChildElement = (SOAPElement)nextUsernameTokenElement;
if(usernameTokenSoapChildElement.getLocalName().equals("Username")) { //
credentials.username = usernameTokenSoapChildElement.getFirstChild().getTextContent();
} else if(usernameTokenSoapChildElement.getLocalName().equals("Password")) { //
credentials.password = usernameTokenSoapChildElement.getFirstChild().getTextContent();
}
}
}
}
}
}
}
}
}
return credentials;
}
}
sábado, 26 de enero de 2013
Viaje a Cabo de la Vela y Punta Gallinas (Guajira Colombia)
Tour con salida desde Rioacha hasta Cabo de la Vela o Punta Gallinas:
Hospedaje en Punta Gallinas (el mismo que me tocó con Cabo de la Vela Tour's).
- Cabo de la Vela Tour's:
Hospedaje en Punta Gallinas (el mismo que me tocó con Cabo de la Vela Tour's).
- Hospedaje Alexandra:
martes, 23 de octubre de 2012
Passing values containing commas in the jndiProperties parameter of GenericJMSRA
I'm trying the Open Source Glassfish's Generic Resource Adapter for JMS (GenericJMSRA aka GenericRA) and need to supply a value that contains commas for one of the provider specific parameters of the jndiProperties parameter.
I have for example this jndiProperties's value (used to work with Websphere Application Server JMS resources):
java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory,
java.naming.provider.url=corbaloc::myhost1:9810,:myhost1:9811,
com.ibm.CORBA.ORBInit=com.ibm.ws.sib.client.ORB,
java.naming.security.principal=USERNAME,java.naming.security.credentials=PASWORD
As you can see, the value of the java.naming.provider.url sub-parameter contains a comma, but the global jndiProperties value is also comma separated. GenericRA supports "special" character scaping, so you can do this:
java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory,
java.naming.provider.url=corbaloc::myhost1:9810\,:myhost1:9811,
com.ibm.CORBA.ORBInit=com.ibm.ws.sib.client.ORB,
java.naming.security.principal=USERNAME,java.naming.security.credentials=PASWORD
BUT, the value that the providers's code is receiving, stills contains the comma: corbaloc::myhost1:9810\,:myhost1:9811, causing errors like the following (in Websphere's case):
Caused by: javax.naming.ConfigurationException: Malformed provider URL: corbaloc::myhost1:9810\,:myhost1:9811 [Root exception is org.omg.CORBA.BAD_PARAM: For input string: "9810\" in 9810\ vmcid: OMG minor code: 9 completed: No]
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1508)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:389)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObject(ObjectBuilderFactory.java:97)
... 24 more
Caused by: org.omg.CORBA.BAD_PARAM: For input string: "9810\" in 9810\ vmcid: OMG minor code: 9 completed: No
at com.ibm.rmi.corba.IIOPAddrImpl.setPort(IIOPAddrImpl.java:185)
at com.ibm.rmi.corba.IIOPAddrImpl.(IIOPAddrImpl.java:107)
at com.ibm.rmi.corba.Corbaloc.parseObjAddr(Corbaloc.java:230)
at com.ibm.rmi.corba.Corbaloc.parseObjAddrList(Corbaloc.java:184)
at com.ibm.rmi.corba.Corbaloc.parseCorbaloc(Corbaloc.java:141)
at com.ibm.rmi.corba.Corbaloc.(Corbaloc.java:119)
at com.ibm.rmi.corba.ORB.createObjectURL(ORB.java:3890)
at com.ibm.rmi.corba.ORB.createObjectURL(ORB.java:3853)
at com.ibm.CORBA.iiop.ORB.createObjectURL(ORB.java:3416)
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1503)
... 30 more
I found there's an reported bug that, although is related to other use case, has the same underlying cause: imqAddressList doesn't get parsed properly when passed to resource adapter config.
I found the proposed bug fix works for me, so I'm compiling an "ObjectBuilder" version that contains the fix.
I have for example this jndiProperties's value (used to work with Websphere Application Server JMS resources):
java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory,
java.naming.provider.url=corbaloc::myhost1:9810,:myhost1:9811,
com.ibm.CORBA.ORBInit=com.ibm.ws.sib.client.ORB,
java.naming.security.principal=USERNAME,java.naming.security.credentials=PASWORD
As you can see, the value of the java.naming.provider.url sub-parameter contains a comma, but the global jndiProperties value is also comma separated. GenericRA supports "special" character scaping, so you can do this:
java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory,
java.naming.provider.url=corbaloc::myhost1:9810\,:myhost1:9811,
com.ibm.CORBA.ORBInit=com.ibm.ws.sib.client.ORB,
java.naming.security.principal=USERNAME,java.naming.security.credentials=PASWORD
BUT, the value that the providers's code is receiving, stills contains the comma: corbaloc::myhost1:9810\,:myhost1:9811, causing errors like the following (in Websphere's case):
Caused by: javax.naming.ConfigurationException: Malformed provider URL: corbaloc::myhost1:9810\,:myhost1:9811 [Root exception is org.omg.CORBA.BAD_PARAM: For input string: "9810\" in 9810\ vmcid: OMG minor code: 9 completed: No]
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1508)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:389)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObject(ObjectBuilderFactory.java:97)
... 24 more
Caused by: org.omg.CORBA.BAD_PARAM: For input string: "9810\" in 9810\ vmcid: OMG minor code: 9 completed: No
at com.ibm.rmi.corba.IIOPAddrImpl.setPort(IIOPAddrImpl.java:185)
at com.ibm.rmi.corba.IIOPAddrImpl.
at com.ibm.rmi.corba.Corbaloc.parseObjAddr(Corbaloc.java:230)
at com.ibm.rmi.corba.Corbaloc.parseObjAddrList(Corbaloc.java:184)
at com.ibm.rmi.corba.Corbaloc.parseCorbaloc(Corbaloc.java:141)
at com.ibm.rmi.corba.Corbaloc.
at com.ibm.rmi.corba.ORB.createObjectURL(ORB.java:3890)
at com.ibm.rmi.corba.ORB.createObjectURL(ORB.java:3853)
at com.ibm.CORBA.iiop.ORB.createObjectURL(ORB.java:3416)
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1503)
... 30 more
I found there's an reported bug that, although is related to other use case, has the same underlying cause: imqAddressList doesn't get parsed properly when passed to resource adapter config.
I found the proposed bug fix works for me, so I'm compiling an "ObjectBuilder" version that contains the fix.
domingo, 30 de septiembre de 2012
Poor performance when updating Asus Transformer Prime TF201 to Android 4.1 (Jelly Bean)
I received and applied the long-awaited official Android 4.1 (Jelly Bean) update to my standard, not rooted Asus Transformer Prime TF201 tablet but in my case the results were not as expected; I didn't feel any of the smoothness and fluidity that I'm used to feel for example on my Galaxy Nexus. Fortunately,
everything changed after doing a "Factory data reset" (in Backup &
Reset settings); I had to reinstall my apps, but now the tablet runs super fast
and super smooth.
:-D
:-D
Suscribirse a:
Entradas (Atom)










