Skip to content

Commit

Permalink
Merge pull request #557 from markusstoll/ERJaxWS
Browse files Browse the repository at this point in the history
Er jax ws
  • Loading branch information
ishimoto committed Apr 14, 2014
2 parents 1284e0b + 2c9ee31 commit 5e69b03
Show file tree
Hide file tree
Showing 123 changed files with 2,929 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Build/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@
</antcall>
</target>

<target name="ERJaxWS.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="" />
<param name="project.name" value="ERJaxWS" />
<param name="project.dir" value="Frameworks/Misc/ERJaxWS" />
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}" />
</antcall>
</target>

<target name="EROpenID.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="" />
Expand Down Expand Up @@ -1389,7 +1398,7 @@
to add your own, add a target definition above and choose the correct group below
-->

<target name="common.frameworks.all" depends="ERJars.all, JavaWOExtensions.all, ERExtensions.all, Ajax.all, ERDirectToWeb.all, ERNeutralLook.all, ERSelenium.all, WOOgnl.all, ERPrototypes.all, ERPlot.all, ERIndexing.all, ERChronic.all, ERCaptcha.all, ERProfiling.all, EROpenID.all, ERPDFGeneration.all, ERJGroupsSynchronizer.all, ERRest.all, ERAttachment.all, ERTaggable.all, ERJavaMail.all, ERCoreBusinessLogic.all, ERChangeNotificationJMS.all, ERCalendar.all, ERExcelLook.all, BTBusinessLogic.all, JavaMemoryAdaptor.all, JavaNeo4JAdaptor.all, JavaFSAdaptor.all, JavaERJDBCAdaptor.all, WOLips.all, WOJRebel.all, ERMoviesLogic.all, SnapshotExplorer.all, ERJasperReports.all, ERAttributeExtension.all, ERWOAdaptor.all, ERCayenne.all, ERCayenne.all, ERDistribution.all, MooTools.all, ERJQueryMobile.all, ERJQMobile.all, ERPersistentSessionStorage.all, ERQuartzScheduler.all, ERXiss.all, ERFirebug.all, ERXPartialBaseModel.all, ERXPartialsExampleModel.all" />
<target name="common.frameworks.all" depends="ERJars.all, JavaWOExtensions.all, ERExtensions.all, Ajax.all, ERDirectToWeb.all, ERNeutralLook.all, ERSelenium.all, WOOgnl.all, ERPrototypes.all, ERPlot.all, ERIndexing.all, ERChronic.all, ERCaptcha.all, ERProfiling.all, EROpenID.all, ERJaxWS.all, ERPDFGeneration.all, ERJGroupsSynchronizer.all, ERRest.all, ERAttachment.all, ERTaggable.all, ERJavaMail.all, ERCoreBusinessLogic.all, ERChangeNotificationJMS.all, ERCalendar.all, ERExcelLook.all, BTBusinessLogic.all, JavaMemoryAdaptor.all, JavaNeo4JAdaptor.all, JavaFSAdaptor.all, JavaERJDBCAdaptor.all, WOLips.all, WOJRebel.all, ERMoviesLogic.all, SnapshotExplorer.all, ERJasperReports.all, ERAttributeExtension.all, ERWOAdaptor.all, ERCayenne.all, ERCayenne.all, ERDistribution.all, MooTools.all, ERJQueryMobile.all, ERJQMobile.all, ERPersistentSessionStorage.all, ERQuartzScheduler.all, ERXiss.all, ERFirebug.all, ERXPartialBaseModel.all, ERXPartialsExampleModel.all" />

<target name="common.applications.all" depends="BugTracker.all, ERMailer.all, Uber.all, SecretPal.all, ERXTest.all, PluginTest.all, WOTested.all" />

Expand Down
30 changes: 30 additions & 0 deletions Examples/ErJaxWS/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
The attached examples show how to use ERJaxWS to
provide SOAP services in your WOApplication

1. WebService_Created

shows you how to private a simple WebService from scratch
and how to register this with your WOApplication


2. WebService_Imported

shows you how to provide a WebService implementing a generated
interface based on a given WSDL.
The wsdl had been imported using

wsimport -s Sources -keep <url to wsdl>


3. WebService_Stateful

shows you how to
- provide a WebService implementing a generated interface
based on a given WSDL, all generated stuff is in a jar file
and had been created using

wsimport -clientjar Libraries/testservice.jar <url to wsdl>

- provide and use a stateful WebService

- use WebFaults, generated by throwing Exceptions
18 changes: 18 additions & 0 deletions Examples/ErJaxWS/WebService_Created/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="Sources"/>
<classpathentry kind="con" path="WOFramework/ERExtensions"/>
<classpathentry kind="con" path="WOFramework/ERJars"/>
<classpathentry kind="con" path="WOFramework/ERPrototypes"/>
<classpathentry kind="con" path="WOFramework/JavaWOExtensions"/>
<classpathentry kind="con" path="WOFramework/WOOgnl"/>
<classpathentry kind="con" path="WOFramework/JavaEOAccess"/>
<classpathentry kind="con" path="WOFramework/JavaEOControl"/>
<classpathentry kind="con" path="WOFramework/JavaFoundation"/>
<classpathentry kind="con" path="WOFramework/JavaJDBCAdaptor"/>
<classpathentry kind="con" path="WOFramework/JavaWebObjects"/>
<classpathentry kind="con" path="WOFramework/JavaXML"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="WOFramework/ERJaxWS"/>
<classpathentry kind="output" path="bin"/>
</classpath>
23 changes: 23 additions & 0 deletions Examples/ErJaxWS/WebService_Created/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>WebService_Created</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.objectstyle.wolips.incrementalbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.objectstyle.wolips.incrementalapplicationnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/Components=UTF-8
5 changes: 5 additions & 0 deletions Examples/ErJaxWS/WebService_Created/Components/Main.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wodefinitions>
<wo wocomponentcontent="false" class="Main.java">
</wo>
</wodefinitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
Hello World
</body>
</html>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
68 changes: 68 additions & 0 deletions Examples/ErJaxWS/WebService_Created/Resources/Properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# OGNL
ognl.helperFunctions=true
ognl.inlineBindings=true

# Misc
er.extensions.stackTrace.cleanup=true

# EOF
er.extensions.ERXEC.safeLocking=true
er.extensions.ERXEC.useSharedEditingContext=false
er.extensions.ERXEnterpriseObject.applyRestrictingQualifierOnInsert=true
er.extensions.ERXEnterpriseObject.updateInverseRelationships=true
#dbConnectURLGLOBAL=
#dbConnectUserGLOBAL=
#dbConnectPasswordGLOBAL=

# Migrations
#er.migration.migrateAtStartup=true
#er.migration.createTablesIfNecessary=true
#er.migration.modelNames=YourModel

# Misc Components
#er.extensions.ERXWOForm.multipleSubmitDefault=true
#er.extensions.ERXWORepetition.checkHashCodes=true
#er.extensions.ERXWORepetition.raiseOnUnmatchedObject=true
#er.extensions.ERXWORepetition.eoSupport=true
#er.component.clickToOpen=true
#wolips.password=wo

# ERJavaMail
er.javamail.centralize=true
er.javamail.adminEmail=admin@yourhost.com
er.javamail.debugEnabled=false
er.javamail.smtpHost=your.smtpserver.com
er.javamail.smtpAuth=false
er.javamail.smtpUser=
er.javamail.smtpPassword=

# Log4j Configuration
log4j.loggerFactory=er.extensions.logging.ERXLogger$Factory
log4j.rootCategory=INFO,A1
log4j.appender.A1=er.extensions.logging.ERXConsoleAppender
log4j.appender.A1.layout=er.extensions.logging.ERXPatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{MMM dd HH:mm:ss} %$[%#] %-5p %c %x - %m%n

# Log4j Categories
# Here are a few log4j sub-categories that are interesting.
# Don't forget that in developement mode this file will get reloaded
# everytime it changes, so if you say want to turn adaptor debugging
# on in the middle of the app simply set the below category to debug.
# Very handy.
# Base Category
log4j.logger.er=INFO

# ERExtensions
# Transaction - Switching this to debug will start the sql ouputting.
log4j.logger.er.transaction.adaptor.EOAdaptorDebugEnabled=DEBUG

# Fixes - Turning this on will show all the models that are loaded
log4j.logger.er.extensions.fixes.ERSharedEOLoader=INFO

er.extensions.ERXNSLogLog4jBridge=INFO
#log4j.logger.er.eo.ERXGenericRecord=DEBUG
#log4j.logger.er.validation.ERXEntityClassDescription=DEBUG
#log4j.logger.er.default.ERXEntityClassDescription=DEBUG
log4j.logger.er.extensions.ERXDatabaseContextDelegate=WARN
log4j.logger.er.extensions.ERXConfigurationManager=INFO
#log4j.logger.er.extensions.ERXApplication.RequestHandling=DEBUG
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package your.app;

import javax.xml.ws.Endpoint;

import your.app.ws.Calculator;
import er.extensions.appserver.ERXApplication;
import er.extensions.appserver.ws.ERJaxWebService;
import er.extensions.appserver.ws.ERJaxWebServiceRequestHandler;

public class Application extends ERXApplication {
public static void main(String[] argv) {
ERXApplication.main(argv, Application.class);
}

public Application() {
ERXApplication.log.info("Welcome to " + name() + " !");
/* ** put your initialization code in here ** */
setAllowsConcurrentRequestHandling(true);

// do it the WONDER way
ERJaxWebServiceRequestHandler wsHandler = new ERJaxWebServiceRequestHandler();
wsHandler.registerWebService("Calculator", new ERJaxWebService<Calculator>(Calculator.class));
this.registerRequestHandler(wsHandler, this.webServiceRequestHandlerKey());

// create a standalone endpoint using Jax WS mechanisms
Endpoint.publish("http://localhost:9999/ws/Calculator", new Calculator());

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package your.app;

import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WOApplication;
import com.webobjects.appserver.WORequest;

import er.extensions.appserver.ERXDirectAction;

import your.app.components.Main;

public class DirectAction extends ERXDirectAction {
public DirectAction(WORequest request) {
super(request);
}

@Override
public WOActionResults defaultAction() {
return pageWithName(Main.class.getName());
}

public Application application() {
return (Application)WOApplication.application();
}

@Override
public Session session() {
return (Session)super.session();
}
}
16 changes: 16 additions & 0 deletions Examples/ErJaxWS/WebService_Created/Sources/your/app/Session.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package your.app;

import er.extensions.appserver.ERXSession;

public class Session extends ERXSession {
private static final long serialVersionUID = 1L;

public Session() {
}

@Override
public Application application() {
return (Application)super.application();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package your.app.components;

import com.webobjects.appserver.WOContext;

import er.extensions.components.ERXComponent;
import your.app.Application;
import your.app.Session;

@SuppressWarnings("serial")
public class BaseComponent extends ERXComponent {
public BaseComponent(WOContext context) {
super(context);
}

@Override
public Application application() {
return (Application)super.application();
}

@Override
public Session session() {
return (Session)super.session();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package your.app.components;

import com.webobjects.appserver.WOContext;

@SuppressWarnings("serial")
public class Main extends BaseComponent {
public Main(WOContext context) {
super(context);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package your.app.ws;

import javax.jws.WebService;

@WebService

public class Calculator {

public int add(int a, int b)
{
return a + b;
}
}
13 changes: 13 additions & 0 deletions Examples/ErJaxWS/WebService_Created/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
classes.dir=bin
project.name=WebService_Created
project.name.lowercase=webservice_created
project.type=application
principalClass=your.app.Application
customInfoPListContent=
embed.Local=true
embed.System=true
webXML=false
webXML_CustomContent=
component.wellFormedTemplateRequired=false
component.inlineBindingPrefix=$
component.inlineBindingSuffix=
Loading

0 comments on commit 5e69b03

Please sign in to comment.