Here I'm answering the question I asked in several newsgroups:

Problem:

The problem was, that it wasn't possible to deserialize a complex type
in .NET, which was sent by AXIS. I either got an InvalidCastException
or an error in the XML-Document.

A Solution:

When sending a complex type, the wsdl-file has to contain a schema 
definition of this type. Let's take a UserInfo-Bean with two simple strings:

<types>
  <schema targetNamespace="http://authorization.security.dcx"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
   <complexType name="UserInfo">
    <sequence>
        <element name="firstname" type="xsd:string"/>
        <element name="lastname" type="xsd:string"/>
    </sequence>
   </complexType>
  </schema>

When deploying this service, you have to provide a beanMapping:

<service name="TestService" provider="java:RPC">
    <parameter value="com.webapplic.service.TestService" name="className"/>
    <parameter value="*" name="allowedMethods"/>
    <beanMapping qname="nq:UserInfo" xmlns:nq="http://service.webapplic.com"; 
languageSpecificType="java:com.webapplic.service.UserInfo"/>
  </service>

When generating the client stub in .NET Visual Studio, a proxy is gene-
rated and a class, which has two public strings: firstname and lastname.

/// <remarks/>
    [System.Xml.Serialization.SoapTypeAttribute("UserInfo", 
"http://service.webapplic.com";)]
    public class SECAuthorizedApplication {
        
        /// <remarks/>
        public string firstname;
        
        /// <remarks/>
        public string lastname;
    }

Now the service should work!

The mistake was, that targetNamesapce from WSDL and the xmlns:qn in
deploy.wsdd didn't match.

Thought, would be nice to share this info, since i only found quesitons
about this topic in the newsgroups and didn't get any response anywhere.

Have a nice day, Gerrit

-- 


Gerrit Quast                  
CEO Research & Development

WebApplic GmbH                v: 0700 - WebApplic
Wegl�nder Strasse 24          g: 0711 - 78 23 91 - 40
70563 Stuttgart

Rosenbergstrasse 128          p: 0711 - 3 05 65 26
70193 Stuttgart               m: 0178 - 4 72 47 73

www.webapplic.de              [EMAIL PROTECTED]
______________________________________________________________________________
WEB.DE MyPage - Ultimatives Kommunikationstool! Ihre Message sofort
online! Domain aenderbar! http://www.das.ist.aber.ne.lustige.sache.ms/

Reply via email to