You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2009/03/07 02:31:36 UTC
svn commit: r751165 - in /ode/trunk:
axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/
axis2/src/main/java/org/apache/ode/axis2/httpbinding/
utils/src/main/java/org/apache/ode/utils/wsdl/
Author: midon
Date: Sat Mar 7 01:31:36 2009
New Revision: 751165
URL: http://svn.apache.org/viewvc?rev=751165&view=rev
Log:
ODE-546: rest operations may have no parts now
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpMethodConverter.java
ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/Messages.java
Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java?rev=751165&r1=751164&r2=751165&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java Sat Mar 7 01:31:36 2009
@@ -37,20 +37,9 @@
protected void setUp() throws Exception {
super.setUp();
final CountDownLatch latch = new CountDownLatch(1);
- jettyWrapper = new JettyWrapper(7070);
- new Thread("HttpBindingJetty") {
- public void run() {
- try {
- jettyWrapper.start();
- latch.countDown();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }.start();
- // wait for jetty to be ready
- latch.await();
- }
+ jettyWrapper = new JettyWrapper(7070);
+ jettyWrapper.start();
+ }
@AfterMethod
protected void tearDown() throws Exception {
Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java?rev=751165&r1=751164&r2=751165&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpExternalService.java Sat Mar 7 01:31:36 2009
@@ -146,7 +146,8 @@
// configure the client (proxy, security, etc)
- Element authenticatePart = DOMUtils.findChildByName(odeMex.getRequest().getMessage(), new QName(null, "WWW-Authenticate"));
+ Element message = odeMex.getRequest().getMessage();
+ Element authenticatePart = message == null ? null : DOMUtils.findChildByName(message, new QName(null, "WWW-Authenticate"));
HttpHelper.configure(client, method.getURI(), authenticatePart, params);
// this callable encapsulates the http method execution and the process of the response
Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpMethodConverter.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpMethodConverter.java?rev=751165&r1=751164&r2=751165&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpMethodConverter.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/httpbinding/HttpMethodConverter.java Sat Mar 7 01:31:36 2009
@@ -334,6 +334,9 @@
protected Map<String, Element> extractPartElements(Message msgDef, Element message) {
+ if (msgDef.getParts().size() != 0 && message == null) {
+ throw new IllegalArgumentException(msgs.msgOdeMessageExpected());
+ }
Map<String, Element> partValues = new HashMap<String, Element>();
for (Iterator iterator = msgDef.getParts().values().iterator(); iterator.hasNext();) {
Part part = (Part) iterator.next();
Modified: ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/Messages.java
URL: http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/Messages.java?rev=751165&r1=751164&r2=751165&view=diff
==============================================================================
--- ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/Messages.java (original)
+++ ode/trunk/utils/src/main/java/org/apache/ode/utils/wsdl/Messages.java Sat Mar 7 01:31:36 2009
@@ -158,6 +158,10 @@
return new IllegalArgumentException(s);
}
+ public Throwable msgOdeMessageExpected() {
+ String s = format("Message expected!");
+ return new IllegalArgumentException(s);
+ }
public Throwable msgOdeMessageMissingRequiredPart(String partName) {
String s = format("Message is missing required part: {0}", partName);