It looks like the wsdl I was provided with was missing the
<mime:content type="text/xml" part="post_content"/>. Adding it yielded a
ConcurrentModificationException. Apparently list remove is being called
in a for each loop over that list in WsdlUtils getHttpHeaders, attached
is a small patch for that. However after fixing the
ConcurrentModificationException the process is still failing. Attached
is the modified wsdl I was provided with.
Bill McCusker
Alexis Midon wrote:
ODE puts all HTTP response headers in the message, so they can eventually be
used by the process. So, yes, this message is correct.
Assuming your assignment is right and that the service output is fine, if
the part your assign is looking for is not in the message then I guess the
issue is in the wsdl you use to describe the service. It looks like your
wsdl is valid (no fault in the invoke), but the response body is not bound
to a part.
What is the content of the operation output element? could you share with us
your wsdl?
Here is an example of an operation binding that stores the response body in
the part "post_content".
<definitions ...
xmlns:odex="http://www.apache.org/ode/type/extension/http"/>
<binding name="blogBinding" type="blogPortType">
<operation name="PUT">
<odex:binding verb="PUT" />
<http:operation location=""/>
<input>
<http:urlReplacement/>
<mime:content type="text/xml" part="post_content"/>
<!-- set a standard request header from a part -->
<odex:header name="Authorization" part="credentials_part"/>
<!-- set a custom request header with a static value -->
<odex:header name="MyCustomHeader" value="[email protected]" />
</input>
<output>
<mime:content type="text/xml" part="post_content"/>
<!-- set 1 response header to a part -->
<odex:header name="Age" part="age_part"/>
</output>
</operation>
</binding>
</definitions>
You can check the doc for more details:
http://ode.apache.org/user-guide.html#UserGuide-HTTPBindingExtensionsforRESTfulservices
Alexis
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="YahooGeocodeWSDL" targetNamespace="http://j2ee.netbeans.org/wsdl/GeocoderBpelModule/YahooGeocodeWSDL"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://j2ee.netbeans.org/wsdl/GeocoderBpelModule/YahooGeocodeWSDL"
xmlns:ns="urn:yahoo:maps"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/">
<types>
<xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/GeocoderBpelModule/YahooGeocodeWSDL">
<xsd:import namespace="urn:yahoo:maps" schemaLocation="GeocodeResponse.xsd"/>
</xsd:schema>
</types>
<message name="YahooGeocodeWSDLOperationRequest">
<part name="appid" type="xsd:string"/>
<part name="street" type="xsd:string"/>
<part name="city" type="xsd:string"/>
<part name="state" type="xsd:string"/>
</message>
<message name="YahooGeocodeWSDLOperationResponse">
<part name="geoCoderResult" element="ns:ResultSet"/>
</message>
<portType name="YahooGeocodeWSDLPortType">
<operation name="YahooGeocodeWSDLOperation">
<input name="input1" message="tns:YahooGeocodeWSDLOperationRequest"/>
<output name="output1" message="tns:YahooGeocodeWSDLOperationResponse"/>
</operation>
</portType>
<binding name="YahooGeocodeWSDLBinding" type="tns:YahooGeocodeWSDLPortType">
<http:binding verb="GET"/>
<operation name="YahooGeocodeWSDLOperation">
<http:operation location=""/>
<input name="input1">
<http:urlEncoded/>
</input>
<output name="output1">
<mime:content type="text/xml" part="geoCoderResult"/>
</output>
</operation>
</binding>
<service name="YahooGeocodeWSDLService">
<port name="YahooGeocodeWSDLPort" binding="tns:YahooGeocodeWSDLBinding">
<http:address location="http://local.yahooapis.com/MapsService/V1/geocode"/>
</port>
</service>
<plnk:partnerLinkType name="YahooGeocodeWSDL">
<!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes.
In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
<plnk:role name="YahooGeocodeWSDLPortTypeRole" portType="tns:YahooGeocodeWSDLPortType"/>
</plnk:partnerLinkType>
</definitions>
Index: utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java
===================================================================
--- utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java
(revision 786653)
+++ utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java
(working copy)
@@ -48,6 +48,7 @@
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Iterator;
import java.util.List;
/**
@@ -307,12 +308,13 @@
public static Collection<UnknownExtensibilityElement> getHttpHeaders(List
extensibilityElements) {
final Collection<UnknownExtensibilityElement> unknownExtElements =
CollectionsX.filter(extensibilityElements, UnknownExtensibilityElement.class);
- for (UnknownExtensibilityElement extensibilityElement :
unknownExtElements) {
+ for(Iterator<UnknownExtensibilityElement> iter =
unknownExtElements.iterator(); iter.hasNext();) {
+ final UnknownExtensibilityElement extensibilityElement =
iter.next();
final Element e = extensibilityElement.getElement();
// keep only the header elements
if
(!Namespaces.ODE_HTTP_EXTENSION_NS.equalsIgnoreCase(e.getNamespaceURI())
||
!"header".equals(extensibilityElement.getElement().getLocalName())) {
- unknownExtElements.remove(extensibilityElement);
+ iter.remove();
}
}
return unknownExtElements;