Hello Josef,

Now I've managed to run the webservice.
I don't exactly what was the problem, but your checklist was very useful.

In the end I installed Eclipse Axis2 Code Generator plug-in e made the client using this plug-in. (I was using wsdl2java)
And then it started communicating properly.

Later I had just one problem. When webservice sends an error message, axis breaks. But I discovered that the problem was http version. Axis uses 1.2 and the server 1.1.

I set this configuration
bookingService._getServiceClient().getOptions().setSoapVersionURI(org.apache.axis2.Constants.URI_SOAP11_ENV);

And now everything is working like a charm.

Josef I really appreciate your help


*Humberto Costa de Santana*
Grupo de Desenvolvimento de Sistemas - AI - Reitoria
Em 08-11-2012 06:54, Stadelmann Josef escreveu:

Humberto

the best way to understand interoperation issues between foreign client and server architectures is as such

1.build your ASP.NET service and make your ASP.NET client connecting to it, make it work well.

2.build your axis2 service and have your axis2 client connecting to it, make it work well

3.if you are satisfied with each take WireShark (TCP Monitor) to see how ASP.net works and then how AXIS2 works on the wire

4.think wire and protocol and seek independence on this level

5.notice the difference in protocol

6.then take your axis2 client and try to make it understand your ASP.net service

7.or take your ASP.net client and make it work with your axis2 service

8.you will learn a lot

That is what I always do when I have to make client services work in heterogeneous environments

Josef

*Von:*Humberto Costa de Santana [mailto:humbe...@reitoria.unesp.br]
*Gesendet:* Mittwoch, 7. November 2012 11:54
*An:* java-user@axis.apache.org
*Betreff:* Re: AW: AW: Connection reset when not using tcpmonitor

Hello Josef, thanks a lot for your help.

I'll explain exactly what I am trying to do.
The company where I work has an equipment to make video conferences. This equipment has a webservice made in ASP.net that is used to arrange rooms and systems to realize the conferences. So I don't have the server side source code. I can't make any change in it.

I'm trying to consume the above mentioned webservice with axis2 (I tried with axis 1 as well and got the same error). I generated all the client beans using Eclipse tool and it works perfectly when I use TCP/IP monitor tool (that comes with Eclipse) to see the xml flow.
But the same client does not work when I run it right to the webservice.

Example:
When I run the client with the address http://localhost:8081/tms/external/Booking/BookingService.asmx everything works, because this is the address to TCP/IP monitor, and TCP/IP Monitor is responsible to connect with the server. But when I use the right address, that is http://serverhostname/tms/external/Booking/BookingService.asmx, the same client does not work.

My client doesn't have axis2.xml configuration. I'll try to adjust the transport according to your tip.
I'll tell you if it works.

Thanks a lot

*Humberto Costa de Santana*
Grupo de Desenvolvimento de Sistemas - AI - Reitoria

Em 06-11-2012 13:49, Stadelmann Josef escreveu:

    Humberto,

    can you check at your server /catalina_home/webapps/WEB-INF/conf/axis2.xml

    for proper Transport Ins selection.

    the default configuration assumes that Axis2Servlet only receives request 
through HTTP.

    in case you have uncommented for tcp, comment it out and make sure only 
http is engaged!

         <!--Uncomment if you want to have TCP transport support-->

         <!--transportReceiver name="tcp"

                            class="org.apache.axis2.transport.tcp.TCPServer">

             <parameter name="port">6060</parameter-->>

    make sure you comment out as shown above the tcp transport.

    Also check that the proper Transport Outs are enabled!

    i.e. uncomment as shown below for not having any TCP outgoing transports 
selected

         <!--Uncomment if you want to have TCP transport support-->

         <!--

         <transportSender name="tcp"

                          
class="org.apache.axis2.transport.tcp.TCPTransportSender"/>

         -->

    outgoing and incoming is sometime confusing.

    it depends what your axis2.xml configurations are.

    if your axis2.xml configures a service

    or

    if your axis2.xml configures your client,

    the meanings are different.

    So given you have an axis2.xml to configure your client, look at this as 
well.

    And may you can show me your service.xml content.

    Also, how is your client configuring done  for startup?

    Josef

    Von: Humberto Costa de Santana [mailto:humbe...@reitoria.unesp.br]

    Gesendet: Montag, 5. November 2012 19:17

    An:java-user@axis.apache.org  <mailto:java-user@axis.apache.org>

    Betreff: Re: AW: Connection reset when not using tcpmonitor

    Hi Josef, thanks for your reply.

    I tested with Wireshark and it seems that my client is sending exactly the 
same xml with or without tcpmonitor.

    I really don't know why when I use the same client using tcpmonitor it 
works, while when I try directly to webservice it does not work.

    But I found a strange thing. When I configure tcpmonitor to tcp instead off 
http I get the same error.

    So. It seems that my client is sending message throught tcp and the server 
accepts only http.

    Is it possible that my client is using tcp instead of http to send the 
messages to the server?

    If so how can I solve it?

    Thanks in advance

    PS: The server is ASP .net and the client is axis and the beans were made 
using Eclipse

    Humberto Costa de Santana

    Grupo de Desenvolvimento de Sistemas - AI - Reitoria

    Em 01-11-2012 07:18, Stadelmann Josef escreveu:

    1.  I would look at the stack trace below;

    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

    "Server.userException", so the origin is somewhat clear! It is generated at 
the server/service side of the pond for whatever reason.

    If this happens at the service, then it has potentially nothing to do with 
your client code.

    Try to find the condition and place in code where this Server.userException 
is generated?

    2. I would use a Network Protocol Analyzer like Wireshark and lookout for a 
TCP RST issued sometimes by Windows.

    3. In the past we observed this TCP RST signal may times with Wireshark, 
and we could see a distributed NetBeans plugin fail, loosing connection as FTP 
client to its remote FTP server. Then engineering hat to deal with that and 
make a new plugin which was able to recover from this situation on a TCP RST.

    4. if TCP RST (RESET) is not observed then it might be one of the many time 
outs one can adjust i.e. for Tomcat.

    Josef

    Von: Humberto Costa de Santana [mailto:humbe...@reitoria.unesp.br]

    Gesendet: Mittwoch, 31. Oktober 2012 17:19

    An:java-user@axis.apache.org  <mailto:java-user@axis.apache.org>

    Betreff: Connection reset when not using tcpmonitor

    I'm facing a very strange problem when consuming a webservice.

    When I consume the webservice using tcpmonitor it works fine. But when I 
use the real url I have the following problem:

    Exception in thread "main" AxisFault

      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

      faultSubcode:

      faultString: java.net.SocketException: Connection reset

      faultActor:

      faultNode:

      faultDetail:

         {http://xml.apache.org/axis/}stackTrace:java.net.SocketException: 
Connection reset

         at java.net.SocketInputStream.read(SocketInputStream.java:189)

         at java.net.SocketInputStream.read(SocketInputStream.java:121)

         at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)

         at java.io.BufferedInputStream.read(BufferedInputStream.java:254)

         at 
org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:583)

         at 
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)

         at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

         at org.apache.axis.client.Call.invoke(Call.java:2767)

         at org.apache.axis.client.Call.invoke(Call.java:2443)

         at org.apache.axis.client.Call.invoke(Call.java:2366)

         at org.apache.axis.client.Call.invoke(Call.java:1812)

         at 
net.tandberg._2004._02.tms.external.booking.BookingServiceSoapStub.saveConference(BookingServiceSoapStub.java:681)

         at test.client.TesteBooking.main(TesteBooking.java:51)

    Does somebody know what is happening?

    Thanks in advance


Reply via email to