You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Dave Sowerby <da...@gmail.com> on 2008/04/10 13:29:23 UTC

Problems with wsdl2java

Hi,

I'm currently facing issues when attmepting to utilise the wsdl
generated by a service exposed using binding.ws, when I use wsdl2java
with this wsdl I get the following exception:

IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
Emitter failure.  Cannot find endpoint address in port
ServiceRequestPortType__SOAPHTTPPort in service
ServiceRequestPortType__ServiceLocator
    java.io.IOException: Emitter failure.  Cannot find endpoint
address in port ServiceRequestPortType__SOAPHTTPPort in service
ServiceRequestPortType__ServiceLocator
    at org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
    at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
    at org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
    at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
    at java.lang.Thread.run(Unknown Source)

I've diffed a previously functioning wsdl against the currently (RC3a)
generated wsdl file, the difference causing this problem appears to be
the additional lines of:

  <wsdl:service name="ServiceRequestPortType__Service">
    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
binding="ns2:ServiceRequestPortType__SOAPBinding">
    </wsdl:port>
  </wsdl:service>

Which without an address is causing wsdl2java to fail.

Has anyone seen this before?  Or does anyone have any suggestions?

Cheers,

Dave.

-- 
Dave Sowerby MEng MBCS

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Dave Sowerby <da...@gmail.com>.
Hi Simon,

The JIRA issue can be found at:

https://issues.apache.org/jira/browse/TUSCANY-2220

Cheers,

Dave.

On Fri, Apr 11, 2008 at 3:37 PM, Simon Laws <si...@googlemail.com> wrote:
> On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
>
>
> wrote:
>
>  > Hey Simon,
>  >
>  > Thanks for the response.
>  >
>  > Indeed this is a change in Tuscany behaviour - using the same service
>  > running under 1.0-incubating or 1.1-incubating the WSDL generated is
>  > as expected.  This problem only appears to have started recently with
>  > 1.2.
>  >
>  > Cheers,
>  >
>  > Dave.
>  >
>  > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
>  > wrote:
>  > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
>  > >  wrote:
>  > >
>  > >
>  > >
>  > >  > Hi,
>  > >  >
>  > >  > I'm currently facing issues when attmepting to utilise the wsdl
>  > >  > generated by a service exposed using binding.ws, when I use wsdl2java
>  > >  > with this wsdl I get the following exception:
>  > >  >
>  > >  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
>  > >  > Emitter failure.  Cannot find endpoint address in port
>  > >  > ServiceRequestPortType__SOAPHTTPPort in service
>  > >  > ServiceRequestPortType__ServiceLocator
>  > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>  > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>  > >  > ServiceRequestPortType__ServiceLocator
>  > >  >    at
>  > >  >
>  > org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>  > >  >    at
>  > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>  > >  >    at
>  > >  >
>  > org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>  > >  >    at
>  > >  >
>  > org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>  > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>  > >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>  > >  >    at
>  > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>  > >  >    at java.lang.Thread.run(Unknown Source)
>  > >  >
>  > >  > I've diffed a previously functioning wsdl against the currently
>  > (RC3a)
>  > >  > generated wsdl file, the difference causing this problem appears to
>  > be
>  > >  > the additional lines of:
>  > >  >
>  > >  >  <wsdl:service name="ServiceRequestPortType__Service">
>  > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>  > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>  > >  >    </wsdl:port>
>  > >  >  </wsdl:service>
>  > >  >
>  > >  > Which without an address is causing wsdl2java to fail.
>  > >  >
>  > >  > Has anyone seen this before?  Or does anyone have any suggestions?
>  > >  >
>  > >  > Cheers,
>  > >  >
>  > >  > Dave.
>  > >  >
>  > >  > --
>  > >  > Dave Sowerby MEng MBCS
>  > >  >
>  > >  > ---------------------------------------------------------------------
>  > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>  > >  >
>  > >  >
>  > >  Hi Dave
>  > >
>  > >  I don't have an immediate suggestion so I'd like to understand if this
>  > is a
>  > >  change in behavior in the Tuscany code that you are now seeing. I.e.
>  > The
>  > >  previously functioning WSDL that you diffed against. Was that also
>  > generated
>  > >  by Tuscany in the past? If so I'll go look at what changed and why.
>  > >
>  > >  As an aside I saw a post from Simon Nash saying that he is looking at
>  > the
>  > >  WSDL generation story afresh so hopefully we can make this runtime vs
>  > >  development story much more consistent.
>  > >
>  > >  Regards
>  > >
>  > >  Simon
>  > >
>  >
>  >
>  >
>  > --
>  > Dave Sowerby MEng MBCS
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>  >
>  >
>  Dave
>
>  As this effect seems to be erroneous in several ways and is different from
>  1.1 can you raise a high priority JIRA so we can track it.
>
>  Thanks
>
>  Simon
>



-- 
Dave Sowerby MEng MBCS

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Dave Sowerby <da...@gmail.com>.
Hey Simon,

Thanks for investigating this so quickly!

I shall raise the JIRA as requested now.

Dave.

On Fri, Apr 11, 2008 at 4:26 PM, Simon Laws <si...@googlemail.com> wrote:
> On Fri, Apr 11, 2008 at 3:37 PM, Simon Laws <si...@googlemail.com>
>
>
> wrote:
>
>  >
>  >
>  > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
>  > wrote:
>  >
>  > > Hey Simon,
>  > >
>  > > Thanks for the response.
>  > >
>  > > Indeed this is a change in Tuscany behaviour - using the same service
>  > > running under 1.0-incubating or 1.1-incubating the WSDL generated is
>  > > as expected.  This problem only appears to have started recently with
>  > > 1.2.
>  > >
>  > > Cheers,
>  > >
>  > > Dave.
>  > >
>  > > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
>  > > wrote:
>  > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <dave.sowerby@gmail.com
>  > > >
>  > > >  wrote:
>  > > >
>  > > >
>  > > >
>  > > >  > Hi,
>  > > >  >
>  > > >  > I'm currently facing issues when attmepting to utilise the wsdl
>  > > >  > generated by a service exposed using binding.ws, when I use
>  > > wsdl2java
>  > > >  > with this wsdl I get the following exception:
>  > > >  >
>  > > >  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
>  > > >  > Emitter failure.  Cannot find endpoint address in port
>  > > >  > ServiceRequestPortType__SOAPHTTPPort in service
>  > > >  > ServiceRequestPortType__ServiceLocator
>  > > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>  > > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>  > > >  > ServiceRequestPortType__ServiceLocator
>  > > >  >    at
>  > > >  >
>  > > org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>  > > >  >    at
>  > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>  > > >  >    at
>  > > >  >
>  > > org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>  > > >  >    at
>  > > >  >
>  > > org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>  > > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>  > > >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>  > > >  >    at
>  > > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>  > > >  >    at java.lang.Thread.run(Unknown Source)
>  > > >  >
>  > > >  > I've diffed a previously functioning wsdl against the currently
>  > > (RC3a)
>  > > >  > generated wsdl file, the difference causing this problem appears to
>  > > be
>  > > >  > the additional lines of:
>  > > >  >
>  > > >  >  <wsdl:service name="ServiceRequestPortType__Service">
>  > > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>  > > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>  > > >  >    </wsdl:port>
>  > > >  >  </wsdl:service>
>  > > >  >
>  > > >  > Which without an address is causing wsdl2java to fail.
>  > > >  >
>  > > >  > Has anyone seen this before?  Or does anyone have any suggestions?
>  > > >  >
>  > > >  > Cheers,
>  > > >  >
>  > > >  > Dave.
>  > > >  >
>  > > >  > --
>  > > >  > Dave Sowerby MEng MBCS
>  > > >  >
>  > > >  >
>  > > ---------------------------------------------------------------------
>  > > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  > > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>  > > >  >
>  > > >  >
>  > > >  Hi Dave
>  > > >
>  > > >  I don't have an immediate suggestion so I'd like to understand if
>  > > this is a
>  > > >  change in behavior in the Tuscany code that you are now seeing. I.e.
>  > > The
>  > > >  previously functioning WSDL that you diffed against. Was that also
>  > > generated
>  > > >  by Tuscany in the past? If so I'll go look at what changed and why.
>  > > >
>  > > >  As an aside I saw a post from Simon Nash saying that he is looking at
>  > > the
>  > > >  WSDL generation story afresh so hopefully we can make this runtime vs
>  > > >  development story much more consistent.
>  > > >
>  > > >  Regards
>  > > >
>  > > >  Simon
>  > > >
>  > >
>  > >
>  > >
>  > > --
>  > > Dave Sowerby MEng MBCS
>  > >
>  > > ---------------------------------------------------------------------
>  > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>  > >
>  > >
>  > Dave
>  >
>  > As this effect seems to be erroneous in several ways and is different from
>  > 1.1 can you raise a high priority JIRA so we can track it.
>  >
>  > Thanks
>  >
>  > Simon
>  >
>
>  As a work around while we fix this you could try specifying a WSDL port
>  manually in the composite. E.g. I tried this on samples/callback-ws-service
>  by changing the binding.ws as follows.
>
>     <component name="MyServiceComponent">
>         <implementation.java class="myserver.MyServiceImpl" />
>         <service name="MyService">
>             <interface.java interface="myserver.MyService"
>                 callbackInterface="myserver.MyServiceCallback" />
>             <binding.ws uri="http://localhost:8086/MyServiceComponent"
>  wsdlElement="http://myserver#wsdl.port(MyService/MyServiceSOAP11port_http)"
>  />
>             <callback>
>                 <binding.ws />
>             </callback>
>         </service>
>     </component>
>
>  I looked in the generated wsdl to work out what the namespace/service/port
>  should be. The addition of wsdlElement="
>  http://myserver#wsdl.port(MyService/MyServiceSOAP11port_http)" has the
>  effect of turning off the extra service/binding that now gets added
>  otherwise.
>
>  I was a little surprised it allowed me to use both uri= and wsdlElement= but
>  that's another subject.
>
>  Regards
>
>  Simon
>



-- 
Dave Sowerby MEng MBCS

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Nash <na...@apache.org>.
Simon Laws wrote:
> On Fri, Apr 11, 2008 at 3:37 PM, Simon Laws <si...@googlemail.com>
> wrote:
> 
>>
>> On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
>> wrote:
>>
>>> Hey Simon,
>>>
>>> Thanks for the response.
>>>
>>> Indeed this is a change in Tuscany behaviour - using the same service
>>> running under 1.0-incubating or 1.1-incubating the WSDL generated is
>>> as expected.  This problem only appears to have started recently with
>>> 1.2.
>>>
>>> Cheers,
>>>
>>> Dave.
>>>
>>> On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
>>> wrote:
>>>> On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <dave.sowerby@gmail.com
>>>>
>>>>  wrote:
>>>>
>>>>
>>>>
>>>>  > Hi,
>>>>  >
>>>>  > I'm currently facing issues when attmepting to utilise the wsdl
>>>>  > generated by a service exposed using binding.ws, when I use
>>> wsdl2java
>>>>  > with this wsdl I get the following exception:
>>>>  >
>>>>  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
>>>>  > Emitter failure.  Cannot find endpoint address in port
>>>>  > ServiceRequestPortType__SOAPHTTPPort in service
>>>>  > ServiceRequestPortType__ServiceLocator
>>>>  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>>>>  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>>>>  > ServiceRequestPortType__ServiceLocator
>>>>  >    at
>>>>  >
>>> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>>>>  >    at
>>> org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>>>>  >    at
>>>>  >
>>> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>>>>  >    at
>>>>  >
>>> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>>>>  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>>>>  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>>>>  >    at
>>> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>>>>  >    at java.lang.Thread.run(Unknown Source)
>>>>  >
>>>>  > I've diffed a previously functioning wsdl against the currently
>>> (RC3a)
>>>>  > generated wsdl file, the difference causing this problem appears to
>>> be
>>>>  > the additional lines of:
>>>>  >
>>>>  >  <wsdl:service name="ServiceRequestPortType__Service">
>>>>  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>>>>  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>>>>  >    </wsdl:port>
>>>>  >  </wsdl:service>
>>>>  >
>>>>  > Which without an address is causing wsdl2java to fail.
>>>>  >
>>>>  > Has anyone seen this before?  Or does anyone have any suggestions?
>>>>  >
>>>>  > Cheers,
>>>>  >
>>>>  > Dave.
>>>>  >
>>>>  > --
>>>>  > Dave Sowerby MEng MBCS
>>>>  >
>>>>  >
>>> ---------------------------------------------------------------------
>>>>  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>>>  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>>>  >
>>>>  >
>>>>  Hi Dave
>>>>
>>>>  I don't have an immediate suggestion so I'd like to understand if
>>> this is a
>>>>  change in behavior in the Tuscany code that you are now seeing. I.e.
>>> The
>>>>  previously functioning WSDL that you diffed against. Was that also
>>> generated
>>>>  by Tuscany in the past? If so I'll go look at what changed and why.
>>>>
>>>>  As an aside I saw a post from Simon Nash saying that he is looking at
>>> the
>>>>  WSDL generation story afresh so hopefully we can make this runtime vs
>>>>  development story much more consistent.
>>>>
>>>>  Regards
>>>>
>>>>  Simon
>>>>
>>>
>>>
>>> --
>>> Dave Sowerby MEng MBCS
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>>
>>>
>> Dave
>>
>> As this effect seems to be erroneous in several ways and is different from
>> 1.1 can you raise a high priority JIRA so we can track it.
>>
>> Thanks
>>
>> Simon
>>
> 
> As a work around while we fix this you could try specifying a WSDL port
> manually in the composite. E.g. I tried this on samples/callback-ws-service
> by changing the binding.ws as follows.
> 
>     <component name="MyServiceComponent">
>         <implementation.java class="myserver.MyServiceImpl" />
>         <service name="MyService">
>             <interface.java interface="myserver.MyService"
>                 callbackInterface="myserver.MyServiceCallback" />
>             <binding.ws uri="http://localhost:8086/MyServiceComponent"
> wsdlElement="http://myserver#wsdl.port(MyService/MyServiceSOAP11port_http)"
> />
>             <callback>
>                 <binding.ws />
>             </callback>
>         </service>
>     </component>
> 
> I looked in the generated wsdl to work out what the namespace/service/port
> should be. The addition of wsdlElement="
> http://myserver#wsdl.port(MyService/MyServiceSOAP11port_http)" has the
> effect of turning off the extra service/binding that now gets added
> otherwise.
> 
This workaround can't be used with calculator-ws-webapp, which
doesn't have any explicit WSDL.  This bug makes the WSDL-less
scenario close to unusable, which is pretty serious.

   Simon

> I was a little surprised it allowed me to use both uri= and wsdlElement= but
> that's another subject.
> 
> Regards
> 
> Simon
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Apr 11, 2008 at 3:37 PM, Simon Laws <si...@googlemail.com>
wrote:

>
>
> On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
> wrote:
>
> > Hey Simon,
> >
> > Thanks for the response.
> >
> > Indeed this is a change in Tuscany behaviour - using the same service
> > running under 1.0-incubating or 1.1-incubating the WSDL generated is
> > as expected.  This problem only appears to have started recently with
> > 1.2.
> >
> > Cheers,
> >
> > Dave.
> >
> > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
> > wrote:
> > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <dave.sowerby@gmail.com
> > >
> > >  wrote:
> > >
> > >
> > >
> > >  > Hi,
> > >  >
> > >  > I'm currently facing issues when attmepting to utilise the wsdl
> > >  > generated by a service exposed using binding.ws, when I use
> > wsdl2java
> > >  > with this wsdl I get the following exception:
> > >  >
> > >  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
> > >  > Emitter failure.  Cannot find endpoint address in port
> > >  > ServiceRequestPortType__SOAPHTTPPort in service
> > >  > ServiceRequestPortType__ServiceLocator
> > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
> > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
> > >  > ServiceRequestPortType__ServiceLocator
> > >  >    at
> > >  >
> > org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
> > >  >    at
> > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
> > >  >    at
> > >  >
> > org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
> > >  >    at
> > >  >
> > org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
> > >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> > >  >    at
> > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> > >  >    at java.lang.Thread.run(Unknown Source)
> > >  >
> > >  > I've diffed a previously functioning wsdl against the currently
> > (RC3a)
> > >  > generated wsdl file, the difference causing this problem appears to
> > be
> > >  > the additional lines of:
> > >  >
> > >  >  <wsdl:service name="ServiceRequestPortType__Service">
> > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
> > >  >    </wsdl:port>
> > >  >  </wsdl:service>
> > >  >
> > >  > Which without an address is causing wsdl2java to fail.
> > >  >
> > >  > Has anyone seen this before?  Or does anyone have any suggestions?
> > >  >
> > >  > Cheers,
> > >  >
> > >  > Dave.
> > >  >
> > >  > --
> > >  > Dave Sowerby MEng MBCS
> > >  >
> > >  >
> > ---------------------------------------------------------------------
> > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >  >
> > >  >
> > >  Hi Dave
> > >
> > >  I don't have an immediate suggestion so I'd like to understand if
> > this is a
> > >  change in behavior in the Tuscany code that you are now seeing. I.e.
> > The
> > >  previously functioning WSDL that you diffed against. Was that also
> > generated
> > >  by Tuscany in the past? If so I'll go look at what changed and why.
> > >
> > >  As an aside I saw a post from Simon Nash saying that he is looking at
> > the
> > >  WSDL generation story afresh so hopefully we can make this runtime vs
> > >  development story much more consistent.
> > >
> > >  Regards
> > >
> > >  Simon
> > >
> >
> >
> >
> > --
> > Dave Sowerby MEng MBCS
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
> Dave
>
> As this effect seems to be erroneous in several ways and is different from
> 1.1 can you raise a high priority JIRA so we can track it.
>
> Thanks
>
> Simon
>

As a work around while we fix this you could try specifying a WSDL port
manually in the composite. E.g. I tried this on samples/callback-ws-service
by changing the binding.ws as follows.

    <component name="MyServiceComponent">
        <implementation.java class="myserver.MyServiceImpl" />
        <service name="MyService">
            <interface.java interface="myserver.MyService"
                callbackInterface="myserver.MyServiceCallback" />
            <binding.ws uri="http://localhost:8086/MyServiceComponent"
wsdlElement="http://myserver#wsdl.port(MyService/MyServiceSOAP11port_http)"
/>
            <callback>
                <binding.ws />
            </callback>
        </service>
    </component>

I looked in the generated wsdl to work out what the namespace/service/port
should be. The addition of wsdlElement="
http://myserver#wsdl.port(MyService/MyServiceSOAP11port_http)" has the
effect of turning off the extra service/binding that now gets added
otherwise.

I was a little surprised it allowed me to use both uri= and wsdlElement= but
that's another subject.

Regards

Simon

Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
wrote:

> Hey Simon,
>
> Thanks for the response.
>
> Indeed this is a change in Tuscany behaviour - using the same service
> running under 1.0-incubating or 1.1-incubating the WSDL generated is
> as expected.  This problem only appears to have started recently with
> 1.2.
>
> Cheers,
>
> Dave.
>
> On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
> wrote:
> > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
> >  wrote:
> >
> >
> >
> >  > Hi,
> >  >
> >  > I'm currently facing issues when attmepting to utilise the wsdl
> >  > generated by a service exposed using binding.ws, when I use wsdl2java
> >  > with this wsdl I get the following exception:
> >  >
> >  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
> >  > Emitter failure.  Cannot find endpoint address in port
> >  > ServiceRequestPortType__SOAPHTTPPort in service
> >  > ServiceRequestPortType__ServiceLocator
> >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
> >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
> >  > ServiceRequestPortType__ServiceLocator
> >  >    at
> >  >
> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
> >  >    at
> org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
> >  >    at
> >  >
> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
> >  >    at
> >  >
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
> >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> >  >    at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> >  >    at java.lang.Thread.run(Unknown Source)
> >  >
> >  > I've diffed a previously functioning wsdl against the currently
> (RC3a)
> >  > generated wsdl file, the difference causing this problem appears to
> be
> >  > the additional lines of:
> >  >
> >  >  <wsdl:service name="ServiceRequestPortType__Service">
> >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
> >  >    </wsdl:port>
> >  >  </wsdl:service>
> >  >
> >  > Which without an address is causing wsdl2java to fail.
> >  >
> >  > Has anyone seen this before?  Or does anyone have any suggestions?
> >  >
> >  > Cheers,
> >  >
> >  > Dave.
> >  >
> >  > --
> >  > Dave Sowerby MEng MBCS
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >  >
> >  >
> >  Hi Dave
> >
> >  I don't have an immediate suggestion so I'd like to understand if this
> is a
> >  change in behavior in the Tuscany code that you are now seeing. I.e.
> The
> >  previously functioning WSDL that you diffed against. Was that also
> generated
> >  by Tuscany in the past? If so I'll go look at what changed and why.
> >
> >  As an aside I saw a post from Simon Nash saying that he is looking at
> the
> >  WSDL generation story afresh so hopefully we can make this runtime vs
> >  development story much more consistent.
> >
> >  Regards
> >
> >  Simon
> >
>
>
>
> --
> Dave Sowerby MEng MBCS
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>
Dave

As this effect seems to be erroneous in several ways and is different from
1.1 can you raise a high priority JIRA so we can track it.

Thanks

Simon

Re: Problems with wsdl2java

Posted by Luciano Resende <lu...@gmail.com>.
Thanks Raymond.

On Sun, Apr 13, 2008 at 1:41 PM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
>
>  I checked in a fix into trunk for TUSCANY-2220 under r647623. I'll let you
> to decide if you want to merge it into 1.2 branch.
>
>
>  Thanks,
>  Raymond
>
>  --------------------------------------------------
>  From: "Luciano Resende" <lu...@gmail.com>
>  Sent: Sunday, April 13, 2008 12:05 PM
>  To: <tu...@ws.apache.org>
>  Subject: Re: Problems with wsdl2java
>
>
>
> > Hi Simon
> >
> >  Are we close to a fix to this issue ?
> >
> > - Luciano
> >
> > On Sun, Apr 13, 2008 at 10:19 AM, Simon Nash <na...@apache.org> wrote:
> >
> > > One comment inline.
> > >
> > >  Simon
> > >
> > >
> > >
> > >  Simon Laws wrote:
> > >
> > > > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
> > > > wrote:
> > > >
> > > >
> > > > > Hey Simon,
> > > > >
> > > > > Thanks for the response.
> > > > >
> > > > > Indeed this is a change in Tuscany behaviour - using the same
> service
> > > > > running under 1.0-incubating or 1.1-incubating the WSDL generated is
> > > > > as expected.  This problem only appears to have started recently
> with
> > > > > 1.2.
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Dave.
> > > > >
> > > > > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws > >
> <si...@googlemail.com>
> > > > > wrote:
> > > > >
> > > > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby
> > > <da...@gmail.com>
> > > > > >  wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > >  > Hi,
> > > > > >  >
> > > > > >  > I'm currently facing issues when attmepting to utilise the wsdl
> > > > > >  > generated by a service exposed using binding.ws, when I use
> > > wsdl2java
> > > > > >  > with this wsdl I get the following exception:
> > > > > >  >
> > > > > >  > IWAB0399E Error in generating Java from WSDL: > > >
> java.io.IOException:
> > > > > >  > Emitter failure.  Cannot find endpoint address in port
> > > > > >  > ServiceRequestPortType__SOAPHTTPPort in service
> > > > > >  > ServiceRequestPortType__ServiceLocator
> > > > > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
> > > > > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
> > > > > >  > ServiceRequestPortType__ServiceLocator
> > > > > >  >    at
> > > > > >  >
> > > > > >
> > > > >
> > >
> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
> > > > >
> > > > > >  >    at
> > > > > >
> > > > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
> > > > >
> > > > > >  >    at
> > > > > >  >
> > > > > >
> > > > >
> > >
> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
> > > > >
> > > > > >  >    at
> > > > > >  >
> > > > > >
> > > > >
> > >
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> > > > >
> > > > > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
> > > > > >  >    at
> org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> > > > > >  >    at
> > > > > >
> > > > > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> > > > >
> > > > > >  >    at java.lang.Thread.run(Unknown Source)
> > > > > >  >
> > > > > >  > I've diffed a previously functioning wsdl against the currently
> > > > > >
> > > > > (RC3a)
> > > > >
> > > > > >  > generated wsdl file, the difference causing this problem
> appears > > > to
> > > > > >
> > > > > be
> > > > >
> > > > > >  > the additional lines of:
> > > > > >  >
> > > > > >  >  <wsdl:service name="ServiceRequestPortType__Service">
> > > > > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> > > > > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
> > > > > >  >    </wsdl:port>
> > > > > >  >  </wsdl:service>
> > > > > >  >
> > > > > >  > Which without an address is causing wsdl2java to fail.
> > > > > >  >
> > > > > >  > Has anyone seen this before?  Or does anyone have any > > >
> suggestions?
> > > > > >  >
> > > > > >  > Cheers,
> > > > > >  >
> > > > > >  > Dave.
> > > > > >  >
> > > > > >  > --
> > > > > >  > Dave Sowerby MEng MBCS
> > > > > >  >
> > > > > >  >
> > > ---------------------------------------------------------------------
> > > > > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > > > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > > > > >  >
> > > > > >  >
> > > > > >  Hi Dave
> > > > > >
> > > > > >  I don't have an immediate suggestion so I'd like to understand if
> > > this
> > > > > >
> > > > > is a
> > > > >
> > > > > >  change in behavior in the Tuscany code that you are now seeing. >
> > > I.e.
> > > > > >
> > > > > The
> > > > >
> > > > > >  previously functioning WSDL that you diffed against. Was that
> also
> > > > > >
> > > > > generated
> > > > >
> > > > > >  by Tuscany in the past? If so I'll go look at what changed and >
> > > why.
> > > > > >
> > > > > >  As an aside I saw a post from Simon Nash saying that he is
> looking > > > at
> > > > > >
> > > > > the
> > > > >
> > > > > >  WSDL generation story afresh so hopefully we can make this
> runtime > > > vs
> > > > > >  development story much more consistent.
> > > > > >
> > > > > >  Regards
> > > > > >
> > > > > >  Simon
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Dave Sowerby MEng MBCS
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > > Hi Dave
> > > >
> > > > I just ran up samples/helloworld-ws-sdo and retrieved the >
> auto-generated
> > > > wsdl by pointing my browser at >
> http://l3aw203:8085/HelloWorldService?wsdl.
> > > > I've pasted the result in at the end of this message. The bottom line
> > > though
> > > > is that I see the service/port with missing address information.
> > > >
> > > >  <wsdl:service name="HelloWorld__Service">
> > > >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
> > > > binding="tns:HelloWorld__SOAPBinding">
> > > >    </wsdl:port>
> > > >  </wsdl:service>
> > > >
> > > >
> > > > There are two issues in the code here but I'm going to need some help
> > to
> > > > determine a final fix
> > > >
> > > > Firstly there is code, for example, in >
> Axis2ServiceClient.setServicePort
> > > > that makes a decision about whether the binding definition in the
> > > composite
> > > > file references a service or just a portType.
> > > >
> > > >        WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
> > > >        if (wsBinding.getBinding() == null) {
> > > >            InterfaceContract ic = >
> wsBinding.getBindingInterfaceContract();
> > > >            WSDLInterface wi = (WSDLInterface)ic.getInterface();
> > > >            Service service = helper.createService(wsdlDefinition,
> > > > wi.getPortType());
> > > >            Port port =
> > > (Port)service.getPorts().values().iterator().next();
> > > >            wsBinding.setService(service);
> > > >            wsBinding.setPort(port);
> > > >            wsBinding.setBinding(port.getBinding());
> > > >        } else {
> > > >            Service service = helper.createService(wsdlDefinition,
> > > > wsBinding.getBinding());
> > > >            Port port =
> > > (Port)service.getPorts().values().iterator().next();
> > > >            wsBinding.setService(service);
> > > >            wsBinding.setPort(port);
> > > >        }
> > > >
> > > > If it thinks the binding is null it goes ahead and adds a new binding,
> > > > service and port. This is why you are seeing this extra information in
> > the
> > > > WSDL file. There should probably a test here to look at the WSDL >
> interface
> > > > and see if there is already a binding that will do the job.
> > > >
> > > >
> > >  This would be a worthwhile optimization, though not essential to fix
> > >  the immediate bug.  The same approach could also be used to find a
> > >  service/port that will do the job, if these exist.
> > >
> > >  Simon
> > >
> > >
> > >
> > >
> > > > Secondly, when it does go ahead and creates a service the code in
> > > > WSDLDefinitionHelper.createPort() has some lines commented out...
> > > >
> > > >    protected Port createPort(Definition definition, Binding binding,
> > > > Service service) throws WSDLException {
> > > >        Port port = definition.createPort();
> > > >        port.setBinding(binding);
> > > >        configurePort(definition, port, binding);
> > > >        /*
> > > >        ExtensibilityElement soapAddress =
> > > > > definition.getExtensionRegistry().createExtension(Port.class,
> > > > SOAP_ADDRESS);
> > > >        ((SOAPAddress)soapAddress).setLocationURI("");
> > > >        port.addExtensibilityElement(soapAddress);
> > > >        */
> > > >        service.addPort(port);
> > > >        return port;
> > > >
> > > > Which means that the port will not have address information. With this
> > > code
> > > > though even if it were active the location would be empty so there >
> should
> > > > probably be more logic to determine if the URI on the binding has been
> > > > manually set and use the location from there.
> > > >
> > > > I welcome feedback on anyone who is familiar with this are in case >
> there
> > > is
> > > > deeper thinking about the changes that have been made to this logic.
> > > >
> > > > Regards
> > > >
> > > > Simon
> > > >
> > > >
> > > > ==========================================================
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <wsdl:definitions name="helloworld"
> > > > targetNamespace="http://helloworld"
> > > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > xmlns:tns="http://helloworld">
> > > >  <wsdl:types>
> > > >    <schema elementFormDefault="qualified"
> > > > targetNamespace="http://helloworld"
> > > > xmlns="http://www.w3.org/2001/XMLSchema">
> > > >
> > > >            <element name="getGreetings">
> > > >                <complexType>
> > > >                    <sequence>
> > > >                        <element name="name" type="tns:Name"/>
> > > >                    </sequence>
> > > >
> > > >                </complexType>
> > > >            </element>
> > > >
> > > >            <element name="getGreetingsResponse">
> > > >                <complexType>
> > > >                    <sequence>
> > > >                        <element name="getGreetingsReturn"
> > > type="xsd:string"/>
> > > >                    </sequence>
> > > >                </complexType>
> > > >
> > > >            </element>
> > > >
> > > >            <complexType name="Name">
> > > >                <sequence>
> > > >                    <element name="first" type="xsd:string"/>
> > > >                    <element name="last" type="xsd:string"/>
> > > >                </sequence>
> > > >            </complexType>
> > > >
> > > >        </schema>
> > > >
> > > >  </wsdl:types>
> > > >  <wsdl:message name="getGreetingsResponse">
> > > >    <wsdl:part name="parameters" element="tns:getGreetingsResponse">
> > > >    </wsdl:part>
> > > >  </wsdl:message>
> > > >  <wsdl:message name="getGreetingsRequest">
> > > >    <wsdl:part name="parameters" element="tns:getGreetings">
> > > >    </wsdl:part>
> > > >  </wsdl:message>
> > > >
> > > >  <wsdl:portType name="HelloWorld">
> > > >    <wsdl:operation name="getGreetings">
> > > >      <wsdl:input name="getGreetingsRequest"
> > > message="tns:getGreetingsRequest">
> > > >    </wsdl:input>
> > > >      <wsdl:output name="getGreetingsResponse"
> > > > message="tns:getGreetingsResponse">
> > > >    </wsdl:output>
> > > >    </wsdl:operation>
> > > >  </wsdl:portType>
> > > >  <wsdl:binding name="HelloWorld__SOAPBinding" type="tns:HelloWorld">
> > > >
> > > >    <wsdlsoap:binding style="document"
> > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >    <wsdl:operation name="getGreetings">
> > > >      <wsdlsoap:operation soapAction=""/>
> > > >      <wsdl:input name="getGreetingsRequest">
> > > >        <wsdlsoap:body use="literal"/>
> > > >      </wsdl:input>
> > > >      <wsdl:output name="getGreetingsResponse">
> > > >        <wsdlsoap:body use="literal"/>
> > > >      </wsdl:output>
> > > >
> > > >    </wsdl:operation>
> > > >  </wsdl:binding>
> > > >  <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
> > > >    <wsdlsoap:binding style="document"
> > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >    <wsdl:operation name="getGreetings">
> > > >      <wsdlsoap:operation soapAction=""/>
> > > >      <wsdl:input name="getGreetingsRequest">
> > > >        <wsdlsoap:body use="literal"/>
> > > >      </wsdl:input>
> > > >
> > > >      <wsdl:output name="getGreetingsResponse">
> > > >        <wsdlsoap:body use="literal"/>
> > > >      </wsdl:output>
> > > >    </wsdl:operation>
> > > >  </wsdl:binding>
> > > >  <wsdl:service name="HelloWorld__Service">
> > > >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
> > > > binding="tns:HelloWorld__SOAPBinding">
> > > >    </wsdl:port>
> > > >  </wsdl:service>
> > > >
> > > >  <wsdl:service name="HelloWorldService">
> > > >    <wsdl:port name="HelloWorldSoapPort"
> > > binding="tns:HelloWorldSoapBinding">
> > > >      <wsdlsoap:address
> > > location="http://192.168.247.1:8085/HelloWorldService"/>
> > > >    </wsdl:port>
> > > >  </wsdl:service>
> > > > </wsdl:definitions>
> > > >
> > > >
> > >
> > >
> > >
> > >  ---------------------------------------------------------------------
> > >  To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > >  For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> > >
> >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende
> > http://lresende.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Apr 14, 2008 at 5:50 AM, Simon Nash <na...@apache.org> wrote:

> Raymond Feng wrote:
>
> > Hi,
> >
> > I checked in a fix into trunk for TUSCANY-2220 under r647623. I'll let
> > you to decide if you want to merge it into 1.2 branch.
> >
> >  Thanks, Raymond.  I tried this on my test case and it worked OK.
>
>  Simon
>
>
>  Thanks,
> > Raymond
> >
> > --------------------------------------------------
> > From: "Luciano Resende" <lu...@gmail.com>
> > Sent: Sunday, April 13, 2008 12:05 PM
> > To: <tu...@ws.apache.org>
> > Subject: Re: Problems with wsdl2java
> >
> >  Hi Simon
> > >
> > >  Are we close to a fix to this issue ?
> > >
> > > - Luciano
> > >
> > > On Sun, Apr 13, 2008 at 10:19 AM, Simon Nash <na...@apache.org> wrote:
> > >
> > > > One comment inline.
> > > >
> > > >  Simon
> > > >
> > > >
> > > >
> > > >  Simon Laws wrote:
> > > >
> > > > > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <
> > > > dave.sowerby@gmail.com>
> > > > > wrote:
> > > > >
> > > > >
> > > > > > Hey Simon,
> > > > > >
> > > > > > Thanks for the response.
> > > > > >
> > > > > > Indeed this is a change in Tuscany behaviour - using the same
> > > > service
> > > > > > running under 1.0-incubating or 1.1-incubating the WSDL
> > > > generated is
> > > > > > as expected.  This problem only appears to have started recently
> > > > with
> > > > > > 1.2.
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > > Dave.
> > > > > >
> > > > > > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws > > <
> > > > simonslaws@googlemail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby
> > > > <da...@gmail.com>
> > > > > > >  wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >  > Hi,
> > > > > > >  >
> > > > > > >  > I'm currently facing issues when attmepting to utilise the
> > > > wsdl
> > > > > > >  > generated by a service exposed using binding.ws, when I use
> > > > wsdl2java
> > > > > > >  > with this wsdl I get the following exception:
> > > > > > >  >
> > > > > > >  > IWAB0399E Error in generating Java from WSDL: > > >
> > > > java.io.IOException:
> > > > > > >  > Emitter failure.  Cannot find endpoint address in port
> > > > > > >  > ServiceRequestPortType__SOAPHTTPPort in service
> > > > > > >  > ServiceRequestPortType__ServiceLocator
> > > > > > >  >    java.io.IOException: Emitter failure.  Cannot find
> > > > endpoint
> > > > > > >  > address in port ServiceRequestPortType__SOAPHTTPPort in
> > > > service
> > > > > > >  > ServiceRequestPortType__ServiceLocator
> > > > > > >  >    at
> > > > > > >  >
> > > > > > >
> > > > > >
> > > > org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
> > > >
> > > > > >
> > > > > > >  >    at
> > > > > > >
> > > > > >
> > > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
> > > > > >
> > > > > > >  >    at
> > > > > > >  >
> > > > > > >
> > > > > >
> > > > org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
> > > >
> > > > > >
> > > > > > >  >    at
> > > > > > >  >
> > > > > > >
> > > > > >
> > > > org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> > > >
> > > > > >
> > > > > > >  >    at
> > > > org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
> > > > > > >  >    at
> > > > org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> > > > > > >  >    at
> > > > > > >
> > > > > >
> > > > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> > > > > >
> > > > > > >  >    at java.lang.Thread.run(Unknown Source)
> > > > > > >  >
> > > > > > >  > I've diffed a previously functioning wsdl against the
> > > > currently
> > > > > > >
> > > > > > (RC3a)
> > > > > >
> > > > > > >  > generated wsdl file, the difference causing this problem
> > > > appears > > > to
> > > > > > >
> > > > > > be
> > > > > >
> > > > > > >  > the additional lines of:
> > > > > > >  >
> > > > > > >  >  <wsdl:service name="ServiceRequestPortType__Service">
> > > > > > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> > > > > > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
> > > > > > >  >    </wsdl:port>
> > > > > > >  >  </wsdl:service>
> > > > > > >  >
> > > > > > >  > Which without an address is causing wsdl2java to fail.
> > > > > > >  >
> > > > > > >  > Has anyone seen this before?  Or does anyone have any > > >
> > > > suggestions?
> > > > > > >  >
> > > > > > >  > Cheers,
> > > > > > >  >
> > > > > > >  > Dave.
> > > > > > >  >
> > > > > > >  > --
> > > > > > >  > Dave Sowerby MEng MBCS
> > > > > > >  >
> > > > > > >  >
> > > >
> > > > ---------------------------------------------------------------------
> > > > > > >  > To unsubscribe, e-mail:
> > > > tuscany-dev-unsubscribe@ws.apache.org
> > > > > > >  > For additional commands, e-mail:
> > > > tuscany-dev-help@ws.apache.org
> > > > > > >  >
> > > > > > >  >
> > > > > > >  Hi Dave
> > > > > > >
> > > > > > >  I don't have an immediate suggestion so I'd like to
> > > > understand if
> > > > this
> > > > > > >
> > > > > > is a
> > > > > >
> > > > > > >  change in behavior in the Tuscany code that you are now
> > > > seeing. > > > I.e.
> > > > > > >
> > > > > > The
> > > > > >
> > > > > > >  previously functioning WSDL that you diffed against. Was that
> > > > also
> > > > > > >
> > > > > > generated
> > > > > >
> > > > > > >  by Tuscany in the past? If so I'll go look at what changed
> > > > and > > > why.
> > > > > > >
> > > > > > >  As an aside I saw a post from Simon Nash saying that he is
> > > > looking > > > at
> > > > > > >
> > > > > > the
> > > > > >
> > > > > > >  WSDL generation story afresh so hopefully we can make this
> > > > runtime > > > vs
> > > > > > >  development story much more consistent.
> > > > > > >
> > > > > > >  Regards
> > > > > > >
> > > > > > >  Simon
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Dave Sowerby MEng MBCS
> > > > > >
> > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > Hi Dave
> > > > >
> > > > > I just ran up samples/helloworld-ws-sdo and retrieved the >
> > > > auto-generated
> > > > > wsdl by pointing my browser at >
> > > > http://l3aw203:8085/HelloWorldService?wsdl.
> > > > > I've pasted the result in at the end of this message. The bottom
> > > > line
> > > > though
> > > > > is that I see the service/port with missing address information.
> > > > >
> > > > >  <wsdl:service name="HelloWorld__Service">
> > > > >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
> > > > > binding="tns:HelloWorld__SOAPBinding">
> > > > >    </wsdl:port>
> > > > >  </wsdl:service>
> > > > >
> > > > >
> > > > > There are two issues in the code here but I'm going to need some
> > > > help > to
> > > > > determine a final fix
> > > > >
> > > > > Firstly there is code, for example, in >
> > > > Axis2ServiceClient.setServicePort
> > > > > that makes a decision about whether the binding definition in the
> > > > composite
> > > > > file references a service or just a portType.
> > > > >
> > > > >        WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
> > > > >        if (wsBinding.getBinding() == null) {
> > > > >            InterfaceContract ic = >
> > > > wsBinding.getBindingInterfaceContract();
> > > > >            WSDLInterface wi = (WSDLInterface)ic.getInterface();
> > > > >            Service service = helper.createService(wsdlDefinition,
> > > > > wi.getPortType());
> > > > >            Port port =
> > > > (Port)service.getPorts().values().iterator().next();
> > > > >            wsBinding.setService(service);
> > > > >            wsBinding.setPort(port);
> > > > >            wsBinding.setBinding(port.getBinding());
> > > > >        } else {
> > > > >            Service service = helper.createService(wsdlDefinition,
> > > > > wsBinding.getBinding());
> > > > >            Port port =
> > > > (Port)service.getPorts().values().iterator().next();
> > > > >            wsBinding.setService(service);
> > > > >            wsBinding.setPort(port);
> > > > >        }
> > > > >
> > > > > If it thinks the binding is null it goes ahead and adds a new
> > > > binding,
> > > > > service and port. This is why you are seeing this extra
> > > > information in > the
> > > > > WSDL file. There should probably a test here to look at the WSDL >
> > > > interface
> > > > > and see if there is already a binding that will do the job.
> > > > >
> > > > >
> > > >  This would be a worthwhile optimization, though not essential to
> > > > fix
> > > >  the immediate bug.  The same approach could also be used to find a
> > > >  service/port that will do the job, if these exist.
> > > >
> > > >  Simon
> > > >
> > > >
> > > >
> > > >
> > > > > Secondly, when it does go ahead and creates a service the code in
> > > > > WSDLDefinitionHelper.createPort() has some lines commented out...
> > > > >
> > > > >    protected Port createPort(Definition definition, Binding
> > > > binding,
> > > > > Service service) throws WSDLException {
> > > > >        Port port = definition.createPort();
> > > > >        port.setBinding(binding);
> > > > >        configurePort(definition, port, binding);
> > > > >        /*
> > > > >        ExtensibilityElement soapAddress =
> > > > > > definition.getExtensionRegistry().createExtension(Port.class,
> > > > > SOAP_ADDRESS);
> > > > >        ((SOAPAddress)soapAddress).setLocationURI("");
> > > > >        port.addExtensibilityElement(soapAddress);
> > > > >        */
> > > > >        service.addPort(port);
> > > > >        return port;
> > > > >
> > > > > Which means that the port will not have address information. With
> > > > this
> > > > code
> > > > > though even if it were active the location would be empty so there
> > > > > should
> > > > > probably be more logic to determine if the URI on the binding has
> > > > been
> > > > > manually set and use the location from there.
> > > > >
> > > > > I welcome feedback on anyone who is familiar with this are in case
> > > > > there
> > > > is
> > > > > deeper thinking about the changes that have been made to this
> > > > logic.
> > > > >
> > > > > Regards
> > > > >
> > > > > Simon
> > > > >
> > > > >
> > > > > ==========================================================
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <wsdl:definitions name="helloworld"
> > > > > targetNamespace="http://helloworld"
> > > > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > > xmlns:tns="http://helloworld">
> > > > >  <wsdl:types>
> > > > >    <schema elementFormDefault="qualified"
> > > > > targetNamespace="http://helloworld"
> > > > > xmlns="http://www.w3.org/2001/XMLSchema">
> > > > >
> > > > >            <element name="getGreetings">
> > > > >                <complexType>
> > > > >                    <sequence>
> > > > >                        <element name="name" type="tns:Name"/>
> > > > >                    </sequence>
> > > > >
> > > > >                </complexType>
> > > > >            </element>
> > > > >
> > > > >            <element name="getGreetingsResponse">
> > > > >                <complexType>
> > > > >                    <sequence>
> > > > >                        <element name="getGreetingsReturn"
> > > > type="xsd:string"/>
> > > > >                    </sequence>
> > > > >                </complexType>
> > > > >
> > > > >            </element>
> > > > >
> > > > >            <complexType name="Name">
> > > > >                <sequence>
> > > > >                    <element name="first" type="xsd:string"/>
> > > > >                    <element name="last" type="xsd:string"/>
> > > > >                </sequence>
> > > > >            </complexType>
> > > > >
> > > > >        </schema>
> > > > >
> > > > >  </wsdl:types>
> > > > >  <wsdl:message name="getGreetingsResponse">
> > > > >    <wsdl:part name="parameters"
> > > > element="tns:getGreetingsResponse">
> > > > >    </wsdl:part>
> > > > >  </wsdl:message>
> > > > >  <wsdl:message name="getGreetingsRequest">
> > > > >    <wsdl:part name="parameters" element="tns:getGreetings">
> > > > >    </wsdl:part>
> > > > >  </wsdl:message>
> > > > >
> > > > >  <wsdl:portType name="HelloWorld">
> > > > >    <wsdl:operation name="getGreetings">
> > > > >      <wsdl:input name="getGreetingsRequest"
> > > > message="tns:getGreetingsRequest">
> > > > >    </wsdl:input>
> > > > >      <wsdl:output name="getGreetingsResponse"
> > > > > message="tns:getGreetingsResponse">
> > > > >    </wsdl:output>
> > > > >    </wsdl:operation>
> > > > >  </wsdl:portType>
> > > > >  <wsdl:binding name="HelloWorld__SOAPBinding"
> > > > type="tns:HelloWorld">
> > > > >
> > > > >    <wsdlsoap:binding style="document"
> > > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > > >    <wsdl:operation name="getGreetings">
> > > > >      <wsdlsoap:operation soapAction=""/>
> > > > >      <wsdl:input name="getGreetingsRequest">
> > > > >        <wsdlsoap:body use="literal"/>
> > > > >      </wsdl:input>
> > > > >      <wsdl:output name="getGreetingsResponse">
> > > > >        <wsdlsoap:body use="literal"/>
> > > > >      </wsdl:output>
> > > > >
> > > > >    </wsdl:operation>
> > > > >  </wsdl:binding>
> > > > >  <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
> > > > >    <wsdlsoap:binding style="document"
> > > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > > >    <wsdl:operation name="getGreetings">
> > > > >      <wsdlsoap:operation soapAction=""/>
> > > > >      <wsdl:input name="getGreetingsRequest">
> > > > >        <wsdlsoap:body use="literal"/>
> > > > >      </wsdl:input>
> > > > >
> > > > >      <wsdl:output name="getGreetingsResponse">
> > > > >        <wsdlsoap:body use="literal"/>
> > > > >      </wsdl:output>
> > > > >    </wsdl:operation>
> > > > >  </wsdl:binding>
> > > > >  <wsdl:service name="HelloWorld__Service">
> > > > >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
> > > > > binding="tns:HelloWorld__SOAPBinding">
> > > > >    </wsdl:port>
> > > > >  </wsdl:service>
> > > > >
> > > > >  <wsdl:service name="HelloWorldService">
> > > > >    <wsdl:port name="HelloWorldSoapPort"
> > > > binding="tns:HelloWorldSoapBinding">
> > > > >      <wsdlsoap:address
> > > > location="http://192.168.247.1:8085/HelloWorldService"/>
> > > > >    </wsdl:port>
> > > > >  </wsdl:service>
> > > > > </wsdl:definitions>
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >  ---------------------------------------------------------------------
> > > >  To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > >  For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Luciano Resende
> > > Apache Tuscany Committer
> > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> > > http://lresende.blogspot.com/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
> Thanks Raymond

The wonders of open source. Go away for the weekend and the problem is fixed
when I come back:-)

Simon

Re: Problems with wsdl2java

Posted by Simon Nash <na...@apache.org>.
Raymond Feng wrote:
> Hi,
> 
> I checked in a fix into trunk for TUSCANY-2220 under r647623. I'll let 
> you to decide if you want to merge it into 1.2 branch.
> 
Thanks, Raymond.  I tried this on my test case and it worked OK.

   Simon

> Thanks,
> Raymond
> 
> --------------------------------------------------
> From: "Luciano Resende" <lu...@gmail.com>
> Sent: Sunday, April 13, 2008 12:05 PM
> To: <tu...@ws.apache.org>
> Subject: Re: Problems with wsdl2java
> 
>> Hi Simon
>>
>>   Are we close to a fix to this issue ?
>>
>> - Luciano
>>
>> On Sun, Apr 13, 2008 at 10:19 AM, Simon Nash <na...@apache.org> wrote:
>>> One comment inline.
>>>
>>>   Simon
>>>
>>>
>>>
>>>  Simon Laws wrote:
>>>
>>> > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
>>> > wrote:
>>> >
>>> >
>>> > > Hey Simon,
>>> > >
>>> > > Thanks for the response.
>>> > >
>>> > > Indeed this is a change in Tuscany behaviour - using the same 
>>> service
>>> > > running under 1.0-incubating or 1.1-incubating the WSDL generated is
>>> > > as expected.  This problem only appears to have started recently 
>>> with
>>> > > 1.2.
>>> > >
>>> > > Cheers,
>>> > >
>>> > > Dave.
>>> > >
>>> > > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws > > 
>>> <si...@googlemail.com>
>>> > > wrote:
>>> > >
>>> > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby
>>> <da...@gmail.com>
>>> > > >  wrote:
>>> > > >
>>> > > >
>>> > > >
>>> > > >  > Hi,
>>> > > >  >
>>> > > >  > I'm currently facing issues when attmepting to utilise the wsdl
>>> > > >  > generated by a service exposed using binding.ws, when I use
>>> wsdl2java
>>> > > >  > with this wsdl I get the following exception:
>>> > > >  >
>>> > > >  > IWAB0399E Error in generating Java from WSDL: > > > 
>>> java.io.IOException:
>>> > > >  > Emitter failure.  Cannot find endpoint address in port
>>> > > >  > ServiceRequestPortType__SOAPHTTPPort in service
>>> > > >  > ServiceRequestPortType__ServiceLocator
>>> > > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>>> > > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>>> > > >  > ServiceRequestPortType__ServiceLocator
>>> > > >  >    at
>>> > > >  >
>>> > > >
>>> > >
>>> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189) 
>>>
>>> > >
>>> > > >  >    at
>>> > > >
>>> > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>>> > >
>>> > > >  >    at
>>> > > >  >
>>> > > >
>>> > >
>>> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112) 
>>>
>>> > >
>>> > > >  >    at
>>> > > >  >
>>> > > >
>>> > >
>>> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421) 
>>>
>>> > >
>>> > > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>>> > > >  >    at 
>>> org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>>> > > >  >    at
>>> > > >
>>> > > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>>> > >
>>> > > >  >    at java.lang.Thread.run(Unknown Source)
>>> > > >  >
>>> > > >  > I've diffed a previously functioning wsdl against the currently
>>> > > >
>>> > > (RC3a)
>>> > >
>>> > > >  > generated wsdl file, the difference causing this problem 
>>> appears > > > to
>>> > > >
>>> > > be
>>> > >
>>> > > >  > the additional lines of:
>>> > > >  >
>>> > > >  >  <wsdl:service name="ServiceRequestPortType__Service">
>>> > > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>>> > > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>>> > > >  >    </wsdl:port>
>>> > > >  >  </wsdl:service>
>>> > > >  >
>>> > > >  > Which without an address is causing wsdl2java to fail.
>>> > > >  >
>>> > > >  > Has anyone seen this before?  Or does anyone have any > > > 
>>> suggestions?
>>> > > >  >
>>> > > >  > Cheers,
>>> > > >  >
>>> > > >  > Dave.
>>> > > >  >
>>> > > >  > --
>>> > > >  > Dave Sowerby MEng MBCS
>>> > > >  >
>>> > > >  >
>>> ---------------------------------------------------------------------
>>> > > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>> > > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>> > > >  >
>>> > > >  >
>>> > > >  Hi Dave
>>> > > >
>>> > > >  I don't have an immediate suggestion so I'd like to understand if
>>> this
>>> > > >
>>> > > is a
>>> > >
>>> > > >  change in behavior in the Tuscany code that you are now 
>>> seeing. > > > I.e.
>>> > > >
>>> > > The
>>> > >
>>> > > >  previously functioning WSDL that you diffed against. Was that 
>>> also
>>> > > >
>>> > > generated
>>> > >
>>> > > >  by Tuscany in the past? If so I'll go look at what changed and 
>>> > > > why.
>>> > > >
>>> > > >  As an aside I saw a post from Simon Nash saying that he is 
>>> looking > > > at
>>> > > >
>>> > > the
>>> > >
>>> > > >  WSDL generation story afresh so hopefully we can make this 
>>> runtime > > > vs
>>> > > >  development story much more consistent.
>>> > > >
>>> > > >  Regards
>>> > > >
>>> > > >  Simon
>>> > > >
>>> > > >
>>> > >
>>> > >
>>> > > --
>>> > > Dave Sowerby MEng MBCS
>>> > >
>>> > > 
>>> ---------------------------------------------------------------------
>>> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>> > >
>>> > >
>>> >
>>> > Hi Dave
>>> >
>>> > I just ran up samples/helloworld-ws-sdo and retrieved the > 
>>> auto-generated
>>> > wsdl by pointing my browser at > 
>>> http://l3aw203:8085/HelloWorldService?wsdl.
>>> > I've pasted the result in at the end of this message. The bottom line
>>> though
>>> > is that I see the service/port with missing address information.
>>> >
>>> >  <wsdl:service name="HelloWorld__Service">
>>> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
>>> > binding="tns:HelloWorld__SOAPBinding">
>>> >    </wsdl:port>
>>> >  </wsdl:service>
>>> >
>>> >
>>> > There are two issues in the code here but I'm going to need some 
>>> help > to
>>> > determine a final fix
>>> >
>>> > Firstly there is code, for example, in > 
>>> Axis2ServiceClient.setServicePort
>>> > that makes a decision about whether the binding definition in the
>>> composite
>>> > file references a service or just a portType.
>>> >
>>> >        WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
>>> >        if (wsBinding.getBinding() == null) {
>>> >            InterfaceContract ic = > 
>>> wsBinding.getBindingInterfaceContract();
>>> >            WSDLInterface wi = (WSDLInterface)ic.getInterface();
>>> >            Service service = helper.createService(wsdlDefinition,
>>> > wi.getPortType());
>>> >            Port port =
>>> (Port)service.getPorts().values().iterator().next();
>>> >            wsBinding.setService(service);
>>> >            wsBinding.setPort(port);
>>> >            wsBinding.setBinding(port.getBinding());
>>> >        } else {
>>> >            Service service = helper.createService(wsdlDefinition,
>>> > wsBinding.getBinding());
>>> >            Port port =
>>> (Port)service.getPorts().values().iterator().next();
>>> >            wsBinding.setService(service);
>>> >            wsBinding.setPort(port);
>>> >        }
>>> >
>>> > If it thinks the binding is null it goes ahead and adds a new binding,
>>> > service and port. This is why you are seeing this extra information 
>>> in > the
>>> > WSDL file. There should probably a test here to look at the WSDL > 
>>> interface
>>> > and see if there is already a binding that will do the job.
>>> >
>>> >
>>>  This would be a worthwhile optimization, though not essential to fix
>>>  the immediate bug.  The same approach could also be used to find a
>>>  service/port that will do the job, if these exist.
>>>
>>>   Simon
>>>
>>>
>>>
>>>
>>> > Secondly, when it does go ahead and creates a service the code in
>>> > WSDLDefinitionHelper.createPort() has some lines commented out...
>>> >
>>> >    protected Port createPort(Definition definition, Binding binding,
>>> > Service service) throws WSDLException {
>>> >        Port port = definition.createPort();
>>> >        port.setBinding(binding);
>>> >        configurePort(definition, port, binding);
>>> >        /*
>>> >        ExtensibilityElement soapAddress =
>>> > > definition.getExtensionRegistry().createExtension(Port.class,
>>> > SOAP_ADDRESS);
>>> >        ((SOAPAddress)soapAddress).setLocationURI("");
>>> >        port.addExtensibilityElement(soapAddress);
>>> >        */
>>> >        service.addPort(port);
>>> >        return port;
>>> >
>>> > Which means that the port will not have address information. With this
>>> code
>>> > though even if it were active the location would be empty so there 
>>> > should
>>> > probably be more logic to determine if the URI on the binding has been
>>> > manually set and use the location from there.
>>> >
>>> > I welcome feedback on anyone who is familiar with this are in case 
>>> > there
>>> is
>>> > deeper thinking about the changes that have been made to this logic.
>>> >
>>> > Regards
>>> >
>>> > Simon
>>> >
>>> >
>>> > ==========================================================
>>> >
>>> > <?xml version="1.0" encoding="UTF-8"?>
>>> > <wsdl:definitions name="helloworld"
>>> > targetNamespace="http://helloworld"
>>> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>>> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>> > xmlns:tns="http://helloworld">
>>> >  <wsdl:types>
>>> >    <schema elementFormDefault="qualified"
>>> > targetNamespace="http://helloworld"
>>> > xmlns="http://www.w3.org/2001/XMLSchema">
>>> >
>>> >            <element name="getGreetings">
>>> >                <complexType>
>>> >                    <sequence>
>>> >                        <element name="name" type="tns:Name"/>
>>> >                    </sequence>
>>> >
>>> >                </complexType>
>>> >            </element>
>>> >
>>> >            <element name="getGreetingsResponse">
>>> >                <complexType>
>>> >                    <sequence>
>>> >                        <element name="getGreetingsReturn"
>>> type="xsd:string"/>
>>> >                    </sequence>
>>> >                </complexType>
>>> >
>>> >            </element>
>>> >
>>> >            <complexType name="Name">
>>> >                <sequence>
>>> >                    <element name="first" type="xsd:string"/>
>>> >                    <element name="last" type="xsd:string"/>
>>> >                </sequence>
>>> >            </complexType>
>>> >
>>> >        </schema>
>>> >
>>> >  </wsdl:types>
>>> >  <wsdl:message name="getGreetingsResponse">
>>> >    <wsdl:part name="parameters" element="tns:getGreetingsResponse">
>>> >    </wsdl:part>
>>> >  </wsdl:message>
>>> >  <wsdl:message name="getGreetingsRequest">
>>> >    <wsdl:part name="parameters" element="tns:getGreetings">
>>> >    </wsdl:part>
>>> >  </wsdl:message>
>>> >
>>> >  <wsdl:portType name="HelloWorld">
>>> >    <wsdl:operation name="getGreetings">
>>> >      <wsdl:input name="getGreetingsRequest"
>>> message="tns:getGreetingsRequest">
>>> >    </wsdl:input>
>>> >      <wsdl:output name="getGreetingsResponse"
>>> > message="tns:getGreetingsResponse">
>>> >    </wsdl:output>
>>> >    </wsdl:operation>
>>> >  </wsdl:portType>
>>> >  <wsdl:binding name="HelloWorld__SOAPBinding" type="tns:HelloWorld">
>>> >
>>> >    <wsdlsoap:binding style="document"
>>> > transport="http://schemas.xmlsoap.org/soap/http"/>
>>> >    <wsdl:operation name="getGreetings">
>>> >      <wsdlsoap:operation soapAction=""/>
>>> >      <wsdl:input name="getGreetingsRequest">
>>> >        <wsdlsoap:body use="literal"/>
>>> >      </wsdl:input>
>>> >      <wsdl:output name="getGreetingsResponse">
>>> >        <wsdlsoap:body use="literal"/>
>>> >      </wsdl:output>
>>> >
>>> >    </wsdl:operation>
>>> >  </wsdl:binding>
>>> >  <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
>>> >    <wsdlsoap:binding style="document"
>>> > transport="http://schemas.xmlsoap.org/soap/http"/>
>>> >    <wsdl:operation name="getGreetings">
>>> >      <wsdlsoap:operation soapAction=""/>
>>> >      <wsdl:input name="getGreetingsRequest">
>>> >        <wsdlsoap:body use="literal"/>
>>> >      </wsdl:input>
>>> >
>>> >      <wsdl:output name="getGreetingsResponse">
>>> >        <wsdlsoap:body use="literal"/>
>>> >      </wsdl:output>
>>> >    </wsdl:operation>
>>> >  </wsdl:binding>
>>> >  <wsdl:service name="HelloWorld__Service">
>>> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
>>> > binding="tns:HelloWorld__SOAPBinding">
>>> >    </wsdl:port>
>>> >  </wsdl:service>
>>> >
>>> >  <wsdl:service name="HelloWorldService">
>>> >    <wsdl:port name="HelloWorldSoapPort"
>>> binding="tns:HelloWorldSoapBinding">
>>> >      <wsdlsoap:address
>>> location="http://192.168.247.1:8085/HelloWorldService"/>
>>> >    </wsdl:port>
>>> >  </wsdl:service>
>>> > </wsdl:definitions>
>>> >
>>> >
>>>
>>>
>>>
>>>  ---------------------------------------------------------------------
>>>  To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>>  For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>>
>>>
>>
>>
>>
>> -- 
>> Luciano Resende
>> Apache Tuscany Committer
>> http://people.apache.org/~lresende
>> http://lresende.blogspot.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Raymond Feng <en...@gmail.com>.
Hi,

I checked in a fix into trunk for TUSCANY-2220 under r647623. I'll let you 
to decide if you want to merge it into 1.2 branch.

Thanks,
Raymond

--------------------------------------------------
From: "Luciano Resende" <lu...@gmail.com>
Sent: Sunday, April 13, 2008 12:05 PM
To: <tu...@ws.apache.org>
Subject: Re: Problems with wsdl2java

> Hi Simon
>
>   Are we close to a fix to this issue ?
>
> - Luciano
>
> On Sun, Apr 13, 2008 at 10:19 AM, Simon Nash <na...@apache.org> wrote:
>> One comment inline.
>>
>>   Simon
>>
>>
>>
>>  Simon Laws wrote:
>>
>> > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
>> > wrote:
>> >
>> >
>> > > Hey Simon,
>> > >
>> > > Thanks for the response.
>> > >
>> > > Indeed this is a change in Tuscany behaviour - using the same service
>> > > running under 1.0-incubating or 1.1-incubating the WSDL generated is
>> > > as expected.  This problem only appears to have started recently with
>> > > 1.2.
>> > >
>> > > Cheers,
>> > >
>> > > Dave.
>> > >
>> > > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws 
>> > > <si...@googlemail.com>
>> > > wrote:
>> > >
>> > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby
>> <da...@gmail.com>
>> > > >  wrote:
>> > > >
>> > > >
>> > > >
>> > > >  > Hi,
>> > > >  >
>> > > >  > I'm currently facing issues when attmepting to utilise the wsdl
>> > > >  > generated by a service exposed using binding.ws, when I use
>> wsdl2java
>> > > >  > with this wsdl I get the following exception:
>> > > >  >
>> > > >  > IWAB0399E Error in generating Java from WSDL: 
>> > > > java.io.IOException:
>> > > >  > Emitter failure.  Cannot find endpoint address in port
>> > > >  > ServiceRequestPortType__SOAPHTTPPort in service
>> > > >  > ServiceRequestPortType__ServiceLocator
>> > > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>> > > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>> > > >  > ServiceRequestPortType__ServiceLocator
>> > > >  >    at
>> > > >  >
>> > > >
>> > >
>> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>> > >
>> > > >  >    at
>> > > >
>> > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>> > >
>> > > >  >    at
>> > > >  >
>> > > >
>> > >
>> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>> > >
>> > > >  >    at
>> > > >  >
>> > > >
>> > >
>> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>> > >
>> > > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>> > > >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>> > > >  >    at
>> > > >
>> > > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>> > >
>> > > >  >    at java.lang.Thread.run(Unknown Source)
>> > > >  >
>> > > >  > I've diffed a previously functioning wsdl against the currently
>> > > >
>> > > (RC3a)
>> > >
>> > > >  > generated wsdl file, the difference causing this problem appears 
>> > > > to
>> > > >
>> > > be
>> > >
>> > > >  > the additional lines of:
>> > > >  >
>> > > >  >  <wsdl:service name="ServiceRequestPortType__Service">
>> > > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>> > > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>> > > >  >    </wsdl:port>
>> > > >  >  </wsdl:service>
>> > > >  >
>> > > >  > Which without an address is causing wsdl2java to fail.
>> > > >  >
>> > > >  > Has anyone seen this before?  Or does anyone have any 
>> > > > suggestions?
>> > > >  >
>> > > >  > Cheers,
>> > > >  >
>> > > >  > Dave.
>> > > >  >
>> > > >  > --
>> > > >  > Dave Sowerby MEng MBCS
>> > > >  >
>> > > >  >
>> ---------------------------------------------------------------------
>> > > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> > > >  >
>> > > >  >
>> > > >  Hi Dave
>> > > >
>> > > >  I don't have an immediate suggestion so I'd like to understand if
>> this
>> > > >
>> > > is a
>> > >
>> > > >  change in behavior in the Tuscany code that you are now seeing. 
>> > > > I.e.
>> > > >
>> > > The
>> > >
>> > > >  previously functioning WSDL that you diffed against. Was that also
>> > > >
>> > > generated
>> > >
>> > > >  by Tuscany in the past? If so I'll go look at what changed and 
>> > > > why.
>> > > >
>> > > >  As an aside I saw a post from Simon Nash saying that he is looking 
>> > > > at
>> > > >
>> > > the
>> > >
>> > > >  WSDL generation story afresh so hopefully we can make this runtime 
>> > > > vs
>> > > >  development story much more consistent.
>> > > >
>> > > >  Regards
>> > > >
>> > > >  Simon
>> > > >
>> > > >
>> > >
>> > >
>> > > --
>> > > Dave Sowerby MEng MBCS
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> > >
>> > >
>> >
>> > Hi Dave
>> >
>> > I just ran up samples/helloworld-ws-sdo and retrieved the 
>> > auto-generated
>> > wsdl by pointing my browser at 
>> > http://l3aw203:8085/HelloWorldService?wsdl.
>> > I've pasted the result in at the end of this message. The bottom line
>> though
>> > is that I see the service/port with missing address information.
>> >
>> >  <wsdl:service name="HelloWorld__Service">
>> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
>> > binding="tns:HelloWorld__SOAPBinding">
>> >    </wsdl:port>
>> >  </wsdl:service>
>> >
>> >
>> > There are two issues in the code here but I'm going to need some help 
>> > to
>> > determine a final fix
>> >
>> > Firstly there is code, for example, in 
>> > Axis2ServiceClient.setServicePort
>> > that makes a decision about whether the binding definition in the
>> composite
>> > file references a service or just a portType.
>> >
>> >        WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
>> >        if (wsBinding.getBinding() == null) {
>> >            InterfaceContract ic = 
>> > wsBinding.getBindingInterfaceContract();
>> >            WSDLInterface wi = (WSDLInterface)ic.getInterface();
>> >            Service service = helper.createService(wsdlDefinition,
>> > wi.getPortType());
>> >            Port port =
>> (Port)service.getPorts().values().iterator().next();
>> >            wsBinding.setService(service);
>> >            wsBinding.setPort(port);
>> >            wsBinding.setBinding(port.getBinding());
>> >        } else {
>> >            Service service = helper.createService(wsdlDefinition,
>> > wsBinding.getBinding());
>> >            Port port =
>> (Port)service.getPorts().values().iterator().next();
>> >            wsBinding.setService(service);
>> >            wsBinding.setPort(port);
>> >        }
>> >
>> > If it thinks the binding is null it goes ahead and adds a new binding,
>> > service and port. This is why you are seeing this extra information in 
>> > the
>> > WSDL file. There should probably a test here to look at the WSDL 
>> > interface
>> > and see if there is already a binding that will do the job.
>> >
>> >
>>  This would be a worthwhile optimization, though not essential to fix
>>  the immediate bug.  The same approach could also be used to find a
>>  service/port that will do the job, if these exist.
>>
>>   Simon
>>
>>
>>
>>
>> > Secondly, when it does go ahead and creates a service the code in
>> > WSDLDefinitionHelper.createPort() has some lines commented out...
>> >
>> >    protected Port createPort(Definition definition, Binding binding,
>> > Service service) throws WSDLException {
>> >        Port port = definition.createPort();
>> >        port.setBinding(binding);
>> >        configurePort(definition, port, binding);
>> >        /*
>> >        ExtensibilityElement soapAddress =
>> > 
>> > definition.getExtensionRegistry().createExtension(Port.class,
>> > SOAP_ADDRESS);
>> >        ((SOAPAddress)soapAddress).setLocationURI("");
>> >        port.addExtensibilityElement(soapAddress);
>> >        */
>> >        service.addPort(port);
>> >        return port;
>> >
>> > Which means that the port will not have address information. With this
>> code
>> > though even if it were active the location would be empty so there 
>> > should
>> > probably be more logic to determine if the URI on the binding has been
>> > manually set and use the location from there.
>> >
>> > I welcome feedback on anyone who is familiar with this are in case 
>> > there
>> is
>> > deeper thinking about the changes that have been made to this logic.
>> >
>> > Regards
>> >
>> > Simon
>> >
>> >
>> > ==========================================================
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <wsdl:definitions name="helloworld"
>> > targetNamespace="http://helloworld"
>> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> > xmlns:tns="http://helloworld">
>> >  <wsdl:types>
>> >    <schema elementFormDefault="qualified"
>> > targetNamespace="http://helloworld"
>> > xmlns="http://www.w3.org/2001/XMLSchema">
>> >
>> >            <element name="getGreetings">
>> >                <complexType>
>> >                    <sequence>
>> >                        <element name="name" type="tns:Name"/>
>> >                    </sequence>
>> >
>> >                </complexType>
>> >            </element>
>> >
>> >            <element name="getGreetingsResponse">
>> >                <complexType>
>> >                    <sequence>
>> >                        <element name="getGreetingsReturn"
>> type="xsd:string"/>
>> >                    </sequence>
>> >                </complexType>
>> >
>> >            </element>
>> >
>> >            <complexType name="Name">
>> >                <sequence>
>> >                    <element name="first" type="xsd:string"/>
>> >                    <element name="last" type="xsd:string"/>
>> >                </sequence>
>> >            </complexType>
>> >
>> >        </schema>
>> >
>> >  </wsdl:types>
>> >  <wsdl:message name="getGreetingsResponse">
>> >    <wsdl:part name="parameters" element="tns:getGreetingsResponse">
>> >    </wsdl:part>
>> >  </wsdl:message>
>> >  <wsdl:message name="getGreetingsRequest">
>> >    <wsdl:part name="parameters" element="tns:getGreetings">
>> >    </wsdl:part>
>> >  </wsdl:message>
>> >
>> >  <wsdl:portType name="HelloWorld">
>> >    <wsdl:operation name="getGreetings">
>> >      <wsdl:input name="getGreetingsRequest"
>> message="tns:getGreetingsRequest">
>> >    </wsdl:input>
>> >      <wsdl:output name="getGreetingsResponse"
>> > message="tns:getGreetingsResponse">
>> >    </wsdl:output>
>> >    </wsdl:operation>
>> >  </wsdl:portType>
>> >  <wsdl:binding name="HelloWorld__SOAPBinding" type="tns:HelloWorld">
>> >
>> >    <wsdlsoap:binding style="document"
>> > transport="http://schemas.xmlsoap.org/soap/http"/>
>> >    <wsdl:operation name="getGreetings">
>> >      <wsdlsoap:operation soapAction=""/>
>> >      <wsdl:input name="getGreetingsRequest">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:input>
>> >      <wsdl:output name="getGreetingsResponse">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:output>
>> >
>> >    </wsdl:operation>
>> >  </wsdl:binding>
>> >  <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
>> >    <wsdlsoap:binding style="document"
>> > transport="http://schemas.xmlsoap.org/soap/http"/>
>> >    <wsdl:operation name="getGreetings">
>> >      <wsdlsoap:operation soapAction=""/>
>> >      <wsdl:input name="getGreetingsRequest">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:input>
>> >
>> >      <wsdl:output name="getGreetingsResponse">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:output>
>> >    </wsdl:operation>
>> >  </wsdl:binding>
>> >  <wsdl:service name="HelloWorld__Service">
>> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
>> > binding="tns:HelloWorld__SOAPBinding">
>> >    </wsdl:port>
>> >  </wsdl:service>
>> >
>> >  <wsdl:service name="HelloWorldService">
>> >    <wsdl:port name="HelloWorldSoapPort"
>> binding="tns:HelloWorldSoapBinding">
>> >      <wsdlsoap:address
>> location="http://192.168.247.1:8085/HelloWorldService"/>
>> >    </wsdl:port>
>> >  </wsdl:service>
>> > </wsdl:definitions>
>> >
>> >
>>
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>  For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>
>
>
> -- 
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Raymond Feng <en...@gmail.com>.
I think I have the final fix by passing the uri into the port generation and 
I'm running the full build now.

Thanks,
Raymond
--------------------------------------------------
From: "Luciano Resende" <lu...@gmail.com>
Sent: Sunday, April 13, 2008 12:05 PM
To: <tu...@ws.apache.org>
Subject: Re: Problems with wsdl2java

> Hi Simon
>
>   Are we close to a fix to this issue ?
>
> - Luciano
>
> On Sun, Apr 13, 2008 at 10:19 AM, Simon Nash <na...@apache.org> wrote:
>> One comment inline.
>>
>>   Simon
>>
>>
>>
>>  Simon Laws wrote:
>>
>> > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
>> > wrote:
>> >
>> >
>> > > Hey Simon,
>> > >
>> > > Thanks for the response.
>> > >
>> > > Indeed this is a change in Tuscany behaviour - using the same service
>> > > running under 1.0-incubating or 1.1-incubating the WSDL generated is
>> > > as expected.  This problem only appears to have started recently with
>> > > 1.2.
>> > >
>> > > Cheers,
>> > >
>> > > Dave.
>> > >
>> > > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws 
>> > > <si...@googlemail.com>
>> > > wrote:
>> > >
>> > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby
>> <da...@gmail.com>
>> > > >  wrote:
>> > > >
>> > > >
>> > > >
>> > > >  > Hi,
>> > > >  >
>> > > >  > I'm currently facing issues when attmepting to utilise the wsdl
>> > > >  > generated by a service exposed using binding.ws, when I use
>> wsdl2java
>> > > >  > with this wsdl I get the following exception:
>> > > >  >
>> > > >  > IWAB0399E Error in generating Java from WSDL: 
>> > > > java.io.IOException:
>> > > >  > Emitter failure.  Cannot find endpoint address in port
>> > > >  > ServiceRequestPortType__SOAPHTTPPort in service
>> > > >  > ServiceRequestPortType__ServiceLocator
>> > > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>> > > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>> > > >  > ServiceRequestPortType__ServiceLocator
>> > > >  >    at
>> > > >  >
>> > > >
>> > >
>> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>> > >
>> > > >  >    at
>> > > >
>> > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>> > >
>> > > >  >    at
>> > > >  >
>> > > >
>> > >
>> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>> > >
>> > > >  >    at
>> > > >  >
>> > > >
>> > >
>> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>> > >
>> > > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>> > > >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>> > > >  >    at
>> > > >
>> > > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>> > >
>> > > >  >    at java.lang.Thread.run(Unknown Source)
>> > > >  >
>> > > >  > I've diffed a previously functioning wsdl against the currently
>> > > >
>> > > (RC3a)
>> > >
>> > > >  > generated wsdl file, the difference causing this problem appears 
>> > > > to
>> > > >
>> > > be
>> > >
>> > > >  > the additional lines of:
>> > > >  >
>> > > >  >  <wsdl:service name="ServiceRequestPortType__Service">
>> > > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>> > > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>> > > >  >    </wsdl:port>
>> > > >  >  </wsdl:service>
>> > > >  >
>> > > >  > Which without an address is causing wsdl2java to fail.
>> > > >  >
>> > > >  > Has anyone seen this before?  Or does anyone have any 
>> > > > suggestions?
>> > > >  >
>> > > >  > Cheers,
>> > > >  >
>> > > >  > Dave.
>> > > >  >
>> > > >  > --
>> > > >  > Dave Sowerby MEng MBCS
>> > > >  >
>> > > >  >
>> ---------------------------------------------------------------------
>> > > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> > > >  >
>> > > >  >
>> > > >  Hi Dave
>> > > >
>> > > >  I don't have an immediate suggestion so I'd like to understand if
>> this
>> > > >
>> > > is a
>> > >
>> > > >  change in behavior in the Tuscany code that you are now seeing. 
>> > > > I.e.
>> > > >
>> > > The
>> > >
>> > > >  previously functioning WSDL that you diffed against. Was that also
>> > > >
>> > > generated
>> > >
>> > > >  by Tuscany in the past? If so I'll go look at what changed and 
>> > > > why.
>> > > >
>> > > >  As an aside I saw a post from Simon Nash saying that he is looking 
>> > > > at
>> > > >
>> > > the
>> > >
>> > > >  WSDL generation story afresh so hopefully we can make this runtime 
>> > > > vs
>> > > >  development story much more consistent.
>> > > >
>> > > >  Regards
>> > > >
>> > > >  Simon
>> > > >
>> > > >
>> > >
>> > >
>> > > --
>> > > Dave Sowerby MEng MBCS
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> > >
>> > >
>> >
>> > Hi Dave
>> >
>> > I just ran up samples/helloworld-ws-sdo and retrieved the 
>> > auto-generated
>> > wsdl by pointing my browser at 
>> > http://l3aw203:8085/HelloWorldService?wsdl.
>> > I've pasted the result in at the end of this message. The bottom line
>> though
>> > is that I see the service/port with missing address information.
>> >
>> >  <wsdl:service name="HelloWorld__Service">
>> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
>> > binding="tns:HelloWorld__SOAPBinding">
>> >    </wsdl:port>
>> >  </wsdl:service>
>> >
>> >
>> > There are two issues in the code here but I'm going to need some help 
>> > to
>> > determine a final fix
>> >
>> > Firstly there is code, for example, in 
>> > Axis2ServiceClient.setServicePort
>> > that makes a decision about whether the binding definition in the
>> composite
>> > file references a service or just a portType.
>> >
>> >        WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
>> >        if (wsBinding.getBinding() == null) {
>> >            InterfaceContract ic = 
>> > wsBinding.getBindingInterfaceContract();
>> >            WSDLInterface wi = (WSDLInterface)ic.getInterface();
>> >            Service service = helper.createService(wsdlDefinition,
>> > wi.getPortType());
>> >            Port port =
>> (Port)service.getPorts().values().iterator().next();
>> >            wsBinding.setService(service);
>> >            wsBinding.setPort(port);
>> >            wsBinding.setBinding(port.getBinding());
>> >        } else {
>> >            Service service = helper.createService(wsdlDefinition,
>> > wsBinding.getBinding());
>> >            Port port =
>> (Port)service.getPorts().values().iterator().next();
>> >            wsBinding.setService(service);
>> >            wsBinding.setPort(port);
>> >        }
>> >
>> > If it thinks the binding is null it goes ahead and adds a new binding,
>> > service and port. This is why you are seeing this extra information in 
>> > the
>> > WSDL file. There should probably a test here to look at the WSDL 
>> > interface
>> > and see if there is already a binding that will do the job.
>> >
>> >
>>  This would be a worthwhile optimization, though not essential to fix
>>  the immediate bug.  The same approach could also be used to find a
>>  service/port that will do the job, if these exist.
>>
>>   Simon
>>
>>
>>
>>
>> > Secondly, when it does go ahead and creates a service the code in
>> > WSDLDefinitionHelper.createPort() has some lines commented out...
>> >
>> >    protected Port createPort(Definition definition, Binding binding,
>> > Service service) throws WSDLException {
>> >        Port port = definition.createPort();
>> >        port.setBinding(binding);
>> >        configurePort(definition, port, binding);
>> >        /*
>> >        ExtensibilityElement soapAddress =
>> > 
>> > definition.getExtensionRegistry().createExtension(Port.class,
>> > SOAP_ADDRESS);
>> >        ((SOAPAddress)soapAddress).setLocationURI("");
>> >        port.addExtensibilityElement(soapAddress);
>> >        */
>> >        service.addPort(port);
>> >        return port;
>> >
>> > Which means that the port will not have address information. With this
>> code
>> > though even if it were active the location would be empty so there 
>> > should
>> > probably be more logic to determine if the URI on the binding has been
>> > manually set and use the location from there.
>> >
>> > I welcome feedback on anyone who is familiar with this are in case 
>> > there
>> is
>> > deeper thinking about the changes that have been made to this logic.
>> >
>> > Regards
>> >
>> > Simon
>> >
>> >
>> > ==========================================================
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <wsdl:definitions name="helloworld"
>> > targetNamespace="http://helloworld"
>> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> > xmlns:tns="http://helloworld">
>> >  <wsdl:types>
>> >    <schema elementFormDefault="qualified"
>> > targetNamespace="http://helloworld"
>> > xmlns="http://www.w3.org/2001/XMLSchema">
>> >
>> >            <element name="getGreetings">
>> >                <complexType>
>> >                    <sequence>
>> >                        <element name="name" type="tns:Name"/>
>> >                    </sequence>
>> >
>> >                </complexType>
>> >            </element>
>> >
>> >            <element name="getGreetingsResponse">
>> >                <complexType>
>> >                    <sequence>
>> >                        <element name="getGreetingsReturn"
>> type="xsd:string"/>
>> >                    </sequence>
>> >                </complexType>
>> >
>> >            </element>
>> >
>> >            <complexType name="Name">
>> >                <sequence>
>> >                    <element name="first" type="xsd:string"/>
>> >                    <element name="last" type="xsd:string"/>
>> >                </sequence>
>> >            </complexType>
>> >
>> >        </schema>
>> >
>> >  </wsdl:types>
>> >  <wsdl:message name="getGreetingsResponse">
>> >    <wsdl:part name="parameters" element="tns:getGreetingsResponse">
>> >    </wsdl:part>
>> >  </wsdl:message>
>> >  <wsdl:message name="getGreetingsRequest">
>> >    <wsdl:part name="parameters" element="tns:getGreetings">
>> >    </wsdl:part>
>> >  </wsdl:message>
>> >
>> >  <wsdl:portType name="HelloWorld">
>> >    <wsdl:operation name="getGreetings">
>> >      <wsdl:input name="getGreetingsRequest"
>> message="tns:getGreetingsRequest">
>> >    </wsdl:input>
>> >      <wsdl:output name="getGreetingsResponse"
>> > message="tns:getGreetingsResponse">
>> >    </wsdl:output>
>> >    </wsdl:operation>
>> >  </wsdl:portType>
>> >  <wsdl:binding name="HelloWorld__SOAPBinding" type="tns:HelloWorld">
>> >
>> >    <wsdlsoap:binding style="document"
>> > transport="http://schemas.xmlsoap.org/soap/http"/>
>> >    <wsdl:operation name="getGreetings">
>> >      <wsdlsoap:operation soapAction=""/>
>> >      <wsdl:input name="getGreetingsRequest">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:input>
>> >      <wsdl:output name="getGreetingsResponse">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:output>
>> >
>> >    </wsdl:operation>
>> >  </wsdl:binding>
>> >  <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
>> >    <wsdlsoap:binding style="document"
>> > transport="http://schemas.xmlsoap.org/soap/http"/>
>> >    <wsdl:operation name="getGreetings">
>> >      <wsdlsoap:operation soapAction=""/>
>> >      <wsdl:input name="getGreetingsRequest">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:input>
>> >
>> >      <wsdl:output name="getGreetingsResponse">
>> >        <wsdlsoap:body use="literal"/>
>> >      </wsdl:output>
>> >    </wsdl:operation>
>> >  </wsdl:binding>
>> >  <wsdl:service name="HelloWorld__Service">
>> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
>> > binding="tns:HelloWorld__SOAPBinding">
>> >    </wsdl:port>
>> >  </wsdl:service>
>> >
>> >  <wsdl:service name="HelloWorldService">
>> >    <wsdl:port name="HelloWorldSoapPort"
>> binding="tns:HelloWorldSoapBinding">
>> >      <wsdlsoap:address
>> location="http://192.168.247.1:8085/HelloWorldService"/>
>> >    </wsdl:port>
>> >  </wsdl:service>
>> > </wsdl:definitions>
>> >
>> >
>>
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>  For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>
>
>
> -- 
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Luciano Resende <lu...@gmail.com>.
Hi Simon

   Are we close to a fix to this issue ?

- Luciano

On Sun, Apr 13, 2008 at 10:19 AM, Simon Nash <na...@apache.org> wrote:
> One comment inline.
>
>   Simon
>
>
>
>  Simon Laws wrote:
>
> > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
> > wrote:
> >
> >
> > > Hey Simon,
> > >
> > > Thanks for the response.
> > >
> > > Indeed this is a change in Tuscany behaviour - using the same service
> > > running under 1.0-incubating or 1.1-incubating the WSDL generated is
> > > as expected.  This problem only appears to have started recently with
> > > 1.2.
> > >
> > > Cheers,
> > >
> > > Dave.
> > >
> > > On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
> > > wrote:
> > >
> > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby
> <da...@gmail.com>
> > > >  wrote:
> > > >
> > > >
> > > >
> > > >  > Hi,
> > > >  >
> > > >  > I'm currently facing issues when attmepting to utilise the wsdl
> > > >  > generated by a service exposed using binding.ws, when I use
> wsdl2java
> > > >  > with this wsdl I get the following exception:
> > > >  >
> > > >  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
> > > >  > Emitter failure.  Cannot find endpoint address in port
> > > >  > ServiceRequestPortType__SOAPHTTPPort in service
> > > >  > ServiceRequestPortType__ServiceLocator
> > > >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
> > > >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
> > > >  > ServiceRequestPortType__ServiceLocator
> > > >  >    at
> > > >  >
> > > >
> > >
> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
> > >
> > > >  >    at
> > > >
> > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
> > >
> > > >  >    at
> > > >  >
> > > >
> > >
> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
> > >
> > > >  >    at
> > > >  >
> > > >
> > >
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> > >
> > > >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
> > > >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> > > >  >    at
> > > >
> > > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> > >
> > > >  >    at java.lang.Thread.run(Unknown Source)
> > > >  >
> > > >  > I've diffed a previously functioning wsdl against the currently
> > > >
> > > (RC3a)
> > >
> > > >  > generated wsdl file, the difference causing this problem appears to
> > > >
> > > be
> > >
> > > >  > the additional lines of:
> > > >  >
> > > >  >  <wsdl:service name="ServiceRequestPortType__Service">
> > > >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> > > >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
> > > >  >    </wsdl:port>
> > > >  >  </wsdl:service>
> > > >  >
> > > >  > Which without an address is causing wsdl2java to fail.
> > > >  >
> > > >  > Has anyone seen this before?  Or does anyone have any suggestions?
> > > >  >
> > > >  > Cheers,
> > > >  >
> > > >  > Dave.
> > > >  >
> > > >  > --
> > > >  > Dave Sowerby MEng MBCS
> > > >  >
> > > >  >
> ---------------------------------------------------------------------
> > > >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > > >  >
> > > >  >
> > > >  Hi Dave
> > > >
> > > >  I don't have an immediate suggestion so I'd like to understand if
> this
> > > >
> > > is a
> > >
> > > >  change in behavior in the Tuscany code that you are now seeing. I.e.
> > > >
> > > The
> > >
> > > >  previously functioning WSDL that you diffed against. Was that also
> > > >
> > > generated
> > >
> > > >  by Tuscany in the past? If so I'll go look at what changed and why.
> > > >
> > > >  As an aside I saw a post from Simon Nash saying that he is looking at
> > > >
> > > the
> > >
> > > >  WSDL generation story afresh so hopefully we can make this runtime vs
> > > >  development story much more consistent.
> > > >
> > > >  Regards
> > > >
> > > >  Simon
> > > >
> > > >
> > >
> > >
> > > --
> > > Dave Sowerby MEng MBCS
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> >
> > Hi Dave
> >
> > I just ran up samples/helloworld-ws-sdo and retrieved the auto-generated
> > wsdl by pointing my browser at http://l3aw203:8085/HelloWorldService?wsdl.
> > I've pasted the result in at the end of this message. The bottom line
> though
> > is that I see the service/port with missing address information.
> >
> >  <wsdl:service name="HelloWorld__Service">
> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
> > binding="tns:HelloWorld__SOAPBinding">
> >    </wsdl:port>
> >  </wsdl:service>
> >
> >
> > There are two issues in the code here but I'm going to need some help to
> > determine a final fix
> >
> > Firstly there is code, for example, in Axis2ServiceClient.setServicePort
> > that makes a decision about whether the binding definition in the
> composite
> > file references a service or just a portType.
> >
> >        WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
> >        if (wsBinding.getBinding() == null) {
> >            InterfaceContract ic = wsBinding.getBindingInterfaceContract();
> >            WSDLInterface wi = (WSDLInterface)ic.getInterface();
> >            Service service = helper.createService(wsdlDefinition,
> > wi.getPortType());
> >            Port port =
> (Port)service.getPorts().values().iterator().next();
> >            wsBinding.setService(service);
> >            wsBinding.setPort(port);
> >            wsBinding.setBinding(port.getBinding());
> >        } else {
> >            Service service = helper.createService(wsdlDefinition,
> > wsBinding.getBinding());
> >            Port port =
> (Port)service.getPorts().values().iterator().next();
> >            wsBinding.setService(service);
> >            wsBinding.setPort(port);
> >        }
> >
> > If it thinks the binding is null it goes ahead and adds a new binding,
> > service and port. This is why you are seeing this extra information in the
> > WSDL file. There should probably a test here to look at the WSDL interface
> > and see if there is already a binding that will do the job.
> >
> >
>  This would be a worthwhile optimization, though not essential to fix
>  the immediate bug.  The same approach could also be used to find a
>  service/port that will do the job, if these exist.
>
>   Simon
>
>
>
>
> > Secondly, when it does go ahead and creates a service the code in
> > WSDLDefinitionHelper.createPort() has some lines commented out...
> >
> >    protected Port createPort(Definition definition, Binding binding,
> > Service service) throws WSDLException {
> >        Port port = definition.createPort();
> >        port.setBinding(binding);
> >        configurePort(definition, port, binding);
> >        /*
> >        ExtensibilityElement soapAddress =
> >            definition.getExtensionRegistry().createExtension(Port.class,
> > SOAP_ADDRESS);
> >        ((SOAPAddress)soapAddress).setLocationURI("");
> >        port.addExtensibilityElement(soapAddress);
> >        */
> >        service.addPort(port);
> >        return port;
> >
> > Which means that the port will not have address information. With this
> code
> > though even if it were active the location would be empty so there should
> > probably be more logic to determine if the URI on the binding has been
> > manually set and use the location from there.
> >
> > I welcome feedback on anyone who is familiar with this are in case there
> is
> > deeper thinking about the changes that have been made to this logic.
> >
> > Regards
> >
> > Simon
> >
> >
> > ==========================================================
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions name="helloworld"
> > targetNamespace="http://helloworld"
> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:tns="http://helloworld">
> >  <wsdl:types>
> >    <schema elementFormDefault="qualified"
> > targetNamespace="http://helloworld"
> > xmlns="http://www.w3.org/2001/XMLSchema">
> >
> >            <element name="getGreetings">
> >                <complexType>
> >                    <sequence>
> >                        <element name="name" type="tns:Name"/>
> >                    </sequence>
> >
> >                </complexType>
> >            </element>
> >
> >            <element name="getGreetingsResponse">
> >                <complexType>
> >                    <sequence>
> >                        <element name="getGreetingsReturn"
> type="xsd:string"/>
> >                    </sequence>
> >                </complexType>
> >
> >            </element>
> >
> >            <complexType name="Name">
> >                <sequence>
> >                    <element name="first" type="xsd:string"/>
> >                    <element name="last" type="xsd:string"/>
> >                </sequence>
> >            </complexType>
> >
> >        </schema>
> >
> >  </wsdl:types>
> >  <wsdl:message name="getGreetingsResponse">
> >    <wsdl:part name="parameters" element="tns:getGreetingsResponse">
> >    </wsdl:part>
> >  </wsdl:message>
> >  <wsdl:message name="getGreetingsRequest">
> >    <wsdl:part name="parameters" element="tns:getGreetings">
> >    </wsdl:part>
> >  </wsdl:message>
> >
> >  <wsdl:portType name="HelloWorld">
> >    <wsdl:operation name="getGreetings">
> >      <wsdl:input name="getGreetingsRequest"
> message="tns:getGreetingsRequest">
> >    </wsdl:input>
> >      <wsdl:output name="getGreetingsResponse"
> > message="tns:getGreetingsResponse">
> >    </wsdl:output>
> >    </wsdl:operation>
> >  </wsdl:portType>
> >  <wsdl:binding name="HelloWorld__SOAPBinding" type="tns:HelloWorld">
> >
> >    <wsdlsoap:binding style="document"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> >    <wsdl:operation name="getGreetings">
> >      <wsdlsoap:operation soapAction=""/>
> >      <wsdl:input name="getGreetingsRequest">
> >        <wsdlsoap:body use="literal"/>
> >      </wsdl:input>
> >      <wsdl:output name="getGreetingsResponse">
> >        <wsdlsoap:body use="literal"/>
> >      </wsdl:output>
> >
> >    </wsdl:operation>
> >  </wsdl:binding>
> >  <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
> >    <wsdlsoap:binding style="document"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> >    <wsdl:operation name="getGreetings">
> >      <wsdlsoap:operation soapAction=""/>
> >      <wsdl:input name="getGreetingsRequest">
> >        <wsdlsoap:body use="literal"/>
> >      </wsdl:input>
> >
> >      <wsdl:output name="getGreetingsResponse">
> >        <wsdlsoap:body use="literal"/>
> >      </wsdl:output>
> >    </wsdl:operation>
> >  </wsdl:binding>
> >  <wsdl:service name="HelloWorld__Service">
> >    <wsdl:port name="HelloWorld__SOAPHTTPPort"
> > binding="tns:HelloWorld__SOAPBinding">
> >    </wsdl:port>
> >  </wsdl:service>
> >
> >  <wsdl:service name="HelloWorldService">
> >    <wsdl:port name="HelloWorldSoapPort"
> binding="tns:HelloWorldSoapBinding">
> >      <wsdlsoap:address
> location="http://192.168.247.1:8085/HelloWorldService"/>
> >    </wsdl:port>
> >  </wsdl:service>
> > </wsdl:definitions>
> >
> >
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Nash <na...@apache.org>.
One comment inline.

   Simon

Simon Laws wrote:
> On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
> wrote:
> 
>> Hey Simon,
>>
>> Thanks for the response.
>>
>> Indeed this is a change in Tuscany behaviour - using the same service
>> running under 1.0-incubating or 1.1-incubating the WSDL generated is
>> as expected.  This problem only appears to have started recently with
>> 1.2.
>>
>> Cheers,
>>
>> Dave.
>>
>> On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
>> wrote:
>>> On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
>>>  wrote:
>>>
>>>
>>>
>>>  > Hi,
>>>  >
>>>  > I'm currently facing issues when attmepting to utilise the wsdl
>>>  > generated by a service exposed using binding.ws, when I use wsdl2java
>>>  > with this wsdl I get the following exception:
>>>  >
>>>  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
>>>  > Emitter failure.  Cannot find endpoint address in port
>>>  > ServiceRequestPortType__SOAPHTTPPort in service
>>>  > ServiceRequestPortType__ServiceLocator
>>>  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>>>  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>>>  > ServiceRequestPortType__ServiceLocator
>>>  >    at
>>>  >
>> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>>>  >    at
>> org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>>>  >    at
>>>  >
>> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>>>  >    at
>>>  >
>> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>>>  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>>>  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>>>  >    at
>> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>>>  >    at java.lang.Thread.run(Unknown Source)
>>>  >
>>>  > I've diffed a previously functioning wsdl against the currently
>> (RC3a)
>>>  > generated wsdl file, the difference causing this problem appears to
>> be
>>>  > the additional lines of:
>>>  >
>>>  >  <wsdl:service name="ServiceRequestPortType__Service">
>>>  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>>>  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>>>  >    </wsdl:port>
>>>  >  </wsdl:service>
>>>  >
>>>  > Which without an address is causing wsdl2java to fail.
>>>  >
>>>  > Has anyone seen this before?  Or does anyone have any suggestions?
>>>  >
>>>  > Cheers,
>>>  >
>>>  > Dave.
>>>  >
>>>  > --
>>>  > Dave Sowerby MEng MBCS
>>>  >
>>>  > ---------------------------------------------------------------------
>>>  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>>  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>>  >
>>>  >
>>>  Hi Dave
>>>
>>>  I don't have an immediate suggestion so I'd like to understand if this
>> is a
>>>  change in behavior in the Tuscany code that you are now seeing. I.e.
>> The
>>>  previously functioning WSDL that you diffed against. Was that also
>> generated
>>>  by Tuscany in the past? If so I'll go look at what changed and why.
>>>
>>>  As an aside I saw a post from Simon Nash saying that he is looking at
>> the
>>>  WSDL generation story afresh so hopefully we can make this runtime vs
>>>  development story much more consistent.
>>>
>>>  Regards
>>>
>>>  Simon
>>>
>>
>>
>> --
>> Dave Sowerby MEng MBCS
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
> 
> Hi Dave
> 
> I just ran up samples/helloworld-ws-sdo and retrieved the auto-generated
> wsdl by pointing my browser at http://l3aw203:8085/HelloWorldService?wsdl.
> I've pasted the result in at the end of this message. The bottom line though
> is that I see the service/port with missing address information.
> 
>   <wsdl:service name="HelloWorld__Service">
>     <wsdl:port name="HelloWorld__SOAPHTTPPort"
> binding="tns:HelloWorld__SOAPBinding">
>     </wsdl:port>
>   </wsdl:service>
> 
> 
> There are two issues in the code here but I'm going to need some help to
> determine a final fix
> 
> Firstly there is code, for example, in Axis2ServiceClient.setServicePort
> that makes a decision about whether the binding definition in the composite
> file references a service or just a portType.
> 
>         WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
>         if (wsBinding.getBinding() == null) {
>             InterfaceContract ic = wsBinding.getBindingInterfaceContract();
>             WSDLInterface wi = (WSDLInterface)ic.getInterface();
>             Service service = helper.createService(wsdlDefinition,
> wi.getPortType());
>             Port port = (Port)service.getPorts().values().iterator().next();
>             wsBinding.setService(service);
>             wsBinding.setPort(port);
>             wsBinding.setBinding(port.getBinding());
>         } else {
>             Service service = helper.createService(wsdlDefinition,
> wsBinding.getBinding());
>             Port port = (Port)service.getPorts().values().iterator().next();
>             wsBinding.setService(service);
>             wsBinding.setPort(port);
>         }
> 
> If it thinks the binding is null it goes ahead and adds a new binding,
> service and port. This is why you are seeing this extra information in the
> WSDL file. There should probably a test here to look at the WSDL interface
> and see if there is already a binding that will do the job.
> 
This would be a worthwhile optimization, though not essential to fix
the immediate bug.  The same approach could also be used to find a
service/port that will do the job, if these exist.

   Simon

> Secondly, when it does go ahead and creates a service the code in
> WSDLDefinitionHelper.createPort() has some lines commented out...
> 
>     protected Port createPort(Definition definition, Binding binding,
> Service service) throws WSDLException {
>         Port port = definition.createPort();
>         port.setBinding(binding);
>         configurePort(definition, port, binding);
>         /*
>         ExtensibilityElement soapAddress =
>             definition.getExtensionRegistry().createExtension(Port.class,
> SOAP_ADDRESS);
>         ((SOAPAddress)soapAddress).setLocationURI("");
>         port.addExtensibilityElement(soapAddress);
>         */
>         service.addPort(port);
>         return port;
> 
> Which means that the port will not have address information. With this code
> though even if it were active the location would be empty so there should
> probably be more logic to determine if the URI on the binding has been
> manually set and use the location from there.
> 
> I welcome feedback on anyone who is familiar with this are in case there is
> deeper thinking about the changes that have been made to this logic.
> 
> Regards
> 
> Simon
> 
> 
> ==========================================================
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="helloworld"
> targetNamespace="http://helloworld"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="http://helloworld">
>   <wsdl:types>
>     <schema elementFormDefault="qualified"
> targetNamespace="http://helloworld"
> xmlns="http://www.w3.org/2001/XMLSchema">
> 
>             <element name="getGreetings">
>                 <complexType>
>                     <sequence>
>                         <element name="name" type="tns:Name"/>
>                     </sequence>
> 
>                 </complexType>
>             </element>
> 
>             <element name="getGreetingsResponse">
>                 <complexType>
>                     <sequence>
>                         <element name="getGreetingsReturn" type="xsd:string"/>
>                     </sequence>
>                 </complexType>
> 
>             </element>
> 
>             <complexType name="Name">
>                 <sequence>
>                     <element name="first" type="xsd:string"/>
>                     <element name="last" type="xsd:string"/>
>                 </sequence>
>             </complexType>
> 
>         </schema>
> 
>   </wsdl:types>
>   <wsdl:message name="getGreetingsResponse">
>     <wsdl:part name="parameters" element="tns:getGreetingsResponse">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="getGreetingsRequest">
>     <wsdl:part name="parameters" element="tns:getGreetings">
>     </wsdl:part>
>   </wsdl:message>
> 
>   <wsdl:portType name="HelloWorld">
>     <wsdl:operation name="getGreetings">
>       <wsdl:input name="getGreetingsRequest" message="tns:getGreetingsRequest">
>     </wsdl:input>
>       <wsdl:output name="getGreetingsResponse"
> message="tns:getGreetingsResponse">
>     </wsdl:output>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="HelloWorld__SOAPBinding" type="tns:HelloWorld">
> 
>     <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="getGreetings">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="getGreetingsRequest">
>         <wsdlsoap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output name="getGreetingsResponse">
>         <wsdlsoap:body use="literal"/>
>       </wsdl:output>
> 
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
>     <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="getGreetings">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="getGreetingsRequest">
>         <wsdlsoap:body use="literal"/>
>       </wsdl:input>
> 
>       <wsdl:output name="getGreetingsResponse">
>         <wsdlsoap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="HelloWorld__Service">
>     <wsdl:port name="HelloWorld__SOAPHTTPPort"
> binding="tns:HelloWorld__SOAPBinding">
>     </wsdl:port>
>   </wsdl:service>
> 
>   <wsdl:service name="HelloWorldService">
>     <wsdl:port name="HelloWorldSoapPort" binding="tns:HelloWorldSoapBinding">
>       <wsdlsoap:address location="http://192.168.247.1:8085/HelloWorldService"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <da...@gmail.com>
wrote:

> Hey Simon,
>
> Thanks for the response.
>
> Indeed this is a change in Tuscany behaviour - using the same service
> running under 1.0-incubating or 1.1-incubating the WSDL generated is
> as expected.  This problem only appears to have started recently with
> 1.2.
>
> Cheers,
>
> Dave.
>
> On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com>
> wrote:
> > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
> >  wrote:
> >
> >
> >
> >  > Hi,
> >  >
> >  > I'm currently facing issues when attmepting to utilise the wsdl
> >  > generated by a service exposed using binding.ws, when I use wsdl2java
> >  > with this wsdl I get the following exception:
> >  >
> >  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
> >  > Emitter failure.  Cannot find endpoint address in port
> >  > ServiceRequestPortType__SOAPHTTPPort in service
> >  > ServiceRequestPortType__ServiceLocator
> >  >    java.io.IOException: Emitter failure.  Cannot find endpoint
> >  > address in port ServiceRequestPortType__SOAPHTTPPort in service
> >  > ServiceRequestPortType__ServiceLocator
> >  >    at
> >  >
> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
> >  >    at
> org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
> >  >    at
> >  >
> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
> >  >    at
> >  >
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> >  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
> >  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> >  >    at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> >  >    at java.lang.Thread.run(Unknown Source)
> >  >
> >  > I've diffed a previously functioning wsdl against the currently
> (RC3a)
> >  > generated wsdl file, the difference causing this problem appears to
> be
> >  > the additional lines of:
> >  >
> >  >  <wsdl:service name="ServiceRequestPortType__Service">
> >  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> >  > binding="ns2:ServiceRequestPortType__SOAPBinding">
> >  >    </wsdl:port>
> >  >  </wsdl:service>
> >  >
> >  > Which without an address is causing wsdl2java to fail.
> >  >
> >  > Has anyone seen this before?  Or does anyone have any suggestions?
> >  >
> >  > Cheers,
> >  >
> >  > Dave.
> >  >
> >  > --
> >  > Dave Sowerby MEng MBCS
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >  >
> >  >
> >  Hi Dave
> >
> >  I don't have an immediate suggestion so I'd like to understand if this
> is a
> >  change in behavior in the Tuscany code that you are now seeing. I.e.
> The
> >  previously functioning WSDL that you diffed against. Was that also
> generated
> >  by Tuscany in the past? If so I'll go look at what changed and why.
> >
> >  As an aside I saw a post from Simon Nash saying that he is looking at
> the
> >  WSDL generation story afresh so hopefully we can make this runtime vs
> >  development story much more consistent.
> >
> >  Regards
> >
> >  Simon
> >
>
>
>
> --
> Dave Sowerby MEng MBCS
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>

Hi Dave

I just ran up samples/helloworld-ws-sdo and retrieved the auto-generated
wsdl by pointing my browser at http://l3aw203:8085/HelloWorldService?wsdl.
I've pasted the result in at the end of this message. The bottom line though
is that I see the service/port with missing address information.

  <wsdl:service name="HelloWorld__Service">
    <wsdl:port name="HelloWorld__SOAPHTTPPort"
binding="tns:HelloWorld__SOAPBinding">
    </wsdl:port>
  </wsdl:service>


There are two issues in the code here but I'm going to need some help to
determine a final fix

Firstly there is code, for example, in Axis2ServiceClient.setServicePort
that makes a decision about whether the binding definition in the composite
file references a service or just a portType.

        WSDLDefinitionHelper helper = new WSDLDefinitionHelper();
        if (wsBinding.getBinding() == null) {
            InterfaceContract ic = wsBinding.getBindingInterfaceContract();
            WSDLInterface wi = (WSDLInterface)ic.getInterface();
            Service service = helper.createService(wsdlDefinition,
wi.getPortType());
            Port port = (Port)service.getPorts().values().iterator().next();
            wsBinding.setService(service);
            wsBinding.setPort(port);
            wsBinding.setBinding(port.getBinding());
        } else {
            Service service = helper.createService(wsdlDefinition,
wsBinding.getBinding());
            Port port = (Port)service.getPorts().values().iterator().next();
            wsBinding.setService(service);
            wsBinding.setPort(port);
        }

If it thinks the binding is null it goes ahead and adds a new binding,
service and port. This is why you are seeing this extra information in the
WSDL file. There should probably a test here to look at the WSDL interface
and see if there is already a binding that will do the job.

Secondly, when it does go ahead and creates a service the code in
WSDLDefinitionHelper.createPort() has some lines commented out...

    protected Port createPort(Definition definition, Binding binding,
Service service) throws WSDLException {
        Port port = definition.createPort();
        port.setBinding(binding);
        configurePort(definition, port, binding);
        /*
        ExtensibilityElement soapAddress =
            definition.getExtensionRegistry().createExtension(Port.class,
SOAP_ADDRESS);
        ((SOAPAddress)soapAddress).setLocationURI("");
        port.addExtensibilityElement(soapAddress);
        */
        service.addPort(port);
        return port;

Which means that the port will not have address information. With this code
though even if it were active the location would be empty so there should
probably be more logic to determine if the URI on the binding has been
manually set and use the location from there.

I welcome feedback on anyone who is familiar with this are in case there is
deeper thinking about the changes that have been made to this logic.

Regards

Simon


==========================================================

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="helloworld"
targetNamespace="http://helloworld"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://helloworld">
  <wsdl:types>
    <schema elementFormDefault="qualified"
targetNamespace="http://helloworld"
xmlns="http://www.w3.org/2001/XMLSchema">

            <element name="getGreetings">
                <complexType>
                    <sequence>
                        <element name="name" type="tns:Name"/>
                    </sequence>

                </complexType>
            </element>

            <element name="getGreetingsResponse">
                <complexType>
                    <sequence>
                        <element name="getGreetingsReturn" type="xsd:string"/>
                    </sequence>
                </complexType>

            </element>

            <complexType name="Name">
                <sequence>
                    <element name="first" type="xsd:string"/>
                    <element name="last" type="xsd:string"/>
                </sequence>
            </complexType>

        </schema>

  </wsdl:types>
  <wsdl:message name="getGreetingsResponse">
    <wsdl:part name="parameters" element="tns:getGreetingsResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getGreetingsRequest">
    <wsdl:part name="parameters" element="tns:getGreetings">
    </wsdl:part>
  </wsdl:message>

  <wsdl:portType name="HelloWorld">
    <wsdl:operation name="getGreetings">
      <wsdl:input name="getGreetingsRequest" message="tns:getGreetingsRequest">
    </wsdl:input>
      <wsdl:output name="getGreetingsResponse"
message="tns:getGreetingsResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="HelloWorld__SOAPBinding" type="tns:HelloWorld">

    <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getGreetings">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getGreetingsRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getGreetingsResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>

    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
    <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getGreetings">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getGreetingsRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>

      <wsdl:output name="getGreetingsResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="HelloWorld__Service">
    <wsdl:port name="HelloWorld__SOAPHTTPPort"
binding="tns:HelloWorld__SOAPBinding">
    </wsdl:port>
  </wsdl:service>

  <wsdl:service name="HelloWorldService">
    <wsdl:port name="HelloWorldSoapPort" binding="tns:HelloWorldSoapBinding">
      <wsdlsoap:address location="http://192.168.247.1:8085/HelloWorldService"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Re: Problems with wsdl2java

Posted by Dave Sowerby <da...@gmail.com>.
Hey Simon,

Thanks for the response.

Indeed this is a change in Tuscany behaviour - using the same service
running under 1.0-incubating or 1.1-incubating the WSDL generated is
as expected.  This problem only appears to have started recently with
1.2.

Cheers,

Dave.

On Thu, Apr 10, 2008 at 10:40 PM, Simon Laws <si...@googlemail.com> wrote:
> On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
>  wrote:
>
>
>
>  > Hi,
>  >
>  > I'm currently facing issues when attmepting to utilise the wsdl
>  > generated by a service exposed using binding.ws, when I use wsdl2java
>  > with this wsdl I get the following exception:
>  >
>  > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
>  > Emitter failure.  Cannot find endpoint address in port
>  > ServiceRequestPortType__SOAPHTTPPort in service
>  > ServiceRequestPortType__ServiceLocator
>  >    java.io.IOException: Emitter failure.  Cannot find endpoint
>  > address in port ServiceRequestPortType__SOAPHTTPPort in service
>  > ServiceRequestPortType__ServiceLocator
>  >    at
>  > org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>  >    at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>  >    at
>  > org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>  >    at
>  > org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>  >    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>  >    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>  >    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>  >    at java.lang.Thread.run(Unknown Source)
>  >
>  > I've diffed a previously functioning wsdl against the currently (RC3a)
>  > generated wsdl file, the difference causing this problem appears to be
>  > the additional lines of:
>  >
>  >  <wsdl:service name="ServiceRequestPortType__Service">
>  >    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>  > binding="ns2:ServiceRequestPortType__SOAPBinding">
>  >    </wsdl:port>
>  >  </wsdl:service>
>  >
>  > Which without an address is causing wsdl2java to fail.
>  >
>  > Has anyone seen this before?  Or does anyone have any suggestions?
>  >
>  > Cheers,
>  >
>  > Dave.
>  >
>  > --
>  > Dave Sowerby MEng MBCS
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>  >
>  >
>  Hi Dave
>
>  I don't have an immediate suggestion so I'd like to understand if this is a
>  change in behavior in the Tuscany code that you are now seeing. I.e. The
>  previously functioning WSDL that you diffed against. Was that also generated
>  by Tuscany in the past? If so I'll go look at what changed and why.
>
>  As an aside I saw a post from Simon Nash saying that he is looking at the
>  WSDL generation story afresh so hopefully we can make this runtime vs
>  development story much more consistent.
>
>  Regards
>
>  Simon
>



-- 
Dave Sowerby MEng MBCS

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Nash <na...@apache.org>.
Simon Laws wrote:
> I uncommented the lines in this code
> 
>     protected Port createPort(Definition definition, Binding binding,
> Service service) throws WSDLException {
>         Port port = definition.createPort();
>         port.setBinding(binding);
>         configurePort(definition, port, binding);
>         /*
>         ExtensibilityElement soapAddress =
>             definition.getExtensionRegistry().createExtension(Port.class,
> SOAP_ADDRESS);
>         ((SOAPAddress)soapAddress).setLocationURI("");
>         port.addExtensibilityElement(soapAddress);
>         */
>         service.addPort(port);
>         return port;
> 
> And now ?wsdl returns
> 
> <wsdl:service name="HelloWorld__Service">
>     <wsdl:port name="HelloWorld__SOAPHTTPPort"
> binding="tns:HelloWorld__SOAPBinding">
> <wsdlsoap:address location="http://192.168.247.1:8085/HelloWorldService"/>
> </wsdl:port>
> </wsdl:service>
> 
> So the URI must be inserted later on from the binding URI. My hunch was
> wrong there. Why are these lines commented out?
> 
> Simon
> 
I have been investigating how this used to work before the code
change in r633216.

If these lines in createPort() are uncommented, a WSDL document with
a soap:address URI of "" is passed to Axis2 to create the service.

This may seem like a problem, but actually it's OK.  On the client
side, the correct URI is computed by getWSATOEPR() when creating
the Axis2 binding invoker.  On the service side, the correct URI
is computed and added to the servlet host.

When "?wsdl" is sent to the Axis2 servlet, Axis2 is smart enough
to use the actual URI from the "?wsdl" invocation and insert that
in the WSDL document that it returns, overriding the "" that was
put there by Tuscany.

So I believe that uncommenting these lines in createPort() would
provide a fix (or at least an acceptable workaround for now).

   Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Raymond Feng <en...@gmail.com>.
Hi, Simon.

You had so many responses on this thread and I had to find the right one to 
reply :-).

1) IIRC, it was me who commented out the code to set the soap:address as I 
was getting some problems with the empty location URI. Ideally the uri 
should from the binding.uri. To make that happen, we need to do some code 
refactoring to pass the uri in.

2) The WSDLDefinitionGenerator is the seed code for the efforts to implement 
java2wsdl from Tuscany's Interface/Operation model. I checked in the initial 
code and Simon Nash is working on it. See 
http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg30162.html.

Thanks,
Raymond

--------------------------------------------------
From: "Simon Laws" <si...@googlemail.com>
Sent: Friday, April 11, 2008 7:26 AM
To: <tu...@ws.apache.org>
Subject: Re: Problems with wsdl2java

> On Fri, Apr 11, 2008 at 3:17 PM, Simon Laws <si...@googlemail.com>
> wrote:
>
>> I uncommented the lines in this code
>>
>>     protected Port createPort(Definition definition, Binding binding,
>> Service service) throws WSDLException {
>>         Port port = definition.createPort();
>>         port.setBinding(binding);
>>         configurePort(definition, port, binding);
>>         /*
>>         ExtensibilityElement soapAddress =
>>             definition.getExtensionRegistry
>> ().createExtension(Port.class, SOAP_ADDRESS);
>>         ((SOAPAddress)soapAddress).setLocationURI("");
>>         port.addExtensibilityElement(soapAddress);
>>         */
>>         service.addPort(port);
>>         return port;
>>
>> And now ?wsdl returns
>>
>> <wsdl:service name="HelloWorld__Service">
>>     <wsdl:port name="HelloWorld__SOAPHTTPPort"
>> binding="tns:HelloWorld__SOAPBinding">
>> <wsdlsoap:address 
>> location="http://192.168.247.1:8085/HelloWorldService"/>
>> </wsdl:port>
>> </wsdl:service>
>>
>> So the URI must be inserted later on from the binding URI. My hunch was
>> wrong there. Why are these lines commented out?
>>
>> Simon
>>
>>
> Another thing that I notice is that there seems to be pretty much the same
> code in
>
> interface-wsdl-java2wsdl/o.a.t.s.interfacedef.wsdl.interface2wsdl.WSDLDefinitionGenerator.java
> binding-ws-axis2/o.a.t.s.binding.ws.axis2.WSDLDefinitionHelper.java
>
> Apart from the addition of a  createTypes(Definition definition)  method 
> to
> WSDLDefintionGenerator.
>
> Why do we have two copies of this code?
>
> Simon
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Apr 11, 2008 at 3:17 PM, Simon Laws <si...@googlemail.com>
wrote:

> I uncommented the lines in this code
>
>     protected Port createPort(Definition definition, Binding binding,
> Service service) throws WSDLException {
>         Port port = definition.createPort();
>         port.setBinding(binding);
>         configurePort(definition, port, binding);
>         /*
>         ExtensibilityElement soapAddress =
>             definition.getExtensionRegistry
> ().createExtension(Port.class, SOAP_ADDRESS);
>         ((SOAPAddress)soapAddress).setLocationURI("");
>         port.addExtensibilityElement(soapAddress);
>         */
>         service.addPort(port);
>         return port;
>
> And now ?wsdl returns
>
> <wsdl:service name="HelloWorld__Service">
>     <wsdl:port name="HelloWorld__SOAPHTTPPort"
> binding="tns:HelloWorld__SOAPBinding">
> <wsdlsoap:address location="http://192.168.247.1:8085/HelloWorldService"/>
> </wsdl:port>
> </wsdl:service>
>
> So the URI must be inserted later on from the binding URI. My hunch was
> wrong there. Why are these lines commented out?
>
> Simon
>
>
Another thing that I notice is that there seems to be pretty much the same
code in

interface-wsdl-java2wsdl/o.a.t.s.interfacedef.wsdl.interface2wsdl.WSDLDefinitionGenerator.java
binding-ws-axis2/o.a.t.s.binding.ws.axis2.WSDLDefinitionHelper.java

Apart from the addition of a  createTypes(Definition definition)  method to
WSDLDefintionGenerator.

Why do we have two copies of this code?

Simon

Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
I uncommented the lines in this code

    protected Port createPort(Definition definition, Binding binding,
Service service) throws WSDLException {
        Port port = definition.createPort();
        port.setBinding(binding);
        configurePort(definition, port, binding);
        /*
        ExtensibilityElement soapAddress =
            definition.getExtensionRegistry().createExtension(Port.class,
SOAP_ADDRESS);
        ((SOAPAddress)soapAddress).setLocationURI("");
        port.addExtensibilityElement(soapAddress);
        */
        service.addPort(port);
        return port;

And now ?wsdl returns

<wsdl:service name="HelloWorld__Service">
    <wsdl:port name="HelloWorld__SOAPHTTPPort"
binding="tns:HelloWorld__SOAPBinding">
<wsdlsoap:address location="http://192.168.247.1:8085/HelloWorldService"/>
</wsdl:port>
</wsdl:service>

So the URI must be inserted later on from the binding URI. My hunch was
wrong there. Why are these lines commented out?

Simon

Re: Problems with wsdl2java

Posted by Simon Nash <na...@apache.org>.
Simon Laws wrote:
> On Fri, Apr 11, 2008 at 2:46 PM, Simon Nash <na...@apache.org> wrote:
> 
>> Simon Laws wrote:
>>
>>> On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
>>> wrote:
>>>
>>>  Hi,
>>>> I'm currently facing issues when attmepting to utilise the wsdl
>>>> generated by a service exposed using binding.ws, when I use wsdl2java
>>>> with this wsdl I get the following exception:
>>>>
>>>> IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
>>>> Emitter failure.  Cannot find endpoint address in port
>>>> ServiceRequestPortType__SOAPHTTPPort in service
>>>> ServiceRequestPortType__ServiceLocator
>>>>   java.io.IOException: Emitter failure.  Cannot find endpoint
>>>> address in port ServiceRequestPortType__SOAPHTTPPort in service
>>>> ServiceRequestPortType__ServiceLocator
>>>>   at
>>>>
>>>> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>>>>   at
>>>> org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>>>>   at
>>>>
>>>> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>>>>   at
>>>>
>>>> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>>>>   at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>>>>   at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>>>>   at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>>>>   at java.lang.Thread.run(Unknown Source)
>>>>
>>>> I've diffed a previously functioning wsdl against the currently (RC3a)
>>>> generated wsdl file, the difference causing this problem appears to be
>>>> the additional lines of:
>>>>
>>>>  <wsdl:service name="ServiceRequestPortType__Service">
>>>>   <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>>>> binding="ns2:ServiceRequestPortType__SOAPBinding">
>>>>   </wsdl:port>
>>>>  </wsdl:service>
>>>>
>>>> Which without an address is causing wsdl2java to fail.
>>>>
>>>> Has anyone seen this before?  Or does anyone have any suggestions?
>>>>
>>>> Cheers,
>>>>
>>>> Dave.
>>>>
>>>> --
>>>> Dave Sowerby MEng MBCS
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>>>
>>>>
>>>>  Hi Dave
>>> I don't have an immediate suggestion so I'd like to understand if this
>>> is a
>>> change in behavior in the Tuscany code that you are now seeing. I.e. The
>>> previously functioning WSDL that you diffed against. Was that also
>>> generated
>>> by Tuscany in the past? If so I'll go look at what changed and why.
>>>
>>> As an aside I saw a post from Simon Nash saying that he is looking at
>>> the
>>> WSDL generation story afresh so hopefully we can make this runtime vs
>>> development story much more consistent.
>>>
>>>  I haven't had an opportunity to do a full investigation of this yet.
>> My understanding of Dave's post is that this is a regression in Tuscany's
>> runtime behaviour for WSDL generation,
> 
> 
> Agreed
> 
> 
>> not an inconsistency between how
>> Tuscany generates WSDL at development time and runtime.
> 
> 
> Where was this suggested? Is there some conversation thread I've missed?
> 
This is how I took one of your earlier responses on this thread
which mentioned my name and said I was working on improved
consistency between runtime and development-time WSDL generation.
My apologies for misinterpreting what you were saying.

   Simon
> 
>> From Dave's description, Tuscany SCA Java 1.2 is generating WSDL at
>> runtime that's invalid and therefore can't be processed by other tools.
>> If correct, this would be a very serious problem and we would need to
>> consider whether it's OK to release 1.2 with this regression.
> 
> 
> Agreed
> 
> 
>>
>> I'll try to find time later today to look at this and confirm how
>> serious the problem is.
>>
>>  Simon
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Apr 11, 2008 at 2:46 PM, Simon Nash <na...@apache.org> wrote:

> Simon Laws wrote:
>
> > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
> > wrote:
> >
> >  Hi,
> > >
> > > I'm currently facing issues when attmepting to utilise the wsdl
> > > generated by a service exposed using binding.ws, when I use wsdl2java
> > > with this wsdl I get the following exception:
> > >
> > > IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
> > > Emitter failure.  Cannot find endpoint address in port
> > > ServiceRequestPortType__SOAPHTTPPort in service
> > > ServiceRequestPortType__ServiceLocator
> > >   java.io.IOException: Emitter failure.  Cannot find endpoint
> > > address in port ServiceRequestPortType__SOAPHTTPPort in service
> > > ServiceRequestPortType__ServiceLocator
> > >   at
> > >
> > > org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
> > >   at
> > > org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
> > >   at
> > >
> > > org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
> > >   at
> > >
> > > org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> > >   at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
> > >   at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
> > >   at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
> > >   at java.lang.Thread.run(Unknown Source)
> > >
> > > I've diffed a previously functioning wsdl against the currently (RC3a)
> > > generated wsdl file, the difference causing this problem appears to be
> > > the additional lines of:
> > >
> > >  <wsdl:service name="ServiceRequestPortType__Service">
> > >   <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> > > binding="ns2:ServiceRequestPortType__SOAPBinding">
> > >   </wsdl:port>
> > >  </wsdl:service>
> > >
> > > Which without an address is causing wsdl2java to fail.
> > >
> > > Has anyone seen this before?  Or does anyone have any suggestions?
> > >
> > > Cheers,
> > >
> > > Dave.
> > >
> > > --
> > > Dave Sowerby MEng MBCS
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> > >  Hi Dave
> >
> > I don't have an immediate suggestion so I'd like to understand if this
> > is a
> > change in behavior in the Tuscany code that you are now seeing. I.e. The
> > previously functioning WSDL that you diffed against. Was that also
> > generated
> > by Tuscany in the past? If so I'll go look at what changed and why.
> >
> > As an aside I saw a post from Simon Nash saying that he is looking at
> > the
> > WSDL generation story afresh so hopefully we can make this runtime vs
> > development story much more consistent.
> >
> >  I haven't had an opportunity to do a full investigation of this yet.
> My understanding of Dave's post is that this is a regression in Tuscany's
> runtime behaviour for WSDL generation,


Agreed


> not an inconsistency between how
> Tuscany generates WSDL at development time and runtime.


Where was this suggested? Is there some conversation thread I've missed?


>
> From Dave's description, Tuscany SCA Java 1.2 is generating WSDL at
> runtime that's invalid and therefore can't be processed by other tools.
> If correct, this would be a very serious problem and we would need to
> consider whether it's OK to release 1.2 with this regression.


Agreed


>
>
> I'll try to find time later today to look at this and confirm how
> serious the problem is.
>
>  Simon
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Problems with wsdl2java

Posted by Simon Nash <na...@apache.org>.
Simon Laws wrote:
> On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
> wrote:
> 
>> Hi,
>>
>> I'm currently facing issues when attmepting to utilise the wsdl
>> generated by a service exposed using binding.ws, when I use wsdl2java
>> with this wsdl I get the following exception:
>>
>> IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
>> Emitter failure.  Cannot find endpoint address in port
>> ServiceRequestPortType__SOAPHTTPPort in service
>> ServiceRequestPortType__ServiceLocator
>>    java.io.IOException: Emitter failure.  Cannot find endpoint
>> address in port ServiceRequestPortType__SOAPHTTPPort in service
>> ServiceRequestPortType__ServiceLocator
>>    at
>> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>>    at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>>    at
>> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>>    at
>> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>>    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>>    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>>    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>>    at java.lang.Thread.run(Unknown Source)
>>
>> I've diffed a previously functioning wsdl against the currently (RC3a)
>> generated wsdl file, the difference causing this problem appears to be
>> the additional lines of:
>>
>>  <wsdl:service name="ServiceRequestPortType__Service">
>>    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
>> binding="ns2:ServiceRequestPortType__SOAPBinding">
>>    </wsdl:port>
>>  </wsdl:service>
>>
>> Which without an address is causing wsdl2java to fail.
>>
>> Has anyone seen this before?  Or does anyone have any suggestions?
>>
>> Cheers,
>>
>> Dave.
>>
>> --
>> Dave Sowerby MEng MBCS
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
> Hi Dave
> 
> I don't have an immediate suggestion so I'd like to understand if this is a
> change in behavior in the Tuscany code that you are now seeing. I.e. The
> previously functioning WSDL that you diffed against. Was that also generated
> by Tuscany in the past? If so I'll go look at what changed and why.
> 
> As an aside I saw a post from Simon Nash saying that he is looking at the
> WSDL generation story afresh so hopefully we can make this runtime vs
> development story much more consistent.
> 
I haven't had an opportunity to do a full investigation of this yet.
My understanding of Dave's post is that this is a regression in Tuscany's
runtime behaviour for WSDL generation, not an inconsistency between how
Tuscany generates WSDL at development time and runtime.

 From Dave's description, Tuscany SCA Java 1.2 is generating WSDL at
runtime that's invalid and therefore can't be processed by other tools.
If correct, this would be a very serious problem and we would need to
consider whether it's OK to release 1.2 with this regression.

I'll try to find time later today to look at this and confirm how
serious the problem is.

   Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Problems with wsdl2java

Posted by Simon Laws <si...@googlemail.com>.
On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby <da...@gmail.com>
wrote:

> Hi,
>
> I'm currently facing issues when attmepting to utilise the wsdl
> generated by a service exposed using binding.ws, when I use wsdl2java
> with this wsdl I get the following exception:
>
> IWAB0399E Error in generating Java from WSDL:  java.io.IOException:
> Emitter failure.  Cannot find endpoint address in port
> ServiceRequestPortType__SOAPHTTPPort in service
> ServiceRequestPortType__ServiceLocator
>    java.io.IOException: Emitter failure.  Cannot find endpoint
> address in port ServiceRequestPortType__SOAPHTTPPort in service
> ServiceRequestPortType__ServiceLocator
>    at
> org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.java:189)
>    at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
>    at
> org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112)
>    at
> org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
>    at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476)
>    at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
>    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
>    at java.lang.Thread.run(Unknown Source)
>
> I've diffed a previously functioning wsdl against the currently (RC3a)
> generated wsdl file, the difference causing this problem appears to be
> the additional lines of:
>
>  <wsdl:service name="ServiceRequestPortType__Service">
>    <wsdl:port name="ServiceRequestPortType__SOAPHTTPPort"
> binding="ns2:ServiceRequestPortType__SOAPBinding">
>    </wsdl:port>
>  </wsdl:service>
>
> Which without an address is causing wsdl2java to fail.
>
> Has anyone seen this before?  Or does anyone have any suggestions?
>
> Cheers,
>
> Dave.
>
> --
> Dave Sowerby MEng MBCS
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>
Hi Dave

I don't have an immediate suggestion so I'd like to understand if this is a
change in behavior in the Tuscany code that you are now seeing. I.e. The
previously functioning WSDL that you diffed against. Was that also generated
by Tuscany in the past? If so I'll go look at what changed and why.

As an aside I saw a post from Simon Nash saying that he is looking at the
WSDL generation story afresh so hopefully we can make this runtime vs
development story much more consistent.

Regards

Simon