Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Lilly Wiesie

Greenhorn
+ Follow
since Jan 20, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lilly Wiesie

The "13e" and "0" are for chunk encoding. It won't cause problems on .net side.
16 years ago
Hi Jean-Louis,

Thanks for you reply.

That's exactly what happened - the web services is set up using Axis 1.2 in doc/literal, and the client is c# in .net. There is no problem for .net client to send the request to the server, and there is no problem for the server sending out the response (I can see both in tcpmon). The problem is that the response doesn't show up in the client program (the return string is null). .Net doesn't show any exception. It just silently shows nothing (on the return string).

I did set up accepting "chunk" in iis, but it doesn't solve the problem.

I am going to use .net XMLSerilizer to test the return SOAP message to see if it can give me any hint.

Thanks for your help.

Lilly
16 years ago
continue from the above post - I can see the response on tcpmon as:


------------------------------------------------------------------
HTTP/1.1 100 Continue



HTTP/1.1 200 OK

X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.1 (build: CVSTag=JBoss_4_0_1 date=200412230944)

Content-Type: text/xml;charset=utf-8

Transfer-Encoding: chunked

Date: Fri, 11 Feb 2005 05:11:31 GMT

Server: Apache-Coyote/1.1



10f

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><getStringReturn xmlns="">Test</getStringReturn></soapenv:Body></soapenv:Envelope>
0

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

I am almost clueless on what went wrong

Any help welcome.

Lilly
16 years ago
Sorry - here is the information:

InterOpTest.wsdl:
---------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions targetNamespace="http://localhost:8080/axis/services/InterOpTest"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8080/axis/services/InterOpTest"
xmlns:intf="http://localhost:8080/axis/services/InterOpTest"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2RC2
Built on Nov 16, 2004 (12:19:44 EST)-->
<wsdl:types>
<schema elementFormDefault="qualified"
targetNamespace="http://localhost:8080/axis/services/InterOpTest"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="getStringReturn" type="xsd:string"/>
</schema>
</wsdl:types>

<wsdl:message name="getStringRequest">

</wsdl:message>

<wsdl:message name="getStringResponse">

<wsdl art element="impl:getStringReturn" name="getStringReturn"/>

</wsdl:message>

<wsdl ortType name="InterOpTest">

<wsdl peration name="getString">

<wsdl:input message="impl:getStringRequest" name="getStringRequest"/>

<wsdl utput message="impl:getStringResponse" name="getStringResponse"/>

</wsdl peration>

</wsdl ortType>

<wsdl:binding name="InterOpTestSoapBinding" type="impl:InterOpTest">

<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl peration name="getString">

<wsdlsoap peration soapAction=""/>

<wsdl:input name="getStringRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl utput name="getStringResponse">

<wsdlsoap:body use="literal"/>

</wsdl utput>

</wsdl peration>

</wsdl:binding>

<wsdl:service name="InterOpTestService">

<wsdl ort binding="impl:InterOpTestSoapBinding" name="InterOpTest">

<wsdlsoap:address location="http://localhost:8080/axis/services/InterOpTest"/>

</wsdl ort>

</wsdl:service>

</wsdl efinitions>

============================================================================




.Net client proxy (InterOpTest.cs):
//--------------------------------------------------------------------------// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.2032
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------

//
// This source code was auto-generated by wsdl, Version=1.1.4322.2032.
//
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;


/// <remarks/>
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="InterOpTestSoapBinding", Namespace="http://localhost:8080/axis/services/InterOpTest")]
public class InterOpTest : System.Web.Services.Protocols.SoapHttpClientProtocol {

/// <remarks/>
public InterOpTest() {
this.Url = "http://localhost:8080/axis/services/InterOpTest";
}

/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("getStringReturn")]
public string getString() {
object[] results = this.Invoke("getString", new object[0]);
return ((string)(results[0]));
}

/// <remarks/>
public System.IAsyncResult BegingetString(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("getString", new object[0], callback, asyncState);
}

/// <remarks/>
public string EndgetString(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
}

=====================================================================

Java service (InterOpTest.java)

public class InterOpTest
{
public InterOpTest()
{

}

public String getString()
{
return "Test";
}
}


==================================================

I tried many things, noone of them work. I can clearly see the response on t
16 years ago
I was testing a very simple web services written in Axis (1.2RC2) with just a single method, returning a string "test". The method doesn't need any parameters. when I tested it using .Net client, it returns null. Could anyone please tell me what could ne wrong? I've beening fighting this problem for days now, but still no luck..

Could anyone tell me what could be wrong? Where can I find sample code for Axis/.Net combination?

Thanks.

Lilly
16 years ago
Hi Jean-Louis,

Thanks for your reply. I'll try the TCPMonitor.

I was surprise that .Net client will have deserialization problem for a simple string. By searching online for an answer, I found I was not the only one having this problem. But most of the people had (retun null)problems for complex type though.

Lilly
16 years ago
I have a web serives written in Java and deployed in Axis. Now I am testing the service using .Net client. When the .Net test program calls the method of the web service, I can see the method does get called on the server side (I use JBoss and I can see the ouput on the JBoss console when the method is called), however there is no output on the .Net side. It seems the Response doesn't get back to .Net (However the Request does get to the server because I can see the method is called). What could happen? I am using doc/literal style, and it's a simple method (return string only).

Thanks.

Lilly
16 years ago
I didn't put in the big smily faces in the above post, they just showed up! Sorry!

Actually I have a more general question: how can we list the <types> for generic Java datatype such as Hashtable, ArrayList, etc in wsdl? Those datatatypes may not be recognized by other platform such as .Net. If I have a return from a method is Hashtable, how can I list it in wsdl?

Thanks.

Lilly
16 years ago
Please forgive me if this question sounds dumb (I am new to web services. I guess I am allowed to ask some dumb questions ):

(1) If the style is document/literal, does that mean the return type of a method (in the service) is Document(an xml document)?

(2) I have a method returning an XML Doucment (public Document getThemes( ) ), how do I list the Document types in wsdl? Here is part of the wsdl Axis genetared:

--------------------------------------------------------------------------
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://localhost:8080/axis/services/ThemeServices" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xml.apache.org/xml-soap" />
<element name="getThemesReturn" type="apachesoap ocument" />
</schema>
</wsdl:types>

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

When I tried to create a proxy in .Net, .Net complains as the following:

--------------------------------------------------------------------------
Error: Unable to import binding 'ThemeServicesSoapBinding' from namespace 'http://localhost:8080/axis/services/ThemeServices'.
- Unable to import operation 'getThemes'.
- The datatype 'http://xml.apache.org/xml-soap ocument' is missing.
--------------------------------------------------------------------------

Evidentially "Document" is not a datatype that can be recognized by .Net.

I know I need to provide datatype for "Document", my question is how to define a "Document" datatype in wsdl?



Please help. Thanks.

Lilly
16 years ago
Dave,

The problem is that Hibernate changes the package name from net.sf.hibernate... to org.hibernate... in Hibernate 3. Now the compiler is complaining it can't find the net.sf.hibernate.* if I use the new version of Hibernate(for example I was using doInHibernate( Session s), the Session in the doInHibernate() implementation is the Session in net.sf.hibernate.Session, not the Session in org.hibernate.Session).

I installed the hibernate 2.1.18, it seems working fine.

Thanks.

Lilly
Could somebody tell me which version of Hibernate Spring Framework supports? Where can I get this kind of information? I was browsing Spring's site, but couldn't find it.

I am using Hibernate 3.0 Beta 3. Evidentaily Spring doesn't support this version of Hibernate yet(which is understandable since it's not in production release yet). My question is: what's the usual lagging time of Spring to Hibernate?

It seems to be a problem if a project incorporates many products from different vendors, while some of the products rely each other. In the case I mention here, we can never use the most updated version of Hibernate if we want to use Hibernate with Spring. What if Spring drops the support of Hibernate (which won't happen in the coming years I hope ), does that mean we need to modify Spring's souce code and implement our own way's support of new Hibernate? Sigh.

Thanks.

Lilly
David,

Thanks for the reference. As a matter of fact, I was reading Expert one on one J2EE without EJB. It's a pretty good book, with a little a little bit reduntcy.

I'll play around so I can get a feel. It seems a little easier than Hibernate. Hope it's not too hard to learn.

Lilly
David,

You definitely get me convinced. I am in - to incorporate Spring to Hibernate.

Thanks for the input. That helps a lot.


Lasse and Steven,

Thanks for your help as well. Very good information.

Lilly

By the way, Lilly, would you mind editing your display name to include a full last name -- it's required by our naming policy.



How do you know 'WS' is not my last name?

Anyway, I have changed - hope Lasse feels a little happier My apology.

Lilly
I am new to both Hibernate and Spring Framework. Could somebody tell me the benefits of using Spring Framework on the top of Hibernate? Since now we add another layer on top of Hibernate, would that affect performance?

Hibernate doesn't provide production-suitable connection pool (my understanding), does Spring provide production-ready pooling? What about the transaction?

Thanks.

Lilly