|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
Error invoking loca Web sevice behind a firewallHi,
My mule instance is behind a firewall and I need to invoke 2 Webservices the first one is external and the second one is internal (also behind the firewall), Mule send the local invocation to the firewall an failed. The http:connector element does not support the nonProxyHosts attribute, so I don't know how to configure mule in order to resolve local end points without the proxy. This is a critical issue I need help very urgent. Thanks. |
|
|
Re: Error invoking loca Web sevice behind a firewallYou may configure 2 different HTTP connectors with different proxy settings
|
|
|
Re: Error invoking loca Web sevice behind a firewallYou may configure 2 different HTTP connectors with different proxy settings
|
|
|
Re: Error invoking loca Web sevice behind a firewallYou may configure 2 different HTTP connectors with different proxy settings
|
|
|
Re: Error invoking loca Web sevice behind a firewallYou may configure 2 different HTTP connectors with different proxy settings.
|
|
|
Re: Error invoking loca Web sevice behind a firewallDimitry thanks for your response, but I'm not sure about that, I have only one proxy, the first Web service is outside of my company and the second one is in my intranet, so how can I say to mule that local Web services must be invoked without proxy, the issue is nonProxyHosts proxy attribute is not available.
Thanks.
|
|
|
Re: Error invoking loca Web sevice behind a firewallJust create file proxy.properties:
proxyHostname=proxy proxyPort=3128 proxyUsername= proxyPassword= declare 2 connectors: <connector name="HttpProxyConnector" className="org.mule.providers.http.HttpConnector"> <properties> <file-properties location="proxy.properties" /> </properties> </connector> <connector name="HttpDirectConnector" className="org.mule.providers.http.HttpConnector"> </connector> and specify explicitly "connector" property on your endpoints: <endpoint address="http://localsite/service" connector="HttpDirectConnector"/> <endpoint address="http://remotesite/service" connector="HttpProxyConnector"/>
|
|
|
Re: Error invoking loca Web sevice behind a firewallI tried this solution but I have following problems (I´m working in Mule 2):
Connector definitions: <http:connector name="HttpConnector" proxyHostname="${proxyHostname}" proxyPort="${proxyPort}" proxyUsername="${proxyUsername}" proxyPassword="${proxyPassword}"/> <http:connector name="LocalHttpConnector" /> with the mule core outbound-endpoint: <outbound-endpoint connector-ref="HttpConnector" address="http://xxxxx"> </outbound-endpoint> shows this error invocating the service: ******************************************************************************** Message : Failed to invoke org.mule.component.simple.PassThroughComponent component for: PersistirRespuestaEJB. Component that caused exception is: PersistirRespuestaEJB. Message payload is of type: byte[] Type : org.mule.api.service.ServiceException Code : MULE_ERROR--2 JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/api/service/ServiceException.html Payload : [B@c5e2cf ******************************************************************************** Exception stack is: 1. only whitespace content allowed before start tag and not n (position: START_DOCUMENT seen <?xml version="1.0" encoding="utf-8"?>\r\n \r\n \r\n n... @4:5) (org.xmlpull.v1.XmlPullParserException) org.xmlpull.mxp1.MXParser:1519 (null) 2. : only whitespace content allowed before start tag and not n (position: START_DOCUMENT seen <?xml version="1.0" encoding="utf-8"?>\r\n \r\n \r\n n... @4:5) (com.thoughtworks.xstream.io.StreamException) com.thoughtworks.xstream.io.xml.XppReader:67 (null) 3. Failed to invoke org.mule.component.simple.PassThroughComponent component for: PersistirRespuestaEJB. Component that caused exception is: PersistirRespuestaEJB. Message payload is of type: byte[] (org.mule.api.service.ServiceException) org.mule.component.AbstractComponent:101 (http://mule.mulesource.org/docs/apidocs/org/mule/api/service/ServiceException.html) ******************************************************************************** If I use axis:outbound-endpoint without connector_ref it behaves but when I reference the connector show this error starting the server: <outbound-endpoint connector-ref="HttpConnector" address="axis:http://xxxxx"> </outbound-endpoint> the error is: ******************************************************************************** Message : Error creating bean with name 'WebServiceSNIES': Cannot create inner bean '(inner bean)' of type [org.mule.routing.outbound.DefaultOutboundRouterCollection] while setting bean property 'outboundRouter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.routing.outbound.ChainingRouter] while setting bean property 'routers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.config.spring.factories.OutboundEndpointFactoryBean] while setting bean property 'endpoints' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL" (org.springframework.beans.factory.BeanCreationException) Type : org.mule.api.config.ConfigurationException Code : MULE_ERROR-12999 JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/api/config/ConfigurationException.html ******************************************************************************** Exception stack is: 1. Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL" (java.lang.IllegalArgumentException) org.mule.endpoint.AbstractEndpointBuilder:191 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html) 2. Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL" (org.springframework.beans.factory.BeanCreationException) org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1:127 (null) 3. Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.config.spring.factories.OutboundEndpointFactoryBean] while setting bean property 'endpoints' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL" (org.springframework.beans.factory.BeanCreationException) org.springframework.beans.factory.support.BeanDefinitionValueResolver:230 (null) 4. Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.routing.outbound.ChainingRouter] while setting bean property 'routers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.config.spring.factories.OutboundEndpointFactoryBean] while setting bean property 'endpoints' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL" (org.springframework.beans.factory.BeanCreationException) org.springframework.beans.factory.support.BeanDefinitionValueResolver:230 (null) 5. Error creating bean with name 'WebServiceSNIES': Cannot create inner bean '(inner bean)' of type [org.mule.routing.outbound.DefaultOutboundRouterCollection] while setting bean property 'outboundRouter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.routing.outbound.ChainingRouter] while setting bean property 'routers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.config.spring.factories.OutboundEndpointFactoryBean] while setting bean property 'endpoints' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL" (org.springframework.beans.factory.BeanCreationException) org.springframework.beans.factory.support.BeanDefinitionValueResolver:230 (null) 6. Error creating bean with name 'WebServiceSNIES': Cannot create inner bean '(inner bean)' of type [org.mule.routing.outbound.DefaultOutboundRouterCollection] while setting bean property 'outboundRouter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.routing.outbound.ChainingRouter] while setting bean property 'routers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.mule.config.spring.factories.OutboundEndpointFactoryBean] while setting bean property 'endpoints' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "http", endpoint is "http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL" (org.springframework.beans.factory.BeanCreationException) (org.mule.api.config.ConfigurationException) org.mule.config.builders.AbstractConfigurationBuilder:44 (http://mule.mulesource.org/docs/apidocs/org/mule/api/config/ConfigurationException.html) ********************************************************************************
|
|
|
Re: Error invoking loca Web sevice behind a firewallWhich Mule version do you use? I tried with the latest snapshot and it worked without any errors:http-endpoints.xml HttpTestCase.java
|
|
|
Re: Error invoking loca Web sevice behind a firewallI´m using Mule 2.0.2, but I´m getting an unexpecting response:
<service name="WebServiceSNIES"> <inbound> <jms:inbound-endpoint address="jms://list.in"> <transformer ref="JMSToString"/> </jms:inbound-endpoint> </inbound> <outbound> <chaining-router> <outbound-endpoint connector-ref="HttpConnector" address="http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL"> </outbound-endpoint> <stdio:outbound-endpoint system="OUT"> </stdio:outbound-endpoint> </chaining-router> </outbound> </service> The response is of type org.mule.transport.http.ReleasingInputStream@1f1bd98 not the XML string I´m expecting. On the other hand if I use axis the resposnse is the expected XML, but this configuration does not support connector-ref attribute. <service name="WebServiceSNIES"> <inbound> <jms:inbound-endpoint address="jms://list.in"> <transformer ref="JMSToString"/> </jms:inbound-endpoint> </inbound> <outbound> <chaining-router> <axis:outbound-endpoint address="http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL"> </axis:outbound-endpoint> <stdio:outbound-endpoint system="OUT"> </stdio:outbound-endpoint> </chaining-router> </outbound> </service>
|
|
|
Re: Error invoking loca Web sevice behind a firewallYou may apply <object-to-string-transformer/> to get String representation of your XML response.
But in case of [b]huge[/b] response you may also make more robust things with that [b]InputStream[/b] directly.
|
|
|
Re: Error invoking loca Web sevice behind a firewallI used byte-array-to-string-transformer transformer but I´m getting a "no SOAPAction header!" fault, but using axis:outbound-endpoint it brhaves. Following is my conf
... <byte-array-to-string-transformer name="ObjectToString"/> ... <outbound-endpoint connector-ref="HttpConnector" responseTransformer-refs="ObjectToString" address="http://200.41.9.227:7777/WebService/WS/WebService.jws?method=getXMLProgramasOL"> </outbound-endpoint> The response is: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode> <faultstring>no SOAPAction header!</faultstring> <detail> <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">sniessa1</ns2:hostname> </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
|
| Free embeddable forum powered by Nabble | Forum Help |