Navigation Menu

Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Fix bug with HTTP GET in query service. fix version # in POM. Clean u…
Browse files Browse the repository at this point in the history
…p example config.
  • Loading branch information
dandiep committed Jul 11, 2011
1 parent 483fbe0 commit 95be983
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.mulesoft.mql</groupId>
<artifactId>mql-parent</artifactId>
<version>0.2-SNAPSHOT</version>
<version>0.9-SNAPSHOT</version>
</parent>

<artifactId>mql-examples</artifactId>
Expand Down
7 changes: 0 additions & 7 deletions examples/src/main/app/example.properties

This file was deleted.

11 changes: 1 addition & 10 deletions examples/src/main/app/mule-config.xml
Expand Up @@ -12,18 +12,9 @@
">

<spring:beans>
<!-- Load passwords from external file -->
<spring:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<spring:property name="locations">
<spring:list>
<spring:value>example.properties</spring:value>
</spring:list>
</spring:property>
<spring:property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
</spring:bean>

<spring:import resource="activity.xml" />
<spring:import resource="salesforce-join.xml" />
<spring:import resource="versioning.xml" />
</spring:beans>

</mule>
Expand Down
Expand Up @@ -23,6 +23,7 @@
import org.mule.processor.ResponseMessageProcessorAdapter;
import org.mule.routing.ChoiceRouter;
import org.mule.transformer.types.DataTypeFactory;
import org.mule.transport.http.HttpConnector;
import org.mule.transport.http.transformers.FormTransformer;

public class QueryService extends AbstractFlowConstruct {
Expand Down Expand Up @@ -72,7 +73,10 @@ protected Filter getJsonFilter() {

public boolean accept(MuleMessage msg) {
Object ct = msg.getInboundProperty("Content-Type");
if (ct == null || ct.toString().contains("application/json")) {
String method = (String)msg.getInboundProperty(HttpConnector.HTTP_METHOD_PROPERTY);

if ((ct == null && (method == null || !method.toUpperCase().equals("GET")))
|| (ct != null && ct.toString().contains("application/json"))) {
return true;
}
return false;
Expand Down

0 comments on commit 95be983

Please sign in to comment.