Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-379

Wrong transportURI when usnig the servicemix-http with a JSR181 endpoint.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0-M1
    • servicemix-http
    • None
    • ALL

    Description

      When I tried to generate stub's from a servicemix-jsr181 component, the WSDL generated has a bad transport attribut with fails when the ws-import task is called. here is the current binding transport value (generated by the JSR181 component):

      transport=http://java.sun.com/xml/ns/jbi/binding/service+engine

      This fails when trying to generate the stub source code since this is not a valid transport. Output from the console :
      [wsimport] warning: ignoring SOAP port "LogServicePort": unrecognized transport [wsimport] warning: Service "LogService" does not contain any usable ports

      The correct tranport value should be :
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

      I've attached the new version of HttpEndpoint.

      Here is the diff for the source code modification:
      ----------------
      $ diff /cygdrive/d/My\ Received\ Files/HttpEndpoint.java HttpEndpoint.java
      20a21
      > import javax.wsdl.Binding;
      26a28
      > import javax.wsdl.extensions.soap.SOAPBinding;
      34a37
      > import com.ibm.wsdl.extensions.soap.SOAPBindingImpl;
      39c42
      < * @version $Revision$

      > * @version $Revision: 389216 $
      79,84d81
      < } else if (targetService != null) {
      < svc = def.getService(targetService);
      < if (svc != null)

      { < Iterator it = svc.getPorts().values().iterator(); < port = (it.hasNext()) ? (Port) it.next() : null; < }

      101a99,102
      > SOAPBinding binding = getSOAPTransport(port.getBinding());
      > if(binding!=null)

      { > binding.setTransportURI("http://schemas.xmlsoap.org/soap /http"); > }

      113a115,123
      >
      > protected SOAPBinding getSOAPTransport(Binding binding) {
      > ExtensibilityElement extensElm;
      > for(Iterator it = binding.getExtensibilityElements().iterator();it.hasNe
      xt() {
      > extensElm = (ExtensibilityElement) it.next();
      > if(extensElm instanceof SOAPBinding)

      { return (SOAPBinding)exten sElm; }

      > }
      > return null;
      > }

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            ewrick Eric Dofonsou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: