Hi,

I tried the above. It is true that Java2WSDL generates two bindings,
one for SOAP 1.1 and one for SOAP 1.2. However, this is not accepted
by Tuscany and an exception is thrown on server startup:

SEVERE: exception initializing SCADomain
org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
        at 
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:264)
        at 
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:82)
        at 
org.apache.tuscany.sca.webapp.SCADomainHelper.initSCADomain(SCADomainHelper.java:63)
        at 
org.apache.tuscany.sca.webapp.TuscanyContextListener.contextInitialized(TuscanyContextListener.java:37)
        at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
        at 
org.apache.tuscany.sca.binding.ws.xml.WebServiceBindingProcessor.resolve(WebServiceBindingProcessor.java:236)
        at 
org.apache.tuscany.sca.binding.ws.xml.WebServiceBindingProcessor.resolve(WebServiceBindingProcessor.java:57)
        at 
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:102)
        at 
org.apache.tuscany.sca.assembly.xml.BaseArtifactProcessor.resolveContracts(BaseArtifactProcessor.java:414)
        at 
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:569)
        at 
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:66)
        at 
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:102)
        at 
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:86)
        at 
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:43)
        at 
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve(ExtensibleURLArtifactProcessor.java:73)
        at 
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase(ContributionServiceImpl.java:412)
        at 
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:339)
        at 
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:154)
        at 
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:113)
        at 
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:230)
        ... 18 more

Is it a bug in Tuscany or is there anything wrong in my WSDL? My WSDL is:

<wsdl:definitions
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:xsd="http://helloworld/xsd"; xmlns:ns="http://helloworld";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
targetNamespace="http://helloworld";>
        <wsdl:types>
                <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://helloworld/xsd";>
                        <xs:element name="getGreetings">
                                <xs:complexType>
                                        <xs:sequence>
                                                <xs:element name="param0" 
nillable="true" type="xs:string"/>
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="getGreetingsResponse">
                                <xs:complexType>
                                        <xs:sequence>
                                                <xs:element name="return" 
nillable="true" type="xsd:ComplexTypeTest"/>
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="ComplexTypeTest" 
type="xsd:ComplexTypeTest"/>
                        <xs:complexType name="ComplexTypeTest">
                                <xs:sequence>
                                        <xs:element name="age" type="xs:long"/>
                                        <xs:element name="firstName" 
nillable="true" type="xs:string"/>
                                        <xs:element name="lastName" 
nillable="true" type="xs:string"/>
                                </xs:sequence>
                        </xs:complexType>
                </xs:schema>
        </wsdl:types>
        <wsdl:message name="getGreetingsMessage">
                <wsdl:part name="part1" element="xsd:getGreetings"/>
        </wsdl:message>
        <wsdl:message name="getGreetingsResponseMessage">
                <wsdl:part name="part1" element="xsd:getGreetingsResponse"/>
        </wsdl:message>
        <wsdl:portType name="HelloWorldServicePortType">
                <wsdl:operation name="getGreetings">
                        <wsdl:input 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
wsaw:Action="urn:getGreetings" message="ns:getGreetingsMessage"/>
                        <wsdl:output 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
message="ns:getGreetingsResponseMessage"
wsaw:Action="urn:getGreetings"/>
                </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="HelloWorldServiceSOAP11Binding"
type="ns:HelloWorldServicePortType">
                <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>
                <wsdl:operation name="getGreetings">
                        <soap:operation soapAction="urn:getGreetings" 
style="document"/>
                        <wsdl:input>
                                <soap:body use="literal"/>
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal"/>
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:binding name="HelloWorldServiceSOAP12Binding"
type="ns:HelloWorldServicePortType">
                <soap12:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>
                <wsdl:operation name="getGreetings">
                        <soap12:operation soapAction="urn:getGreetings" 
style="document"/>
                        <wsdl:input>
                                <soap12:body use="literal"/>
                        </wsdl:input>
                        <wsdl:output>
                                <soap12:body use="literal"/>
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="HelloWorldService">
                <wsdl:port name="HelloWorldServiceSOAP11port"
binding="ns:HelloWorldServiceSOAP11Binding">
                        <soap:address
location="http://localhost:8080/axis2/services/HelloWorldService"/>
                </wsdl:port>
                <wsdl:port name="HelloWorldServiceSOAP12port"
binding="ns:HelloWorldServiceSOAP12Binding">
                        <soap12:address
location="http://localhost:8080/axis2/services/HelloWorldService"/>
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>


Best regards,
Radim

On 8/6/07, Scott Kurz <[EMAIL PROTECTED]> wrote:
> Hi, what you're seeing is the tool generating a port for each of the SOAP
> 1.1 / HTTP and SOAP 1.2 / HTTP bindings.
> As far as why they are both generated by default... well.. I guess that was
> just a decision someone made.
>
> Scott
>
> On 8/6/07, Nishant Joshi <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > When i have generated wsdl by Tuscany Java2WSDL, It generate wsdl with 2
> > port in service, I did not understand why 2 port is generated?.I have also
> > tried it with axis2 Java2WSDL same problem is there, as Tuscany Java2WSDL
> > is
> > just a wrap over axis2 as mention by Venkata Krishnan.
> >
> >
> > thanks in advance
> > --
> > Nishant Joshi
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to