Hi all,

I took Anne's (Anne Thomas Manes) advice and looked other implementations to learn the way out of my hiatus with document/literal. If anything, things look even worse. I probably have to RTFM more deeply, but now I am stuck with the most basic service/client example and thought that maybe my experience is useful for others. Of course any comments would he highly welcome.

Ok, so let's consider the simplest possible service to deploy:

--------------------------------------------------------------
/*
 * TestService.java
 */

package com.tamashauer.interop3;

public class TestService implements ITestService
{
    public String echo( String testString )
    {
        return "Echoing: " + testString;
    }
}
--------------------------------------------------------------

I get this service started using doc/lit on AXIS, WASP and GLUE succesfully. As for AXIS, this is the wsdd:

--------------------------------------------------------------
<deployment xmlns="http://xml.apache.org/axis/wsdd/";
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
    <service    name="TestService"  style="document">
        <parameter name="className"
                   value="com.tamashauer.interop3.TestService"/>
        <parameter name="allowedMethods" value="echo"/>
    </service>
</deployment>
--------------------------------------------------------------

I skip the GLUE and WASP deployment part, but it suffices to say
that in both those cases I can run the respective wsdl2java which
does generate a working client for me. The problems start when I want to generate clients to the service deployed on top of the "others".
The only working version is the GLUE client to the WASP server, none
of the others work (I skipped the wsdl2java from AXIS but I had
little success with that even when pointing to the AXIS service):


--------------------------------------------------------------
--- GLUE client to AXIS server: ------------------------------

1157:$ /home/thauer/TME/glue/bin/wsdl2java \
http://localhost:8080/axis/services/TestService?wsdl \
-p com.tamashauer.interop3.glue.axis
[STARTUP] GLUE Professional 4.1 (c) 2001-2003 The Mind Electric
evaluation expires on 7/16/03
electric.xml.io.schema.SchemaException: could not find a electric.xml.io.schema.SchemaElement with
qname http://schemas.xmlsoap.org/wsdl/:echoReturn
--------------------------------------------------------------


--------------------------------------------------------------
--- WASP client to AXIS server: ------------------------------


1202:$ /home/thauer/wasp451/bin/WSDL2Java \
--url http://127.0.0.1:8080/axis/services/TestService?wsdl \
-d /home/thauer/cvsroot/thauer/Soaping/sources \
-p com.tamashauer.interop3.wasp.axis
Exception : org.idoox.xml.schema.SchemaException: Can not get schema element for {http://schemas.xmlsoap.org/wsdl/}testString
-------------------------------------------------------------


--------------------------------------------------------------
--- WASP client to GLUE server: ------------------------------

1400:$ /home/thauer/wasp451/bin/WSDL2Java \
              --url http://127.0.0.1:8004/glue/TestService.wsdl \
              -d /home/thauer/cvsroot/thauer/Soaping/sources \
              -p com.tamashauer.interop3.wasp.glue
WARN: wasp.WSDLPortInfo - Unknown part <testString> in parameterOrder

--------------------------------------------------------------

I will try to attach an html file with more explanation and the
wsdl documents to this email,

Tamas

--
-------------------------------------------------------------------
--      Tamas Hauer          ETT Division, CERN
    [EMAIL PROTECTED]      Geneve 23 Switzerland 1211
 http://cern.ch/Tamas.Hauer  Tel:(41)-227672342  Fax:(41)-227678930
Title: GLUE-AXIS Interoperability



AXIS - GLUE -WASP Interoperability

Example codes

Following is the Service class which we want to deploy:

/*
* TestService.java
*/

package com.tamashauer.interop3;

public class TestService implements ITestService
{
public String echo( String testString )
{
return "Echoing: " + testString;
}
}

The service class implements the following interface.  This interface can then be used in the client programs

/*
* ITestService.java
*/

package com.tamashauer.interop3;

public interface ITestService {

public String echo( String testString );

}

Deployment of the service using GLUE on port 8004:

/*
* StartGLUEServer.java
*
* Created on June 17, 2003, 1:50 PM
*/

package com.tamashauer.interop3;

import electric.registry.Registry;
import electric.server.http.HTTP;
import electric.glue.context.ServiceContext;

public class StartServer {

public static void main(String[] args) throws Exception
{
HTTP.startup( "http://localhost:8004/glue" );

ServiceContext context = new ServiceContext();
context.setDocumentStyle();

Registry.publish( "TestService", new TestService(), context );
}
}

1338:$ cpath
/home/thauer/cvsroot/thauer/Soaping/sources
/home/thauer/TME/glue/lib/GLUE-ALL.jar
[EMAIL PROTECTED]:)---(.../thauer/Soaping/sources/com/tamashauer/interop3)-
1340:$ java -Delectric.logging="SOAP" com.tamashauer.interop3.StartGLUEServer


http://localhost:8004/glue/TestService.wsdl

<?xml version='1.0' encoding='UTF-8'?>
<!--generated by GLUE Professional 4.1 on Mon Jun 23 13:44:17 CEST 2003-->
<wsdl:definitions name='TestService'
targetNamespace='http://www.themindelectric.com/wsdl/TestService/'
xmlns:tns='http://www.themindelectric.com/wsdl/TestService/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
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://www.w3.org/2001/XMLSchema'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns:tme='http://www.themindelectric.com/'>
<wsdl:types>
<xsd:schema elementFormDefault='qualified' targetNamespace='http://www.themindelectric.com/wsdl/TestService/'>
<xsd:element name='echo'>
<xsd:complexType>
<xsd:sequence>
<xsd:element name='testString' type='xsd:string'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name='echoResponse'>
<xsd:complexType>
<xsd:sequence>
<xsd:element name='Result' type='xsd:string'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name='echo0In'>
<wsdl:part name='parameters' element='tns:echo'/>
</wsdl:message>
<wsdl:message name='echo0Out'>
<wsdl:part name='parameters' element='tns:echoResponse'/>
</wsdl:message>
<wsdl:portType name='TestService'>
<wsdl:operation name='echo' parameterOrder='testString'>
<wsdl:input name='echo0In' message='tns:echo0In'/>
<wsdl:output name='echo0Out' message='tns:echo0Out'/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name='TestService' type='tns:TestService'>
<soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
<tme:optimizations tag='1' href='' env='1'/>
<wsdl:operation name='echo'>
<soap:operation soapAction='echo' style='document'/>
<wsdl:input name='echo0In'>
<soap:body use='literal'/>
</wsdl:input>
<wsdl:output name='echo0Out'>
<soap:body use='literal'/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name='TestService'>
<wsdl:documentation>
instance of class com.tamashauer.interop3.TestService
</wsdl:documentation>
<wsdl:port name='TestService' binding='tns:TestService'>
<soap:address location='http://137.138.39.41:8004/glue/TestService'/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>



Deployment on top of WASP:

[EMAIL PROTECTED]:)----(/home/thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1352:$ /home/thauer/wasp451/bin/Deploy --target http://localhost:6060 \
--- --class com.tamashauer.interop3.TestService \
--- --classpath "/home/thauer/cvsroot/thauer/Soaping/sources" \
--- --uri /TestService
INFO: admin.PackageRepositoryImpl - Installing package /tmp/wasp_install_6580.jar
INFO: admin.PackageRepositoryImpl - Registering package [][http://my.org][TestService][1.0]
INFO: admin.PackageRepositoryImpl - Loading package [][http://my.org][TestService][1.0]
Succesfully deployed.


http://pcettmg01.cern.ch:6060/TestService

<?xml version='1.0'?>
<wsdl:definitions name='com.tamashauer.interop3.TestService' targetNamespace='http://systinet.com/wsdl/com/tamashauer/interop3/'
xmlns:tns='http://systinet.com/wsdl/com/tamashauer/interop3/'
xmlns:ns0='http://systinet.com/xsd/SchemaTypes/'
xmlns:map='http://systinet.com/mapping/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'>
<wsdl:types>
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://systinet.com/xsd/SchemaTypes/"
xmlns:map="http://systinet.com/mapping/"
xmlns:ns0="http://systinet.com/xsd/SchemaTypes/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://systinet.com/xsd/SchemaTypes/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="p0" nillable="true" type="xsd:string"/>
<xsd:element name="string_Response" nillable="true"
type="xsd:string"/>
</xsd:schema>

</wsdl:types>
<wsdl:message name='TestService_echo_Response'>
<wsdl:part name='response' element='ns0:string_Response'/>
</wsdl:message>
<wsdl:message name='TestService_echo_1_Request'>
<wsdl:part name='p0' element='ns0:p0'/>
</wsdl:message>
<wsdl:portType name='TestService'>
<wsdl:operation name='echo' parameterOrder='p0'>
<wsdl:input message='tns:TestService_echo_1_Request'/>
<wsdl:output message='tns:TestService_echo_Response'/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name='TestService' type='tns:TestService'>
<soap:binding transport='http://schemas.xmlsoap.org/soap/http' style='document'/>
<wsdl:operation name='echo'>
<map:java-operation name='echo' signature='KExqYXZhL2xhbmcvU3RyaW5nOylMamF2YS9sYW5nL1N0cmluZzs='/>
<soap:operation soapAction='http://systinet.com/wsdl/com/tamashauer/interop3/TestService#echo#KExqYXZhL2xhbmcvU3RyaW5nOylMamF2YS9sYW5nL1N0cmluZzs=' style='document'/>
<wsdl:input>
<soap:body use='literal'/>
</wsdl:input>
<wsdl:output>
<soap:body use='literal'/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name='JavaService'>
<wsdl:port name='TestService' binding='tns:TestService'>
<soap:address location='http://pcettmg01.cern.ch:6060/TestService'/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Deployment on top of AXIS:

[EMAIL PROTECTED]:)---(...thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1156:$ cat deploy.wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="TestService" style="document">
<parameter name="className" value="com.tamashauer.interop3.TestService"/>
<parameter name="allowedMethods" value="echo"/>
</service>
</deployment>

[EMAIL PROTECTED]:)---(...thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1156:$ axisclient deploy.wsdd
- Processing file deploy.wsdd
- <Admin>Done processing</Admin>

http://localhost:8080/axis/services/TestService?wsdl

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/TestService"
xmlns
="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap
="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8080/axis/services/TestService"
xmlns:intf="http://localhost:8080/axis/services/TestService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl
="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap
="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<element name="testString" type="xsd:string"/>
<element name="echoReturn" type="xsd:string"/>
</schema>
</wsdl:types>
<wsdl:message name="echoRequest">
<wsdl:part element="testString" name="testString"/>
</wsdl:message>
<wsdl:message name="echoResponse">
<wsdl:part element="echoReturn" name="echoReturn"/>
</wsdl:message>
<wsdl:portType name="TestService">
<wsdl:operation name="echo" parameterOrder="testString">
<wsdl:input message="impl:echoRequest" name="echoRequest"/>
<wsdl:output message="impl:echoResponse" name="echoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestServiceSoapBinding" type="impl:TestService">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echo">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="echoRequest">
<wsdlsoap:body namespace="http://localhost:8080/axis/services/TestService" use="literal"/>
</wsdl:input>
<wsdl:output name="echoResponse">
<wsdlsoap:body namespace="http://localhost:8080/axis/services/TestService" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestServiceService">
<wsdl:port binding="impl:TestServiceSoapBinding" name="TestService">
<wsdlsoap:address location="http://localhost:8080/axis/services/TestService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Create GLUE client:

[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/glue/glue)-
1342:$ /home/thauer/TME/glue/bin/wsdl2java http://localhost:8004/glue/TestService.wsdl -p com.tamashauer.interop3.glue.glue

[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/glue/glue)-
1345:$ ls -l
total 8
-rw-r--r-- 1 thauer users 200 Jun 23 13:45 ITestService.java
-rw-r--r-- 1 thauer users 538 Jun 23 13:45 TestServiceHelper.java

/*
* Client.java
*/
package com.tamashauer.interop3.glue.glue;

public class Client
{
public static void main(String[] args) throws Exception
{
ITestService client = TestServiceHelper.bind();
System.out.println( client.echo( "Hello" ) ) ;
}
}

[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/glue/glue)-
1348:$ java com.tamashauer.interop3.glue.glue.Client
Echoing: Hello



Get GLUE client to WASP server (note TestService -> JavaService):

[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/glue/wasp)-
1353:$ /home/thauer/TME/glue/bin/wsdl2java http://localhost:6060/TestService -p com.tamashauer.interop3.glue.wasp

[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/glue/wasp)-
1354:$ l
total 8
-rw-r--r-- 1 thauer users 193 Jun 23 13:54 ITestService.java
-rw-r--r-- 1 thauer users 529 Jun 23 13:54 JavaServiceHelper.java

/*
* Client.java
*/
package com.tamashauer.interop3.glue.wasp;

public class Client
{
public static void main(String[] args) throws Exception
{
ITestService client = JavaServiceHelper.bind();
System.out.println( client.echo( "Hello" ) ) ;
}
}


[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/glue/wasp)-
1355:$ java com.tamashauer.interop3.glue.wasp.Client
Echoing: Hello



Get GLUE client to AXIS server   << BAD >>:


[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/glue/axis)-
1157:$ /home/thauer/TME/glue/bin/wsdl2java http://localhost:8080/axis/services/TestService?wsdl \
-p com.tamashauer.interop3.glue.axis
[STARTUP] GLUE Professional 4.1 (c) 2001-2003 The Mind Electric
evaluation expires on 7/16/03
electric.xml.io.schema.SchemaException: could not find a electric.xml.io.schema.SchemaElement with
qname http://schemas.xmlsoap.org/wsdl/:echoReturn


Get WASP client to WASP server:

[EMAIL PROTECTED]:)----(/home/thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1357:$ /home/thauer/wasp451/bin/WSDL2Java --url http://127.0.0.1:6060/TestService/wsdl \
-d /home/thauer/cvsroot/thauer/Soaping/sources \
-p com.tamashauer.interop3.wasp.wasp -v5

[EMAIL PROTECTED]:)----(/home/thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1358:$ l wasp/wasp/
total 8
-rw-r--r-- 1 thauer users 271 Jun 23 13:58 TestService.java
-rw-r--r-- 1 thauer users 1290 Jun 23 13:58 TestService.xmap

/*
* Client.java
*/
package com.tamashauer.interop3.wasp.wasp;

import org.systinet.wasp.webservice.Registry;

public class Client
{
public static void main(String[] args) throws Exception
{
String wsdlURL = "http://localhost:6060/TestService/wsdl";
TestService client =
(TestService) Registry.lookup(wsdlURL, TestService.class);
System.out.println( client.echo( "Hello" ) ) ;
}
}

[EMAIL PROTECTED]:)----(/home/thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1358:$ java com.tamashauer.interop3.wasp.wasp.Client
Echoing: Hello



Get WASP client to GLUE server  << This is BAAAD !!! >> WHY ?:

[EMAIL PROTECTED]:)----(/home/thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1400:$ /home/thauer/wasp451/bin/WSDL2Java --url http://127.0.0.1:8004/glue/TestService.wsdl \
-d /home/thauer/cvsroot/thauer/Soaping/sources \
-p com.tamashauer.interop3.wasp.glue
WARN: wasp.WSDLPortInfo - Unknown part <testString> in parameterOrder

[EMAIL PROTECTED]:)----(/home/thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1402:$ l wasp/glue/
total 16
-rw-r--r-- 1 thauer users 237 Jun 23 14:02 Echo.java
-rw-r--r-- 1 thauer users 241 Jun 23 14:02 EchoResponse.java
-rw-r--r-- 1 thauer users 331 Jun 23 14:02 TestService.java
-rw-r--r-- 1 thauer users 3127 Jun 23 14:02 TestService.xmap

/*
* Client.java
*/

package com.tamashauer.interop3.wasp.glue;

import org.systinet.wasp.webservice.Registry;

public class Client
{
public static void main(String[] args) throws Exception
{
String wsdlURL = "http://localhost:8004/glue/TestService.wsdl";
TestService client =
(TestService) Registry.lookup(wsdlURL, TestService.class);

Echo e = new Echo();
e.testString = "Hello";
System.out.println( client.echo( e ).Result ) ;
}
}

[EMAIL PROTECTED]:)---(.../cvsroot/thauer/Soaping/sources/com/tamashauer/interop3/wasp/glue)-
1422:$ java com.tamashauer.interop3.wasp.glue.Client
WARN: wasp.WSDLPortInfo - Unknown part <testString> in parameterOrder
Echoing: Hello


Get WASP client to AXIS server

[EMAIL PROTECTED]:)----(/home/thauer/cvsroot/thauer/Soaping/sources/com/tamashauer/interop3)-
1202:$ /home/thauer/wasp451/bin/WSDL2Java --url http://127.0.0.1:8080/axis/services/TestService?wsdl \
-d /home/thauer/cvsroot/thauer/Soaping/sources \
-p com.tamashauer.interop3.wasp.axis
Exception : org.idoox.xml.schema.SchemaException: Can not get schema element for {http://schemas.xmlsoap.org/wsdl/}testString



Reply via email to