WSDL for proxy service: problem with several ports

jchernandez.full-on-net.com's picture
Hi, I'm trying to specify one proxy service which has a WSDL with one service and several ports like this: ... The WSDL generated by WSO2 ESB only offers one of those ports,and it fails when I try to send a request to another of those ports. How could I configure my proxy service for provide this WSDL? Thanks, JC.
AttachmentSize
untitled.png75.28 KB
original_N_services.wsdl3.76 KB
ESB_N_notificacions.wsdl4.08 KB
ESB_N_notificacionManager.wsdl4.1 KB
indika's picture

Hi You can force a proxy to

Hi You can force a proxy to use 'the original WSDL of the service' by specifying 'useOriginalwsdl' as 'true' using a proxy service's parameter. you have to give the WSDL using 'publishWSDL'. Please look at the section 'Proxy Services' in 'configuration language guide' from the ESB documentation (on-line of off-line). Thanks Indika
jchernandez.full-on-net.com's picture

Hi, I added this parameter to

Hi, I added this parameter to the configuration of my proxy service. Now it provide my WSDL with all ports, but when I try this service from console, only there are operations of one port, and when I invoke with an external tool this endpoint only operations of this port are OK . Operations of other ports have the next error: === logs of console === ERROR [29 jul 2010 09:40:39] AxisEngine - The endpoint reference (EPR) for the Operation not found is /services/Directory_soap and the WSA Action = urn:getUserTerminalInfo ERROR [29 jul 2010 09:40:39] ServerWorker - Error processing POST request === response from tool === axis2ns2:Client The endpoint reference (EPR) for the Operation not found is /services/Directory_soap and the WSA Action = urn:getUserTerminalInfo What can I do? Thanks, JC.
indika's picture

Hi The endpoint reference

Hi The endpoint reference (EPR) for the Operation not found is /services/Directory_soap and the WSA Action = urn:getUserTerminalInfo The above error clearly says that there is no operation called 'getUserTerminalInfo' in the service 'Directory_soap'. Does the WSDL of the actual service differs from the WSDL of the proxy service with 'useOrginalWSDL'? Thanks Indika
jchernandez.full-on-net.com's picture

Hi, I thought that the ESB

Hi, I thought that the ESB provides the WSDL that specifies in 'publishWSDL' with all operations and after you can choose operation in sequence with one filter and send with the send of . Anyway, I use mockservice of soapUI to simulate services of this WSDL. I point the proxy's endpoint to several mockservices, but when I try proxy service form ESB’s console always provides operations of the same port and when I try a request from soapUI, only when the proxy's endpoint points to the mockservice of this port, the proxy service response is correct, in other case, there are errors. Next I attach errors that I found in my development: 1.- When proxy’s endpoint points one operation of another port and invoke this request operation: axis2ns4:Client The endpoint reference (EPR) for the Operation not found is /services/Directory_soap and the WSA Action = urn:getUserTerminalInfo 2.- When proxy’s endpoint points one operation of another port and invoke one operation of the list exiting in “try this service” from console: Server Missing operation for soapAction [urn:getUserIdentities] and body element [{http://www.di.com/wsdl /SOAP/directory/v1/local}getUserIdentities] with SOAP Version [SOAP 1.1] Do you have any suggestion about what may be happening? Thanks, JC.
indika's picture

Hi >>>"I thought that the ESB

Hi >>>"I thought that the ESB provides the WSDL that specifies in 'publishWSDL' with all operations and after you can choose operation in sequence with one filter and send with the send of ." It should unless there is a bug. Your error clearly says that an operation based on the SOAP Action 'urn:getUserTerminalInfo' cannot be found. Simply, there is no operation with the name 'getUserTerminalInfo'. Could you please attach WSDLs, synapse configuration, the failed request message. Thanks Indika Ps: to attach a file , you have to click on the Edit tag.
jchernandez.full-on-net.com's picture

WSDL attachs

Hi, I don't have attachment button now nor when y clic on edit button on ESB forum's reply. I use the original WSDL which was use for create soapUI requests and mockservices. These mockeservices are point by endpoint in the ESB. These WSDL has two ports defined. Also this WSDL is specified in the "Publishing WSDL" field in the proxy service. Elements and operations are defined in another WSDL. The WSDL that offer both proxy services (I create one per port) is the same. One of them works correctly when I invoke the same operation what the proxy service's endpoint is pointing, but the other one doesn't work in any case: faultcode=axis2ns2:Client faultstring=The endpoint reference (EPR) for the Operation not found is /services/Notification_NotificationManager_soap?wsdl and the WSA Action = urn:updateEventNotification Here you are the synapse-configuration of these proxys: -?xml version="1.0" encoding="UTF-8"?- -proxy xmlns="http://ws.apache.org/ns/synapse" name="Notification_NotificationManager_soap" transports="https http" startOnLoad="true" trace="disable"- -target endpoint="conf:/repository/synapse/endpoints/Notification_NotificationManager_soap_ep" inSequence="conf:/repository/synapse/sequences/General_log"/- -publishWSDL key="gov:/services/UNICA_API_SOAP_events_notification_services_v1_0.wsdl"/- -parameter name="useOriginalwsdl"-true-/parameter- -parameter name="enablePublishWSDLSafeMode"-true-/parameter- -/proxy- -?xml version="1.0" encoding="UTF-8"?- -proxy xmlns="http://ws.apache.org/ns/synapse" name="Notification_Notifications_soap" transports="https http" startOnLoad="true" trace="disable"- -target endpoint="conf:/repository/synapse/endpoints/Notification_Notifications_soap_ep" inSequence="conf:/repository/synapse/sequences/General_log"/- -publishWSDL key="gov:/services/UNICA_API_SOAP_events_notification_services_v1_0.wsdl"/- -parameter name="useOriginalwsdl"-true-/parameter- -parameter name="enablePublishWSDLSafeMode"-true-/parameter- -/proxy- Thanks, JC
indika's picture

Hi You should be able to

Hi You should be able to attach a file . please refers the attached Screen-shot. I am not seeing an issue with your proxy service configurations. You can go to 'http://localhost:8280/services' and check the operations of each proxy service. Please check the 'soapAction' in each 'operation' in each 'wsdl binding'. Please attach the complete WSDL(s).. I may try your scenario. Thanks Indika
jchernandez.full-on-net.com's picture

WSDL attachs

Hi, I'm sorry, now I see edit tag! 1.- "original_N_services.wsdl" is the original WSDL which was use for create soapUI requests and mockservices. These mockeservices are point by endpoint in the ESB. Also this WSDL is specified in the "Publishing WSDL" field in both proxies services. Elements and operations are defined in another WSDL. 2.- "ESB_N_notificacionManager.wsdl" and "ESB_N_notificacions.wsdl" are the WSDLs which ESB offer after to create the proxies services, one per port's definition. Each proxy service has one of the next endpoint: -endpoint xmlns="http://ws.apache.org/ns/synapse" name="Notification_NotificationManager_soap_ep"- -address uri="http://localhost:8088/NotificationManager?wsdl" - -suspendOnFailure- -progressionFactor-1.0-/progressionFactor- -/suspendOnFailure- -markForSuspension- -retriesBeforeSuspension-0-/retriesBeforeSuspension- -retryDelay-0-/retryDelay- -/markForSuspension- -/address- -/endpoint- -endpoint xmlns="http://ws.apache.org/ns/synapse" name="Notification_Notifications_soap_ep"- -address uri="http://localhost:8088/Notifications?wsdl" - -suspendOnFailure- -progressionFactor-1.0-/progressionFactor- -/suspendOnFailure- -markForSuspension- -retriesBeforeSuspension-0-/retriesBeforeSuspension- -retryDelay-0-/retryDelay- -/markForSuspension- -/address- -/endpoint- BUT when I see in http://localhost:8280/services I can see: N_Notifications_soap Available operations * notifyEvent N_NotificationManager_soap Available operations * notifyEvent First one is right but the second one must have three operations: startEventNotification, stopEventNotification and updateEventNotification. Is this a bug? or Could you tell me what I'm doing wrong? Thanks, JC
indika's picture

Hi The issue is due to the

Hi The issue is due to the fact that when a service is created from a WSDL 1.0, we only select a single 'portType' definition. There is an option for giving a 'port name' for the service builder so that it can select a particular port type if there are more than one. Unfortunately, currently there is no way of giving a specific 'port name' when creating a proxy service. In the case of no explicit 'port name, the service builder picks a one port type randomly if there are more than one. In your case there are two 'portType's in the WSDL and The service builder select only a one. That is why both proxy services only show the operations defined in one port type. So , the workaround is to use a single 'portType'. You may use a different WSDL for each proxy. Thanks Indika
jchernandez.full-on-net.com's picture

That's right

OK, I see. Now it works. Thanks a lot, JC
indika's picture

Nice to here that you got

Nice to here that you got working your scenario. Indika
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)