You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Eric Dofonsou (JIRA)" <ji...@apache.org> on 2006/04/04 14:44:59 UTC

[jira] Created: (SM-379) Wrong transportURI when usnig the servicemix-http with a JSR181 endpoint.

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

         Key: SM-379
         URL: https://issues.apache.org/activemq/browse/SM-379
     Project: ServiceMix
        Type: Bug

  Components: servicemix-http  
 Environment: ALL
    Reporter: Eric Dofonsou
     Fix For: 3.0
 Attachments: HttpEndpoint.java

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;
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (SM-379) Wrong transportURI when usnig the servicemix-http with a JSR181 endpoint.

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-379?page=all ]
     
Guillaume Nodet resolved SM-379:
--------------------------------

    Fix Version: 3.0-M1
                     (was: 3.0)
     Resolution: Fixed
      Assign To: Guillaume Nodet

Sorry, I haven't included your patch because the issue was fixed when working on SM-380.
Thanks anyway...

Author: gnodet
Date: Tue Apr  4 13:00:24 2006
New Revision: 391395

URL: http://svn.apache.org/viewcvs?rev=391395&view=rev
Log:
SM-380:Expose a non-standalone WSDL when the target endpoint description has a port type in a namespace that do not match the http endpoint service namespace
SM-379: Wrong transportURI when usnig the servicemix-http with a JSR181 endpoint.

Added:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/tools/
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/tools/PortTypeDecorator.java
Modified:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/ServerManager.java
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ConsumerProcessor.java
    incubator/servicemix/trunk/servicemix-http/src/test/java/org/apache/servicemix/http/HttpXBeanDeployerTest.java



> Wrong transportURI when usnig the servicemix-http with a JSR181 endpoint.
> -------------------------------------------------------------------------
>
>          Key: SM-379
>          URL: https://issues.apache.org/activemq/browse/SM-379
>      Project: ServiceMix
>         Type: Bug

>   Components: servicemix-http
>  Environment: ALL
>     Reporter: Eric Dofonsou
>     Assignee: Guillaume Nodet
>      Fix For: 3.0-M1
>  Attachments: HttpEndpoint.java
>
>
> 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;
> >     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira