Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created October 14, 2011 18:39
Show Gist options
  • Save terrancesnyder/1287935 to your computer and use it in GitHub Desktop.
Save terrancesnyder/1287935 to your computer and use it in GitHub Desktop.
Mule Simple Passthrough to REST Service while exposed as WSDL
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:mule-xml="http://www.mulesoft.org/schema/mule/xml"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.0/mule-xml.xsd
">
<flow name="HttpProxyService">
<http:inbound-endpoint address="http://localhost:8080/proxy" exchange-pattern="request-response">
<cxf:proxy-service payload="body" service="SearchService"
wsdlLocation="org/mule/example/echo/proxy.wsdl"
namespace="http://echo.example.mule.org/"/>
</http:inbound-endpoint>
<mule-xml:dom-to-xml-transformer/>
<http:outbound-endpoint method="GET" contentType="text/xml" keep-alive="false" address="http://<mydomain>.com/<core>/select/?q=#[xpath://query/text()]&amp;rows=#[xpath://limit/text()]" responseTimeout="10000" encoding="UTF-8" disableTransportTransformer="false" mimeType="text/xml" followRedirects="false" exchange-pattern="request-response" doc:name="HTTP" doc:description="The HTTPS endpoint allows Mule to send and recieve requests securely using HTTP over SSL protocol."/>
</flow>
</mule>
@terrancesnyder
Copy link
Author

Simple wrapper that exposes a plain-old-xml-service (REST/POX/XML) and wraps it to provide WSDL support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment