On Mon, Apr 14, 2008 at 5:50 AM, Simon Nash <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]>
> > Sent: Sunday, April 13, 2008 12:05 PM
> > To: <tuscany-dev@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 <[EMAIL PROTECTED]> wrote:
> > >
> > > > One comment inline.
> > > >
> > > >  Simon
> > > >
> > > >
> > > >
> > > >  Simon Laws wrote:
> > > >
> > > > > On Fri, Apr 11, 2008 at 7:51 AM, Dave Sowerby <
> > > > [EMAIL PROTECTED]>
> > > > > 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 > > <
> > > > [EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > >
> > > > > > > On Thu, Apr 10, 2008 at 12:29 PM, Dave Sowerby
> > > > <[EMAIL PROTECTED]>
> > > > > > >  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:
> > > > [EMAIL PROTECTED]
> > > > > > >  > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > > > > >  >
> > > > > > >  >
> > > > > > >  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: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > >
> > > > > 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: [EMAIL PROTECTED]
> > > >  For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Luciano Resende
> > > Apache Tuscany Committer
> > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> > > http://lresende.blogspot.com/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> Thanks Raymond

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

Simon

Reply via email to