Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7511779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:39:37+00:00 2026-05-29T23:39:37+00:00

I have a client which connects to a Web service to get some information.

  • 0

I have a client which connects to a Web service to get some information. I have a requirement where I have to send the same information to multiple services using different ports. To solve this without modifying the client code I found MULE ESB, which is supposed to do exactly what I need.

I’ve found a guide where I could connect one client to one service using MULE ESB and one port, but I cant find a way to chain the services so they all listen to one port but have different themselves.

This is how it’s supposed to look like:
Conceptual Diagram

UPDATE :

here is my current Mule Applications config :

<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" version="CE-3.2.1" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/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/current/mule.xsd ">
    <flow name="flows1Flow1" doc:name="flows1Flow1">
        <http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:4433/miniwebservice" mimeType="text/xml" doc:name="HTTP"/>
        <http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:4434/miniwebservice?wsdl" mimeType="text/xml" doc:name="HTTP"/>
    </flow>
</mule>

Here is the WebService :

Client :

package miniwebservice;

import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;

public class TestWsClient
{
   public static void main( final String[] args ) throws Throwable
   {
      String url = ( args.length > 0 ) ? args[0] : "http://localhost:4434/miniwebservice";
      Service service = Service.create(
            new URL( url + "?wsdl" ),
            new QName( "http://miniwebservice/", "HalloWeltImplService" ) );
      HalloWelt halloWelt = service.getPort( HalloWelt.class );
      System.out.println( "\n" + halloWelt.hallo( args.length > 1 ? args[1] : "" ) );
   }
}

Server :

package miniwebservice;

import javax.xml.ws.Endpoint;

public class TestWsServer
{
   public static void main( final String[] args )
   {
      String url = ( args.length > 0 ) ? args[0] : "http://localhost:4434/miniwebservice";
      Endpoint.publish( url, new HalloWeltImpl() );
   }
}

InterfaceImpl :

package miniwebservice;

import javax.jws.WebService;

@WebService( endpointInterface="miniwebservice.HalloWelt" )
public class HalloWeltImpl implements HalloWelt
{
   public String hallo( String wer )
   {
      return "Hallo " + wer;
   }
}

interface :

package miniwebservice;

import javax.jws.*;

@WebService
public interface HalloWelt
{
   public String hallo( @WebParam( name = "wer" ) String wer );
}

If I start the Server and the Mule aplication and try to reach http://localhost:4434/miniwebservice?wsdl ower http://localhost:4433/miniwebservice I get the folowing Exception in my Browser (FireFox 8.0) :

Couldn’t create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.

I just started to work with Mule so I thouth that this would be enouth to get redirect mule to the Service to get the wsdl but its seems like its a bit complicatet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:39:39+00:00Added an answer on May 29, 2026 at 11:39 pm

    Disclaimers:

    • This is not the final solution to the whole problem, which includes dispatching to several services and aggregating results, but a step in the right direction.
    • This is not representative of how web service proxying is done in Mule (which is way simpler) but a barebone approach to HTTP request routing so aggregation can be added.

    Since you want to forward HTTP GET requests to the ?wsdl processor and HTTP POST SOAP request to the web service, you need to handle the target HTTP method and request URI propagation yourself:

    <flow name="flows1Flow1">
        <http:inbound-endpoint exchange-pattern="request-response"
            address="http://localhost:4433/miniwebservice" />
        <message-properties-transformer scope="outbound">
            <add-message-property key="http.method" value="#[header:INBOUND:http.method]" />
        </message-properties-transformer>
        <logger level="INFO" category="ddo" />
        <http:outbound-endpoint exchange-pattern="request-response"
            address="http://localhost:4434#[header:INBOUND:http.request]" />
    </flow>
    

    (tested and validated with TestWsClient and TestWsServer)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app which connects to a server using a TCP connection
I have a web-service which I secured using certificates. Now, I want to identify
I have an ASP.Net MVC site, which connects to a web service. The site's
I've have a WCF service which has multiple clients that it connects to. What
I have a server class which connects a client on a specific server socket
I have a client which makes a limited number of concurrent web requests. I
I need some help about WCF and authorization. Currently I have a client which
I have an object (Client * client) which starts multiple threads to handle various
We have a Java client which is using corba to call several third party
I have a simple ASP.NET web app which uses a WCF Client to talk

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.