[ 
https://issues.apache.org/activemq/browse/SM-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39992
 ] 

Philipp Rossmanith commented on SM-1039:
----------------------------------------

Workaround: Give the publishing endpoint the same service and endpoint name as 
specified for servicemix-http service unit and WSDL file.

> Publication of a consumer HTTP endpoint with classpath-provided WSDL file 
> doesn't publish WSDL file
> ---------------------------------------------------------------------------------------------------
>
>                 Key: SM-1039
>                 URL: https://issues.apache.org/activemq/browse/SM-1039
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-http
>         Environment: ServiceMix 3.1.1, Windows
>            Reporter: Philipp Rossmanith
>            Priority: Minor
>
> Trying to publish an HTTP consumer endpoint with a classpath-supplied WSDL 
> connecting to a servicemix.xml-configured publisher, the WSDL file doesn't 
> show at the corresponding URL 
> http://localhost:8192/IMMessageNotificationService/main.wsdl.
> Proposed solution:
> ================
> It seems the problem comes from the HttpEndpoint#getTargetPortType method.
> This method tries to find the *target* PortType.  And the problem is that the 
> target PortType (or interface QName) is not the same as the one exposed by 
> servicemix-http. Somehow, they need to be matched.
> Maybe the getTargetPortType should be a series of
>    if (portType == null && xxx) {
>       ...
>    }
> rather than if / else if.
> See also:
> ========
> Thread 
> http://www.nabble.com/servicemix-http---classpath-supplied-WSDL-file-not-visible-tf4286826s12049.html
>  (subject: servicemix-http - classpath-supplied WSDL file not visible)
> Additional information:
> ==================
> The setup is:
> HTTP consumer EP --> publisher EP
> Deployment units have been created with Maven. Service and endpoint supplied 
> in the servicemix-http xbean.xml*) match the ones supplied in the WSDL 
> file**), setting the service name to <namespace prefix>:<WSDL service name> 
> and setting the endpoint name to the value of the port's name. The WSDL file 
> is present at the top-level in the ZIP-file for the SU.
> *)
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0";
>       xmlns:mag="http://mag.icing.eu/notification/1.0";
>       
> xmlns:csapi="http://www.csapi.org/wsdl/parlayx/multimedia_messaging/noti
> fication/v2_0/service"
>       xmlns:pub="http://iisys.icing.eu/publisher/1.0";
>       
> xmlns:impl="http://www.csapi.org/wsdl/parlayx/multimedia_messaging/notif
> ication/v2_0/service">
>       <classpath>
>               <location>.</location>
>       </classpath>
>       <http:endpoint service="impl:IMMessageNotificationService"
>               endpoint="IMMessageNotification" role="consumer"
>       
> locationURI="http://0.0.0.0:8192/IMMessageNotificationService/";
>               soap="true"
> wsdlResource="classpath:IMMessageNotification.wsdl"
>               targetService="pub:IMMessagePublisher"
> targetEndpoint="ep" />
> </beans>
> **)
> <wsdl:definitions
>       
> targetNamespace="http://www.csapi.org/wsdl/parlayx/multimedia_messaging/
> notification/v2_0/service" ...>
> ...
>       <wsdl:service name="IMMessageNotificationService">
>               <wsdl:port
> binding="impl:IMMessageNotificationSoapBinding"
>                       name="IMMessageNotification">
>                       <wsdlsoap:address
> location="http://0.0.0.0:8192/IMMessageNotificationService/"; />
>               </wsdl:port>
>       </wsdl:service>
> ...
> </ wsdl:definitions>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to