Author: veithen
Date: Mon Dec 25 19:56:29 2017
New Revision: 1819259
URL: http://svn.apache.org/viewvc?rev=1819259&view=rev
Log:
Replace tabs with spaces.
Modified:
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/soapbinding/tests/SOAPBindingProviderTests.java
Modified:
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/soapbinding/tests/SOAPBindingProviderTests.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/soapbinding/tests/SOAPBindingProviderTests.java?rev=1819259&r1=1819258&r2=1819259&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/soapbinding/tests/SOAPBindingProviderTests.java
(original)
+++
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/soapbinding/tests/SOAPBindingProviderTests.java
Mon Dec 25 19:56:29 2017
@@ -47,98 +47,98 @@ public class SOAPBindingProviderTests ex
private QName portName = new
QName("http://SOAPBindingProvider.provider.jaxws.axis2.apache.org",
"SOAPBindingProviderPort");
private static final String SOAP11_NS_URI =
"http://schemas.xmlsoap.org/soap/envelope/";
- private static final String SOAP12_NS_URI =
"http://www.w3.org/2003/05/soap-envelope";
+ private static final String SOAP12_NS_URI =
"http://www.w3.org/2003/05/soap-envelope";
- public static final String SOAP11_ENVELOPE_HEAD = "<?xml version='1.0'
encoding='utf-8'?>" +
- "<soapenv:Envelope xmlns:soapenv=\"" + SOAP11_NS_URI + "\">" +
- "<soapenv:Header />" +
- "<soapenv:Body>";
+ public static final String SOAP11_ENVELOPE_HEAD = "<?xml version='1.0'
encoding='utf-8'?>" +
+ "<soapenv:Envelope xmlns:soapenv=\"" + SOAP11_NS_URI + "\">" +
+ "<soapenv:Header />" +
+ "<soapenv:Body>";
- public static final String SOAP12_ENVELOPE_HEAD =
- "<?xml version='1.0' encoding='utf-8'?>" +
- "<soapenv:Envelope xmlns:soapenv=\"" + SOAP12_NS_URI + "\">" +
- "<soapenv:Header />" +
- "<soapenv:Body>";
+ public static final String SOAP12_ENVELOPE_HEAD =
+ "<?xml version='1.0' encoding='utf-8'?>" +
+ "<soapenv:Envelope xmlns:soapenv=\"" + SOAP12_NS_URI + "\">" +
+ "<soapenv:Header />" +
+ "<soapenv:Body>";
- public static final String SOAP11_ENVELOPE_TAIL =
- "</soapenv:Body>" +
- "</soapenv:Envelope>";
+ public static final String SOAP11_ENVELOPE_TAIL =
+ "</soapenv:Body>" +
+ "</soapenv:Envelope>";
- public static final String SOAP12_ENVELOPE_TAIL =
- "</soapenv:Body>" +
- "</soapenv:Envelope>";
+ public static final String SOAP12_ENVELOPE_TAIL =
+ "</soapenv:Body>" +
+ "</soapenv:Envelope>";
- String request = "<invokeOp>Hello World</invokeOp>";
+ String request = "<invokeOp>Hello World</invokeOp>";
- public static Test suite() {
+ public static Test suite() {
return getTestSetup(new TestSuite(SOAPBindingProviderTests.class));
}
-
- public void testSoap11Request(){
- try{
-
System.out.println("---------------------------------------");
- System.out.println("test: " + getName());
-
- Dispatch<SOAPMessage> dispatch=getDispatch();
- String soapMessage = getSOAP11Message();
- MessageFactory factory = MessageFactory.newInstance();
- SOAPMessage message = factory.createMessage(null, new
ByteArrayInputStream(soapMessage.getBytes()));
- Object obj = dispatch.invoke(message);
- assertTrue(obj!=null && obj instanceof SOAPMessage);
-
assertTrue(getVersionURI(message).equals(SOAP11_NS_URI));
- }catch(Exception e){
- System.out.println("Failure while sending soap 11
request");
- System.out.println(e.getMessage());
- fail();
- }
- }
-
- public void testSoap12Request(){
- try{
-
System.out.println("---------------------------------------");
- System.out.println("test: " + getName());
-
- Dispatch<SOAPMessage> dispatch=getDispatch();
- String soapMessage = getSOAP12Message();
- System.out.println("soap message ="+soapMessage);
- MessageFactory factory =
MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
- MimeHeaders header = new MimeHeaders();
- header.addHeader("Content-Type",
"application/soap+xml");
- SOAPMessage message = factory.createMessage(header, new
ByteArrayInputStream(soapMessage.getBytes()));
- Object obj = dispatch.invoke(message);
- assertTrue(obj!=null && obj instanceof SOAPMessage);
-
assertTrue(getVersionURI(message).equals(SOAP12_NS_URI));
- System.out.println("Provider endpoint was able to
receive both SOAP 11 and SOAP 12 request");
- }catch(Exception e){
- System.out.println("Expecting that endpoint will be
able to receive soap 12 and soap 11 request");
- System.out.println(e.getMessage());
- fail();
-
- }
- }
-
- private Dispatch<SOAPMessage> getDispatch(){
- Service svc = Service.create(serviceName);
+
+ public void testSoap11Request(){
+ try{
+ System.out.println("---------------------------------------");
+ System.out.println("test: " + getName());
+
+ Dispatch<SOAPMessage> dispatch=getDispatch();
+ String soapMessage = getSOAP11Message();
+ MessageFactory factory = MessageFactory.newInstance();
+ SOAPMessage message = factory.createMessage(null, new
ByteArrayInputStream(soapMessage.getBytes()));
+ Object obj = dispatch.invoke(message);
+ assertTrue(obj!=null && obj instanceof SOAPMessage);
+ assertTrue(getVersionURI(message).equals(SOAP11_NS_URI));
+ }catch(Exception e){
+ System.out.println("Failure while sending soap 11 request");
+ System.out.println(e.getMessage());
+ fail();
+ }
+ }
+
+ public void testSoap12Request(){
+ try{
+ System.out.println("---------------------------------------");
+ System.out.println("test: " + getName());
+
+ Dispatch<SOAPMessage> dispatch=getDispatch();
+ String soapMessage = getSOAP12Message();
+ System.out.println("soap message ="+soapMessage);
+ MessageFactory factory =
MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+ MimeHeaders header = new MimeHeaders();
+ header.addHeader("Content-Type", "application/soap+xml");
+ SOAPMessage message = factory.createMessage(header, new
ByteArrayInputStream(soapMessage.getBytes()));
+ Object obj = dispatch.invoke(message);
+ assertTrue(obj!=null && obj instanceof SOAPMessage);
+ assertTrue(getVersionURI(message).equals(SOAP12_NS_URI));
+ System.out.println("Provider endpoint was able to receive both
SOAP 11 and SOAP 12 request");
+ }catch(Exception e){
+ System.out.println("Expecting that endpoint will be able to
receive soap 12 and soap 11 request");
+ System.out.println(e.getMessage());
+ fail();
+
+ }
+ }
+
+ private Dispatch<SOAPMessage> getDispatch(){
+ Service svc = Service.create(serviceName);
svc.addPort(portName, null, endpointUrl);
Dispatch<SOAPMessage> dispatch = svc.createDispatch(portName,
SOAPMessage.class, Service.Mode.MESSAGE);
BindingProvider p = (BindingProvider) dispatch;
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
endpointUrl);
return dispatch;
- }
-
- private String getSOAP11Message() throws SOAPException, IOException{
- return SOAP11_ENVELOPE_HEAD+request+SOAP11_ENVELOPE_TAIL;
- }
-
- private String getSOAP12Message() throws SOAPException, IOException{
- return SOAP12_ENVELOPE_HEAD+request+SOAP12_ENVELOPE_TAIL;
- }
-
- private String getVersionURI(SOAPMessage soapMessage)throws
SOAPException{
- SOAPPart sp = soapMessage.getSOAPPart();
- SOAPEnvelope envelope = sp.getEnvelope();
- return envelope.getNamespaceURI();
- }
+ }
+
+ private String getSOAP11Message() throws SOAPException, IOException{
+ return SOAP11_ENVELOPE_HEAD+request+SOAP11_ENVELOPE_TAIL;
+ }
+
+ private String getSOAP12Message() throws SOAPException, IOException{
+ return SOAP12_ENVELOPE_HEAD+request+SOAP12_ENVELOPE_TAIL;
+ }
+
+ private String getVersionURI(SOAPMessage soapMessage)throws SOAPException{
+ SOAPPart sp = soapMessage.getSOAPPart();
+ SOAPEnvelope envelope = sp.getEnvelope();
+ return envelope.getNamespaceURI();
+ }
}