Consume Axis2 service with .NET c# question

2010-01-08 Thread Pär Malmqvist

Hello!

When I use the following wsdl file to generate a SOAP client with .NET the 
client thinks it is a service of
the style 'bare' and not 'wrapped'.

I think the service is defined in wrapped style.
Can anyone please tell me if I am wrong?

Regards
Pär Malmqvist


?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://main.sol;
xmlns:apachesoap=http://xml.apache.org/xml-soap; 
xmlns:tns=http://main.sol;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
wsdl:types
schema elementFormDefault=qualified targetNamespace=http://main.sol;
xmlns=http://www.w3.org/2001/XMLSchema;
xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:tns=http://main.sol; xmlns:intf=http://main.sol;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;

element name=echo
complexType
sequence
element name=valueString type=xsd:string/
/sequence
/complexType
/element

element name=echoResponse
   complexType
  sequence
 element name=return type=xsd:string/
 /sequence
   /complexType
/element
/schema
/wsdl:types

wsdl:message name=echo
wsdl:part element=tns:echo name=parameter/
/wsdl:message

wsdl:message name=echoResponse
wsdl:part element=tns:echoResponse name=return/
/wsdl:message

wsdl:portType name=Echo
wsdl:operation name=echo
wsdl:input message=tns:echo name=echoRequest/
wsdl:output message=tns:echoResponse name=echoResponse/
/wsdl:operation
/wsdl:portType

wsdl:binding name=EchoSoapBinding type=tns:Echo
wsdlsoap:binding style=document 
transport=http://schemas.xmlsoap.org/soap/http/
wsdl:operation name=echo
wsdlsoap:operation soapAction=/
wsdl:input name=echoRequest
wsdlsoap:body use=literal/
/wsdl:input
wsdl:output name=echoResponse
wsdlsoap:body use=literal/
/wsdl:output
/wsdl:operation
/wsdl:binding

wsdl:service name=Echo
wsdl:port binding=tns:EchoSoapBinding name=Echo
wsdlsoap:address 
location=http://localhost:8080/axis2/services/SolDB2/
/wsdl:port
/wsdl:service

/wsdl:definitions
  
_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

constructors added for generated code

2009-10-01 Thread Pär Malmqvist

Hello!

When I generate my adb service with the wsdl2java tool I get a lot of bean 
classes.
Is there a way to have them generated with a constructor that takes all fields 
in the bean as inparameters.
For the moment I fix this with Eclipse one by one...
Any smart ideas?

Regards.

Pär Malmqvist
  
_
Windows Live™: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009

array with no elements

2009-09-16 Thread Pär Malmqvist

Hello!

When my adb Axis2 service should return an array with no elements to my client 
it looks like the client
receives null instead of an array with zero elements.

Is this the way it should be or is it configurable?

Regards
Pär Malmqvist

_
Share your memories online with anyone you want.
http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1

RE: problem with returning array of objects

2009-09-11 Thread Pär Malmqvist

Thanks Alberto and Amila.
It worked!

/Pär

Date: Fri, 11 Sep 2009 09:54:15 +0530
Subject: Re: problem with returning array of objects
From: amilasuriarach...@gmail.com
To: axis-user@ws.apache.org

change the element into a complex type.


complexType  name=Atc
sequence
element name=atcCode type=xsd:string/

element name=lev type=xsd:int/
element name=textSv type=xsd:string/
element name=MAX_LEN_atcCode type=xsd:string/

element name=MAX_LEN_textSv type=xsd:string/
/sequence
/complexType

thanks,
Amila.
   


On Thu, Sep 10, 2009 at 6:15 PM, Pär Malmqvist par_malmqv...@hotmail.com 
wrote:






Hello!

Thanks Amila för your reply.
I changed the row element maxOccurs=unbounded minOccurs=0 name=return 
type=tns:Atc/
into complexType maxOccurs=unbounded minOccurs=0 name=return 
type=tns:Atc/

as you suggested.

When I check the generated file GetAtcsByAtcCodeResponse.java this time I see 
no field at all that could hold the array value.

What could be the problem? 

/Pär Malmqvist











Date: Wed, 9 Sep 2009 19:18:28 +0530
Subject: Re: problem with returning array of objects
From: amilasuriarach...@gmail.com

To: axis-user@ws.apache.org



On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist par_malmqv...@hotmail.com wrote:







Hello!

I have problem with generating server side code from my wsdl file.
The wsdl file contains a service, getAtcsByAtcCode, that should return an array 
of Atc-objects.
But my generated code returns OMElement[] instead. 



I use this wsdl file:

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://main.sol;
xmlns:apachesoap=http://xml.apache.org/xml-soap; 


xmlns:tns=http://main.sol;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;


xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;


wsdl:types
schema elementFormDefault=qualified targetNamespace=http://main.sol;
xmlns=http://www.w3.org/2001/XMLSchema;


xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:tns=http://main.sol; xmlns:intf=http://main.sol;


xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;

element name=Atc
complexType


sequence
element name=atcCode type=xsd:string/
element name=lev type=xsd:int/


element name=textSv type=xsd:string/
element name=MAX_LEN_atcCode type=xsd:string/
element name=MAX_LEN_textSv type=xsd:string/


/sequence
/complexType
/element


element name=getAtcsByAtcCode
complexType


sequence
element name=atcCode type=xsd:string/
/sequence
/complexType
/element



element name=getAtcsByAtcCodeResponse
complexType
sequence
element maxOccurs=unbounded minOccurs=0 
name=return type=tns:Atc/



this type should be a complex type. not an element.

thanks,
Amila.


/sequence
/complexType
/element

element name=SolException
complexType


sequence
element name=errorCode type=xsd:int/
element name=errorMsg type=xsd:string/


/sequence
/complexType
/element

/schema
/wsdl:types

wsdl:message name=getAtcsByAtcCodeRequest


wsdl:part element=tns:getAtcsByAtcCode name=parameters/
/wsdl:message

wsdl:message name=getAtcsByAtcCodeResponse
wsdl:part element=tns:getAtcsByAtcCodeResponse name=return/


/wsdl:message

wsdl:message name=SolExceptionMessage
wsdl:part element=tns:SolException name=fault/
/wsdl:message



wsdl:portType name=SolDB2
wsdl:operation name=getAtcsByAtcCode
wsdl:input message=tns:getAtcsByAtcCodeRequest 
name=getAtcsByAtcCodeRequest/


wsdl:output message=tns:getAtcsByAtcCodeResponse 
name=getAtcsByAtcCodeResponse/
wsdl:fault message=tns:SolExceptionMessage 
name=SolExceptionFault/


/wsdl:operation
/wsdl:portType

wsdl:binding name=SolDB2SoapBinding type=tns:SolDB2
wsdlsoap:binding style=document 
transport=http://schemas.xmlsoap.org/soap/http/


wsdl:operation name=getAtcsByAtcCode
wsdlsoap:operation soapAction=/
wsdl:input name=getAtcsByAtcCodeRequest
wsdlsoap:body use=literal/


/wsdl:input

RE: problem with returning array of objects

2009-09-10 Thread Pär Malmqvist

Hello!

Thanks Amila för your reply.
I changed the row element maxOccurs=unbounded minOccurs=0 name=return 
type=tns:Atc/
into complexType maxOccurs=unbounded minOccurs=0 name=return 
type=tns:Atc/
as you suggested.

When I check the generated file GetAtcsByAtcCodeResponse.java this time I see 
no field at all that could hold the array value.

What could be the problem? 

/Pär Malmqvist











Date: Wed, 9 Sep 2009 19:18:28 +0530
Subject: Re: problem with returning array of objects
From: amilasuriarach...@gmail.com
To: axis-user@ws.apache.org



On Wed, Sep 9, 2009 at 6:48 PM, Pär Malmqvist par_malmqv...@hotmail.com wrote:






Hello!

I have problem with generating server side code from my wsdl file.
The wsdl file contains a service, getAtcsByAtcCode, that should return an array 
of Atc-objects.
But my generated code returns OMElement[] instead. 


I use this wsdl file:

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://main.sol;
xmlns:apachesoap=http://xml.apache.org/xml-soap; 

xmlns:tns=http://main.sol;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;

xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

wsdl:types
schema elementFormDefault=qualified targetNamespace=http://main.sol;
xmlns=http://www.w3.org/2001/XMLSchema;

xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:tns=http://main.sol; xmlns:intf=http://main.sol;

xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;

element name=Atc
complexType

sequence
element name=atcCode type=xsd:string/
element name=lev type=xsd:int/

element name=textSv type=xsd:string/
element name=MAX_LEN_atcCode type=xsd:string/
element name=MAX_LEN_textSv type=xsd:string/

/sequence
/complexType
/element


element name=getAtcsByAtcCode
complexType

sequence
element name=atcCode type=xsd:string/
/sequence
/complexType
/element


element name=getAtcsByAtcCodeResponse
complexType
sequence
element maxOccurs=unbounded minOccurs=0 
name=return type=tns:Atc/


this type should be a complex type. not an element.

thanks,
Amila.


/sequence
/complexType
/element

element name=SolException
complexType

sequence
element name=errorCode type=xsd:int/
element name=errorMsg type=xsd:string/

/sequence
/complexType
/element

/schema
/wsdl:types

wsdl:message name=getAtcsByAtcCodeRequest

wsdl:part element=tns:getAtcsByAtcCode name=parameters/
/wsdl:message

wsdl:message name=getAtcsByAtcCodeResponse
wsdl:part element=tns:getAtcsByAtcCodeResponse name=return/

/wsdl:message

wsdl:message name=SolExceptionMessage
wsdl:part element=tns:SolException name=fault/
/wsdl:message


wsdl:portType name=SolDB2
wsdl:operation name=getAtcsByAtcCode
wsdl:input message=tns:getAtcsByAtcCodeRequest 
name=getAtcsByAtcCodeRequest/

wsdl:output message=tns:getAtcsByAtcCodeResponse 
name=getAtcsByAtcCodeResponse/
wsdl:fault message=tns:SolExceptionMessage 
name=SolExceptionFault/

/wsdl:operation
/wsdl:portType

wsdl:binding name=SolDB2SoapBinding type=tns:SolDB2
wsdlsoap:binding style=document 
transport=http://schemas.xmlsoap.org/soap/http/

wsdl:operation name=getAtcsByAtcCode
wsdlsoap:operation soapAction=/
wsdl:input name=getAtcsByAtcCodeRequest
wsdlsoap:body use=literal/

/wsdl:input
wsdl:output name=getAtcsByAtcCodeResponse
wsdlsoap:body use=literal/
/wsdl:output
wsdl:fault name=SolExceptionFault

wsdlsoap:fault name=SolExceptionFault use=literal/
/wsdl:fault
/wsdl:operation
/wsdl:binding

wsdl:service name=SolDB2

wsdl:port binding=tns:SolDB2SoapBinding name=SolDB2
wsdlsoap:address 
location=http://localhost:8080/axis2/services/SolDB2/

/wsdl:port
/wsdl:service

/wsdl:definitions



I generate my service with the following ant task:

(lib directory contains all Axis2 jars) 


target name=gen.sol.src.service


delete dir=soltarget/
mkdir dir=soltarget/
mkdir dir=soltarget/classes/

java classname=org.apache.axis2

problem with returning array of objects

2009-09-09 Thread Pär Malmqvist

Hello!

I have problem with generating server side code from my wsdl file.
The wsdl file contains a service, getAtcsByAtcCode, that should return an array 
of Atc-objects.
But my generated code returns OMElement[] instead. 

I use this wsdl file:

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://main.sol;
xmlns:apachesoap=http://xml.apache.org/xml-soap; 
xmlns:tns=http://main.sol;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
wsdl:types
schema elementFormDefault=qualified targetNamespace=http://main.sol;
xmlns=http://www.w3.org/2001/XMLSchema;
xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:tns=http://main.sol; xmlns:intf=http://main.sol;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;

element name=Atc
complexType
sequence
element name=atcCode type=xsd:string/
element name=lev type=xsd:int/
element name=textSv type=xsd:string/
element name=MAX_LEN_atcCode type=xsd:string/
element name=MAX_LEN_textSv type=xsd:string/
/sequence
/complexType
/element


element name=getAtcsByAtcCode
complexType
sequence
element name=atcCode type=xsd:string/
/sequence
/complexType
/element

element name=getAtcsByAtcCodeResponse
complexType
sequence
element maxOccurs=unbounded minOccurs=0 
name=return type=tns:Atc/
/sequence
/complexType
/element

element name=SolException
complexType
sequence
element name=errorCode type=xsd:int/
element name=errorMsg type=xsd:string/
/sequence
/complexType
/element

/schema
/wsdl:types

wsdl:message name=getAtcsByAtcCodeRequest
wsdl:part element=tns:getAtcsByAtcCode name=parameters/
/wsdl:message

wsdl:message name=getAtcsByAtcCodeResponse
wsdl:part element=tns:getAtcsByAtcCodeResponse name=return/
/wsdl:message

wsdl:message name=SolExceptionMessage
wsdl:part element=tns:SolException name=fault/
/wsdl:message

wsdl:portType name=SolDB2
wsdl:operation name=getAtcsByAtcCode
wsdl:input message=tns:getAtcsByAtcCodeRequest 
name=getAtcsByAtcCodeRequest/
wsdl:output message=tns:getAtcsByAtcCodeResponse 
name=getAtcsByAtcCodeResponse/
wsdl:fault message=tns:SolExceptionMessage 
name=SolExceptionFault/
/wsdl:operation
/wsdl:portType

wsdl:binding name=SolDB2SoapBinding type=tns:SolDB2
wsdlsoap:binding style=document 
transport=http://schemas.xmlsoap.org/soap/http/
wsdl:operation name=getAtcsByAtcCode
wsdlsoap:operation soapAction=/
wsdl:input name=getAtcsByAtcCodeRequest
wsdlsoap:body use=literal/
/wsdl:input
wsdl:output name=getAtcsByAtcCodeResponse
wsdlsoap:body use=literal/
/wsdl:output
wsdl:fault name=SolExceptionFault
wsdlsoap:fault name=SolExceptionFault use=literal/
/wsdl:fault
/wsdl:operation
/wsdl:binding

wsdl:service name=SolDB2
wsdl:port binding=tns:SolDB2SoapBinding name=SolDB2
wsdlsoap:address 
location=http://localhost:8080/axis2/services/SolDB2/
/wsdl:port
/wsdl:service

/wsdl:definitions



I generate my service with the following ant task:

(lib directory contains all Axis2 jars) 


target name=gen.sol.src.service

delete dir=soltarget/
mkdir dir=soltarget/
mkdir dir=soltarget/classes/

java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
arg line=-uri SolDB2.wsdl/
arg line=-d adb/
arg line=-ss/
arg line=-sd/
arg line=-o soltarget/
classpath
fileset dir=.\lib
  include name=*.jar/
/fileset
/classpath
/java
/target



When I check the generated file GetAtcsByAtcCodeResponse.java I see that the 
object contains an
array of org.apache.axiom.om.OMElement[] instead of sol.main.Atc[].


Is there something wrong with my wsdl file?
Or is this the way to do when returning array of objects at the service side?

Regards

Pär Malmqvist

RE: [ANNOUNCE] Axis2 1.5 beta-1 is out and ready for testing!

2008-12-18 Thread Pär Malmqvist

Hi!

It would be great if you could fix this JIRA to the Axis2 1.5 release:
 https://issues.apache.org/jira/browse/AXIS2-3412
Regards
Pär Malmqvist




 Date: Wed, 17 Dec 2008 13:37:16 -0500
 To: axis-...@ws.apache.org; axis-user@ws.apache.org
 Subject: [ANNOUNCE] Axis2 1.5 beta-1 is out and ready for testing!
 From: g...@thoughtcraft.com
 
 Hi y'all!
 
 I've put the first beta version of Axis2 1.5 up here:
 
 http://people.apache.org/~gdaniels/axis2/dist/1.5-beta-1/
 
 Major Changes Since 1.4.1:
 - Refactored, pluggable transports (separate jars, with deployer)
 - Clustering improvements (works with EC2)
 - Over 100 JIRA issues resolved
 
 This is an initial beta, so there are still a few bugs we expect to nail 
 before 1.5 goes out, and we'll be doing a once-over of the docs/etc 
 before we go final as well.  Thanks to the team for all the good work so 
 far.
 
 For now, please pick it up and kick the tires if you can, paying 
 particular attention to any JIRAs you might want to confirm fixes for. 
 As always, file new issues (or comment on old ones) at:
 
 http://issues.apache.org/jira/browse/AXIS2
 
 If we can manage to get the final version out before the end of the year 
 that would be great.
 
 Thanks,
 --Glen

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

RE: axis2 - creating a customer exception

2008-12-12 Thread Pär Malmqvist

I have reported a similar issue a year ago.
https://issues.apache.org/jira/browse/AXIS2-3412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Is anyone trying to solve the JIRA?
Is it a tough one to fix or just lack of time and other priorities?

Regards
Pär Malmqvist






To: axis-user@ws.apache.org
CC: spar...@scottsdaleins.com
Subject: axis2 - creating a customer exception
From: spar...@scottsdaleins.com
Date: Thu, 11 Dec 2008 09:49:30 -0700





I have created a custom exception and it is being throw by the web service.
The exception has two fields and getter and setter methods for those fields.
Those fields are being set by the service before it throws the customer
exception.  On the client side, the only exception I am able to catch
is  AxisFault exception. In that class, I cannot seem to find the
custom exception I threw, or the fields I set on the custom exception.




Background: 

I am creating the web service from POJO's and a services.xml file. The
WSDL is auto generated when I deploy the web service to axis2 inside of
Tomcat.  Therefore, I have no control over the content of the WSDL.


I am also using Axis2 to create the client. I am using the wsdl2java utility
the auto generates the Stub class from the WSDL.  I have googled this
issue and by all accounts it seems that catching an AxisFault exception
is what the client should do if using Axis2 to autogenerate the stubs from
the WSDL. But how do i access the custom exception I threw and access the
fields I set on the custom exception?   
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

Axis2 1.4.1 release

2008-08-20 Thread Pär Malmqvist


Hallo!

When will the Axis2 1.4.1 version be released?

/Pär Malmqvist

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

RE: images over SOAP

2008-03-12 Thread Pär Malmqvist

Hi, I would like to have a solution that works for Axis1 on the server side as 
well.
I dont know when I am allowed to introduce Axis2 in the production environment. 
And the interoperability to .NET clients has to work as well.

Would MTOM work for Axis1?

Thanks!

/Pär



 Date: Tue, 11 Mar 2008 23:43:44 -0500
 From: [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Subject: Re: images over SOAP
 
 Hi,
   Is the best way to transport the image data as a byte[]?
 You can transport them as byte[] using either base64 encoding, MTOM or
 SwA... MTOM would be the best one among those 3 options, as it
 transports the image data as it is without encoding and it is the new
 standard.
 
   Is there a large overhead from the SOAP protocol which makes the service a
  bit slow or do you
  think it will work fine?
 IMHO it will work fine.. Anyway the file needs to be transferred..
 SOAP overhead would not be a huge compared to the time it takes to
 transport.
 
 thanks,
 Thilina
   Any other suggestions?
 
 
   /Pär
 
  
  Express yourself instantly with MSN Messenger! MSN Messenger
 
 
 
 -- 
 Thilina Gunarathne  - http://thilinag.blogspot.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

images over SOAP

2008-03-11 Thread Pär Malmqvist

Hello!
 
I am about to create a SOAP service that return images (10-50kB) stored in a 
database.
 
Is the best way to transport the image data as a byte[]?
Is there a large overhead from the SOAP protocol which makes the service a bit 
slow or do youthink it will work fine?
Any other suggestions?
 
 
/Pär 
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

RE: [Axis2] 1.4 Release / Blockers

2008-03-03 Thread Pär Malmqvist

Hi!
 
I am really waiting for the JIRA 
https://issues.apache.org/jira/browse/AXIS2-3412 to be fixed.But I cant say it 
is critical. It depends on when the next release (1.5.?) will be delivered and 
if it will by sure be solved then...
 
/Pär
 
 Date: Mon, 3 Mar 2008 09:14:15 -0500 From: [EMAIL PROTECTED] To: [EMAIL 
 PROTECTED]; axis-user@ws.apache.org Subject: [Axis2] 1.4 Release / Blockers 
  -BEGIN PGP SIGNED MESSAGE- Hash: SHA1  Folks,  As of this 
 moment, the # of blockers are down to 1. If you think/know of any bug that 
 needs to be absolutely fixed in Axis2 before the release, please add a 
 comment in JIRA or mark them as blockers.  If there are issues that we 
 should try to target, please set the target as 1.4 and add a comment in JIRA 
 saying that we should try to fix it. Hopefully all of us can chip in to deal 
 with those issues and those in the Critical bucket as well.  thanks, 
 dims -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin)  
 iD8DBQFHzAe2gNg6eWEDv1kRAjU/AKD7RqkIrbTDCHqDliWlufZn0R1drgCg5dfH 
 jz1ptTD5O3zCo+lSoxT4epI= =/6FQ -END PGP SIGNATURE-  
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

RE: Axis2 client hangs with multiple requests in one session

2008-02-18 Thread Pär Malmqvist

Thanks!
 
/Pär Date: Sun, 17 Feb 2008 06:01:01 -0800 From: [EMAIL PROTECTED] To: 
axis-user@ws.apache.org Subject: RE: Axis2 client hangs with multiple requests 
in one session   Yes, doing the following after each AxisFault would help me 
prevent the Axis2 client to hang: client.cleanupTransport(); and my server 
side still gets all the preset cookie values. --  View this message in 
context: 
http://www.nabble.com/Axis2-client-hangs-with-multiple-requests-in-one-session-tp15514156p15529268.html
 Sent from the Axis - User mailing list archive at Nabble.com.   
- To 
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL 
PROTECTED] 
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

RE: Axis2 client hangs with multiple requests in one session

2008-02-17 Thread Pär Malmqvist

Nice in some way to here that I am not the only one having problem with the 
Axis2 client hanging after the third request when AxisFaults are received...
 
I think this is a bug in the transport layer and I have solved it by working 
around.(My application should not get an AxisFault that often so I just 
reinitialize my client...)
So could you send a testcase for Paul, Michele and others to reproduce the 
stuff below?I think the case I reported earlier was not easy enough to 
reproduce.
 
/Pär
 
 
 Date: Sat, 16 Feb 2008 23:09:37 -0800 From: [EMAIL PROTECTED] To: 
 axis-user@ws.apache.org Subject: Re: Axis2 client hangs with multiple 
 requests in one session   1) Yes, the Axis2 client would hang on the 3rd 
 call if the first 2 requests get an AxisFault when I use: 
 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true); 
 options.setCallTransportCleanup(true);  2) The Axis2 client would hang on 
 the 3rd call no matter what when I use: 
 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true);  3) The Axis2 
 client does not work in the way I need when I use: 
 options.setManageSession(true);  4) The Axis2 client is expected to 
 maintain the session correctly, or it is a bug in the code.  5) Can you 
 please provide some example code about how to customize my 
 HttpConnectionManager to help Axis2 client maintain all the info about the 
 session?  Thanks! --  View this message in context: 
 http://www.nabble.com/Axis2-client-hangs-with-multiple-requests-in-one-session-tp15514156p15527041.html
  Sent from the Axis - User mailing list archive at Nabble.com.   
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

RE: Axis2 client hangs with multiple requests in one session

2008-02-16 Thread Pär Malmqvist

Hi!
 
I have noticed that the combination below sometimes hangs on the third call if 
the server response always is an AxisFault.But I have not had time to track it 
down complete so it would be interesting to here from you.What happens when you 
send a call three times in a row and the response is always an AxisFault with 
an error message?
I hope it is not that hard to find out what parameters to use in your call to 
get an AxisFault from the server.
 
Thanks!
 
/Pär
 
 
 
 Date: Sat, 16 Feb 2008 03:30:16 -0800 From: [EMAIL PROTECTED] To: 
 axis-user@ws.apache.org Subject: Re: Axis2 client hangs with multiple 
 requests in one session   Thanks, Michele!  The combination of these 2 
 lines works for multiple requests/responses: 
 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true); 
 options.setCallTransportCleanup(true);  This line only tracks the cookie 
 JSESSIONID but nothing else: options.setManageSession(true); --  View 
 this message in context: 
 http://www.nabble.com/Axis2-client-hangs-with-multiple-requests-in-one-session-tp15514156p15517229.html
  Sent from the Axis - User mailing list archive at Nabble.com.   
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

JIRA solved for Axis2 1.4 release

2008-02-13 Thread Pär Malmqvist

 
Hello!
 
In september 2007 I sent a JIRA about a problem with windows newline \r\n and 
unix/linux newline \n.
https://issues.apache.org/jira/browse/WSCOMMONS-243
 
I was told to report to the WSCOMMONS project.
 
Does anyone here work with WSCOMMONS project and knows if the issue is about to 
be solved?
It would be nice if it is solved for the Axis2 1.4 release.
 
 
/Pär Malmqvist
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

RE: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT

2008-02-03 Thread Pär Malmqvist

Hi Michele!
 
To catch the bug(s) I think the only way for you is to create a testcase that 
is as easy as possible for anyone to reproduce the bug without much effort in 
there own environment.
Most people writing here are good programmers but unfortenately they dont have 
that much time.I think you are doing a great job finding these issues with 
Axis2 and surrounding applications!
 
/Pär 
 
 
 Subject: Re: [axis2] SimpleHTTPServer as transport listener causes too many 
 connections to stay in TIME_WAIT state From: [EMAIL PROTECTED] To: 
 axis-user@ws.apache.org Date: Sat, 2 Feb 2008 20:31:51 +  Paul,  the 
 NIO sender (used by OperationClient objects on the server side) throws an 
 ISE after a few minutes.  I have a logger on the OUT_FLOW phase which 
 captured the error. Here is the SOAP message:  ERROR 20:21:08,751 
 (LoggingHandler.java:161) - OUT_FAULT_FLOW: ?xml version='1.0' 
 encoding='utf-8'?soapenv:Envelope 
 xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; 
 xmlns:wsa=http://www.w3.org/2005/08/addressing;soapenv:Headerwsa:Tohttp://sealbook.ncl.ac.uk:11001/axis2/services/anonService16/wsa:Towsa:ReplyTowsa:Addresshttp://www.w3.org/2005/08/addressing/none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:50C54185E1E92FA9931201983671032/wsa:MessageIDwsa:Actionhttp://www.w3.org/2005/08/addressing/soap/fault/wsa:Actionwsa:RelatesTourn:uuid:FFB56CB70BDEA2D6F41201983736482/wsa:RelatesTo/soapenv:Headersoapenv:Bodysoapenv:Faultsoapenv:Codesoapenv:Valuesoapenv:Receiver/soapenv:Value/soapenv:Codesoapenv:Reasonsoapenv:Text
  xml:lang=en-USError while trying to forward the request to 
 [http://giga23.ncl.ac.uk:18080/axis2/services/Service2] 
 /soapenv:Text/soapenv:Reasonsoapenv:DetailExceptionorg.apache.axis2.AxisFault:
  Error while trying to forward the request to. hostname omitted 
   at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at 
 org.apache.axis2.AxisFault.makeFault(AxisFault.java:406) at 
 org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLogic(RawXMLINOnlyMessageReceiver.java:94)
  at 
 org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145) at 
 org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
  at 
 org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) 
 at 
 org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
  at org.apache.coyote.http11.Http11NioProtocol 
 $Http11ConnectionHandler.process(Http11NioProtocol.java:696) at 
 org.apache.tomcat.util.net.NioEndpoint 
 $SocketProcessor.run(NioEndpoint.java:2009) at 
 java.util.concurrent.ThreadPoolExecutor 
 $Worker.runTask(ThreadPoolExecutor.java:885) at 
 java.util.concurrent.ThreadPoolExecutor 
 $Worker.run(ThreadPoolExecutor.java:907) at 
 java.lang.Thread.run(Thread.java:619) Caused by: 
 java.lang.IllegalStateException: Error while trying to forward the request 
 to [http://giga23.ncl.ac.uk:18080/axis2/services/Service2] at 
 ncl.qosp.controller.service.streams.Sender.send(Sender.java:424) at 
 ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.send(StreamServiceHandlerImpl.java:240)
  at 
 ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.multipleForwards(StreamServiceHandlerImpl.java:226)
  at 
 ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.releaseOrTryForward(StreamServiceHandlerImpl.java:505)
  at 
 ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.response(StreamServiceHandlerImpl.java:581)
  at 
 ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.response(StreamServiceHandlerImpl.java:46)
  at 
 ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.response(StreamDispatcherImpl.java:572)
  at 
 ncl.qosp.controller.streams.StreamRoutingService.result(StreamRoutingService.java:705)
  at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at 

RE: [axis2] ServiceClient.sendReceive blocks application forever

2008-01-23 Thread Pär Malmqvist

Hi Michele!

I have seen the same the same thing with a simple client when an exception is 
thrown from the server.
I posted the issue here on the axis list ago.

I found that when using 
configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
the client hangs. When FALSE it works fine.

Can you try to use use HTTPConstants.REUSE_HTTP_CLIENT = Boolean.FALSE and se 
what happens?
It would be interesting to know.

/Pär






 Subject: [axis2] ServiceClient.sendReceive blocks application forever
 From: [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Date: Tue, 22 Jan 2008 17:14:12 +
 
 Hi all,
 
 after some calls to ServiceClient.sendReceive() my client app. blocks
 forever. On the server side there are no error messages, the same on the
 client.
 By using jstack I've found out that my client blocks on sendReceive(),
 however the target operation is very fast
 
 Here is the output of jstack
 
 Full thread dump Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed mode):
 
 Attach Listener daemon prio=10 tid=0x08790800 nid=0x32bf runnable
 [0x..0x]
java.lang.Thread.State: RUNNABLE
 
Locked ownable synchronizers:
 - None
 
 Axis2 Task daemon prio=10 tid=0x08762800 nid=0x3261 in Object.wait()
 [0x8240d000..0x8240e030]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x85b10070 (a
 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
 $ConnectionPool)
 at
 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnectionManager.java:509)
 - locked 0x85b10070 (a
 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
 $ConnectionPool)
 at
 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHttpConnectionManager.java:394)
 at
 org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:152)
 at
 org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
 at
 org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
 at
 org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
 at
 org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
 at
 org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
 at
 org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
 at
 org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
 at org.apache.axis2.engine.AxisEngine
 $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
 at
 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
 $Worker.runTask(ThreadPoolExecutor.java:665)
 at
 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
 $Worker.run(ThreadPoolExecutor.java:690)
 at java.lang.Thread.run(Thread.java:619)
 
Locked ownable synchronizers:
 - None
 
 HttpListener-11000-1 prio=10 tid=0x08761c00 nid=0x3260 runnable
 [0x8245e000..0x8245efb0]
java.lang.Thread.State: RUNNABLE
 at java.net.PlainSocketImpl.socketAccept(Native Method)
 at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
 - locked 0x85b10430 (a java.net.SocksSocketImpl)
 at java.net.ServerSocket.implAccept(ServerSocket.java:453)
 at java.net.ServerSocket.accept(ServerSocket.java:421)
 at
 org.apache.axis2.transport.http.server.DefaultConnectionListener.run(DefaultConnectionListener.java:79)
 at
 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
 $Worker.runTask(ThreadPoolExecutor.java:665)
 at
 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
 $Worker.run(ThreadPoolExecutor.java:690)
 at java.lang.Thread.run(Thread.java:619)
 
Locked ownable synchronizers:
 - None
 
 MultiThreadedHttpConnectionManager cleanup daemon prio=10
 tid=0x08758000 nid=0x325f in Object.wait() [0x824af000..0x824b0130]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x85b10610 (a java.lang.ref.ReferenceQueue$Lock)
 at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
 - locked 0x85b10610 (a java.lang.ref.ReferenceQueue$Lock)
 at
 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
 $ReferenceQueueThread.run(MultiThreadedHttpConnectionManager.java:1082)
 
Locked ownable synchronizers:
 - None
 
 DestroyJavaVM prio=10 tid=0x0805a800 nid=0x3251 waiting on condition
 [0x..0xb7e3b080]
java.lang.Thread.State: RUNNABLE
 
Locked ownable synchronizers:
 - None
 
 pool-1-thread-1 prio=10 tid=0x0863cc00 nid=0x325e 

RE: [axis2] ServiceClient.sendReceive blocks application forever

2008-01-23 Thread Pär Malmqvist

Michele,
have you checked with a SOAP monitor if the message you are waiting for has 
been sent from the server?
Then you know if it is a server or a client problem.

If it is a client problem you can try to make your thread pool have a size of 1 
to see if there still is some kind of dead lock.

I have checked the source code for the org.apache.commons.httpclient classes 
and found that it would take a while for me to find bugs there. But if you have 
a lot of time I guess it is a way.

/Pär   




 From: [EMAIL PROTECTED]
 Subject: Re: [axis2] ServiceClient.sendReceive blocks application forever
 Date: Wed, 23 Jan 2008 10:48:02 +
 To: axis-user@ws.apache.org
 
 Pär,
 
 what you said makes me think that maybe the cause is that the system  
 blocks when all connections are busy. Does it make any sense?
 
 
 Michele
 
 On 23 Jan 2008, at 10:19, Pär Malmqvist wrote:
 
  Hi Michele!
 
  I have seen the same the same thing with a simple client when an  
  exception is thrown from the server.
  I posted the issue here on the axis list ago.
 
  I found that when using configurationContext.setProperty 
  (HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
  the client hangs. When FALSE it works fine.
 
  Can you try to use use HTTPConstants.REUSE_HTTP_CLIENT =  
  Boolean.FALSE and se what happens?
  It would be interesting to know.
 
  /Pär
 
 
 
 
 
 
   Subject: [axis2] ServiceClient.sendReceive blocks application  
  forever
   From: [EMAIL PROTECTED]
   To: axis-user@ws.apache.org
   Date: Tue, 22 Jan 2008 17:14:12 +
  
   Hi all,
  
   after some calls to ServiceClient.sendReceive() my client app.  
  blocks
   forever. On the server side there are no error messages, the same  
  on the
   client.
   By using jstack I've found out that my client blocks on  
  sendReceive(),
   however the target operation is very fast
  
   Here is the output of jstack
  
   Full thread dump Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed  
  mode):
  
   Attach Listener daemon prio=10 tid=0x08790800 nid=0x32bf runnable
   [0x..0x]
   java.lang.Thread.State: RUNNABLE
  
   Locked ownable synchronizers:
   - None
  
   Axis2 Task daemon prio=10 tid=0x08762800 nid=0x3261 in  
  Object.wait()
   [0x8240d000..0x8240e030]
   java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on 0x85b10070 (a
   org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
   $ConnectionPool)
   at

  org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGet 
  Connection(MultiThreadedHttpConnectionManager.java:509)
   - locked 0x85b10070 (a
   org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
   $ConnectionPool)
   at

  org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getCo 
  nnectionWithTimeout(MultiThreadedHttpConnectionManager.java:394)
   at
   org.apache.commons.httpclient.HttpMethodDirector.executeMethod 
  (HttpMethodDirector.java:152)
   at
   org.apache.commons.httpclient.HttpClient.executeMethod 
  (HttpClient.java:396)
   at
   org.apache.commons.httpclient.HttpClient.executeMethod 
  (HttpClient.java:346)
   at
   org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod 
  (AbstractHTTPSender.java:520)
   at
   org.apache.axis2.transport.http.HTTPSender.sendViaPost 
  (HTTPSender.java:191)
   at
   org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
   at

  org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag 
  eWithCommons(CommonsHTTPTransportSender.java:327)
   at
   org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke 
  (CommonsHTTPTransportSender.java:206)
   at org.apache.axis2.engine.AxisEngine
   $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
   at
   edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
   $Worker.runTask(ThreadPoolExecutor.java:665)
   at
   edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
   $Worker.run(ThreadPoolExecutor.java:690)
   at java.lang.Thread.run(Thread.java:619)
  
   Locked ownable synchronizers:
   - None
  
   HttpListener-11000-1 prio=10 tid=0x08761c00 nid=0x3260 runnable
   [0x8245e000..0x8245efb0]
   java.lang.Thread.State: RUNNABLE
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
   - locked 0x85b10430 (a java.net.SocksSocketImpl)
   at java.net.ServerSocket.implAccept(ServerSocket.java:453)
   at java.net.ServerSocket.accept(ServerSocket.java:421)
   at

  org.apache.axis2.transport.http.server.DefaultConnectionListener.run 
  (DefaultConnectionListener.java:79)
   at
   edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
   $Worker.runTask(ThreadPoolExecutor.java:665)
   at
   edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
   $Worker.run(ThreadPoolExecutor.java:690)
   at java.lang.Thread.run(Thread.java:619)
  
   Locked ownable

my Axis2 1.3 wsdl2java client hangs

2008-01-14 Thread Pär Malmqvist

Hello!
I have a simple service that adds two positive integers and returns the 
result.If a negative value is inserted a java.lang.Exception() is thrown.
The service class file MyTest.java looks like:
 
package mytest;
public class MyTest {public MyTest() {}
public int addPositiveValues (int value1, int value2) throws Exception {
   if(value1 = 0) {  throw(new Exception());   }   if(value2 
= 0) {  throw(new Exception());   }
   return(value1 + value2);}}
 
The services.xml looks like:
 
service name=MyTest scope=applicationdescriptionThis is a 
webservice for MyTest/descriptionmessageReceivers
messageReceiver mep='http://www.w3.org/2004/08/wsdl/in-out'
 class='org.apache.axis2.rpc.receivers.RPCMessageReceiver'/
/messageReceiversparameter name='ServiceClass' 
locked='false'mytest.MyTest/parameter/service
Then I generate an Axis2 1.3 wsdl2java client, xmlbeans style.
I init my client and sets the property HTTPConstants.REUSE_HTTP_CLIENT to 
Boolean.TRUE:Options options = 
stub._getServiceClient().getOptions();options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
 Boolean.TRUE);  Then I call my service with arguments that causes an 
exception (value1=-1, value2=-1) several times.stub.addPositiveValues(...);
The first call by the client works fine and an exception is caught in my client 
the way it should.The second call works fine too and an exception is caught in 
my client.But the third time it just hangs after executing the call. Waits 
forever... The method stub.addPositiveValues(...) never returns or throw an 
exception.
 
One interesting thing is that when I do these three calls with 
HTTPConstants.REUSE_HTTP_CLIENT = Boolean.FALSE it works fine.
 
I hope this is enough information to easy reproduce this case.I am using 
Windows Vista, Tomcat 6.0 and Java 1.6. or Windows XP, Tomcat 6.0 and Java 1.5
 
What do you think?
 
/Pär
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

RE: [Axis2] Release plan and road map for Axis2 1.4 release

2007-12-19 Thread Pär Malmqvist

Hi!

Could you please have a look at the following issue if it can be resolved to 
the Axis2 1.4 release.
I have asked the axis mailing list about this issue a couple of times the last 
year but the problem has not been solved yet.


When creating a web service using existing business logic with code first 
approach I dont think custom exceptions are handled the way it should. (Axis2 
1.3)

Assume the following server side code:

package axis2test;
public class MyService {
public MyService() {
}
public int addOneToPositiveValue(int value) throws CustomException {
if(value  1) {
throw(new CustomException());
}
   
return(value + 1);
}
}
 
package axis2test;
public class CustomException extends Exception {  
private static final long serialVersionUID = 9;
public CustomException() {
super();
}
public String toString() {
return(super.toString() + ' axis2test.CustomException');
}
}
 


This is a webservice for MyService




axis2test.MyService


I deploy the service, let Axis2 generate the .wsdl file and then create a 
client with the wsdl2java tool (xmlbeans style).

The custom exception appears on the client side in the AxisFault details field 
within  -tags together with a HUGE stack trace. This makes it hard for a client 
to parse.

Is it posible to fix this to make it possible to use the generated client like:


try {
stub.addOneToPositiveValue(-1);
}
catch(CustomException c) {
...
...
}
catch(Exception e) {
...
...
}

I have tried the parameters drillDownTo... and sendStackTrace...
It doesn't solve the problem for me.

Thanks.

/Pär
 
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [Axis2] Considerations regarding a static RPCServiceClient instance

2007-12-07 Thread Pär Malmqvist

Hello!
 
I checked the Axis2 source code a couple of weeks ago to see if there would be 
any difference for my generated client when I use different ways of cleanups. 
1. options.setCallTransportCleanup(true)  2. Using any of these methods after 
each call.stub._getServiceClient().cleanup()
stub._getServiceClient().cleanupTransport()stub.cleanup() For my client I could 
not see a reason to do anything more than using 1) and everything would cleanup 
by itself.But this might not be the case for your client, I dont know. /Pär   
From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: RE: [Axis2] 
Considerations regarding a static RPCServiceClient instance Date: Thu, 6 Dec 
2007 17:17:51 +   Hi Michele and Pär,  Finally my code seems to work 
with minimum ressource allocation and mutch faster than before. When I create 
the RPCServiceClient instance I set  options.setCallTransportCleanup(true); 
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);  I 
couldn't find documentation for setCallTransportCleanup, but Pär assumed to use 
this in an other thread. Can someone explain what it really does?  Thanks 
-Marc    From: [EMAIL PROTECTED]  
Subject: Re: [Axis2] Considerations regarding a static RPCServiceClient 
instance  Date: Tue, 4 Dec 2007 09:51:26 +  To: 
axis-user@ws.apache.org  On 4 Dec 2007, at 07:36, Marc Nädele wrote: 
Hi Michele,   the state does not matter. The calls to the 
service are   independent. So the WS implementation on the server does not 
need   to know anything about the state.You didn't get my point. The 
state is your RPCServiceClient instance   (you're doing the same using a 
stateless WS + static variable).   My problem is that the client 
application produces bursts of   independend web service calls to the same 
web service. The user can   load a file where elements are stored. Some of 
those elements are   converted using a web service depending on their type. 
Because of   the system architecture the module which wrapps the   
RPCServiceClient and which calls the web service can not know how   many 
elements are converted via the web service because the   conversion of each 
element is an independent operation. So until   know I create a new 
RPCServiceClient for every conversion   operation. Since there may be up to 
5000 elements which must be   converted in a row, 5000 instances of 
RPCServiceClient are created   in a short period of time and I run into the 
described ressource   problems with the sockets.   My concerns are 
that I keep a living static instance of   RPCServiceClient during the whole 
lifetime of my application which   may never close open ressources. So my 
question is what I have to   do when I reuse one instance during the 
lifetime of the   application. Is it important to initialize and close the 
instance   for each call or can I just create and initialize the instance 
once   and then reuse it without using any special method?Keep using 
your single instance and clean only when you're done.   I hope this helps 
to understand the problem.   Thanks  - Marc   Michele 
    From: [EMAIL PROTECTED] 
 Subject: Re: [Axis2] Considerations regarding a static   
RPCServiceClient instance  Date: Mon, 3 Dec 2007 17:50:38 +  To: 
axis-user@ws.apache.org   Marc,   have you considered making 
your WS statefull?, Using a static  variable to store the state (i.e. your 
RPCServiceClient) doesn't  sound a good idea to me.  About your 
concerns (i.e. resource usage) can you be more specific?
MicheleOn 3 Dec 2007, at 17:40, Marc Nädele wrote:   
Hi all,  I have some serious problems (like out-of socket errors) with 
the  RPCServiceClient class when I have a burst of web service calls  
very fast in a row and create a new RPCServiceClient instance for  each 
call. Normally my application creates series of fast web  service calls 
(to the same web service) in a row like a burst.  Unfortunately because 
of the system architecture I don't know in my  module - which implements 
the web service request - how many  service calls will follow a certain 
service call. So I can not use  the best solution like creating a 
RPCServiceClient instance when  the first call to the web service occurs 
and shut down the  RPCServiceClient instance when all requests of this 
burst are   done.   The only solution I currently have is to 
use a static  RPCServiceClient instance which will be created when the 
 applciation starts and lives until the application is shut down.  
This solution seems to be OK at the first glance but I am afraid  that 
this will result in some other problems like not freeing  ressources or 
other ugly side-effects.   Does anyone have some hints what I have to 
consider if I use a  static RPCServiceClient instance and which options 
or parameters  I should use?  Any help or comment is welcome.  
 Thanks in advance  - Marc   Mit Live 

RE: [Axis2] Considerations regarding a static RPCServiceClient instance

2007-12-04 Thread Pär Malmqvist

Hi Marc! If you dont feel safe of your implementation or how different 
resources are used the best thing is to test your webservice at heavy load and 
for a long time.Make as many calls as you can for a day or even better a couple 
of days with all kinds of data input.If your applications have not grown in 
memory usage and still is working as it should then you probably dont have a 
problem. /Pär  From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: 
RE: [Axis2] Considerations regarding a static RPCServiceClient instance Date: 
Tue, 4 Dec 2007 07:36:11 +   Hi Michele,  the state does not matter. 
The calls to the service are independent. So the WS implementation on the 
server does not need to know anything about the state.  My problem is that 
the client application produces bursts of independend web service calls to the 
same web service. The user can load a file where elements are stored. Some of 
those elements are converted using a web service depending on their type. 
Because of the system architecture the module which wrapps the RPCServiceClient 
and which calls the web service can not know how many elements are converted 
via the web service because the conversion of each element is an independent 
operation. So until know I create a new RPCServiceClient for every conversion 
operation. Since there may be up to 5000 elements which must be converted in a 
row, 5000 instances of RPCServiceClient are created in a short period of time 
and I run into the described ressource problems with the sockets.  My 
concerns are that I keep a living static instance of RPCServiceClient during 
the whole lifetime of my application which may never close open ressources. So 
my question is what I have to do when I reuse one instance during the lifetime 
of the application. Is it important to initialize and close the instance for 
each call or can I just create and initialize the instance once and then reuse 
it without using any special method?  I hope this helps to understand the 
problem.  Thanks - Marc     
From: [EMAIL PROTECTED]  Subject: Re: [Axis2] Considerations regarding a 
static RPCServiceClient instance  Date: Mon, 3 Dec 2007 17:50:38 +  To: 
axis-user@ws.apache.orgMarc,have you considered making your WS 
statefull?, Using a static   variable to store the state (i.e. your 
RPCServiceClient) doesn't   sound a good idea to me.  About your concerns 
(i.e. resource usage) can you be more specific?  Michele  
On 3 Dec 2007, at 17:40, Marc Nädele wrote:Hi all,  I have some 
serious problems (like out-of socket errors) with the   RPCServiceClient 
class when I have a burst of web service calls   very fast in a row and 
create a new RPCServiceClient instance for   each call. Normally my 
application creates series of fast web   service calls (to the same web 
service) in a row like a burst.   Unfortunately because of the system 
architecture I don't know in my   module - which implements the web service 
request - how many   service calls will follow a certain service call. So I 
can not use   the best solution like creating a RPCServiceClient instance 
when   the first call to the web service occurs and shut down the   
RPCServiceClient instance when all requests of this burst are done.   
The only solution I currently have is to use a static   RPCServiceClient 
instance which will be created when the   applciation starts and lives until 
the application is shut down.  This solution seems to be OK at the first 
glance but I am afraid   that this will result in some other problems like 
not freeing   ressources or other ugly side-effects.   Does anyone 
have some hints what I have to consider if I use a   static 
RPCServiceClient instance and which options or parameters   I should use? 
 Any help or comment is welcome.   Thanks in advance  - Marc   
Mit Live Search: Ihre Stadt in der Vogelperspektive! Erleben Sie   neue 
Blickwinkel!  
-  To 
unsubscribe, e-mail: [EMAIL PROTECTED]  For additional commands, e-mail: 
[EMAIL PROTECTED]
_ Jetzt 
kostenlos downloaden: 30 Messenger Emoticons! 
http://www.messenger-emoticons.de/ 
- To 
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL 
PROTECTED] 
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

RE: AxisFault, CustomException and code first approach

2007-12-03 Thread Pär Malmqvist

Hello!
 
Thanks Martin, I tried a couple of configs, but unfortunately it doesn't seem 
to work.
 
parameter name=sendStacktraceDetailsWithFaultstrue/parameter-- 
getDetail() returns huge stacktrace
parameter name=sendStacktraceDetailsWithFaultsfalse/parameter   -- 
getDetail() returns null
 
I have also tried: 
parameter name=DrillDownToRootCauseForFaultReasonfalse/parameter and
parameter name=DrillDownToRootCauseForFaultReasontrue/parameter but it 
has no effect in this case.
 
 
So the question is still:
Could it be possible to change the fault handling code a little bit to throw an 
AxisFault with a CustomException only in the details field? Like: The 
AxisFault.getDetails() returns something like CustomExceptioncustom 
message... /CustomException
 
/Pär
 
 
 
 


From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: AxisFault, CustomException and 
code first approachDate: Thu, 30 Nov 2000 10:30:03 -0500



Hello Par
I would first try to attenuate the axis2.xml parameter  StackTrace e.g.
parameter name=sendStacktraceDetailsWithFaultsfalse/parameterMartin--

- Original Message - 
From: Pär Malmqvist 
To: axis-user@ws.apache.org 
Sent: Friday, November 30, 2007 9:49 AM
Subject: AxisFault, CustomException and code first approach
Hi!When creating a web service using existing business logic with code first 
approach I dont think custom exceptions are handled the way it should. (Axis2 
1.3)The custom exception appears on the client side in the AxisFault details 
field within exceptionexception -tags together with a HUGE stack trace. I 
have checked the source code for RPCMesssageReceiver and specially the section 
that handles the AxisFault:} catch (InvocationTargetException e) {
String msg = null;Throwable cause = e.getCause();if 
(cause != null) {msg = cause.getMessage();} 
   if (msg == null) {msg = Exception occurred while trying to 
invoke service method  +method.getName();} 
   if (cause instanceof AxisFault) {log.debug(msg, 
cause);throw (AxisFault)cause;}
log.error(msg, e);throw new AxisFault(msg, e);} 
catch(RuntimeException e) {throw AxisFault.makeFault(e);} 
catch (Exception e) {String msg = Exception occurred while trying 
to invoke service method  +method.getName();
log.error(msg, e);throw AxisFault.makeFault(e);}}Could it 
be possible to change this code a little bit to throw an AxisFault with a 
CustomException only in the details field? Like: The AxisFault.getDetails() 
returns something like CustomExceptioncustom message... /CustomExceptionIt 
would be much easier to handle the exception on the client side!What do you 
gurus think? /Pär  

Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it! 
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

RE: [Axis2] BindException calling RPCServiceClient very frequently

2007-11-30 Thread Pär Malmqvist

Yes, I instanciate the client once and use it many times.
Thats why the client dont need so many resources from the operating system and
it works.
 
/Pär
 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: RE: [Axis2] 
 BindException calling RPCServiceClient very frequently Date: Fri, 30 Nov 
 2007 17:17:42 +   Setting options.setCallTransportCleanup(true) and 
 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE) did not 
 solve my problem. Still the same Exception.  But I think I may have 
 discovered an other thing which may be important:  Currently I create a new 
 RPCServiceClient instance in every loop. If I create the RPCServiceClient 
 only once and then reuse the same instance in every loop I managed to make 
 5000 and 1 calls in a row. Unfortunately the system architecture which 
 calls the service can not be changed easily to reuse the RPCServiceClient 
 instance. So the problem still exists.  Pär: maybe you can tell me how your 
 scenario - which works for you - is. Do you create a new Axis2 service 
 instance for every call to the service or do you create the service once and 
 then call it multiple times?  Thanks - Marc  
   From: [EMAIL PROTECTED]  To: 
 axis-user@ws.apache.org  Subject: RE: [Axis2] BindException calling 
 RPCServiceClient very frequently  Date: Thu, 29 Nov 2007 11:38:22 +0100  
   Hi!I solved the problem with:Options options = 
 stub._getServiceClient().getOptions();
 options.setCallTransportCleanup(true);
 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
 /Pär  Date: Thu, 29 Nov 2007 11:15:42 +0530  
 From: [EMAIL PROTECTED]  To: axis-user@ws.apache.org  Subject: Re: 
 [Axis2] BindException calling RPCServiceClient very frequently   Marc 
 Nädele wrote:  Hi all,   I am now searching for a solution to 
 this problem for many weeks without success.   I have a very simple 
 RPCServiceClient similar to the one described in the Axis2 POJO Web Services 
 example [1]. If I call this client very frequently in a loop (e.g. 5000 
 times) I eventually get a BindException when calling the service. Client OS 
 is Windows XP SP2. Axis2 version is 1.3.   In the meanwhile I know 
 that the sockets used for the connections are not closed fast enough and if 
 the maximum user sockets under Windows of 5000 is reached I get those 
 exceptions.  From the threads in this mailing list ([2] and [3]) I 
 already got a good understanding about the cause of the problem and what the 
 solution for an asynchronous web service (as described in the JIRA issue 
 #2593 [4]) can be.   But I am not able to transfer this knowledge to 
 my RPCServiceClient. All attempts I made failed. The proposed solution 
 desribed in [4] using the AsyncService2Test.java test case as an example 
 seems not to work for a RPCServiceClient . So is it not possible to get a 
 solution for a RPCServiceClient?   Does anyone have an idea how I can 
 solve this problem for a RPCServiceClient? Any hints are welcome!   
 Did you try client.cleanupTransport() ?   Thanks  Deepal
 -  To 
 unsubscribe, e-mail: [EMAIL PROTECTED]  For additional commands, e-mail: 
 [EMAIL PROTECTED]     Connect 
 to the next generation of MSN Messenger Get it now!   
 _ Die neue 
 Version vom Windows Live Messenger ist da! 
 http://get.live.com/messenger/overview 
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

AxisFault, CustomException and code first approach

2007-11-30 Thread Pär Malmqvist

Hi!
When creating a web service using existing business logic with code first 
approach I dont think custom exceptions are handled the way it should. (Axis2 
1.3)The custom exception appears on the client side in the AxisFault details 
field within exceptionexception -tags together with a HUGE stack trace.
 
I have checked the source code for RPCMesssageReceiver and specially the 
section that handles the AxisFault:
} catch (InvocationTargetException e) {String msg = null;   
 Throwable cause = e.getCause();if (cause != null) {
msg = cause.getMessage();}if (msg == null) {
msg = Exception occurred while trying to invoke service method  + 
   method.getName();}if (cause instanceof 
AxisFault) {log.debug(msg, cause);throw 
(AxisFault)cause;}log.error(msg, e);throw 
new AxisFault(msg, e);} catch(RuntimeException e) {throw 
AxisFault.makeFault(e);} catch (Exception e) {String msg = 
Exception occurred while trying to invoke service method  +   
 method.getName();log.error(msg, e);throw 
AxisFault.makeFault(e);}}
Could it be possible to change this code a little bit to throw an AxisFault 
with a CustomException only in the details field? 
Like: The AxisFault.getDetails() returns something like CustomExceptioncustom 
message... /CustomException
It would be much easier to handle the exception on the client side!
What do you gurus think?
 
/Pär
 
 
 
 
 
 
_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us

RE: [Axis2] BindException calling RPCServiceClient very frequently

2007-11-29 Thread Pär Malmqvist

Hi!
 
I solved the problem with:
 
Options options = stub._getServiceClient().getOptions();
options.setCallTransportCleanup(true);
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
 
/Pär
 
 
 
 
 
 Date: Thu, 29 Nov 2007 11:15:42 +0530 From: [EMAIL PROTECTED] To: 
 axis-user@ws.apache.org Subject: Re: [Axis2] BindException calling 
 RPCServiceClient very frequently  Marc Nädele wrote:  Hi all,   I am 
 now searching for a solution to this problem for many weeks without success. 
   I have a very simple RPCServiceClient similar to the one described in 
 the Axis2 POJO Web Services example [1]. If I call this client very 
 frequently in a loop (e.g. 5000 times) I eventually get a BindException when 
 calling the service. Client OS is Windows XP SP2. Axis2 version is 1.3.   
 In the meanwhile I know that the sockets used for the connections are not 
 closed fast enough and if the maximum user sockets under Windows of 5000 is 
 reached I get those exceptions.   From the threads in this mailing list 
 ([2] and [3]) I already got a good understanding about the cause of the 
 problem and what the solution for an asynchronous web service (as described 
 in the JIRA issue #2593 [4]) can be.   But I am not able to transfer this 
 knowledge to my RPCServiceClient. All attempts I made failed. The proposed 
 solution desribed in [4] using the AsyncService2Test.java test case as an 
 example seems not to work for a RPCServiceClient . So is it not possible to 
 get a solution for a RPCServiceClient?   Does anyone have an idea how I 
 can solve this problem for a RPCServiceClient? Any hints are welcome!   
 Did you try client.cleanupTransport() ?  Thanks Deepal   
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

help to explain an exception

2007-11-23 Thread Pär Malmqvist

Hello!
 
I am running a couple of generated wsdl2java blocking clients in parallel. 
Different processes.They are executing calls to a local web server as fast as 
they can.
Then after some hours I get an exception and I cant understand what is wrong.
What do you think?
 
/Pär Malmqvist
 
 
INFO main org.apache.commons.httpclient.HttpMethodDirector - I/O exception 
(org.apache.commons.httpclient.NoHttpResponseException) caught when processing 
request: The server 127.0.0.1 failed to respondINFO main 
org.apache.commons.httpclient.HttpMethodDirector - Retrying requestINFO main 
org.apache.axis2.transport.http.HTTPSender - Unable to sendViaPost to 
url[http://127.0.0.1:8080/axis2/services/SilDB2]org.apache.axis2.AxisFault: 
problem accessing the parser. Parser already accessed! at 
org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at 
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:72)
 at 
org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
 at 
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
 at 
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
 at 
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) 
at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
 at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) 
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) 
at 
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
 at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191) 
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
 at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
 at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
 at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) 
at 
client.axis2.main.SilDB2Stub.getInteractionsWithinDrugIdListSevClassification(Unknown
 Source) at 
silor.prot.SilApiAxis2Handler.getInteractionsWithinDrugIdListSevClassification(Unknown
 Source) at silor.cases.InteractionBasic.InteractionBasic20070912000(Unknown 
Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at 
java.lang.reflect.Method.invoke(Unknown Source) at 
silor.main.Mexecute.execute(Unknown Source) at 
silor.main.CaseExecutor.run(Unknown Source) at silor.main.Main.init(Unknown 
Source) at silor.main.Main.main(Unknown Source)Caused by: 
javax.xml.stream.XMLStreamException: problem accessing the parser. Parser 
already accessed! at 
org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:906) at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:72)
 at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:57)
 at 
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:525)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:789)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
 at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:237)
 at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:225)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
 at 
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:421)
 at 
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:68)
 ... 28 more
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

wsdl2java client threadsafe?

2007-11-16 Thread Pär Malmqvist

Hello,
do you know if a client generated by the wsdl2java tool is said to be thread 
safe?I am using Axis2 1.3.
 
/Pär Malmqvist
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

RE: Address already in use: connect

2007-11-14 Thread Pär Malmqvist

Hello!
 
The problem with Address already in use: connect exception for an Axis2 
client when executing thousends of calls is solved by:
 
Options options = stub._getServiceClient().getOptions();
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
 
So it might be good to change the default value for 
HTTPConstants.REUSE_HTTP_CLIENT
to TRUE for the client generated by the wsdl2java tool.
 
What do you gurus think?
 
/Pär
 
 
 
 
 Subject: Re: Address already in use: connect From: [EMAIL PROTECTED] To: 
 axis-user@ws.apache.org Date: Wed, 10 Oct 2007 10:54:29 +0100  Try to set 
 some custom options [1], like caching/reusing the same http client and 
 throttling the max number of connections.  Michele  [1] 
 http://svn.apache.org/viewcvs.cgi//webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncService2Test.java
On Wed, 2007-10-10 at 11:13 +0200, Pär Malmqvist wrote:  Hi!I 
 have written a simple blocking client using Axis2 1.3 API's.When I do 
 like this:for(int i = 0; i  100; i++) {  ...  ServiceClient 
 sender = new ServiceClient();  sender.sendReceive(payload);  ...  }  
   there is no problem. The client runs for many hours.When 
 I do like this:ServiceClient sender = new ServiceClient();
 for(int i = 0; i  100; i++) {  ...  sender.sendReceive(payload);  
   sender.cleanup();  sender.cleanupTransport();}I get 
 exception AxisFault: Address already in use: connect  after a couple of 
 thousand calls.It seems to be something wrong in the ServiceClient 
 class which  shows up after a while.  Any ideas?/Pär Malmqvist  
   
 __  
 Explore the seven wonders of the world Learn more!   
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

RE: Address already in use: connect

2007-11-14 Thread Pär Malmqvist

Hi Michele!
 
I have also added:
options.setCallTransportCleanup(true);
to my generated client.
 
Do you know of any more cleanup calls I should do to use the wsdl2java 
generated client in a correct way?
My main goal is to to get the wsdl2java client work fine.
 
/Pär
 
 
 From: [EMAIL PROTECTED] Subject: Re: Address already in use: connect Date: 
 Wed, 14 Nov 2007 14:50:48 + To: axis-user@ws.apache.org  I think that 
 this is not solution.  The problem arises because your code doesn't cleanup 
 the used  resources properly. When you (re)use the same http client you 
 can't see the problem only  because you're using only 1 object.  Michele 
  On 14 Nov 2007, at 14:46, Pär Malmqvist wrote:   Hello!   The 
 problem with Address already in use: connect exception for an   Axis2 
 client when executing thousends of calls  is solved by:   Options 
 options = stub._getServiceClient().getOptions();   
 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);   So 
 it might be good to change the default value for   
 HTTPConstants.REUSE_HTTP_CLIENT  to TRUE for the client generated by the 
 wsdl2java tool.   What do you gurus think?   /Pär   
   Subject: Re: Address already in use: connect   From: [EMAIL 
 PROTECTED]   To: axis-user@ws.apache.org   Date: Wed, 10 Oct 2007 
 10:54:29 +0100 Try to set some custom options [1], like 
 caching/reusing the same   http   client and throttling the max number 
 of connections. Michele [1]   
 http://svn.apache.org/viewcvs.cgi//webservices/axis2/trunk/java/   
 modules/integration/test/org/apache/axis2/async/AsyncService2Test.java   
 On Wed, 2007-10-10 at 11:13 +0200, Pär Malmqvist wrote:Hi! 
   I have written a simple blocking client using Axis2 1.3 API's. 
   When I do like this:   for(int i = 0; i  100; 
 i++) {...ServiceClient sender = new ServiceClient();
 sender.sendReceive(payload);...}   there is no 
 problem. The client runs for many hours. When I 
 do like this:   ServiceClient sender = new ServiceClient();   
 for(int i = 0; i  100; i++) {...
 sender.sendReceive(payload);sender.cleanup();
 sender.cleanupTransport();   }   I get exception 
 AxisFault: Address already in use: connectafter a couple of 
 thousand calls.   It seems to be something wrong in the 
 ServiceClient class whichshows up after a while.Any ideas?  
  /Pär Malmqvist   
   
 __
 Explore the seven wonders of the world Learn more! 
 -   To 
 unsubscribe, e-mail: [EMAIL PROTECTED]   For additional commands, e-mail: 
 [EMAIL PROTECTED]  Get news, entertainment and everything you 
 care about at Live.com.   Check it out!   
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

RE: WSDL2Java, Address already in use: connect

2007-10-13 Thread Pär Malmqvist

Hi Michele!
 
Yes I know about your other reply, it was my question that one too... :)
Thanks!
 
I guess the solution you gave me works for both cases, but in this case I would 
like to get a generated client that works fine with not much work.
Not that I am that lazy but I think of the people that dont have that much 
knowledge about Axis2 and we want everybody to use Axis2 in a simple way!
 
So it would be nice to here the opinion from anyone working with the WSDL2Java 
tool.
 
Regards 
Pär Malmqvist
 
 
 
 
 
 
 
 Subject: Re: WSDL2Java, Address already in use: connect From: [EMAIL 
 PROTECTED] To: axis-user@ws.apache.org Date: Fri, 12 Oct 2007 16:11:33 
 +0100  A question like yours - with related reply - was sent to this 
 mailing list 2 days ago.  Michele  On Fri, 2007-10-12 at 16:05 +0200, 
 Pär Malmqvist wrote:  Hi!I am using Axis2 1.3 and have generated a 
 client of type xmlbeans with  WSDL2Java.I am using the constructor: 
 stub = new MyServiceStub(endPoint);  Then I create my request and execute 
 the service and it works fine.But when I have done a couple of 
 thousands requests I get the  exception:  Address already in use: 
 connect.Is there something wrong in the generated client or am I 
 using it  wrong?/Pär Malmqvist
 __  
 Invite your mail contacts to join your friends list with Windows Live  
 Spaces. It's easy! Try it!   
 - To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: 
 [EMAIL PROTECTED] 
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

Address already in use: connect

2007-10-10 Thread Pär Malmqvist

Hi!
 
I have written a simple blocking client using Axis2 1.3 API's.
 
When I do like this:
 
for(int i = 0; i  100; i++) {
...
ServiceClient sender = new ServiceClient();
sender.sendReceive(payload);
...
}
 
there is no problem. The client runs for many hours.
 
 
 
When I do like this:
 
ServiceClient sender = new ServiceClient();
 
for(int i = 0; i  100; i++) {
...
sender.sendReceive(payload);

sender.cleanup();
sender.cleanupTransport();
 
}
 
I get exception AxisFault: Address already in use: connect
after a couple of thousand calls.
 
It seems to be something wrong in the ServiceClient class which shows up after 
a while.
Any ideas?
 
/Pär Malmqvist
 
 
 
 
 
 
 
_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

AxisFault and CustomException

2007-10-04 Thread Pär Malmqvist

Hello! I have created a simple Axis2 service called MyService, se code below. 
It has one method: addOneToPositiveValue. If it is called with a negative value 
it throws a CustomException.I have created a MyService.aar and deployed it on 
Axis2 1.3 and Tomcat 5.5.23 Then I created a simple client with wsdl2java and 
xmlbeans style. Its really hard to get the CustomException in an easy way at 
the client side.The AxisFault.getDetail() displays the name of the exception 
deep down in some kind of stacktrace. Thats all. Can you Axis2 gurus have a 
look at it please?If I haven't missed anything I think something has to be done 
to make this easier. Thanks. /Pär package axis2test;public class MyService {
public MyService() {}public int addOneToPositiveValue(int value) throws 
CustomException {if(value  1) {throw(new 
CustomException());}return(value + 1);}} package 
axis2test;public class CustomException extends Exception {   private static 
final long serialVersionUID = 9;public CustomException() {
super();}public String toString() {return(super.toString() + ' 
axis2test.CustomException');}} service name='MyService' 
scope='application'descriptionThis is a webservice for MyService 
   /descriptionmessageReceiversmessageReceiver 
mep='http://www.w3.org/2004/08/wsdl/in-out' 
class='org.apache.axis2.rpc.receivers.RPCMessageReceiver'/
/messageReceiversparameter name='ServiceClass' 
locked='false'axis2test.MyService/parameter/service
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

RE: Exception handling - AxisFault

2007-10-02 Thread Pär Malmqvist

I also have problem with this and I have a bad solution for the moment.
Set the parameter DrillDownToRootCauseForFaultReason to true in the axis2.xml 
configuration file at the server side.
Then you can see the Exception in the AxisFault message. I think it is 
getDetails().
 
 
/Pär
 
 
 
 
 Subject: Exception handling - AxisFault Date: Tue, 2 Oct 2007 09:57:08 
 +0200 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org  Hi,  I am 
 desperate since 2 weeks, because I keep hanging on this problem: I do not 
 know how AxisFault is handled, and why my custom exception is not serialized 
 and passed back to the client side, where it should be re-instantiated by 
 reflection, as it should be, according to the Axis2 tools.   To be honest, 
 I am not sure anymore if this works at all, and I am only 1 step before 
 implementing my own webservice handling classes and quit the Axis framework, 
 or look for something else - the framework is unfortunately _completely_ 
 useless if something as basic as that does not function or is poorly 
 documented. I would of course also appreciate verbose documentation on how 
 exceptions are passed, how AxisFault is handled, instantiated, passed back, 
 serialized, etc. etc.  So I repost my problem here, in hope for help or 
 advice. If I do not get any until tomorrow, I will have to recommend using 
 something else.   My problem: I can invoke web services without problems, 
 but I do not get back customized exceptions on my Java client side.  Here 
 is my generation procedure and source: 1) I write a class AService, in which 
 I define one simple operation (add(int,int,int)), it returns a result of type 
 long, if the third argument is 0. If the 3rd int is not 0, it will throw 
 CustomException. 2) CustomException is a class defined as extending 
 java.lang.Exception and implements java.io.Serializable 3) I generate the 
 service with Axis2 tools, and deploy the service. 4) I generate the wsdl. 
 The wsdl correctly includes the fault element named wsdl:fault 
 name=CustomException soap:fault use=literal name=CustomException/ 
 5) I generate the java client with the axis2 codegen wizard. 6) I invoke the 
 web service with it, without exception testing: works. 7) I invoke it to 
 throw the exception (3rd int = 1): doesn't work. I only get an AxisFault. But 
 the generated client should throw a CustomException. AxisFault.getDetail() is 
 empty.   What is wrong ? I include the 2 simple java files from which I 
 started here: package com.foo.bar;   public class AService { public long 
 Add(int a, int b, int exceptionThrown) throws CustomException {  if 
 (exceptionThrown != 0) { System.out.println(CustomException to b 
 instantiated);   CustomException e = new CustomException(); 
 e.setCustomMsg(bar); throw e; }   return a+b;}  }  Here the 
 exception class: package com.foo.bar;  import java.io.Serializable;  
 public class CustomException extends java.lang.Exception implements 
 Serializable {  private static final long serialVersionUID = 
 1542353156105984960L; private String customMsg;  public String 
 getCustomMsg() {return customMsg;} public void setCustomMsg(String 
 customMsg) {this.customMsg=customMsg;}   }   Here is the generated 
 WSDL: wsdl:definitions 
 xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; 
 xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; 
 xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; 
 xmlns:xsd=http://bar.foo.com/xsd; xmlns:ns=http://bar.foo.com; 
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; 
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; 
 targetNamespace=http://bar.foo.com;wsdl:typesxs:schema 
 xmlns:xs=http://www.w3.org/2001/XMLSchema; attributeFormDefault=qualified 
 elementFormDefault=qualified targetNamespace=http://bar.foo.com/xsd; 
 xs:element name=CustomExceptionFault xs:complexType xs:sequence 
 xs:element name=CustomException nillable=true type=xsd:CustomException 
 / /xs:sequence /xs:complexType /xs:element xs:element 
 name=CustomException type=xsd:CustomException / xs:complexType 
 name=CustomException xs:complexContent xs:extension 
 base=xs:Exception xs:sequence xs:element name=customMsg 
 nillable=true type=xs:string / /xs:sequence /xs:extension 
 /xs:complexContent /xs:complexType xs:element name=Add 
 xs:complexType xs:sequence xs:element name=a nillable=true 
 type=xs:int / xs:element name=b nillable=true type=xs:int / 
 xs:element name=exceptionThrown nillable=true type=xs:int / 
 /xs:sequence /xs:complexType /xs:element xs:element 
 name=AddResponse xs:complexType xs:sequence xs:element 
 name=return nillable=true type=xs:long / /xs:sequence 
 /xs:complexType /xs:element /xs:schema/wsdl:typeswsdl:message 
 name=AddMessagewsdl:part name=part1 element=xsd:Add 
 //wsdl:messagewsdl:message name=AddResponseMessagewsdl:part 
 name=part1 element=xsd:AddResponse //wsdl:messagewsdl:message 
 name=CustomExceptionwsdl:part name=part1 element=xsd:CustomException 
 //wsdl:messagewsdl:portType name=AServicePortTypewsdl:operation 
 

RE: Urgent - Exception Mapping with Axis2

2007-09-27 Thread Pär Malmqvist

Hi,
a similar case have been discussed here, and mister Deepal Jayasinghe asked 
John to create a JIRA for it.
What happended with that one?
I guess it is the same problem/solution.
 
Check mailconversation below:
 
/Pär Malmqvist
 
 
Hi John,Could you please create a JIRA and attach whatever necessary to 
recreatethe issue. ThanksDeepal Hi all, I'm a newbie to Axis2, though have 
used Axis1 before, and am having trouble with exceptions on the client end. 
I've deployed a POJO as a service under Tomcat. I generated the service and 
client using Eclipse WTP, so to be as brief as possible, the service has a 
method: public CounterLight getCounter(Long nsuk) throws 
CounterNotFoundException { : throw new 
CounterNotFoundException(Exception) ; } CounterNotFoundException is 
simply an extension of java.lang.Exception (it implements Serializable as 
well, though I don't think this makes any difference) Wsdl2java generates a 
class called CounterNotFoundExceptionException2 alongside the stub for the 
service On the client side I have: try { stub.getCounter(params) ; // 
Params initialised properly etc } catch(CounterNotFoundExceptionException2 e) 
{ e.printStackTrace() ; } catch (AxisFault e) { e.printStackTrace() ; } 
The AxisFault is ALWAYS the one that is received, never the generated 
exception (though the compiler insists that I check for it). On the server 
side, I also get a java.lang.reflect.InvocationTargetException...Caused by 
CounterException Can anybody point me in the right direction here, am I 
missing something? I've googled extensively, searched the list archives etc, 
but couldn't find much of help. Thanks for any help! John
 
 
 
 
 
 
 
 Subject: RE: Urgent - Exception Mapping with Axis2 Date: Wed, 26 Sep 2007 
 16:34:34 +0200 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org  just 
 to correct: AxisFault.getDetail is not empty, it is null.   
 -Original Message-  From: Jay Zawar   Sent: mercredi 26 septembre 
 2007 16:32  To: axis-user@ws.apache.org  Subject: Urgent - Exception 
 Mapping with Axis2  Hi people,I am really puzzled about 
 Axis Code generators and the way   custom exceptions are passed. I do not 
 even find good   documentation on it. I've been on this problem for almost 
 a   week now, and still do not find any answer. My problem: I can   
 invoke web services without problems, but I do not get back   customized 
 exceptions on my Java client side.Here is my generation procedure and 
 source:  1) I write a class AService, in which I define one simple   
 operation (add(int,int,int)), it returns a result of type   long, if the 
 third argument is 0. If the 3rd int is not 0, it   will throw 
 CustomException.  2) CustomException is a class defined as extending  
  java.lang.Exception and implements java.io.Serializable  3) I generate 
 the service with Axis2 tools, and deploy the service.  4) I generate the 
 wsdl. The wsdl correctly includes the fault   element named wsdl:fault 
 name=CustomException  soap:fault use=literal 
 name=CustomException/  5) I generate the java client with the axis2 
 codegen wizard.  6) I invoke the web service with it, without exception 
 testing: works.  7) I invoke it to throw the exception (3rd int = 1): 
 doesn't   work. I only get an AxisFault. But the generated client   
 should throw a CustomException. AxisFault.getDetail() is empty. What 
 is wrong ?  I include the 2 simple java files from which I started here:  
 package com.foo.bar;  public class AService {  public long 
 Add(int a, int b, int exceptionThrown)   throws CustomException {if 
 (exceptionThrown != 0) {  System.out.println(CustomException to   b 
 instantiated); CustomException e = new CustomException();  
 e.setCustomMsg(bar);  throw e;  }  return a+b;}}   
  Here the exception class:  package com.foo.bar;import 
 java.io.Serializable;public class CustomException extends 
 java.lang.Exception   implements Serializable {private static final 
 long serialVersionUID =   1542353156105984960L;  private String 
 customMsg;public String getCustomMsg() {return customMsg;}  public 
 void setCustomMsg(String customMsg)   {this.customMsg=customMsg;} 
  }  Here is the generated WSDL:  wsdl:definitions   
 xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;   
 xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;   
 xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/;   
 xmlns:xsd=http://bar.foo.com/xsd;   xmlns:ns=http://bar.foo.com;   
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;   
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;   
 targetNamespace=http://bar.foo.com;wsdl:typesxs:schema   
 xmlns:xs=http://www.w3.org/2001/XMLSchema;   
 attributeFormDefault=qualified   elementFormDefault=qualified   
 targetNamespace=http://bar.foo.com/xsd;  xs:element 
 name=CustomExceptionFault  xs:complexType  xs:sequence  
 xs:element name=CustomException nillable=true   
 type=xsd:CustomException /  /xs:sequence