Hi, I've followed the advice from Raymond in order to be able to call a remote 
Web service that is not under the control of tuscany.
I'm facing the problem that when I invoke the (Axis2) service, I get an 
exception that indicates a problem with the namespace.
Can anybody give me an hint what I'm doing wrong?
thanks very much in advance

Albert

SCHWERWIEGEND: Exception occurred while trying to invoke service method addiere
org.apache.axis2.AxisFault: namespace mismatch require http://move.at/xsd found
http://move.at
        at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic
(RPCMessageReceiver.java:103)
        at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(A
bstractInOutSyncMessageReceiver.java:39)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:279)
        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
16)  ...



The Implementation of the service looks like:

package at.move;
public class MathService {
        public double addiere(double a,double b){
                return a+b;
        }
        public int aufrunden(double a){
                return (int)Math.ceil(a);
        }
}
    
Deployed at http://localhost:8080/zong    

            
The WSDL is auto-generated by AXIS2. (For some reasons I do not know AXIS adds 
'xsd' to the namespace)
(WSDL files from the tuscany samples do not show that /xsd suffix)
 
...    
<wsdl:types>
        <xs:schema attributeFormDefault="qualified" 
elementFormDefault="qualified" targetNamespace="http://move.at/xsd";>
                <xs:element name="addiere">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="a" nillable="true" 
type="xs:double"/>
                                <xs:element name="b" nillable="true" 
type="xs:double"/>
                        </xs:sequence>
                </xs:complexType>   
   ... 
   
In another web application I have (from the calculator example):

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
           targetNamespace="http://sample";
           xmlns:sample="http://sample";
           name="Calculator"> 
<component name="CalculatorServiceComponent">
                <implementation.java class="calculator.CalculatorServiceImpl"/> 
      
                <reference name="addService">         
            <binding.ws uri="http://localhost:8080/zong/services/MathService"; 
/>        
        </reference>
    </component>
    ...
    
    
 I have an Interface:
 
 package at.move;
 import org.osoa.sca.annotations.Remotable;

/**
 * The interface for the add service
 */
@Remotable
public interface RemoteMathService {

    double addiere(double n1, double n2);
    public int aufrunden(double a);

}

And a calculator implementation:

...
private RemoteMathService addService;

@Reference
public void setAddService(RemoteMathService addService) {
this.addService = addService;
}

public double add(double n1, double n2) {
     return addService.addiere(n1, n2);
}

The application is deployed at http://localhost:8080/sample-calculator-ws-webapp
----------------------------------------------------------------
Dr. Albert Rainer
EC3 - Electronic Commerce Competence Center
www.ec3.at
Donau-City Strasse 1
A-1220 Wien
Tel: +43 1 522 71 71 - 33
Fax: +43 1 522 71 71 - 71


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

Reply via email to