File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Two soap message entries in log file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Two soap message entries in log file" Watch "Two soap message entries in log file" New topic
Author

Two soap message entries in log file

Shardul Prasad
Greenhorn

Joined: Dec 01, 2011
Posts: 2
I am calling a web service.
And when I checked the log file, I found soap messages (in XML format), two times like below:
_________________________________________________________________________________

[2012-01-06 09:26:02 , 290] (Call.java:2762) DEBUG - <SOAP Message Request in XML format>

_________________________________________________________________________________

[2012-01-06 09:26:02 , 864] (HTTPSender.java:519) DEBUG - POST /beta/Service HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: <hostname>
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "serviceName"
Content-Length: 527

<SOAP Message Request in XML format>
_________________________________________________________________________________

Above are the appearance of the SOAP Message I was able to find in the log file. Both were exactly same.
Furthermore, I found only one response message in the log file.

I am wondering if the service is being called two times!

Please help!

Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3563

It's hard to tell what caused this. There can be many reasons, how the logging is done in the application, what kind of logging is done by the libraries used etc... You may need to give more details (TellTheDetails).

And welcome to the CodeRanch


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Shardul Prasad
Greenhorn

Joined: Dec 01, 2011
Posts: 2
Logging was done in the most basic way:



With due respect, I think this has nothing to do with the logging.

I wanted to ask, it seems, from log files, that the service is being called two times.
In other way, what happens exactly when a service is being called?
Is it like: The elements in the XSD related to the WSDL file are at first parsed, then the request XML is formed, and then that XML is sent over HTTP?
I am not aware of the details.
It would be very helpful if I get to know the exact mechanism.

And thanks for the welcome :-)
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3563

For a high-level view I suggest you read the WS Architecture. For your case if you provide details of the system with it's boundaries, components etc... then it might be helpful to identify the cause.

But as a developer you don't need to know much about the internals of the libraries used. If you still need to know then you might first try with enhanced debugging configuration to see what is being used and where etc... (of course if the libraries has those debug information).
 
 
subject: Two soap message entries in log file
 
Threads others viewed
struts2.0 example console message
problem with java 6 web services
Newbie to JBoss
can not deploy application!!!!
I am connecting liferay communtiy edition 6.0.6 with postgresql 9.1 and using apache tomcat server6.
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture