-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #557 from markusstoll/ERJaxWS
Er jax ws
- Loading branch information
Showing
123 changed files
with
2,929 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
2 changes: 2 additions & 0 deletions
2
Examples/ErJaxWS/WebService_Created/.settings/org.eclipse.core.resources.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/Components=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
9 changes: 9 additions & 0 deletions
9
Examples/ErJaxWS/WebService_Created/Components/Main.wo/Main.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
4 changes: 4 additions & 0 deletions
4
Examples/ErJaxWS/WebService_Created/Components/Main.wo/Main.woo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"WebObjects Release" = "WebObjects 5.0"; | ||
encoding = "UTF-8"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
29 changes: 29 additions & 0 deletions
29
Examples/ErJaxWS/WebService_Created/Sources/your/app/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
|
||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
Examples/ErJaxWS/WebService_Created/Sources/your/app/DirectAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
Examples/ErJaxWS/WebService_Created/Sources/your/app/Session.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
Examples/ErJaxWS/WebService_Created/Sources/your/app/components/BaseComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
Examples/ErJaxWS/WebService_Created/Sources/your/app/components/Main.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Examples/ErJaxWS/WebService_Created/Sources/your/app/ws/Calculator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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= |
Oops, something went wrong.