Java

show soap message of JAXWS / wsimport generated Java clients

To show the raw SOAP message you could set the following values:


com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump = true
com.sun.xml.internal.ws.transport.http.HttpAdapter.dump_threshold = 64000;

they could be set using the debugger or the -D parameter used to execute the program.

here you could see a older older Version using System Propertys

System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");

pmd mass path change

Falls es mal zu folgenden Fehler kommen sollte, dann muss man die .pmd definition der XML orte aktualisieren.
Die Fehlermeldung lautet:
An internal error occurred during: "ReviewCode". Couldn't find the class Can't find resource rulesets/basic.xml. Make sure the resource is a valid file or URL or is on the CLASSPATH.

und ist mit folgendem Kommand für die gesamte Projektstruktur zu beseitigen:

find . -name .pmd -exec sed -i.bak 's/rulesets\/basic.xml/rulesets\/java\/basic.xml/g' {} \;

Java development with XML Files, Best practice

Developing with XML files could be aweful in Java. Thanks God they invented a toolchain which makes development easy again:

Create your destination XML File

use "trang" to konvert it to XSD File

usd XCJ to convert it to super clean JAXB Java code.

java propeties file translation for bash/ shell

if you want to use localisation in a bash script, using standard java property files is a good way.

if you use this syntax:


cat `dirname $0`/web/src/messages_de_DE.properties | sed '/^.$/d' |sed 's/[\.|-]/_/g' | sed 's/|//g' | sed 's/\ = /=/g' | sed 's/\=/="/g' | sed 's/.$/"/g' | sed '/^ *$/d' > .properties.file

you get a converted version of the propertyfile which can be included inside the bashscript.

my.example.translation = "word"

will be converted to

my_example_translation

and can be used inside the script with $my_example_translation

Seam / Richfaces ReRender function and Internet Explorer IE 9

Cause of some jQuery issues Seam / Richfaces ReRender Function does not function propertly on IE 9.
Richfaces version
3.3.0

can be updated with the attached files. FIx is the Javascript file AJAX.js for later version (fix found http://stackoverflow.com/questions/4916327/javascript-replacement-for-xm...)

This Jar File is the updated Version, which should fix all IE related issues.

Debian updates which block Java RMI (Tomcat / Jameica / Hibiscus for example and other Socket Binding)

I noticed that from one point to another some programs which uses ports, stopped working.

The Java Exception has got parts like this:

"java.rmi.server.ExportException: Listen failed on port: 0;"

Some problem happens with Tomcat Servers:

StandardServer.await: create[localhost:8005]:
java.net.SocketException: Invalid argument
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)

oAW4 Tutorial in MWE

This is the MWE version of the oAW Tutorial 4 which ends ealry than the original caused be the missing Recipe feature which you get whenever you install the oAW original data. The corrected version with the normal oAW is part of the first article.

If anyone alters the Files with additional stuff -> i would love to update them, to make MWE be soon good documented and with lots of example files.

The MWE Version is attached to this article.

first metamodel generation with MWE

after lots of hours i finaly got a version with MWE which does pretty much the same as the original oAW version of the tutorial. This ist just the first step, but on of the most important.

i saved the project file for you.

The original Metamodel Transformation tutorial in the corrected version. There have been some outdated recipes in it.

i will make a new articel out of the MWE generated file whenever i finish it. stay tuned.

moving from oaw4 to mwe

A List of moved and changed libs which drives me crazy in development.
org.eclipse.type.emf.EmfMetaModel replaced by: org.eclipse.xtend.typesystem.emf.EmfMetaModel

Most important resources:
http://www.openarchitectureware.org/forum/viewtopic.php?showtopic=13930
http://wiki.eclipse.org/Xtext/Documentation/Migration

Access restriction: The type [yourClass] is not accessible due to restriction on required project

if you get a error like in the headline, you can get rid of it by editing the plugin.xml (in the basedir of you EMF project where your Model exists) and click the "runtime" tab.
You need to add to the "Exported Packages" the base files you want to use.

Most of the times its ->

  • yourPackagename
  • yourPackagename.impl
  • yourPackagename.util
Inhalt abgleichen