| Commit in servicemix/components/jaxws on MAIN | |||
| src/main/java/org/servicemix/components/jaxws/ServiceBinder.java | +4 | -19 | 1.2 -> 1.3 |
| /JAXWSBinding.java | +3 | -16 | 1.3 -> 1.4 |
| project.xml | +37 | -2 | 1.1 -> 1.2 |
| .classpath | +23 | -18 | 1.2 -> 1.3 |
| src/test/resources/org/servicemix/components/jaxws/responseWithEnvelope.xml | +8 | added 1.1 | |
| /response.xml | +4 | added 1.1 | |
| /request.xml | +1 | 1.1 -> 1.2 | |
| /example.xml | +10 | 1.2 -> 1.3 | |
| src/test/java/org/servicemix/components/jaxws/ServiceBinderTest.java | +1 | -1 | 1.1 -> 1.2 |
| +91 | -56 | ||
upgraded the JAX-WS binding to the latest greatest JAX-WS API (SerivceFactory and EndpointFactory are no more).
also upgraded to the patched version of the RI until someone applies my patch so that the Service.createDispatch() method actually works
servicemix/components/jaxws/src/main/java/org/servicemix/components/jaxws
diff -u -r1.2 -r1.3 --- ServiceBinder.java 4 Sep 2005 10:12:34 -0000 1.2 +++ ServiceBinder.java 22 Sep 2005 11:59:19 -0000 1.3 @@ -18,9 +18,6 @@
package org.servicemix.components.jaxws; import javax.xml.ws.Endpoint;
-import javax.xml.ws.EndpointFactory; - -import java.net.URI;
/** * Binds a service implementation POJO to JAX-WS
@@ -29,22 +26,10 @@
*/
public class ServiceBinder {
- private EndpointFactory endpointFactory;
private Endpoint endpoint;
- private URI uri;
+ private String uri;
private Object implementation;
- public EndpointFactory getEndpointFactory() {
- if (endpointFactory == null) {
- endpointFactory = EndpointFactory.newInstance();
- }
- return endpointFactory;
- }
-
- public void setEndpointFactory(EndpointFactory endpointFactory) {
- this.endpointFactory = endpointFactory;
- }
-
public Endpoint getEndpoint() {
if (endpoint == null) {
endpoint = createEndpoint();
@@ -64,11 +49,11 @@
this.implementation = implementation;
}
- public URI getUri() {
+ public String getUri() {
return uri;
}
- public void setUri(URI uri) {
+ public void setUri(String uri) {
this.uri = uri;
}
@@ -79,7 +64,7 @@
if (implementation == null) {
throw new IllegalArgumentException("You must configure the 'implementation' property");
}
- return getEndpointFactory().createEndpoint(uri, implementation);
+ return Endpoint.create(uri, implementation);
}
}
servicemix/components/jaxws/src/main/java/org/servicemix/components/jaxws
diff -u -r1.3 -r1.4 --- JAXWSBinding.java 4 Sep 2005 10:12:34 -0000 1.3 +++ JAXWSBinding.java 22 Sep 2005 11:59:19 -0000 1.4 @@ -31,7 +31,6 @@
import javax.xml.transform.Source; import javax.xml.ws.Dispatch; import javax.xml.ws.Service;
-import javax.xml.ws.ServiceFactory;
import javax.xml.ws.WebServiceException; import javax.xml.ws.Service.Mode;
@@ -51,7 +50,6 @@
private Dispatch<Source> dispatch;
private Service jaxService;
- private ServiceFactory jaxServiceFactory;
private URL wsdl;
private QName interfaceName;
private Mode mode = Mode.PAYLOAD;
@@ -80,17 +78,6 @@
this.jaxService = jaxService;
}
- public ServiceFactory getJaxServiceFactory() {
- if (jaxServiceFactory == null) {
- jaxServiceFactory = ServiceFactory.newInstance();
- }
- return jaxServiceFactory;
- }
-
- public void setJaxServiceFactory(ServiceFactory jaxServiceFactory) {
- this.jaxServiceFactory = jaxServiceFactory;
- }
-
public URL getWsdl() throws IOException {
if (wsdl == null) {
wsdl = createWsdl();
@@ -162,7 +149,7 @@
try {
if (isInOutRequest(exchange, in, out)) {
- copyProperties(exchange, in, out);
+ copyPropertiesAndAttachments(exchange, in, out);
Source answer = dispatch.invoke(content);
out.setContent(answer);
}
@@ -208,10 +195,10 @@
QName serviceName = getService();
URL url = ""
if (url != null) {
- return getJaxServiceFactory().createService(url, serviceName);
+ return Service.create(url, serviceName);
}
else {
- return getJaxServiceFactory().createService(serviceName);
+ return Service.create(serviceName);
}
}
servicemix/components/jaxws
diff -u -r1.1 -r1.2 --- project.xml 31 Aug 2005 15:43:00 -0000 1.1 +++ project.xml 22 Sep 2005 11:59:19 -0000 1.2 @@ -74,12 +74,12 @@
<dependency>
<groupId>servicemix</groupId>
<artifactId>jaxws-api</artifactId>
- <version>20050818</version>
+ <version>20050915</version>
</dependency>
<dependency>
<groupId>servicemix</groupId>
<artifactId>jaxws-rt</artifactId>
- <version>20050818</version>
+ <version>dev-1</version>
</dependency>
<dependency>
<groupId>servicemix</groupId>
@@ -96,15 +96,50 @@
<artifactId>jaxb-xjc</artifactId>
<version>20050818</version>
</dependency>
+ + <!-- Sun's StAX implementation --> + <dependency> + <groupId>servicemix</groupId> + <artifactId>sjsxp</artifactId> + <version>20050915</version> + </dependency> +
<dependency>
<id>stax+api</id>
<version>1.0</version>
+ <properties> + <lib>true</lib> + <war.bundle>true</war.bundle> + </properties>
</dependency>
<!-- for testing -->
<dependency>
<id>jencks+all</id>
<version>1.0-M1</version>
+ </dependency> + + <!-- optional used for in-web container testing --> + <dependency> + <id>jetty</id> + <jar>org.mortbay.jetty-4.2.20RC0.jar</jar> + <properties> + <optional>true</optional> + </properties> + </dependency> + <dependency> + <id>jetty+jasper-compiler</id> + <jar>jasper-compiler-4.2.20RC0.jar</jar> + <properties> + <optional>true</optional> + </properties> + </dependency> + <dependency> + <id>jetty+jasper-runtime</id> + <jar>jasper-runtime-4.2.20RC0.jar</jar> + <properties> + <optional>true</optional> + </properties>
</dependency> </dependencies>
servicemix/components/jaxws
diff -u -r1.2 -r1.3 --- .classpath 4 Sep 2005 10:12:34 -0000 1.2 +++ .classpath 22 Sep 2005 11:59:19 -0000 1.3 @@ -1,27 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?> <classpath>
+ <classpathentry kind="lib" path="/jaxws-ri/build/lib/sjsxp.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jsr173_api.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/saaj-impl.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/saaj-api.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/resolver.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jsr250-api.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jsr181-api.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jaxws-tools.jar"/> + <classpathentry sourcepath="/jaxws-ri/rt/src" kind="lib" path="/jaxws-ri/build/lib/jaxws-rt.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jaxws-api.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jaxb-xjc.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jaxb-impl.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/jaxb-api.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/http.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/FastInfoset.jar"/> + <classpathentry kind="lib" path="/jaxws-ri/build/lib/activation.jar"/>
<classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" path="src/test/resources"/> <classpathentry kind="src" path="src/test/java"/>
- <classpathentry sourcepath="/jaxws-20050825/src/rt/src" kind="lib" path="/jaxws-20050825/build"/>
<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/>
- <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/activation.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jaxws-api.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jaxb-impl.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/FastInfoset.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jaxb-xjc.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jsr250-api.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jsr181-api.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jsr173_api.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/sjsxp.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/saaj-impl.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/saaj-api.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/resolver.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jaxws-tools.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/jaxb-api.jar"/> - <classpathentry kind="lib" path="/jpackages/jaxws-ri-20050825/lib/http.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/servicemix-1.1-SNAPSHOT.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/spring-1.2.2-dev-2.jar"/> <classpathentry kind="var" path="MAVEN_REPO/activemq/jars/activemq-3.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-j2ee-1.4-rc4.jar"/>
@@ -31,9 +30,15 @@
<classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/jaxb-api-20050818.jar"/> <classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/jaxb-impl-20050818.jar"/> <classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/jaxb-xjc-20050818.jar"/>
- <classpathentry kind="var" path="MAVEN_REPO/stax/jars/stax-api-1.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jencks/jars/jencks-all-1.0-M1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"/> <classpathentry kind="var" path="MAVEN_REPO/concurrent/jars/concurrent-1.3.4.jar"/>
+ <classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/jaxws-rt-dev-1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/jaxws-api-20050915.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/jetty/jars/jasper-runtime-4.2.20RC0.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/jetty/jars/jasper-compiler-4.2.20RC0.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/jetty/jars/org.mortbay.jetty-4.2.20RC0.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/stax/jars/stax-api-1.0.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/servicemix/jars/servicemix-1.1-SNAPSHOT.jar"/>
<classpathentry kind="output" path="bin"/> </classpath>
servicemix/components/jaxws/src/test/resources/org/servicemix/components/jaxws
responseWithEnvelope.xml added at 1.1
diff -N responseWithEnvelope.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ responseWithEnvelope.xml 22 Sep 2005 11:59:19 -0000 1.1 @@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?> +<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> + <SOAP:Body> + <r:addNumbersResponse xmlns:r='http://duke.org'> + <r:return>1234</r:return> + </r:addNumbersResponse> + </SOAP:Body> +</SOAP:Envelope>
servicemix/components/jaxws/src/test/resources/org/servicemix/components/jaxws
response.xml added at 1.1
diff -N response.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ response.xml 22 Sep 2005 11:59:19 -0000 1.1 @@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?> +<addNumbersResponse xmlns:r='http://duke.org'> + <return>1234</return> +</addNumbersResponse>
servicemix/components/jaxws/src/test/resources/org/servicemix/components/jaxws
diff -u -r1.1 -r1.2 --- request.xml 31 Aug 2005 15:47:38 -0000 1.1 +++ request.xml 22 Sep 2005 11:59:19 -0000 1.2 @@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<ns2:addNumbers xmlns:ns2="http://duke.org"> <arg0>10</arg0> <arg1>20</arg1>
servicemix/components/jaxws/src/test/resources/org/servicemix/components/jaxws
diff -u -r1.2 -r1.3 --- example.xml 1 Sep 2005 18:48:39 -0000 1.2 +++ example.xml 22 Sep 2005 11:59:19 -0000 1.3 @@ -8,6 +8,16 @@
<property name="wsdlResource" value="classpath:org/servicemix/components/jaxws/AddNumbers.wsdl"/>
</component>
<!-- END SNIPPET: jaxws -->
+ + <!-- lets provide an implementation of the service --> + <component id="httpReceiver" service="foo:httpBinding" class="org.servicemix.components.http.HttpConnector" destinationService="foo:addNumbersImpl"> + <property name="host" value="localhost"/> + <property name="port" value="8080"/> + </component> + + <component id="addNumbersImpl" service="foo:addNumbersImpl" class="org.servicemix.components.util.MockServiceComponent"> + <property name="responseResource" value="classpath:org/servicemix/components/jaxws/responseWithEnvelope.xml"/> + </component>
</components> </container>
servicemix/components/jaxws/src/test/java/org/servicemix/components/jaxws
diff -u -r1.1 -r1.2 --- ServiceBinderTest.java 4 Sep 2005 10:12:34 -0000 1.1 +++ ServiceBinderTest.java 22 Sep 2005 11:59:19 -0000 1.2 @@ -31,7 +31,7 @@
protected ServiceBinder binder = new ServiceBinder();
public void testBinding() throws Exception {
- binder.setUri(new URI("http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/"));
+ binder.setUri("http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/");
AddNumbersImpl implementation = new AddNumbersImpl();
binder.setImplementation(implementation);
