Jakarta Tomcat 4.1.12 Java Web Service, .NET client


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Jakarta Tomcat 4.1.12 Java Web Service, .NET client

  1. #1
    Sandra Guest

    Jakarta Tomcat 4.1.12 Java Web Service, .NET client


    Hi,

    How can I access a Web Service made in Java using Jakarta Tomcat 4.1.12 -
    Axis 1.0 from a client in Visual Studio .NET (using a Visual Basic.NET Web
    Application)?

    I have an autogenerated WSDL file frm Tomcat.

    When I use Add Web Reference from VS.NET the Reference is linked to my application
    but the Jakarta Tomcat server gives messages indicating wrong types even
    though I didn't write any code.

    Then if I try to add code, the Intellisense doesn't show this class between
    the possibilities. I think that this means that the class is not considered.

    How can resolve this?

    Thank in advance,
    Sandra

  2. #2
    Luciano Guest

    Re: Jakarta Tomcat 4.1.12 Java Web Service, .NET client



    >
    >I have an autogenerated WSDL file frm Tomcat.
    >
    >When I use Add Web Reference from VS.NET the Reference is linked to my application
    >but the Jakarta Tomcat server gives messages indicating wrong types even
    >though I didn't write any code.
    >


    VS.NET generates a proxy class from the WSDL that you specify. You can find
    the file in the Web References directory (under wwwroot\$ProjectDir). Examining
    the file could offer you clues to solve the problem.

    >Then if I try to add code, the Intellisense doesn't show this class between
    >the possibilities. I think that this means that the class is not considered.


    Not exactly: it could be a problem of namespaces; usually, you access the
    proxy class by specifying NameSpace.ClassName. Don't worry about Intellisense,
    sometimes it doesn't simplify things.

    >
    >How can resolve this?
    >


    Make sure that you instantiate correctly the proxy class and invoke the web
    method with the appropriate parameters.

    Good luck,
    LP

  3. #3
    Pink Guest

    Re: Jakarta Tomcat 4.1.12 Java Web Service, .NET client


    I have the same problem. It seams like i cant deserialize the xml.
    I'm using the same xml namespaces in the client as in the host.

    The company that delivers the host says that they have no problem using the
    ws from Java.
    Is this a .NET problem or have I done something wrong?


    "Sandra" <kmarisan@jumpy.it> wrote:
    >
    >Hi,
    >
    >How can I access a Web Service made in Java using Jakarta Tomcat 4.1.12

    -
    >Axis 1.0 from a client in Visual Studio .NET (using a Visual Basic.NET Web
    >Application)?
    >
    >I have an autogenerated WSDL file frm Tomcat.
    >
    >When I use Add Web Reference from VS.NET the Reference is linked to my application
    >but the Jakarta Tomcat server gives messages indicating wrong types even
    >though I didn't write any code.
    >
    >Then if I try to add code, the Intellisense doesn't show this class between
    >the possibilities. I think that this means that the class is not considered.
    >
    >How can resolve this?
    >
    >Thank in advance,
    > Sandra



  4. #4
    ste Guest

    Re: Jakarta Tomcat 4.1.12 Java Web Service, .NET client


    It probably depends on <types> section of your WSDL. I also have the same
    problem with the following description where there is nested <complexType>
    with no name:
    <complexType name="RecMap">
    <sequence>
    <element maxOccurs="unbounded" minOccurs="0" name="item">
    <complexType >
    <sequence>
    <element name="key" type="xsd:string"/>
    <element name="value" type="xsd:string"/>
    </sequence>
    </complexType >
    </element>
    </sequence>
    </complexType>
    In fact Visual Studio isn't able to create proxy for this data. But it creates
    proxy for the following data:
    <complexType name="RecMap">
    <sequence>
    <element maxOccurs="unbounded" minOccurs="0" name="item"
    type="tns2:RecItem" />
    </sequence>
    </complexType>
    <complexType name="RecItem">
    <all>
    <element name="key" type="xsd:string"/>
    <element name="value" type="xsd:string"/>
    </all>
    </complexType>
    However I cannot use the second WSDL because it doesn't respect SOAP message
    format of my java web service.
    Any suggestion?



    "Sandra" <kmarisan@jumpy.it> wrote:
    >
    >Hi,
    >
    >How can I access a Web Service made in Java using Jakarta Tomcat 4.1.12

    -
    >Axis 1.0 from a client in Visual Studio .NET (using a Visual Basic.NET Web
    >Application)?
    >
    >I have an autogenerated WSDL file frm Tomcat.
    >
    >When I use Add Web Reference from VS.NET the Reference is linked to my application
    >but the Jakarta Tomcat server gives messages indicating wrong types even
    >though I didn't write any code.
    >
    >Then if I try to add code, the Intellisense doesn't show this class between
    >the possibilities. I think that this means that the class is not considered.
    >
    >How can resolve this?
    >
    >Thank in advance,
    > Sandra



  5. #5
    LP Guest

    Re: Jakarta Tomcat 4.1.12 Java Web Service, .NET client



    You should try to give a name to the second (nested) complex type. I think
    that would solve the problem.

    As an example, .NET handles this by the use of attributes. You declare a
    class which has a vector field; in this case, you bind that field with the
    following attribute:

    [XmlArrayItem(__typeof(ClassItem), IsNullable=true)]

    which tells to generate appropriate descriptions for vector's items (i.e.
    description for the class ClassItem)

    Try to do something simmilar with Axis!

    **LP

    "ste" <stcis@katamail.com> wrote:
    >
    >It probably depends on <types> section of your WSDL. I also have the same
    >problem with the following description where there is nested <complexType>
    >with no name:
    ><complexType name="RecMap">
    > <sequence>
    > <element maxOccurs="unbounded" minOccurs="0" name="item">
    > <complexType >
    > <sequence>
    > <element name="key" type="xsd:string"/>
    > <element name="value" type="xsd:string"/>
    > </sequence>
    > </complexType >
    > </element>
    > </sequence>
    ></complexType>
    >In fact Visual Studio isn't able to create proxy for this data. But it creates
    >proxy for the following data:
    ><complexType name="RecMap">
    > <sequence>
    > <element maxOccurs="unbounded" minOccurs="0" name="item"
    >type="tns2:RecItem" />
    > </sequence>
    ></complexType>
    ><complexType name="RecItem">
    > <all>
    > <element name="key" type="xsd:string"/>
    > <element name="value" type="xsd:string"/>
    > </all>
    ></complexType>
    >However I cannot use the second WSDL because it doesn't respect SOAP message
    >format of my java web service.
    >Any suggestion?



  6. #6
    Guest

    Re: Jakarta Tomcat 4.1.12 Java Web Service, .NET client


    "Sandra" <kmarisan@jumpy.it> wrote:

    Hi,
    I managed to call Tomcat Axis from .NET by making sure that the first line
    of the wsdl was NOT
    <?xml version=\"1.0\" encoding=\"utf-8\"?>

    Strangely, that type of line was not authorized in WSDL by my version of
    .NET !

    >
    >Hi,
    >
    >How can I access a Web Service made in Java using Jakarta Tomcat 4.1.12

    -
    >Axis 1.0 from a client in Visual Studio .NET (using a Visual Basic.NET Web
    >Application)?
    >
    >I have an autogenerated WSDL file frm Tomcat.
    >
    >When I use Add Web Reference from VS.NET the Reference is linked to my application
    >but the Jakarta Tomcat server gives messages indicating wrong types even
    >though I didn't write any code.
    >
    >Then if I try to add code, the Intellisense doesn't show this class between
    >the possibilities. I think that this means that the class is not considered.
    >
    >How can resolve this?
    >
    >Thank in advance,
    > Sandra



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center