Michael Dehmlow wrote:
I'm Having a hard time creating a Web Service using Tuscany and the Eclipse IDE:

My Composite is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"; xmlns:hw="http://math.company.com"; name="calculator" targetNamespace="http://com.company.math";>
  <component name="AServiceComponent">
    <implementation.java class="com.company.math.MathServerImpl"/>
    <service name="MathService">
<interface.wsdl wsdlLocation="MathService.wsdl" interface="http://math.company.com#wsdl.interface(MathServer)"/>
      <binding.ws <http://binding.ws> uri="http://localhost:8085/ms"/>
    </service>
  </component>
</composite>


My WSDL Is as such:

<?xml version="1.0" encoding="UTF-8"?>
<!--
    * Licensed to the Apache Software Foundation (ASF) under one
    * or more contributor license agreements.  See the NOTICE file
    * distributed with this work for additional information
    * regarding copyright ownership.  The ASF licenses this file
    * to you under the Apache License, Version 2.0 (the
    * "License"); you may not use this file except in compliance
    * with the License.  You may obtain a copy of the License at
    *
    *   http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing,
    * software distributed under the License is distributed on an
    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    * KIND, either express or implied.  See the License for the
    * specific language governing permissions and limitations
* under the License. --> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://math.company.com/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/"; name="MathService" targetNamespace="http://math.company.com/";>
    <message name="add">
        <part name="arg0" type="xsd:int"/>
        <part name="arg1" type="xsd:long"/>
    </message>
    <message name="subtract">
        <part name="arg0" type="xsd:int"/>
        <part name="arg1" type="xsd:long"/>
    </message>
    <message name="multiply">
        <part name="arg0" type="xsd:int"/>
        <part name="arg1" type="xsd:long"/>
    </message>
    <message name="divide">
        <part name="arg0" type="xsd:int"/>
        <part name="arg1" type="xsd:long"/>
    </message>
    <message name="mathResponse">
        <part name="return" type="xsd:long"/>
    </message>
    <portType name="MathServer">
        <operation name="add">
            <input message="tns:add"/>
            <output message="tns:mathResponse"/>
        </operation>
        <operation name="subtract">
            <input message="tns:subtract"/>
            <output message="tns:mathResponse"/>
        </operation>
        <operation name="multiply">
            <input message="tns:multiply"/>
            <output message="tns:mathResponse"/>
        </operation>
        <operation name="divide">
            <input message="tns:divide"/>
            <output message="tns:mathResponse"/>
        </operation>
    </portType>
    <binding name="MathPortBinding" type="tns:MathServer">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="add">
            <soap:operation soapAction=""/>
            <input>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </input>
            <output>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </output>
        </operation>
        <operation name="subtract">
            <soap:operation soapAction=""/>
            <input>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </input>
            <output>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </output>
        </operation>
        <operation name="multiply">
            <soap:operation soapAction=""/>
            <input>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </input>
            <output>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </output>
        </operation>
        <operation name="divide">
            <soap:operation soapAction=""/>
            <input>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </input>
            <output>
<soap:body use="literal" namespace="http://math.company.com/"/>
            </output>
        </operation>
    </binding>
    <service name="MathService">
        <port name="MathPort" binding="tns:MathPortBinding">
            <soap:address location="http://localhost:9989/ms"/>
        </port>
    </service>
</definitions>

I have successfully used the above prototype app to run using JAX-WS in java core 6 but when I run the this using the SCA plug-in I get:

Deploying calculator.composite...
Sep 21, 2009 10:16:07 AM org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: calculator.composite
Sep 21, 2009 10:16:08 AM org.apache.tuscany.sca.node.impl.NodeImpl configureNode INFO: Loading contribution: file:/C:/Users/mldehmlo/TuscanyWorkspace2/Calculator/bin/ Sep 21, 2009 10:16:08 AM org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl WARNING: Service not found for component service: Component = AServiceComponent Service = MathService Sep 21, 2009 10:16:08 AM org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl WARNING: Service not found for component service: Component = AServiceComponent Service = MathService Sep 21, 2009 10:16:08 AM org.apache.tuscany.sca.binding.ws.wsdlgen.WSDLServiceGenerator
SEVERE: No WSDL interface definition for MathService/{2}
java.lang.reflect.InvocationTargetException
    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:597)
at org.eclipse.stp.sca.deployment.mains.TuscanyMain1x.main(TuscanyMain1x.java:34) Caused by: org.osoa.sca.ServiceRuntimeException: No WSDL interface definition for MathService/{2} at org.apache.tuscany.sca.node.impl.NodeImpl.analyzeProblems(NodeImpl.java:701) at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:622)
    at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:196)
at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100) at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182) at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
...

The MathService.wsdl is in my source directory, the same package directory as my java impl, the root directory of the project, and in a folder I created called META-INF/wsdl.

I've tried not specifying the wsdlLocation, specifying sdlLocation="MathService.wsdl" and specifying wsdlLocation="META-INF/wsdl/MathService.wsdl"

Any Help? I'm using the plugin detailed here:
http://wiki.eclipse.org/STP/SCA_Component/SCA_Java_Run_and_Debug

Thanks.
>
Hi Michael,
Your WSDL file uses the namespace "http://math.company.com/";.  Your
composite file uses the namespace "http://math.company.com"; (no slash
at the end).  I think this is the reason for the error message.

  Simon

Reply via email to