You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2008/03/21 03:02:35 UTC
svn commit: r639515 [2/4] - in
/webservices/axis2/trunk/java/modules/samples/jaxws-samples: ./ src/
src/main/ src/main/org/ src/main/org/apache/ src/main/org/apache/axis2/
src/main/org/apache/axis2/jaxws/ src/main/org/apache/axis2/jaxws/samples/
src/ma...
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/mtom/SampleMTOMTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/mtom/SampleMTOMTests.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/mtom/SampleMTOMTests.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/mtom/SampleMTOMTests.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,420 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.client.mtom;
+
+import org.apache.axis2.jaxws.samples.mtom.ImageDepot;
+import org.apache.axis2.jaxws.samples.mtom.ObjectFactory;
+import org.apache.axis2.jaxws.samples.mtom.SendImage;
+import org.apache.axis2.jaxws.samples.mtom.SendImageResponse;
+
+import javax.activation.DataHandler;
+import javax.activation.FileDataSource;
+import javax.xml.bind.JAXBContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+
+/**
+ * A sample client that uses MTOM to send an image using both the JAX-WS
+ * Dispatch and the Proxy.
+ */
+public class SampleMTOMTests {
+ private String urlHost = "localhost";
+ private String urlPort = "8080";
+ private String urlSuffix = "";
+ private static final String CONTEXT_BASE = "/jaxws-samples/services/";
+ private static final String MTOM_CONTEXT11 = CONTEXT_BASE + "MtomSampleService.MtomSamplePort";
+ private static final String MTOM_CONTEXT12 = CONTEXT_BASE + "MtomSampleService12.MtomSamplePort";
+ private static final String NAMESPACE = "http://org/apache/axis2/jaxws/samples/mtom/";
+ private String uriString = "http://" + urlHost + ":" + urlPort;
+ private QName serviceName11 = new QName(NAMESPACE, "MtomSampleService");
+ private QName serviceName12 = new QName(NAMESPACE, "MtomSampleService12");
+ private QName portNameDispatch = new QName(NAMESPACE, "MtomSamplePortDispatch");
+ private DataHandler content;
+ private String imageFilename = "";
+ private Boolean tryDispatch = true;
+ private Boolean tryProxy = true;
+ private Boolean soap12 = false;
+
+ /**
+ * Command Line Program Entry Point
+ *
+ * @param args - see printUsage output
+ */
+ public static void main(String[] args) throws Exception {
+ SampleMTOMTests tests = new SampleMTOMTests();
+ tests.parseArgs(args);
+ if (tests.tryDispatch) {
+ tests.testMtomWithDispatch(null);
+ }
+ if (tests.tryProxy) {
+ tests.testMtomWithProxy(null);
+ }
+ }
+
+ /**
+ * Read and interpret the command-line arguments.
+ * See printUsage output for supported parameters
+ *
+ * @param args String[] From the Command Line
+ */
+ public void parseArgs(String[] args) {
+ // Parse the arguments
+
+ if (args.length >= 1) {
+ for (int i = 0; i < args.length; i++) {
+ try {
+ if ('-' == args[i].charAt(0)) {
+ switch (args[i].charAt(1)) {
+ case '?':
+ printUsage(null);
+ System.exit(0);
+ break;
+ case 'd':
+ case 'D':
+ tryDispatch = true;
+ tryProxy = false;
+ break;
+ case 'x':
+ case 'X':
+ tryDispatch = false;
+ tryProxy = true;
+ break;
+ case 'h':
+ case 'H':
+ urlHost = args[++i];
+ break;
+ case 'p':
+ case 'P':
+ urlPort = args[++i];
+ break;
+ case 'f':
+ case 'F':
+ urlSuffix = args[++i];
+ break;
+ case 'i':
+ case 'I':
+ imageFilename = args[++i];
+ break;
+ case '1':
+ soap12 = false;
+ break;
+ case '2':
+ soap12 = true;
+ break;
+ default:
+ printUsage(args[i]);
+ System.exit(0);
+ break;
+ }
+ }
+
+ } catch (Exception e) {
+ System.out.println("Invalid option format.");
+ printUsage(null);
+ System.exit(0);
+ }
+ uriString = "http://" + urlHost + ":" + urlPort;
+ }
+ }
+
+ // Display a warning if there is no input filename
+ if (0 == imageFilename.length()) {
+ System.out
+ .println(">> [WARNING} - No attachment file specified. No data will be included.");
+ }
+
+ // Use the default suffix if it was not specified
+ if (0 == urlSuffix.length()) {
+ if (soap12) {
+ urlSuffix = MTOM_CONTEXT12;
+ } else {
+ urlSuffix = MTOM_CONTEXT11;
+ }
+ }
+ }
+
+ /**
+ * Set multiple class variables and init content.
+ *
+ * @param uri - String - base service URI
+ * @param soapdef - Boolean - true for SOAP 1.2
+ * @param fileName - source file to send
+ */
+ public void setOptions(String uri, Boolean soapdef, String fileName)
+ throws Exception {
+ uriString = uri;
+ urlSuffix = (soapdef) ? MTOM_CONTEXT12 : MTOM_CONTEXT11;
+ soap12 = soapdef;
+ imageFilename = fileName;
+ init();
+ }
+
+ /**
+ * Print usage help to output
+ *
+ * @param invalidOpt -
+ * if non-null, is the invalid parameter
+ */
+ private void printUsage(String invalidOpt) {
+ if (null != invalidOpt) {
+ System.out.println("Invalid Option: " + invalidOpt);
+ }
+ System.out.println("Usage:");
+ System.out
+ .println(" runSampleMtom -h [hostname] -p [port] -f [urlSuffix] -i [imageFilename] -d -x -1 -2");
+ System.out.println("Default values:");
+ System.out.println(" hostname = localhost");
+ System.out.println(" port = 8080");
+ System.out.println(" urlSuffix = /jaxws-samples/services/MtomSampleService.MtomSamplePort");
+ System.out.println(" -d = Use Dispatch Only");
+ System.out.println(" -x = Use Proxy Only");
+ System.out.println(" -1 = soap 1.1 (default)");
+ System.out.println(" -2 = soap 1.2");
+ }
+
+ /**
+ * Creates the content object if required
+ */
+ private void init() throws Exception {
+ if (content == null) {
+ content = getBinaryContent();
+ }
+ }
+
+ /**
+ * Tests sending an image with MTOM, using the JAX-WS Dispatch API.
+ *
+ * @param result - String - used to pass back results to servlet.
+ * @return String - the input string or null
+ * @throws Exception
+ */
+ public String testMtomWithDispatch(String result) throws Exception {
+ Service svc;
+ System.out.println(">>---------------------------------------");
+ System.out.println(">>MTOM Dispatch Test");
+
+ init();
+
+ // Set the data inside of the appropriate object
+ ImageDepot imageDepot = new ObjectFactory().createImageDepot();
+ imageDepot.setImageData(content);
+
+ if (soap12) {
+ svc = Service.create(serviceName12);
+ svc.addPort(portNameDispatch, SOAPBinding.SOAP12HTTP_BINDING, uriString + urlSuffix);
+ } else {
+ svc = Service.create(serviceName11);
+ svc.addPort(portNameDispatch, SOAPBinding.SOAP11HTTP_BINDING, uriString + urlSuffix);
+ }
+
+ // Setup the necessary JAX-WS artifacts
+ JAXBContext jbc = JAXBContext
+ .newInstance("org.apache.axis2.jaxws.samples.mtom");
+ Dispatch<Object> dispatch = svc.createDispatch(portNameDispatch, jbc,
+ Service.Mode.PAYLOAD);
+ BindingProvider bp = (BindingProvider) dispatch;
+ bp.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY,
+ Boolean.TRUE);
+ bp.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY,
+ "sendImage");
+
+ // Set the actual flag to enable MTOM
+ SOAPBinding binding = (SOAPBinding) dispatch.getBinding();
+ binding.setMTOMEnabled(true);
+
+ // Create the request wrapper bean
+ ObjectFactory factory = new ObjectFactory();
+ SendImage request = factory.createSendImage();
+ request.setInput(imageDepot);
+
+ if (null != result) {
+ result = result.concat("Invoking Dispatch<Object> with a binary payload\n");
+ } else {
+ System.out
+ .println(">>MTOM Invoking Dispatch<Object> with a binary payload");
+ }
+
+ // Send the image and process the response image
+ try {
+ SendImageResponse response = (SendImageResponse) dispatch.invoke(request);
+ if (null != result) {
+ if (response != null) {
+ result = result.concat("MTOM Dispatch Response received - " + response.getOutput().getImageData().getContentType());
+ } else {
+ result = result.concat("ERROR: MTOM Dispatch NULL Response received");
+ }
+ } else {
+ if (response != null) {
+ System.out.println(">>MTOM Response received");
+ System.out
+ .println(">>MTOM Writing returned image to dispatch_response.gif");
+ ImageDepot responseContent = response.getOutput();
+ processImageDepot(responseContent, "dispatch_response.gif");
+ } else {
+ System.out.println(">> [ERROR] - Response from the server was NULL");
+ }
+
+ }
+ }
+ catch (Exception e) {
+ if (null != result) {
+ result = result.concat(">> [ERROR] - Exception making connection.");
+ }
+ System.out.println(">> [ERROR] - Exception making connection.");
+ e.printStackTrace();
+ }
+ System.out.println(">>MTOM Dispatch Done");
+ return (result);
+ }
+
+ /**
+ * Tests sending an image with MTOM, using a JAX-WS Dynamic Proxy.
+ *
+ * @param result - String - used to pass back results to servlet.
+ * @return String - the input string or null
+ * @throws Exception
+ */
+ public String testMtomWithProxy(String result) throws Exception {
+ ImageDepot response;
+ System.out.println(">>---------------------------------------");
+ System.out.println(">>MTOM Proxy Test");
+
+ init();
+
+ // Set the data inside of the appropriate object
+ ImageDepot imageDepot = new ObjectFactory().createImageDepot();
+ imageDepot.setImageData(content);
+
+ if (null != result) {
+ result = result.concat("Invoking MTOM proxy with a binary payload\n");
+ } else {
+ System.out.println(">>MTOM Invoking proxy with a binary payload");
+ }
+
+ // Setup the necessary JAX-WS artifacts
+ try {
+ if (soap12) {
+ // Use the generated proxy
+ MtomSample12PortProxy proxy = new MtomSample12PortProxy();
+ proxy._getDescriptor().setEndpoint(uriString + urlSuffix);
+
+ // Enable MTOM
+ BindingProvider bp = (BindingProvider) proxy._getDescriptor().getProxy();
+ SOAPBinding binding = (SOAPBinding) bp.getBinding();
+ binding.setMTOMEnabled(true);
+
+ // Send the image and process the response image
+ response = proxy.sendImage(imageDepot);
+ } else {
+ // SOAP 1.1 Create the service
+ // Use the generated proxy
+ MtomSamplePortProxy proxy = new MtomSamplePortProxy();
+ proxy._getDescriptor().setEndpoint(uriString + urlSuffix);
+
+ // Enable MTOM
+ BindingProvider bp = (BindingProvider) proxy._getDescriptor().getProxy();
+ SOAPBinding binding = (SOAPBinding) bp.getBinding();
+ binding.setMTOMEnabled(true);
+
+ // Send the image and process the response image
+ response = proxy.sendImage(imageDepot);
+ }
+
+ if (null != result) {
+ if (response != null) {
+ result = result.concat("MTOM Proxy Response received - " + response.getImageData().getContentType());
+ } else {
+ result = result.concat("ERROR: MTOM Proxy NULL Response received\n");
+ }
+ } else {
+ if (response != null) {
+ System.out.println(">>MTOM Response received");
+ System.out
+ .println(">>MTOM Writing returned image to proxy_response.gif");
+ processImageDepot(response, "proxy_response.gif");
+ } else {
+ System.out
+ .println(">> [ERROR] - Response from the server was NULL");
+ }
+ }
+ }
+ catch (Exception e) {
+ if (null != result) {
+ result = result.concat(">> [ERROR] - Exception making connection.");
+ }
+ System.out.println(">> [ERROR] - Exception making connection.");
+ e.printStackTrace();
+ }
+
+ System.out.println(">>MTOM Proxy Done");
+ return (result);
+ }
+
+ /*
+ * Get a DataHandler that contains the binary data we'd like to send.
+ * @return DataHandler
+ * @throws Exception
+ */
+ private DataHandler getBinaryContent() throws Exception {
+ DataHandler dh = null;
+ if (imageFilename != null) {
+ File file = new File(imageFilename);
+ if (!file.exists()) {
+ throw new FileNotFoundException();
+ }
+ System.out.println(">>MTOM Loading data from: '"
+ + file.toURI().toURL().toExternalForm() + "'");
+ FileDataSource fds = new FileDataSource(file);
+ dh = new DataHandler(fds);
+ }
+
+ return dh;
+ }
+
+ /*
+ * Takes the data from the ImageDepot and writes it out to a file named by
+ * the provided String.
+ * @param ImageDepot data
+ * @param String fname
+ * @throws Exception
+ */
+ private void processImageDepot(ImageDepot data, String fname)
+ throws Exception {
+ DataHandler dh = data.getImageData();
+ if (dh != null) {
+ File f = new File(fname);
+ if (f.exists()) {
+ f.delete();
+ }
+
+ FileOutputStream fos = new FileOutputStream(f);
+ dh.writeTo(fos);
+ } else {
+ System.out
+ .println(">> [ERROR] - ImageDepot was not null, but did not contain binary data");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.client.ping;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+@WebServiceClient(name = "PingService", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/", wsdlLocation = "WEB-INF/wsdl/Ping.wsdl")
+public class PingService
+ extends Service {
+
+ private final static URL PINGSERVICE_WSDL_LOCATION;
+
+ static {
+ URL url = null;
+ try {
+ url = new URL("file:/WEB-INF/wsdl/Ping.wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ PINGSERVICE_WSDL_LOCATION = url;
+ }
+
+ public PingService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public PingService() {
+ super(PINGSERVICE_WSDL_LOCATION, new QName("http://org/apache/axis2/jaxws/samples/ping/", "PingService"));
+ }
+
+ /**
+ * @return returns PingServicePortType
+ */
+ @WebEndpoint(name = "PingServicePort")
+ public PingServicePortTypeClient getPingServicePort() {
+ return (PingServicePortTypeClient) super.getPort(new QName("http://org/apache/axis2/jaxws/samples/ping/", "PingServicePort"), PingServicePortTypeClient.class);
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.client.ping;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+@WebServiceClient(name = "PingService12", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/", wsdlLocation = "WEB-INF/wsdl/Ping12.wsdl")
+public class PingService12
+ extends Service {
+
+ private final static URL PINGSERVICE12_WSDL_LOCATION;
+
+ static {
+ URL url = null;
+ try {
+ url = new URL("file:/WEB-INF/wsdl/Ping12.wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ PINGSERVICE12_WSDL_LOCATION = url;
+ }
+
+ public PingService12(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public PingService12() {
+ super(PINGSERVICE12_WSDL_LOCATION, new QName("http://org/apache/axis2/jaxws/samples/ping/", "PingService12"));
+ }
+
+ /**
+ * @return returns PingService12PortType
+ */
+ @WebEndpoint(name = "PingService12Port")
+ public PingService12PortTypeClient getPingService12Port() {
+ return (PingService12PortTypeClient) super.getPort(new QName("http://org/apache/axis2/jaxws/samples/ping/", "PingService12Port"), PingService12PortTypeClient.class);
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortProxy.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortProxy.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortProxy.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortProxy.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.client.ping;
+
+import org.apache.axis2.jaxws.samples.ping.PingStringInput;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import java.net.URL;
+
+public class PingService12PortProxy {
+
+ protected Descriptor _descriptor;
+
+ public class Descriptor {
+ private PingService12 _service = null;
+ private org.apache.axis2.jaxws.samples.client.ping.PingService12PortTypeClient _proxy = null;
+ private Dispatch<Source> _dispatch = null;
+
+ public Descriptor() {
+ _service = new PingService12();
+ initCommon();
+ }
+
+ public Descriptor(URL wsdlLocation, QName serviceName) {
+ _service = new PingService12(wsdlLocation, serviceName);
+ initCommon();
+ }
+
+ private void initCommon() {
+ _proxy = _service.getPingService12Port();
+ }
+
+ public org.apache.axis2.jaxws.samples.client.ping.PingService12PortTypeClient getProxy() {
+ return _proxy;
+ }
+
+ public Dispatch<Source> getDispatch() {
+ if (_dispatch == null) {
+ QName portQName = new QName("http://org/apache/axis2/jaxws/samples/ping/", "PingService12Port");
+ _dispatch = _service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
+
+ String proxyEndpointUrl = getEndpoint();
+ BindingProvider bp = (BindingProvider) _dispatch;
+ String dispatchEndpointUrl = (String) bp.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ if (!dispatchEndpointUrl.equals(proxyEndpointUrl))
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, proxyEndpointUrl);
+ }
+ return _dispatch;
+ }
+
+ public String getEndpoint() {
+ BindingProvider bp = (BindingProvider) _proxy;
+ return (String) bp.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ }
+
+ public void setEndpoint(String endpointUrl) {
+ BindingProvider bp = (BindingProvider) _proxy;
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl);
+
+ if (_dispatch != null) {
+ bp = (BindingProvider) _dispatch;
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl);
+ }
+ }
+ }
+
+ public PingService12PortProxy() {
+ _descriptor = new Descriptor();
+ }
+
+ public PingService12PortProxy(URL wsdlLocation, QName serviceName) {
+ _descriptor = new Descriptor(wsdlLocation, serviceName);
+ }
+
+ public Descriptor _getDescriptor() {
+ return _descriptor;
+ }
+
+ public void pingOperation(PingStringInput parameter) {
+ _getDescriptor().getProxy().pingOperation(parameter);
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortTypeClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortTypeClient.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortTypeClient.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingService12PortTypeClient.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.client.ping;
+
+import org.apache.axis2.jaxws.samples.ping.PingStringInput;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+
+
+@WebService(name = "PingService12PortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/")
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
+public interface PingService12PortTypeClient {
+
+
+ /**
+ * @param parameter
+ */
+ @WebMethod(action = "pingOperation")
+ @Oneway
+ public void pingOperation(
+ @WebParam(name = "pingStringInput", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/", partName = "parameter")
+ PingStringInput parameter);
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortProxy.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortProxy.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortProxy.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortProxy.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.client.ping;
+
+import org.apache.axis2.jaxws.samples.ping.PingStringInput;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import java.net.URL;
+
+public class PingServicePortProxy {
+
+ protected Descriptor _descriptor;
+
+ public class Descriptor {
+ private PingService _service = null;
+ private org.apache.axis2.jaxws.samples.client.ping.PingServicePortTypeClient _proxy = null;
+ private Dispatch<Source> _dispatch = null;
+
+ public Descriptor() {
+ _service = new PingService();
+ initCommon();
+ }
+
+ public Descriptor(URL wsdlLocation, QName serviceName) {
+ _service = new PingService(wsdlLocation, serviceName);
+ initCommon();
+ }
+
+ private void initCommon() {
+ _proxy = _service.getPingServicePort();
+ }
+
+ public org.apache.axis2.jaxws.samples.client.ping.PingServicePortTypeClient getProxy() {
+ return _proxy;
+ }
+
+ public Dispatch<Source> getDispatch() {
+ if (_dispatch == null) {
+ QName portQName = new QName("http://org/apache/axis2/jaxws/samples/ping/", "PingServicePort");
+ _dispatch = _service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
+
+ String proxyEndpointUrl = getEndpoint();
+ BindingProvider bp = (BindingProvider) _dispatch;
+ String dispatchEndpointUrl = (String) bp.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ if (!dispatchEndpointUrl.equals(proxyEndpointUrl))
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, proxyEndpointUrl);
+ }
+ return _dispatch;
+ }
+
+ public String getEndpoint() {
+ BindingProvider bp = (BindingProvider) _proxy;
+ return (String) bp.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ }
+
+ public void setEndpoint(String endpointUrl) {
+ BindingProvider bp = (BindingProvider) _proxy;
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl);
+
+ if (_dispatch != null) {
+ bp = (BindingProvider) _dispatch;
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl);
+ }
+ }
+ }
+
+ public PingServicePortProxy() {
+ _descriptor = new Descriptor();
+ }
+
+ public PingServicePortProxy(URL wsdlLocation, QName serviceName) {
+ _descriptor = new Descriptor(wsdlLocation, serviceName);
+ }
+
+ public Descriptor _getDescriptor() {
+ return _descriptor;
+ }
+
+ public void pingOperation(PingStringInput parameter) {
+ _getDescriptor().getProxy().pingOperation(parameter);
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortTypeClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortTypeClient.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortTypeClient.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/client/ping/PingServicePortTypeClient.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.client.ping;
+
+import org.apache.axis2.jaxws.samples.ping.PingStringInput;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+
+
+@WebService(name = "PingServicePortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/")
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
+public interface PingServicePortTypeClient {
+
+
+ /**
+ * @param parameter
+ */
+ @WebMethod(action = "pingOperation")
+ @Oneway
+ public void pingOperation(
+ @WebParam(name = "pingStringInput", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/", partName = "parameter")
+ PingStringInput parameter);
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortImpl.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortImpl.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortImpl.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.echo;
+
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+
+@javax.jws.WebService(endpointInterface = "org.apache.axis2.jaxws.samples.echo.EchoService12PortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/", serviceName = "EchoService12", portName = "EchoService12Port", wsdlLocation = "WEB-INF/wsdl/Echo12.wsdl")
+@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
+public class EchoService12PortImpl {
+
+ public EchoStringResponse echoOperation(EchoStringInput parameter) {
+ System.out.println(">> SERVICE: SEI Echo SOAP12 Service: Request received.");
+ String inputString = "Failed";
+ if (parameter != null) {
+ try {
+ System.out.println(">> SERVICE: SOAP12 Echo Input String '" + parameter.echoInput + "'");
+ inputString = parameter.echoInput;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ EchoStringResponse response =
+ new ObjectFactory().createEchoStringResponse();
+ response.echoResponse = "SOAP12==>>" + inputString;
+ return response;
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortType.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortType.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoService12PortType.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.echo;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+
+
+@WebService(name = "EchoService12PortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/")
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
+public interface EchoService12PortType {
+
+
+ /**
+ * @param parameter
+ * @return returns org.apache.axis2.jaxws.samples.echo.EchoStringResponse
+ */
+ @WebMethod(action = "echoOperation")
+ @WebResult(name = "echoStringResponse", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/", partName = "parameter")
+ public EchoStringResponse echoOperation(
+ @WebParam(name = "echoStringInput", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/", partName = "parameter")
+ EchoStringInput parameter);
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortImpl.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortImpl.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortImpl.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.echo;
+
+import javax.jws.WebService;
+
+
+@WebService(endpointInterface = "org.apache.axis2.jaxws.samples.echo.EchoServicePortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/", serviceName = "EchoService", portName = "EchoServicePort", wsdlLocation = "WEB-INF/wsdl/Echo.wsdl")
+public class EchoServicePortImpl {
+
+ public EchoStringResponse echoOperation(EchoStringInput parameter) {
+ System.out.println(">> SERVICE: SEI Echo JAX-WS Service: Request received.");
+ String inputString = "Failed";
+ if (parameter != null) {
+ try {
+ System.out.println(">> SERVICE: SEI Echo Input String '" + parameter.echoInput + "'");
+ inputString = parameter.echoInput;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ EchoStringResponse response =
+ new ObjectFactory().createEchoStringResponse();
+ response.echoResponse = "JAX-WS==>>" + inputString;
+ return response;
+ }
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortType.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortType.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoServicePortType.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.echo;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+
+
+@WebService(name = "EchoServicePortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/")
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
+public interface EchoServicePortType {
+
+
+ /**
+ * @param parameter
+ * @return returns org.apache.axis2.jaxws.samples.echo.EchoStringResponse
+ */
+ @WebMethod(action = "echoOperation")
+ @WebResult(name = "echoStringResponse", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/", partName = "parameter")
+ public EchoStringResponse echoOperation(
+ @WebParam(name = "echoStringInput", targetNamespace = "http://org/apache/axis2/jaxws/samples/echo/", partName = "parameter")
+ EchoStringInput parameter);
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringInput.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringInput.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringInput.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringInput.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.echo;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echoStringInput element declaration.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <element name="echoStringInput">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="echoInput" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "echoInput"
+ })
+@XmlRootElement(name = "echoStringInput")
+public class EchoStringInput {
+
+ @XmlElement(required = true)
+ protected String echoInput;
+
+ /**
+ * Gets the value of the echoInput property.
+ *
+ * @return possible object is
+ * {@link String }
+ */
+ public String getEchoInput() {
+ return echoInput;
+ }
+
+ /**
+ * Sets the value of the echoInput property.
+ *
+ * @param value allowed object is
+ * {@link String }
+ */
+ public void setEchoInput(String value) {
+ this.echoInput = value;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringResponse.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringResponse.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/EchoStringResponse.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.echo;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echoStringResponse element declaration.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <element name="echoStringResponse">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="echoResponse" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "echoResponse"
+ })
+@XmlRootElement(name = "echoStringResponse")
+public class EchoStringResponse {
+
+ @XmlElement(required = true)
+ protected String echoResponse;
+
+ /**
+ * Gets the value of the echoResponse property.
+ *
+ * @return possible object is
+ * {@link String }
+ */
+ public String getEchoResponse() {
+ return echoResponse;
+ }
+
+ /**
+ * Sets the value of the echoResponse property.
+ *
+ * @param value allowed object is
+ * {@link String }
+ */
+ public void setEchoResponse(String value) {
+ this.echoResponse = value;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/ObjectFactory.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/ObjectFactory.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/ObjectFactory.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.echo;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.apache.axis2.jaxws.samples.echo package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.axis2.jaxws.samples.echo
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link EchoStringResponse }
+ */
+ public EchoStringResponse createEchoStringResponse() {
+ return new EchoStringResponse();
+ }
+
+ /**
+ * Create an instance of {@link EchoStringInput }
+ */
+ public EchoStringInput createEchoStringInput() {
+ return new EchoStringInput();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/package-info.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/package-info.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/package-info.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/echo/package-info.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org/apache/axis2/jaxws/samples/echo/") package org.apache.axis2.jaxws.samples.echo;
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ImageDepot.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ImageDepot.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ImageDepot.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ImageDepot.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.mtom;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ImageDepot complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <complexType name="ImageDepot">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="imageData" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ImageDepot", namespace = "http://org/apache/axis2/jaxws/samples/mtom/", propOrder = {
+ "imageData"
+ })
+public class ImageDepot {
+
+ @XmlElement(required = true)
+ @XmlMimeType("multipart/*")
+ protected DataHandler imageData;
+
+ /**
+ * Gets the value of the imageData property.
+ *
+ * @return possible object is
+ * {@link DataHandler }
+ */
+ public DataHandler getImageData() {
+ return imageData;
+ }
+
+ /**
+ * Sets the value of the imageData property.
+ *
+ * @param value allowed object is
+ * {@link DataHandler }
+ */
+ public void setImageData(DataHandler value) {
+ this.imageData = value;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.mtom;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+@WebService(name = "MtomSampleService",
+ targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/",
+ wsdlLocation = "WEB-INF/wsdl/ImageDepot.wsdl")
+public interface MtomSample {
+
+
+ /**
+ * @param input
+ * @return returns org.apache.axis2.jaxws.samples.mtom.ImageDepot
+ */
+ @WebMethod(action = "sendImage")
+ @WebResult(name = "output", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/")
+ @RequestWrapper(localName = "sendImage", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/", className = "org.apache.axis2.jaxws.samples.mtom.SendImage")
+ @ResponseWrapper(localName = "sendImageResponse", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/", className = "org.apache.axis2.jaxws.samples.mtom.SendImageResponse")
+ public ImageDepot sendImage(
+ @WebParam(name = "input", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/")
+ ImageDepot input);
+
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.mtom;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+@WebService(name = "MtomSampleService12",
+ targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/")
+public interface MtomSample12 {
+
+
+ /**
+ * @param input
+ * @return returns org.apache.axis2.jaxws.samples.mtom.ImageDepot
+ */
+ @WebMethod(action = "sendImage")
+ @WebResult(name = "output", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/")
+ @RequestWrapper(localName = "sendImage", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/", className = "org.apache.axis2.jaxws.samples.mtom.SendImage")
+ @ResponseWrapper(localName = "sendImageResponse", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/", className = "org.apache.axis2.jaxws.samples.mtom.SendImageResponse")
+ public ImageDepot sendImage(
+ @WebParam(name = "input", targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/")
+ ImageDepot input);
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12PortImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12PortImpl.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12PortImpl.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSample12PortImpl.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.mtom;
+
+@javax.jws.WebService(endpointInterface = "org.apache.axis2.jaxws.samples.mtom.MtomSample12",
+ targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/",
+ serviceName = "MtomSampleService12",
+ portName = "MtomSamplePort",
+ wsdlLocation = "WEB-INF/wsdl/ImageDepot12.wsdl")
+@javax.xml.ws.BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING)
+public class MtomSample12PortImpl {
+
+ public ImageDepot sendImage(ImageDepot input) {
+ System.out.println(">>MTOM SOAP 1.2 request received, type = " + input.getImageData().getContentType());
+ return input;
+ }
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSamplePortImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSamplePortImpl.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSamplePortImpl.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/MtomSamplePortImpl.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.mtom;
+
+@javax.jws.WebService(endpointInterface = "org.apache.axis2.jaxws.samples.mtom.MtomSample",
+ targetNamespace = "http://org/apache/axis2/jaxws/samples/mtom/",
+ serviceName = "MtomSampleService",
+ portName = "MtomSamplePort",
+ wsdlLocation = "WEB-INF/wsdl/ImageDepot.wsdl")
+@javax.xml.ws.BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_MTOM_BINDING)
+public class MtomSamplePortImpl {
+
+ public ImageDepot sendImage(ImageDepot input) {
+ System.out.println(">>MTOM SOAP 1.1 request received, type = " + input.getImageData().getContentType());
+ return input;
+ }
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ObjectFactory.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ObjectFactory.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/ObjectFactory.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.mtom;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.apache.axis2.jaxws.samples.mtom package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.axis2.jaxws.samples.mtom
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link SendImage }
+ */
+ public SendImage createSendImage() {
+ return new SendImage();
+ }
+
+ /**
+ * Create an instance of {@link SendImageResponse }
+ */
+ public SendImageResponse createSendImageResponse() {
+ return new SendImageResponse();
+ }
+
+ /**
+ * Create an instance of {@link ImageDepot }
+ */
+ public ImageDepot createImageDepot() {
+ return new ImageDepot();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImage.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImage.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImage.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.mtom;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="input" type="{http://org/apache/axis2/jaxws/samples/mtom/}ImageDepot" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "input"
+ })
+@XmlRootElement(name = "sendImage")
+public class SendImage {
+
+ protected ImageDepot input;
+
+ /**
+ * Gets the value of the input property.
+ *
+ * @return possible object is
+ * {@link ImageDepot }
+ */
+ public ImageDepot getInput() {
+ return input;
+ }
+
+ /**
+ * Sets the value of the input property.
+ *
+ * @param value allowed object is
+ * {@link ImageDepot }
+ */
+ public void setInput(ImageDepot value) {
+ this.input = value;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImageResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImageResponse.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImageResponse.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/SendImageResponse.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jaxws.samples.mtom;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * <p/>
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p/>
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="output" type="{http://org/apache/axis2/jaxws/samples/mtom/}ImageDepot" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "output"
+ })
+@XmlRootElement(name = "sendImageResponse")
+public class SendImageResponse {
+
+ protected ImageDepot output;
+
+ /**
+ * Gets the value of the output property.
+ *
+ * @return possible object is
+ * {@link ImageDepot }
+ */
+ public ImageDepot getOutput() {
+ return output;
+ }
+
+ /**
+ * Sets the value of the output property.
+ *
+ * @param value allowed object is
+ * {@link ImageDepot }
+ */
+ public void setOutput(ImageDepot value) {
+ this.output = value;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/package-info.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/package-info.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/package-info.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/mtom/package-info.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org/apache/axis2/jaxws/samples/mtom/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.axis2.jaxws.samples.mtom;
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/ObjectFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/ObjectFactory.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/ObjectFactory.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/ObjectFactory.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.ping;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.apache.axis2.jaxws.samples.ping package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.axis2.jaxws.samples.ping
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link PingStringInput }
+ */
+ public PingStringInput createPingStringInput() {
+ return new PingStringInput();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortImpl.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortImpl.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortImpl.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.ping;
+
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+
+
+@javax.jws.WebService(endpointInterface = "org.apache.axis2.jaxws.samples.ping.PingService12PortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/", serviceName = "PingService12", portName = "PingService12Port", wsdlLocation = "WEB-INF/wsdl/Ping12.wsdl")
+@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
+public class PingService12PortImpl {
+
+ public void pingOperation(PingStringInput parameter) {
+ System.out.println(">> SERVICE: SEI Ping SOAP12 Service: Request received.");
+ if (parameter != null) {
+ try {
+ System.out.println(">> SERVICE: SOAP12 Ping Input String '" + parameter.pingInput + "'");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortType.java?rev=639515&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortType.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-samples/src/main/org/apache/axis2/jaxws/samples/ping/PingService12PortType.java Thu Mar 20 19:02:22 2008
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.samples.ping;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+
+
+@WebService(name = "PingService12PortType", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/")
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
+public interface PingService12PortType {
+
+
+ /**
+ * @param parameter
+ */
+ @WebMethod(action = "pingOperation")
+ @Oneway
+ public void pingOperation(
+ @WebParam(name = "pingStringInput", targetNamespace = "http://org/apache/axis2/jaxws/samples/ping/", partName = "parameter")
+ PingStringInput parameter);
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org