Glen,
Can you please take a look at test2MimeDOCSoapPortEchoAttachments? (get it to work?). Am getting
a
"Bad Types" exception trying to convert from OctetStream<->DataHandler[]...Am not sure
about which
is the best way to fix this problem. There's code in JavaUtils.isConvertable that deals with
DataHandler<->OtherDataTypes conversions, But i don't think this is the right place
to patch/fix.
Thanks,
dims
--- dims@apache.org wrote:
> dims 2002/12/31 14:46:52
>
> Modified: java/test/wsdl/interop4/groupG/mime/doc build.xml
> mime-doc.wsdl
> java/src/org/apache/axis/wsdl/symbolTable SchemaUtils.java
> SymbolTable.java
> Added: java/test/wsdl/interop4/groupG/mime/doc
> AttachmentsBindingImpl.java
> MimeDOCInteropTestCase.java
> Log:
> Initial check-in for GroupG Interop mime/doc tests.
>
> Note:
> - EchoAttachments does not work. (Glen, Can you please help?)
>
> Revision Changes Path
> 1.3 +8 -7 xml-axis/java/test/wsdl/interop4/groupG/mime/doc/build.xml
>
> Index: build.xml
> ===================================================================
> RCS file: /home/cvs/xml-axis/java/test/wsdl/interop4/groupG/mime/doc/build.xml,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- build.xml 29 Nov 2002 23:32:53 -0000 1.2
> +++ build.xml 31 Dec 2002 22:46:51 -0000 1.3
> @@ -54,7 +54,8 @@
> <!-- generate skeletons -->
> <wsdl2java url="${axis.home}/test/wsdl/interop4/groupG/mime/doc/mime-doc.wsdl"
> output="${root.dir}/build/work"
> - skeletonDeploy="no"
> + timeout="-1"
> + skeletonDeploy="yes"
> testCase="yes"
> serverSide="yes">
> <mapping namespace="http://soapinterop.org/attachments/wsdl"
> package="test.wsdl.interop4.groupG.mime.doc"/>
> @@ -70,14 +71,14 @@
> </wsdl2java>
>
> <mkdir dir="${build.dest}"/>
> - <!--
> - <copy file="BaseTypesInteropTestsTestCase.java"
> - todir="${root.dir}/build/work/test/wsdl/interop5/basetype/"
> +
> + <copy file="${axis.home}/test/wsdl/interop4/groupG/mime/doc/MimeDOCInteropTestCase.java"
> + todir="${root.dir}/build/work/test/wsdl/interop4/groupG/mime/doc"
> overwrite="yes"/>
> - <copy file="InteropTestsBindingImpl.java"
> - todir="${root.dir}/build/work/test/wsdl/interop5/basetype/"
> + <copy file="${axis.home}/test/wsdl/interop4/groupG/mime/doc/AttachmentsBindingImpl.java"
> + todir="${root.dir}/build/work/test/wsdl/interop4/groupG/mime/doc"
> overwrite="yes"/>
> - -->
> +
> <!-- compile the skeletons -->
> <javac srcdir="${build.dir}/work"
> destdir="${build.dest}" debug="on">
>
>
>
> 1.2 +5 -0 xml-axis/java/test/wsdl/interop4/groupG/mime/doc/mime-doc.wsdl
>
> Index: mime-doc.wsdl
> ===================================================================
> RCS file: /home/cvs/xml-axis/java/test/wsdl/interop4/groupG/mime/doc/mime-doc.wsdl,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -r1.1 -r1.2
> --- mime-doc.wsdl 1 Nov 2002 21:43:04 -0000 1.1
> +++ mime-doc.wsdl 31 Dec 2002 22:46:51 -0000 1.2
> @@ -177,4 +177,9 @@
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> + <wsdl:service name="MimeDOCInterop">
> + <wsdl:port name="MimeDOCSoapPort" binding="AttachmentsBinding">
> + <soap:address location="http://localhost:8080/axis/services/MimeDOCSoapPort"/>
> + </wsdl:port>
> + </wsdl:service>
> </wsdl:definitions>
>
>
>
> 1.1
> xml-axis/java/test/wsdl/interop4/groupG/mime/doc/AttachmentsBindingImpl.java
>
> Index: AttachmentsBindingImpl.java
> ===================================================================
> /**
> * AttachmentsBindingImpl.java
> *
> * This file was auto-generated from WSDL
> * by the Apache Axis WSDL2Java emitter.
> */
>
> package test.wsdl.interop4.groupG.mime.doc;
>
> public class AttachmentsBindingImpl implements
> test.wsdl.interop4.groupG.mime.doc.AttachmentsPortType{
> public org.apache.axis.attachments.OctetStream
> echoAttachment(org.apache.axis.attachments.OctetStream in) throws java.rmi.RemoteException
{
> return in;
> }
>
> public org.apache.axis.attachments.OctetStream[]
> echoAttachments(org.apache.axis.attachments.OctetStream item[]) throws java.rmi.RemoteException
> {
> return item;
> }
>
> public test.wsdl.interop4.groupG.mime.doc.xsd.Binary
> echoAttachmentAsBase64(org.apache.axis.attachments.OctetStream in) throws
> java.rmi.RemoteException {
> return new test.wsdl.interop4.groupG.mime.doc.xsd.Binary(in.getBytes());
> }
>
> public org.apache.axis.attachments.OctetStream
> echoBase64AsAttachment(test.wsdl.interop4.groupG.mime.doc.xsd.Binary in) throws
> java.rmi.RemoteException {
> return new org.apache.axis.attachments.OctetStream(in.getValue());
> }
> }
>
>
>
> 1.1
> xml-axis/java/test/wsdl/interop4/groupG/mime/doc/MimeDOCInteropTestCase.java
>
> Index: MimeDOCInteropTestCase.java
> ===================================================================
> /**
> * MimeDOCInteropTestCase.java
> *
> * This file was auto-generated from WSDL
> * by the Apache Axis WSDL2Java emitter.
> */
>
> package test.wsdl.interop4.groupG.mime.doc;
>
> import org.apache.axis.attachments.OctetStream;
>
> import java.util.Arrays;
> import java.net.URL;
>
> public class MimeDOCInteropTestCase extends junit.framework.TestCase {
> public MimeDOCInteropTestCase(java.lang.String name) {
> super(name);
> }
>
> protected void setUp() throws Exception {
> if(url == null) {
> url = new URL(new
> test.wsdl.interop4.groupG.mime.doc.MimeDOCInteropLocator().getMimeDOCSoapPortAddress());
> }
> }
>
> public void test1MimeDOCSoapPortEchoAttachment() throws Exception {
> test.wsdl.interop4.groupG.mime.doc.AttachmentsPortType binding;
> try {
> binding = new
> test.wsdl.interop4.groupG.mime.doc.MimeDOCInteropLocator().getMimeDOCSoapPort(url);
> }
> catch (javax.xml.rpc.ServiceException jre) {
> if(jre.getLinkedCause()!=null)
> jre.getLinkedCause().printStackTrace();
> throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: "
> + jre);
> }
> assertTrue("binding is null", binding != null);
>
> // Test operation
> OctetStream input = new OctetStream("EchoAttachment".getBytes());
> OctetStream output = null;
> output = binding.echoAttachment(input);
> // TBD - validate results
> assertTrue(Arrays.equals(input.getBytes(), output.getBytes()));
> }
>
> public void test2MimeDOCSoapPortEchoAttachments() throws Exception {
> test.wsdl.interop4.groupG.mime.doc.AttachmentsPortType binding;
> try {
> binding = new
> test.wsdl.interop4.groupG.mime.doc.MimeDOCInteropLocator().getMimeDOCSoapPort(url);
> }
> catch (javax.xml.rpc.ServiceException jre) {
> if(jre.getLinkedCause()!=null)
> jre.getLinkedCause().printStackTrace();
> throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: "
> + jre);
> }
> assertTrue("binding is null", binding != null);
>
> OctetStream[] input = new OctetStream[2];
>
> input[0] = new OctetStream("EchoAttachments0".getBytes());
> input[1] = new OctetStream("EchoAttachments1".getBytes());
>
> //TODO: Need to fix wsdl2java generation. Getting a "Bad Types"
> // Exception if we enable the following code.
> /*
>
=== message truncated ===
=====
Davanum Srinivas - http://xml.apache.org/~dims/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
|