Author: asoldano
Date: 2014-02-12 11:11:24 -0500 (Wed, 12 Feb 2014)
New Revision: 18344
Added:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/soap/OneWayUnMarshallerHTTP.java
Modified:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnection.java
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionHTTP.java
Log:
[JBWS-3761] Adding proper unmarshaller for oneway invocations
Modified:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
===================================================================
---
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2014-02-12
16:00:35 UTC (rev 18343)
+++
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2014-02-12
16:11:24 UTC (rev 18344)
@@ -112,7 +112,7 @@
callProps.put(StubExt.PROPERTY_CHUNKED_ENCODING_SIZE, 0);
}
- NettyClient client = new NettyClient(getMarshaller(), getUnmarshaller());
+ NettyClient client = new NettyClient(getMarshaller(), getUnmarshaller(oneway));
if (chunkSize != null)
{
client.setChunkSize(chunkSize);
Modified:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnection.java
===================================================================
---
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnection.java 2014-02-12
16:00:35 UTC (rev 18343)
+++
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnection.java 2014-02-12
16:11:24 UTC (rev 18344)
@@ -35,7 +35,7 @@
{
Marshaller getMarshaller();
- UnMarshaller getUnmarshaller();
+ UnMarshaller getUnmarshaller(boolean oneway);
SOAPMessage invoke(SOAPMessage reqMessage, Object endpoint, boolean oneway) throws
IOException;
}
Modified:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionHTTP.java
===================================================================
---
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionHTTP.java 2014-02-12
16:00:35 UTC (rev 18343)
+++
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionHTTP.java 2014-02-12
16:11:24 UTC (rev 18344)
@@ -30,6 +30,7 @@
import org.jboss.ws.core.soap.SOAPMessageMarshaller;
import org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP;
+import org.jboss.ws.core.soap.OneWayUnMarshallerHTTP;
/**
* SOAPConnection implementation
@@ -40,9 +41,12 @@
*/
public class SOAPProtocolConnectionHTTP extends HTTPRemotingConnection
{
- public UnMarshaller getUnmarshaller()
+ public UnMarshaller getUnmarshaller(boolean oneway)
{
- return new SOAPMessageUnMarshallerHTTP();
+ if(oneway)
+ return new OneWayUnMarshallerHTTP();
+ else
+ return new SOAPMessageUnMarshallerHTTP();
}
public Marshaller getMarshaller()
Added:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/soap/OneWayUnMarshallerHTTP.java
===================================================================
---
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/soap/OneWayUnMarshallerHTTP.java
(rev 0)
+++
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/soap/OneWayUnMarshallerHTTP.java 2014-02-12
16:11:24 UTC (rev 18344)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.soap;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.client.UnMarshaller;
+import org.jboss.ws.core.client.transport.NettyClient;
+
+public class OneWayUnMarshallerHTTP implements UnMarshaller
+{
+ public Object read(InputStream inputStream, Map<String, Object> metadata,
Map<String, Object> headers) throws IOException
+ {
+ Integer resCode = (Integer)metadata.get(NettyClient.RESPONSE_CODE);
+ if(!resCode.equals(200))
+ {
+ throw new WSException("One-way operation returned invalid HTTP response:
" + resCode);
+ }
+ return null;
+ }
+}
Property changes on:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/soap/OneWayUnMarshallerHTTP.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native