Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is a casing issue in your WSDL. Instead of:</p> <pre><code> &lt;wsdl:message name="greetingResponse"&gt; &lt;wsdl:part type="tns:greeting" name="greetings"/&gt; &lt;/wsdl:message&gt; </code></pre> <p>you should have:</p> <pre><code> &lt;wsdl:message name="greetingResponse"&gt; &lt;wsdl:part type="tns:Greeting" name="greetings"/&gt; &lt;/wsdl:message&gt; </code></pre> <p>With this fixed, the following produces a web service that works fine when called from SOAPui:</p> <pre><code>&lt;flow name="WS_In"&gt; &lt;http:inbound-endpoint address="http://localhost:8080/HelloService" exchange-pattern="request-response"&gt; &lt;cxf:proxy-service wsdlLocation="classpath:globalid3.wsdl" namespace="http://example.org/HelloService" service="ProxyService" /&gt; &lt;/http:inbound-endpoint&gt; &lt;custom-processor class="com.example.ServiceProxy" /&gt; &lt;/flow&gt; </code></pre> <p>Message processor:</p> <pre><code>package com.example; import javax.xml.namespace.QName; import org.apache.commons.lang.StringEscapeUtils; import org.mule.api.MuleEvent; import org.mule.api.MuleException; import org.mule.api.processor.MessageProcessor; public class ServiceProxy implements MessageProcessor { private final static QName SIMPLE_GREETING = new QName("http://example.org/HelloService", "simpleGreeting"); public MuleEvent process(final MuleEvent event) throws MuleException { final QName operation = event.getFlowVariable("cxf_operation"); if (operation.equals(SIMPLE_GREETING)) { final String lastName = event.getMuleContext() .getExpressionLanguage() .evaluate("xpath('/lastName').text", event); final String responseXml = "&lt;greetings&gt;&lt;greet&gt;Hi " + StringEscapeUtils.escapeXml(lastName) + "&lt;/greet&gt;&lt;/greetings&gt;"; event.getMessage().setPayload(responseXml); return event; } throw new UnsupportedOperationException(operation.getLocalPart() + " " + operation.getNamespaceURI() + " " + operation.getPrefix()); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload