-
15. Re: WS Soap Proxy
mageshbk May 28, 2013 8:29 AM (in response to ruchitel123)Here is your problem. The http connector is missing in your configuration
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> ...
regards,
Magesh
-
16. Re: WS Soap Proxy
ruchitel123 May 28, 2013 11:58 AM (in response to mageshbk)Thank you very much, Magesh, after adding HTTP connector I can get to proxied WSDL in browser.
Slava
-
17. Re: WS Soap Proxy
ruchitel123 May 28, 2013 1:41 PM (in response to ruchitel123)Now that I am past original problem, got as new one.
CatalogService has multiple operations, and I got exception:
Caused by: org.switchyard.exception.SwitchYardException: org.switchyard.exception.SwitchYardException: No operationSelector was configured for the Camel Component and the Service Interface contains more than one operation: [get : IN_OUT : [{http://service.catalog.dmlss/}get, {http://service.catalog.dmlss/}getResponse, null], getList : IN_OUT : [{http://service.catalog.dmlss/}getList, {http://service.catalog.dmlss/}getListResponse, null], simpleSearch : IN_OUT : [{http://service.catalog.dmlss/}simpleSearch, {http://service.catalog.dmlss/}simpleSearchResponse, null], getSimpleSearchFilterBoolean : IN_OUT : [{http://service.catalog.dmlss/}getSimpleSearchFilterBoolean, {http://service.catalog.dmlss/}getSimpleSearchFilterBooleanResponse, null], getSimpleSearchFilterLookup : IN_OUT : [{http://service.catalog.dmlss/}getSimpleSearchFilterLookup, {http://service.catalog.dmlss/}getSimpleSearchFilterLookupResponse, null], ping : IN_OUT : [{http://service.catalog.dmlss/}ping, {http://service.catalog.dmlss/}pingResponse, null]]Please add an operationSelector element.
at org.switchyard.component.soap.InboundHandler.invoke(InboundHandler.java:229) [switchyard-component-soap-0.8.0.Final.jar:0.8.0.Final]
at org.switchyard.component.soap.endpoint.BaseWebService.invoke(BaseWebService.java:115) [switchyard-component-soap-0.8.0.Final.jar:0.8.0.Final]
at org.switchyard.component.soap.endpoint.BaseWebService.invoke(BaseWebService.java:45) [switchyard-component-soap-0.8.0.Final.jar:0.8.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0]
at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0]
at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)
at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181) [jbossws-cxf-server-4.0.2.GA.jar:4.0.2.GA]
... 31 more
I searched for it and found suggestion to use "setHeader" xml tag, i tried it (see my camel route file below), it did n ot help. I will be very greatful for ny suggestion on how to fix the problem
<route xmlns="http://camel.apache.org/schema/spring">
<from uri="switchyard://CatalogProxyService"/>
<log message="Route - message received: ${body} for operation ${header.org.switchyard.operationName} "/>
<setHeader headerName="operationNamee">
<simple>${header.org.switchyard.operationName}</simple>
</setHeader>
<to uri="switchyard://CatalogWS"/>
</route>
-
18. Re: WS Soap Proxy
ruchitel123 May 28, 2013 2:28 PM (in response to ruchitel123)Found typo in header name - "operationNamee" and fixed it:
<route xmlns="http://camel.apache.org/schema/spring">
<from uri="switchyard://CatalogProxyService"/>
<log message="Route - message received: ${body} for operation ${header.org.switchyard.operationName} "/>
<setHeader headerName="operationName">
<simple>${header.org.switchyard.operationName}</simple>
</setHeader>
<to uri="switchyard://CatalogWS"/>
</route>
Still getting th same exception though.
-
19. Re: WS Soap Proxy
kcbabo May 28, 2013 4:43 PM (in response to ruchitel123)You're hitting this, which is fixed in 1.0:
https://issues.jboss.org/browse/SWITCHYARD-1355
For 0.8, you need to pass the operation name as a parameter:
<to uri="switchyard://CatalogWS?operationName=someOperation"/>
If you want to set the operation name dynamically, you can do something like this:
<route xmlns="http://camel.apache.org/schema/spring"> <from uri="switchyard://CatalogProxyService"/> <log message="Route - message received: ${body} for operation ${header.org.switchyard.operationName} "/> <recipientList> <simple>switchyard://CatalogWS?namespace=[put target namespace from switchyard.xml here]&operationName=${header.org.switchyard.operationName}"</simple> <recipientList> </route>
-
20. Re: WS Soap Proxy
ruchitel123 May 28, 2013 6:09 PM (in response to kcbabo)Thanks, no errors now.
-
21. Re: WS Soap Proxy
ruchitel123 May 29, 2013 8:01 AM (in response to ruchitel123)Magesh, thank you very much for your help. There is one more problem I run into. It is not switchyard's problem exactly, but may be you can help me with it.
Service that I am proxing is built bottom-up using metro 2.7.7, it generates WSDL dinamically. The resulting proxied WSDL has include that points directly to original service endpoint (see below). That include has XSD include that also points to original endpoint. It is not a problem in dev environment, because everything is running locally, but in production it'll break because direct connection from service consumer to original endpoint will be blocked. Is there any way to make switchyard to rewrite includes and proxy them too?
***********************wsdl******************
<definitions name="CatalogService" targetNamespace="http://dmlss/ws/wsdl"><import location="http://localhost:8080/dmlss-services/CatalogService?wsdl=1" namespace="http://service.catalog.dmlss/">
</import><binding name="CatalogServicePortBinding" type="ns1:CatalogWS"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="simpleSearch"><soap:operation soapAction=""/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation><operation name="getSimpleSearchFilterLookup"><soap:operation soapAction=""/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation><operation name="getSimpleSearchFilterBoolean"><soap:operation soapAction=""/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation><operation name="get"><soap:operation soapAction=""/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation><operation name="getList"><soap:operation soapAction=""/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation><operation name="ping"><soap:operation soapAction=""/><input><soap:body use="literal"/></input><output><soap:body use="literal"/></output></operation></binding><service name="CatalogService"><port binding="tns:CatalogServicePortBinding" name="CatalogServicePort"><soap:address location="http://localhost/dmles-esb/CatalogService"/></port></service></definitions>
Thanks again,
Slava
-
22. Re: WS Soap Proxy
ruchitel123 Jul 11, 2013 11:36 AM (in response to ruchitel123)I run into the problem that SOAP call from reference to remote system consistently times out. Is there any way to increase timeout on soap reference?
Thanks,
Slava
-
23. Re: WS Soap Proxy
mageshbk Jul 11, 2013 11:06 PM (in response to ruchitel123)Hi Slava,
I am not sure if you have solved the issue you reported on May 29th. Any update on that? We are aware that we lack the feature of overriding timeout values. We have a JIRA to track it here:
-
24. Re: WS Soap Proxy
ruchitel123 Jul 12, 2013 10:25 AM (in response to mageshbk)No, we still have this issue. We are in early prototyping stages and all our invironments so far so not preclude sirect communications from WS consumer to WS producer bypassing ESB, so the fact that proxied WSDL has imports that point directly to WS produced does not break our systems so far. The situation will change when we move to customer acceptance and production (timeline TBD), so we need it to be resolved by that time.
Thanks,
Slava