1
2
3
4
5
6
7 package org.mule.transport.soap.axis;
8
9 import org.mule.api.endpoint.MalformedEndpointException;
10 import org.mule.endpoint.AbstractEndpointURIBuilder;
11
12 import java.net.URI;
13 import java.util.Properties;
14
15
16
17
18
19 public class WsdlUrlEndpointURIBuilder extends AbstractEndpointURIBuilder
20 {
21 @Override
22 protected void setEndpoint(URI uri, Properties props) throws MalformedEndpointException
23 {
24 address = "";
25 if (uri.getHost() != null)
26 {
27
28 this.address = uri.getScheme() + "://" + uri.getHost();
29 if (uri.getPort() != -1)
30 {
31 address += ":" + uri.getPort();
32 }
33 }
34 if (uri.getPath() != null)
35 {
36 address += uri.getPath();
37 }
38 String query = uri.getQuery();
39 if (query != null)
40 {
41 int i = query.indexOf("&");
42 if (i > -1)
43 {
44 address += "?" + query.substring(0, i);
45
46 }
47 else
48 {
49 address += "?" + query;
50 }
51 }
52 }
53 }