Webservice with Spring Web Services 2.0 (M3)

…ng.com/test/sws2/TestService”) 3 public class TestServiceEndpoint { 4 @TestService testService = null; 5 @PayloadRoot(localPart = “checkValueRequest”, namespace = “http://ws.opitz-consulting.com/test/sws2/TestService”) 6 @ResponsePayload 7 public boolean checkValue( 8 final @XPathParam(“/t:checkValueRequest/t:testToken”) String testToken, 9 final @XPathParam(“/t:checkValueRequest/t:date”) Date date) { 10 return this.testService.checkValue(testToke…

Continue reading


OSB: Creating meaningful SOAP exceptions

…r=”$errorMessage” type=”xs:string” ::) 8 9 declare namespace con = “http://www.bea.com/wli/sb/context”; 10 declare namespace exception = “http://opitz-consulting.com/data/common/BusinessExceptionTypes/V1″; 11 declare namespace request = “http://opitz-consulting.com/data/common/RequestInformationTypes/V1″; 12 declare namespace soap = “http://schemas.xmlsoap.org/soap/envelope/”; 13 declare namespace xf = “http://opitz-consulting.com/data/common/tran…

Continue reading


OSB: Configuration with custom XQuery functions

…l version=”1.0″ encoding=”UTF-8″?> 2 <xpf:xpathFunctions xmlns:xpf=”http://www.bea.com/wli/sb/xpath/config”> 3 <xpf:category id=”OSB Configuration XQuery Functions”> 4 5 <xpf:function> 6 <xpf:name>getServerName</xpf:name> 7 <xpf:comment>Returns the hostname of the server.</xpf:comment> 8 <xpf:namespaceURI>http://opitz-consulting.com/osb/custom/functions/config</xpf:namespaceURI> 9 <xpf:className>com.opitzconsulting.osb.xquery.config.ConfigXQueryFu…

Continue reading


OSB: Configurable basic authentication

…asic’ at the authentication section and a service account for the business service: For the service account the OSB supports three settings: Pass Through: The credentials provided to the proxy service are forwarded to the business service. Static: You enter the credentials to the service account file. Mapping: You create inside the service account file a mapping from local usernames to remote usernames and passwords. There is a problem with all th…

Continue reading


JAX-WS: How to input and output XML AnyType

…pper(localName = “testXMLCall”, targetNamespace = “http://opitz-consulting.com/interfaces/TestMessages/V1″, className = “com.oc.soa.sample.ws.v1.messages.TestXMLCall”) 4 @ResponseWrapper(localName = “testXMLCallResponse”, targetNamespace = “http://opitz-consulting.com/interfaces/TestMessages/V1″, className = “com.oc.soa.sample.ws.v1.messages.TestXMLCallResponse”) 5 public Object testXMLCall( 6 @WebParam(name = “name”, targetNamespace = “http://opi…

Continue reading


JEE: Solving the eager fetch or Open-Session-In-View problem

…lized. So lets do it! First we define an Initialized annotation: 1 package com.oc.common.annotations; 2 3 @Target(ElementType.METHOD) 4 @Retention(RetentionPolicy.RUNTIME) 5 public @interface Initialized { 6 7 String[] initializedProperties(); 8 9 } 10 This annotation is used for operations this way: 1 @Initialized(initializedProperties = { “addresses”, “addresses.persons”, “addresses.persons.connections” }) 2 public Partner findByIdInitialized(fi…

Continue reading


JEE: Solving the eager fetch or Open-Session-In-View problem

…lized. So lets do it! First we define an Initialized annotation: 1 package com.oc.common.annotations; 2 3 @Target(ElementType.METHOD) 4 @Retention(RetentionPolicy.RUNTIME) 5 public @interface Initialized { 6 7 String[] initializedProperties(); 8 9 } 10 This annotation is used for operations this way: 1 @Initialized(initializedProperties = { “addresses”, “addresses.persons”, “addresses.persons.connections” }) 2 public Partner findByIdInitialized(fi…

Continue reading


OSB: Using Tuxedo transport with eclipse development environment

…the correct position on my eclipse project. I was able to use the business service inside of the message flow of the proxy service without any errors. Also the build and deployment was possible without any errors. Only when opening the business service inside of eclipse the errors popped up again. Bernhard Mähr @ OPITZ-CONSULTING published at http://thecattlecrew.wordpress.com/ Click to share on Facebook (Opens in new window) Click to share on Twi…

Continue reading


Tunneling SSH over HTTPS with Apache 2.4 and virtual hosts

…onnect didn’t connect to tunnel.bmaehr.com – instead the connection was to www.bmaehr.com. I decided to built a new version of proxytunnel for windows with the latest sources. They are available at github. There where at least two people providing a patch for proxytunnel to support SNI. Unfortunately no one added their path to the source. I was able to find one of the patches here and include it myself. I compiled proxytunnel according this blog u…

Continue reading


Setting up a own CA for the enterprise

…Name (eg, section) 85 organizationalUnitName_default = IT Department 86 87 commonName = Common Name (eg, your name or your server\’s hostname) 88 commonName_max = 64 89 90 emailAddress = Email Address 91 emailAddress_max = 64 92 93 [ req_attributes ] 94 challengePassword = A challenge password 95 challengePassword_min = 4 96 challengePassword_max = 20 97 98 unstructuredName = An optional company name 99 100 ########################################…

Continue reading