I have been going around this but i can't seem to find the problem. Maybe you can help me, I apologize if the post is a bit long as I have tried to control all the error sources.

I developed 2 web services which are running on a remote server on Amazon, the services can be reach directly trough their http addresses and i can make request to them using SoapUI.

> 
> <http://x.x.x.x:8080/cAClienteWEB/ConsultarEstado/ConsultarEstado?wsdl>
> 
> 
> 

I have an application which consumes those services, i've tried locally with both the services and the consuming app on the same machine and it works like a charm. But when the services are on the remote host the app simply does not reach them even though i have added them from scratch to be consumed from the remote IP. I get the error:

> 
> WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (EJB default - 1) 
>  Interceptor for {<http://servicios.cA.com/>}ConsultarEstado#{http:/
>  /servicios.cA.com/}consultar has thrown exception, unwinding now: **org.apache.cxf.interceptor.Fault: Could not send Message.**
> 
> 
> 

```
  ......
 Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found'
   when communicating with http://localhost:8080/cAClienteWEB/ConsultarEstado/ConsultarEstado
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1513)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1318)
 at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
 at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
 at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
 at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
  ... 56 more

```

Obviously it is trying to reach them on the localhost where they don't exist. I modified the Jboss Standalone.xml with 

```
<subsystem xmlns="urn:jboss:domain:webservices:1.2">
            <modify-wsdl-address>true</modify-wsdl-address>
            <wsdl-host>X.X.X.X</wsdl-host>
            <wsdl-port>8080</wsdl-port>
            <endpoint-config name="Standard-Endpoint-Config"/>
            <endpoint-config name="Recording-Endpoint-Config">
                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
                </pre-handler-chain>
            </endpoint-config>
            <client-config name="Standard-Client-Config"/>
        </subsystem>

```

But still it keeps on reaching them in the localhost. From the app i have printed the address from which it is trying to fetch the data and it prints the right remote address.

```
System.out.println(service.getWSDLDocumentLocation());

```

Honestly i don't know what else to modify to get it to work.

Here is one of the services wsdl definition

```
    ?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://servicios.cometeAlguito.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="ConsultarEstado" targetNamespace="http://servicios.cometeAlguito.com/">
  <wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://servicios.cometeAlguito.com/" elementFormDefault="unqualified" targetNamespace="http://servicios.cometeAlguito.com/" version="1.0">

  <xs:element name="consultar" type="tns:consultar"/>

  <xs:element name="consultarResponse" type="tns:consultarResponse"/>

  <xs:element name="recibo" type="tns:recibo"/>

  <xs:complexType name="consultar">
    <xs:sequence/>
  </xs:complexType>

  <xs:complexType name="consultarResponse">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:recibo"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="recibo">
    <xs:sequence>
      <xs:element minOccurs="0" name="combo" type="xs:string"/>
      <xs:element minOccurs="0" name="hora" type="xs:string"/>
      <xs:element minOccurs="0" name="nombreCliente" type="xs:string"/>
      <xs:element minOccurs="0" name="numOrden" type="xs:string"/>
      <xs:element minOccurs="0" name="producto" type="xs:string"/>
      <xs:element minOccurs="0" name="telefono" type="xs:string"/>
      <xs:element minOccurs="0" name="total" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>
  </wsdl:types>
  <wsdl:message name="consultarResponse">
    <wsdl:part element="tns:consultarResponse" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="consultar">
    <wsdl:part element="tns:consultar" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="ConsultarEstado">
    <wsdl:operation name="consultar">
      <wsdl:input message="tns:consultar" name="consultar">
    </wsdl:input>
      <wsdl:output message="tns:consultarResponse" name="consultarResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ConsultarEstadoSoapBinding" type="tns:ConsultarEstado">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="consultar">
      <soap:operation soapAction="" style="document"/>
      <wsdl:input name="consultar">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="consultarResponse">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ConsultarEstado">
    <wsdl:port binding="tns:ConsultarEstadoSoapBinding" name="ConsultarEstadoPort">
      <soap:address location="http://X.X.X.X:8080/cAClienteWEB/ConsultarEstado/ConsultarEstado"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

```