Code generation problem

2008-07-30 Thread Shripad Gokhale
Hi,

 

The code generated by AXIS in our software gets compilation errors when
using a complex WSDL that includes other XSDs. 

The attached MessageInterfaces.zip file contains the xsdl file at
MessageInterfaces\wsdl\billingServices\v3.3\GetProfile.wsdl. This file
contain references to other xsd files which are located in different
directories inside the zip file. CodeGenerated.zip file contains the
codes generated by AXIS 1.4. The problem in the generated files is that
in some classes like CustomerListEntity and Phone, constructors of the
super classes are called with input parameters in different orders than
specified in the constructor definition. 

It's a problem in Pre-Production environment and need an urgent
solution. Due to this problem, our product is not at all configurable at
the customer end.

 

Thanks

Shripad/Dhirendra

 


This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp


RE: Code generation problem

2008-07-30 Thread Shripad Gokhale
The attachements can ne found below

 

https://issues.apache.org/jira/browse/AXIS-2755

 

 

From: Shripad Gokhale [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 30, 2008 11:46 AM
To: axis-user@ws.apache.org
Subject: Code generation problem

 

Hi,

 

The code generated by AXIS in our software gets compilation errors when using a 
complex WSDL that includes other XSDs. 

The attached MessageInterfaces.zip file contains the xsdl file at 
MessageInterfaces\wsdl\billingServices\v3.3\GetProfile.wsdl. This file contain 
references to other xsd files which are located in different directories inside 
the zip file. CodeGenerated.zip file contains the codes generated by AXIS 1.4. 
The problem in the generated files is that in some classes like 
CustomerListEntity and Phone, constructors of the super classes are called with 
input parameters in different orders than specified in the constructor 
definition. 

It's a problem in Pre-Production environment and need an urgent solution. Due 
to this problem, our product is not at all configurable at the customer end.

 

Thanks

Shripad/Dhirendra

 

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp

 



Re: Axis with XSLT

2008-07-30 Thread Pierre Muller




Or you may use AXIOM service and client to build and decode datas in a
DOM-like tree.

sumedha rubasinghe a écrit :

  Hi,
Data Services is a mechanism to expose relational database objects as
web services.
It will return data in your database object (eg. table) in XML format. 
  
Checkout following tutorial @ http://wso2.org/library/2617 .
A collection of such tutorials can be found @ http://wso2.org/library/3183 .
  
/sumedha
  
  
  On Tue, Jul 29, 2008 at 8:39 PM, samsam007 [EMAIL PROTECTED]
wrote:
  
Hi,

I tried to build a AXIS service to return a recordset (from array or
database) to an AXIS client.
The client will use the following APIs to request the recordset from the
AXIS service server:
CreateCall() - SetTargetEndpointAddress(..) -
SetOperationName(...) -
call.invoke()

Now, I am not sure how to build the AXIS service to return the
recordset to
the soap client.
I know xslt can be used to interact between soap/axis service and
client.
Can anybody post an example about how tho use AXIS with XSLT to return
record(xml data) to the client?

Thanks
S
--
View this message in context: http://www.nabble.com/Axis-with-XSLT-tp18714395p18714395.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]


  
  
  

**
Si vous n'êtes pas le destinataire désigné de ce message ou une personne autorisée à l'utiliser, toute distribution, copie, publication ou usage à quelques fins que ce soit des informations dans ce message sont interdits. Merci d'informer immédiatement l'expéditeur par messagerie, et, de détruire ce message.
This e-mail is confidential. If you are not the addressee or an authorized recipient of this message, any distribution, copying, publication or use of this information for any purpose is prohibited. Please notify the sender immediately by e-mail and then delete this message.
**






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When do cleanup functions need to be called?

2008-07-30 Thread David Rees
On Tue, Jul 29, 2008 at 10:52 PM, Amila Suriarachchi
[EMAIL PROTECTED] wrote:
 this method should be call when the MyServiceStub (see finalize method in
 ServiceClient) is garbage collected. I am not sure why it is not being
 called automatically.

I don't think that it's being garbage collected at all. From what I
can tell, a bunch of objects are still being referenced by the
AxisConfiguration referenced by the AxisServlet.

 In RC1 we fixed a memory leak regarding this. But I can not realy think the
 reason for your problem.

Yes, 1.4.1 RC1 makes the situation a lot better than 1.4 - Calling
cleanup has no effect on the memory leak (see my earlier followup
email).

 you can get the AxisConfiguration object like this,
 AxisConfiguration axiConfiguration =
 MessageContext.getCurrentMessageContext().getConfigurationContext().getAxisConfiguration();

 and check whether there are some additional objects there after calling
 clean up.

 Please log a jira.

Once I can create a small reproducable test-case I'll log a jira issue.

Let me know if there is any other information I can gather or if
there's anything else you want me to try in the meantime.

Thanks,

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When do cleanup functions need to be called?

2008-07-30 Thread Pierre Muller




On spec, wouldn't it be related to the scope of your services ?
http://www.developer.com/java/web/article.php/3620661


David Rees a crit:

  On Tue, Jul 29, 2008 at 10:52 PM, Amila Suriarachchi
[EMAIL PROTECTED] wrote:
  
  
this method should be call when the MyServiceStub (see finalize method in
ServiceClient) is garbage collected. I am not sure why it is not being
called automatically.

  
  
I don't think that it's being garbage collected at all. From what I
can tell, a bunch of objects are still being referenced by the
AxisConfiguration referenced by the AxisServlet.

  
  
In RC1 we fixed a memory leak regarding this. But I can not realy think the
reason for your problem.

  
  
Yes, 1.4.1 RC1 makes the situation a lot better than 1.4 - Calling
cleanup has no effect on the memory leak (see my earlier followup
email).

  
  
you can get the AxisConfiguration object like this,
AxisConfiguration axiConfiguration =
MessageContext.getCurrentMessageContext().getConfigurationContext().getAxisConfiguration();

and check whether there are some additional objects there after calling
clean up.

Please log a jira.

  
  
Once I can create a small reproducable test-case I'll log a jira issue.

Let me know if there is any other information I can gather or if
there's anything else you want me to try in the meantime.

Thanks,

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

**
Si vous n'êtes pas le destinataire désigné de ce message ou une personne autorisée à l'utiliser, toute distribution, copie, publication ou usage à quelques fins que ce soit des informations dans ce message sont interdits. Merci d'informer immédiatement l'expéditeur par messagerie, et, de détruire ce message.
This e-mail is confidential. If you are not the addressee or an authorized recipient of this message, any distribution, copying, publication or use of this information for any purpose is prohibited. Please notify the sender immediately by e-mail and then delete this message.
**






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Debugging asynchronous client

2008-07-30 Thread Hasnain Badami
Hi

I am trying to debug an axis client, which interacts with a c# webservice. I
am sending three hello requests using the code

DMTServiceStub dmtStub = *new* DMTServiceStub();

// Related to ws-addressing

dmtStub._getServiceClient().engageModule(Constants.*MODULE_ADDRESSING*);

dmtStub._getServiceClient().getOptions().setUseSeparateListener(*true*);

 HttpTransportProperties.ProxyProperties pp =
*new*HttpTransportProperties.ProxyProperties();

pp.setProxyName(localhost);

pp.setDomain(localhost);

pp.setProxyPort(7070);

Options axisOptions = dmtStub._getServiceClient().getOptions();

axisOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.*PROXY
*, pp);

axisOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.*
REUSE_HTTP_CLIENT*, *true*);

axisOptions.setTransportInProtocol(Constants.*TRANSPORT_HTTP*);

dmtStub._getServiceClient().setOptions(axisOptions);

DMTServiceCallbackHandler callback = *new* DMTServiceCallbackHandler(*null*
){

*public* *void* receiveResultHello(org.tempuri.HelloResponseDocument
result){

*log*.info(Call back,  + result.getHelloResponse().getHelloResult());

}

*public* *void* receiveErrorHello(Exception e){

*log*.info(Error received  + e);

}

};

*for*(*int* counter=0; counter3; counter++)

{

HelloDocument helloEnvelope = HelloDocument.Factory.*newInstance*();

Hello helloRequest = Hello.Factory.*newInstance*();

helloRequest.setMyValue(Hello, my name is HB  + counter);

helloEnvelope.setHello(helloRequest);

dmtStub.startHello(helloEnvelope, callback);

}

*I am using tcpmon to view the request and response. Using the above code,
axis2 starts listening at port 6060 for the response, but it never gets any
response. Tcpmon shows me the response that is being sent. I can see that my
axis2 client is setting the header wsa:ReplyTo and wsa:Address, but its
still not receiving any response from the server, whereas tcpmon shows that
the response is coming in. Can anybody help me in debugging this scenario? I
have really spent a lot of time and am in difficulty. Interestingly if I set
*

*dmtStub._getServiceClient().getOptions().setUseSeparateListener(true) to
false, I start receiving the response in my callback handler. I cant
understand what s going on.
*

*Request tcpmon recieves:*

POST http://localhost:8001/DMTService/DMTService HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action=
http://tempuri.org/IDMTService/Hello;
User-Agent: Axis2
Host: localhost:8001
Proxy-Connection: Keep-Alive
Transfer-Encoding: chunked

290
?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://localhost:8001/DMTService/DMTService/wsa:Towsa:ReplyTowsa:Addresshttp://10.0.75.51:6060/axis2/services/DMTService12499184/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:DA179A9626ABCF16EE1217410510466/wsa:MessageIDwsa:Actionhttp://tempuri.org/IDMTService/Hello/wsa:Action/soapenv:Headersoapenv:BodyHellohttp://www.w3.org/2005/08/addressing%22%3E%3Csoapenv:Header%3E%3Cwsa:To%3Ehttp://localhost:8001/DMTService/DMTService%3C/wsa:To%3E%3Cwsa:ReplyTo%3E%3Cwsa:Address%3Ehttp://10.0.75.51:6060/axis2/services/DMTService12499184%3C/wsa:Address%3E%3C/wsa:ReplyTo%3E%3Cwsa:MessageID%3Eurn:uuid:DA179A9626ABCF16EE1217410510466%3C/wsa:MessageID%3E%3Cwsa:Action%3Ehttp://tempuri.org/IDMTService/Hello%3C/wsa:Action%3E%3C/soapenv:Header%3E%3Csoapenv:Body%3E%3CHelloxmlns=
http://tempuri.org/;myValue http://tempuri.org/%22%3E%3CmyValue xmlns=
http://tempuri.org/;Hello http://tempuri.org/%22%3EHello, my name is HB
0/myValue/Hello/soapenv:Body/soapenv:Envelope
0



*Response tcpmon recieves:*

HTTP/1.1 200 OK
Content-Length: 428
Content-Type: application/soap+xml; charset=utf-8
Server: Microsoft-HTTPAPI/1.0
Date: Wed, 30 Jul 2008 09:35:10 GMT
Connection: close

s:Envelope xmlns:s=http://www.w3.org/2003/05/soap-envelope; xmlns:a=
http://www.w3.org/2005/08/addressing;s:Headera:Actionhttp://www.w3.org/2005/08/addressing%22%3E%3Cs:Header%3E%3Ca:Actions:mustUnderstand=1
http://tempuri.org/IDMTService/HelloResponse/a:Actiona:RelatesTourn:uuid:DA179A9626ABCF16EE1217410510466/a:RelatesTo/s:Headers:BodyHelloResponse
xmlns=http://tempuri.org/;HelloResultHellohttp://tempuri.org/%22%3E%3CHelloResult%3EHello:
Hello, my name is HB 0/HelloResult/HelloResponse/s:Body/s:Envelope


Re: Debugging asynchronous client

2008-07-30 Thread Charitha Kankanamge

Hi,
Please have a look at following blog posts, which explain how to debug 
async clients.


[1]http://charithaka.blogspot.com/2008/07/how-to-monitor-messages-using-tcpmon-in.html
[2]http://pzf.fremantle.org/2008/07/how-to-debug-async-responses-in-axis2.html

regards
Charitha

http://charithaka.blogspot.com
www.wso2.org

Hasnain Badami wrote:


Hi
 
I am trying to debug an axis client, which interacts with a c# 
webservice. I am sending three hello requests using the code  


DMTServiceStub dmtStub =

*new* DMTServiceStub(); // Related to ws-addressing

dmtStub._getServiceClient().engageModule(Constants.

/MODULE_ADDRESSING/);

dmtStub._getServiceClient().getOptions().setUseSeparateListener(

*true*);

HttpTransportProperties.ProxyProperties pp =

*new* HttpTransportProperties.ProxyProperties();

pp.setProxyName(

localhost);

pp.setDomain(

localhost);

pp.setProxyPort(7070);

Options axisOptions = dmtStub._getServiceClient().getOptions();

axisOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.

/PROXY/, pp);

axisOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.

/REUSE_HTTP_CLIENT/, *true*);

axisOptions.setTransportInProtocol(Constants.

/TRANSPORT_HTTP/);

dmtStub._getServiceClient().setOptions(axisOptions);

DMTServiceCallbackHandler callback =

*new* DMTServiceCallbackHandler(*null*){ *public* *void* 
receiveResultHello(org.tempuri.HelloResponseDocument result){ 
/log/.info(Call back,  + result.getHelloResponse().getHelloResult());


}

*public* *void* receiveErrorHello(Exception e){ /log/.info(Error 
received  + e);


}

};

*for*(*int* counter=0; counter3; counter++)

{

HelloDocument helloEnvelope = HelloDocument.Factory./newInstance/();

Hello helloRequest = Hello.Factory./newInstance/();

helloRequest.setMyValue(

Hello, my name is HB  + counter);

helloEnvelope.setHello(helloRequest);

dmtStub.startHello(helloEnvelope, callback);

}

*I am using tcpmon to view the request and response. Using the above 
code, axis2 starts listening at port 6060 for the response, but it 
never gets any response. Tcpmon shows me the response that is being 
sent. I can see that my axis2 client is setting the header 
wsa:ReplyTo and wsa:Address, but its still not receiving any 
response from the server, whereas tcpmon shows that the response is 
coming in. Can anybody help me in debugging this scenario? I have 
really spent a lot of time and am in difficulty. Interestingly if I set *


*dmtStub._getServiceClient().getOptions().setUseSeparateListener(true) 
to false, I start receiving the response in my callback handler. I 
cant understand what s going on.*


*Request tcpmon recieves:*

POST http://localhost:8001/DMTService/DMTService HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; 
action=http://tempuri.org/IDMTService/Hello;

User-Agent: Axis2
Host: localhost:8001
Proxy-Connection: Keep-Alive
Transfer-Encoding: chunked

290
?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://localhost:8001/DMTService/DMTService/wsa:Towsa:ReplyTowsa:Addresshttp://10.0.75.51:6060/axis2/services/DMTService12499184/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid:DA179A9626ABCF16EE1217410510466/wsa:MessageIDwsa:Actionhttp://tempuri.org/IDMTService/Hello/wsa:Action/soapenv:Headersoapenv:BodyHello 
http://www.w3.org/2005/08/addressing%22%3E%3Csoapenv:Header%3E%3Cwsa:To%3Ehttp://localhost:8001/DMTService/DMTService%3C/wsa:To%3E%3Cwsa:ReplyTo%3E%3Cwsa:Address%3Ehttp://10.0.75.51:6060/axis2/services/DMTService12499184%3C/wsa:Address%3E%3C/wsa:ReplyTo%3E%3Cwsa:MessageID%3Eurn:uuid:DA179A9626ABCF16EE1217410510466%3C/wsa:MessageID%3E%3Cwsa:Action%3Ehttp://tempuri.org/IDMTService/Hello%3C/wsa:Action%3E%3C/soapenv:Header%3E%3Csoapenv:Body%3E%3CHello 
xmlns=http://tempuri.org/;myValue 
http://tempuri.org/%22%3E%3CmyValue 
xmlns=http://tempuri.org/;Hello http://tempuri.org/%22%3EHello, my 
name is HB 0/myValue/Hello/soapenv:Body/soapenv:Envelope

0

 


*Response tcpmon recieves:*

HTTP/1.1 200 OK
Content-Length: 428
Content-Type: application/soap+xml; charset=utf-8
Server: Microsoft-HTTPAPI/1.0
Date: Wed, 30 Jul 2008 09:35:10 GMT
Connection: close

s:Envelope xmlns:s=http://www.w3.org/2003/05/soap-envelope; 
xmlns:a=http://www.w3.org/2005/08/addressing;s:Headera:Action 
http://www.w3.org/2005/08/addressing%22%3E%3Cs:Header%3E%3Ca:Action 
s:mustUnderstand=1http://tempuri.org/IDMTService/HelloResponse/a:Actiona:RelatesTourn:uuid:DA179A9626ABCF16EE1217410510466/a:RelatesTo/s:Headers:BodyHelloResponse 
xmlns=http://tempuri.org/;HelloResultHello 
http://tempuri.org/%22%3E%3CHelloResult%3EHello: Hello, my name is 
HB 0/HelloResult/HelloResponse/s:Body/s:Envelope




Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 270.4.7/1543 - Release Date: 7/9/2008 6:32 PM
 





Re: When do cleanup functions need to be called?

2008-07-30 Thread Amila Suriarachchi
On Wed, Jul 30, 2008 at 2:15 PM, David Rees [EMAIL PROTECTED] wrote:

 On Tue, Jul 29, 2008 at 10:52 PM, Amila Suriarachchi
 [EMAIL PROTECTED] wrote:
  this method should be call when the MyServiceStub (see finalize method in
  ServiceClient) is garbage collected. I am not sure why it is not being
  called automatically.

 I don't think that it's being garbage collected at all. From what I
 can tell, a bunch of objects are still being referenced by the
 AxisConfiguration referenced by the AxisServlet.


well see this code,

public static void clientCall1() {
 MyServiceStub stub = new MyServiceStub(http://example.com/myservice;);
 ClientCall1 req = new ClientCall1();
 ClientCall1Response res = stub.clientCall1(req);
 // Need to call this when calling using this function in a web service
 // Otherwise huge resource leak occurs
 stub._getServiceClient().cleanup();
 }
}

After this method call this class should be garbage collected. since stub
does not have any reference after that.








  In RC1 we fixed a memory leak regarding this. But I can not realy think
 the
  reason for your problem.

 Yes, 1.4.1 RC1 makes the situation a lot better than 1.4 - Calling
 cleanup has no effect on the memory leak (see my earlier followup
 email).

  you can get the AxisConfiguration object like this,
  AxisConfiguration axiConfiguration =
 
 MessageContext.getCurrentMessageContext().getConfigurationContext().getAxisConfiguration();
 
  and check whether there are some additional objects there after calling
  clean up.
 
  Please log a jira.

 Once I can create a small reproducable test-case I'll log a jira issue.


yep. this helps a lot.

thanks,
Amila.



 Let me know if there is any other information I can gather or if
 there's anything else you want me to try in the meantime.

 Thanks,

 -Dave

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Amila Suriarachchi,
WSO2 Inc.


disable hostname verification in axis

2008-07-30 Thread paul.ockleford
Hi,

We host some web services for customers using Apache Axis and everything
works fine, except when we hit a load balanced address (MHS0) to consume
somebody else's service. 

The version of AXIS we are using according to the manifest is:

Name: org/apache/axis
Implementation-Title: Apache Axis
Implementation-Version: 1.3 2244 October 5 2005
Implementation-Vendor: Apache Web Services

I think the problem is that the initial request for the endpoint MHS0 is
resolved to an IP address that is actually MHS1, MHS1 returns the
certificate for itself, however I think AXIS might be checking for a
certificate that's common name is MHS0, and there isn't one as it doesn't
exist

Can anyone help???

Thanks,

Paul Ockleford


***
This  message  may  contain  confidential and  privileged  information.
If you  are not the  intended recipient  you should not  disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents.  To do so is strictly  prohibited and may be unlawful.
Please  inform  the  sender that  this  message has  gone astray before
deleting it.  Thank you.

2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.

If you work for the NHS  and  would like  an NHSmail  email account, go
to: www.connectingforhealth.nhs.uk/nhsmail
***


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ServiceLifeCycle and Hot Deployment

2008-07-30 Thread Walker, Carleton
Hi,

I'm trying to create an initialization class using ServiceLifeCycle for
my web service.  hotdeployment and hotupdate are set to true.   I'm
getting the following exception.  I have a class that implements the
ServiceLifeCycle in the AAR file (lkp.aar).  The services.xml file
follows the stack trace.  The application server is WebLogic 9.2 using
the expanded configuration.

Thanks for your help in advance.

-Carl

[INFO] org.apache.axis2.deployment.DeploymentException: The lkp service
group name is not valid.
org.apache.axis2.deployment.DeploymentException: name
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processService
Group(ArchiveReader.java:151)
at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:
81)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(De
ploymentFileData.java:136)
at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.j
ava:597)
at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList
.java:144)
at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener
.java:330)
at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryL
istener.java:227)
at
org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryL
istener.java:324)
at
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(Sche
dulerTask.java:64)
at
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.ja
va:71)
at
org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(S
cheduler.java:83)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: org.apache.axis2.deployment.DeploymentException: name
at
org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(Ser
viceGroupBuilder.java:106)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr
oup(ArchiveReader.java:110)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processService
Group(ArchiveReader.java:144)
... 12 more
Caused by: org.apache.axis2.deployment.DeploymentException: name
at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilde
r.java:431)
at
org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(Ser
viceGroupBuilder.java:101)
... 14 more
Caused by: org.apache.axis2.deployment.DeploymentException: name
at
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(Ser
viceBuilder.java:521)
at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilde
r.java:205)
... 15 more
Caused by: java.lang.NullPointerException: name
at java.util.zip.ZipFile.getEntry(ZipFile.java:247)
at java.util.jar.JarFile.getEntry(JarFile.java:204)
at java.util.jar.JarFile.getJarEntry(JarFile.java:187)
at
sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:674)
at
sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:663)
at sun.misc.URLClassPath.findResource(URLClassPath.java:142)
at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
at
org.apache.axis2.deployment.DeploymentClassLoader.findResource(Deploymen
tClassLoader.java:102)
at
org.apache.axis2.deployment.DeploymentClassLoader.getResourceAsStream(De
ploymentClassLoader.java:250)
at dsh.lkp.ws.LkpInit.startUp(LkpInit.java:42)
at
org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(Ser
viceBuilder.java:518)
... 16 more

services.xml

serviceGroup
  service name=LkpInit class=dsh.lkp.ws.LkpInit /
/serviceGroup




Confidentiality Notice:  This email, including attachments, may include 
non-public, proprietary, confidential or legally privileged information.  If 
you are not an intended recipient or an authorized agent of an intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of the information contained in or transmitted with this e-mail is 
unauthorized and strictly prohibited.  If you have received this email in 
error, please notify the sender by replying to this message and permanently 
delete this e-mail, its attachments, and any copies of it immediately.  You 
should not retain, copy or use this e-mail or any attachment for any purpose, 
nor disclose all or any part of the contents to any other person. Thank you



Re: Yahoo's Web Service Search REST (via POST and non-XML data block)

2008-07-30 Thread jaybytez

Do I build the POST URL and put it as the text node of an OMElement and send
that through the ServiceClient or is there a specific formatted XML that I
send to the ServiceClient?  Do I create an XML with children nodes that have
element names equivalent to the param name and text nodes equivalent to the
param value?

If so, where is this documented?

Thanks - jay



keith chapman wrote:
 
 You can set the OMElement into service Client and change its contentType
 as
 follows,
 
 opts.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA)
 
 This will send the data out as application/form-data which is what yahoo
 expects.
 
 Thanks,
 Keith.
 
 On Thu, Jul 17, 2008 at 12:24 AM, jaybytez [EMAIL PROTECTED] wrote:
 

 I am testing out REST with Axis2 and I believe I have a good handle on
 using
 with GET Method Type.  The problem I am having (in interacting with
 freely
 available REST services) is that services like what are provided by Yahoo
 do
 not create an XML Structure for POST REST services like the Axis2 example
 shows.  Instead Yahoo suggests just putting the parameters into the POST
 body, but the sendAndReceive methods of the ServiceClient only take an
 OMElement.  Does this mean that I cannot use the ServiceClient (and it
 appears RPCServiceClient did not work for me either), unless my POST
 builds
 an XML Body?

 Here is the Yahoo doc:
 http://developer.yahoo.com/search/rest.html#POSTthat
 explains building POST based REST requests.

 Again, I can use the GET functionality...I just want to make sure I
 understand when I would use POST and how that could be done through
 Axis2.

 Thanks - jay.
 --
 View this message in context:
 http://www.nabble.com/Yahoo%27s-Web-Service-Search-REST-%28via-POST-and-non-XML-data-block%29-tp18494234p18494234.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]


 
 
 -- 
 Keith Chapman
 Senior Software Engineer
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/
 
 blog: http://www.keith-chapman.org
 
 

-- 
View this message in context: 
http://www.nabble.com/Yahoo%27s-Web-Service-Search-REST-%28via-POST-and-non-XML-data-block%29-tp18494234p18736630.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]



JUnit Tests for Handlers

2008-07-30 Thread Michael Hänni
Hello

I'm using AXIS2 1.4.
How can I write JUnit tests for my handlers?
I have a Handler in the InFlow. The Handler has a list, which it updates
according to the received messages. In my JUnit tests I want to test the
functionality of my handler. Therefore I have to access the list of the
Handler.
Is there a way to check the list using the (with wsdl2java) generated Stub
class?
Is there a way to directly access a Handler using the stub?
If above is not possible, how can the functionality of a Handler be tested
using JUnit?

Thanks,
Michael


Re: [Axis2] Initialization

2008-07-30 Thread David
It's working, I understood, thanks a lot !

On Tue, Jul 29, 2008 at 7:29 PM, sumedha rubasinghe [EMAIL PROTECTED]wrote:

 Following example might be of help.

 http://wso2.org/library/333

 And you can find an example on latest axis2 distribution too. Inside
 axis2-1.4/samples/servicelifecycle folder. README.txt located there is a
 good starting point.

 /sumedha




 On Tue, Jul 29, 2008 at 10:47 PM, Sameera Jayasoma 
 [EMAIL PROTECTED] wrote:

 On Tue, Jul 29, 2008 at 9:53 PM, David [EMAIL PROTECTED] wrote:

 Hi,

 I made my WS in Axis 2 and it's working very well, but I have one last
 think I would like to implement, I need to launch a method when I deploy my
 webservice, like an init phase where I'm loading some stuff.
 In Axis 1.4 I was using an InitServlet with load on startup option, so is
 it possible in Axis 2 when we use .aar deployed in /services ?


 Yes, there is a way to do this. Once you implement the
 org.apache.axis2.engine.ServiceLifeCycle interface in you service class, you
 will get two methods startup() and shutdown().

 public interface ServiceLifeCycle {

 /**
  * this will be called during the deployement time of the service.
 irrespective
  * of the service scope this method will be called
  */
 public void startUp(ConfigurationContext configctx, AxisService
 service);

 /**
  * this will be called during the system shut down time. irrespective
  * of the service scope this method will be called
  */
 public void shutDown(ConfigurationContext configctx, AxisService
 service);
 }


 Hope you got the answer.

 Regards
 Sameera Jayasoma
 WSO2 Inc.
 Oxygenating the Web Service Platform.
 http://wso2.org/

 blog: http://sameera-jayasoma.blogspot.com/

 http://www.flickr.com/photos/sameera-jayasoma





Asynchronous connection to WCF webservice

2008-07-30 Thread Hasnain Badami
Hi
I am trying to send asynchronous requests (true non blocking as discussed at
http://ws.apache.org/axis2/1_1/userguide.html) to a wcf service. The wsdl is
added as an attachment. When I try to generate java proxies using wsdl2java
specifying -d as xmlbeans, I dont get any proxy code for implementing the
callback. I mean the callbackhandler generated i.e.
DMTServiceCallBackHandler has no methods which listen for the callback
coming from the webservice (i.e. no receiveResultHelloCallback method is
generated). It should be more clear if you can please use wsdl2java on the
attached wsdl.

Thanks

Waiting for your reply.
?xml version=1.0 encoding=utf-8?wsdl:definitions name=DMTService targetNamespace=http://tempuri.org/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=http://www.w3.org/2007/05/addressing/metadata; xmlns:tns=http://tempuri.org/; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsap=http://schemas.xmlsoap.org/ws/2004/08/addressing/policy; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=http://schemas.microsoft.com/ws/2005/12/wsdl/contract; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=http://schemas.xmlsoap.org/ws/2004/09/mex;wsp:Policy wsu:Id=DMTServiceEndPoint_policywsp:ExactlyOnewsp:Allwsrm:RMAssertion xmlns:wsrm=http://schemas.xmlsoap.org/ws/2005/02/rm/policy;wsrm:InactivityTimeout Milliseconds=60/wsrm:AcknowledgementInterval Milliseconds=200//wsrm:RMAssertioncdp:CompositeDuplex xmlns:cdp=http://schemas.microsoft.com/net/2006/06/duplex/ow:OneWay xmlns:ow=http://schemas.microsoft.com/ws/2005/05/routing/policy/wsaw:UsingAddressing//wsp:All/wsp:ExactlyOne/wsp:Policywsdl:typesxsd:schema targetNamespace=http://tempuri.org/Imports;xsd:import schemaLocation=http://localhost:8001/DMTService?xsd=xsd0; namespace=http://tempuri.org//xsd:import schemaLocation=http://localhost:8001/DMTService?xsd=xsd1; namespace=http://schemas.microsoft.com/2003/10/Serialization///xsd:schema/wsdl:typeswsdl:message name=IDMTService_Hello_InputMessagewsdl:part name=parameters element=tns:Hello//wsdl:messagewsdl:message name=IDMTService_Hello_OutputMessagewsdl:part name=parameters element=tns:HelloResponse//wsdl:messagewsdl:message name=IDMTService_HelloCallback_OutputCallbackMessagewsdl:part name=parameters element=tns:HelloCallback//wsdl:messagewsdl:message name=IDMTService_HelloCallback_InputCallbackMessagewsdl:part name=parameters element=tns:HelloCallbackResponse//wsdl:messagewsdl:portType name=IDMTServicewsdl:operation name=Hellowsdl:input wsaw:Action=http://tempuri.org/IDMTService/Hello; message=tns:IDMTService_Hello_InputMessage/wsdl:output wsaw:Action=http://tempuri.org/IDMTService/HelloResponse; message=tns:IDMTService_Hello_OutputMessage//wsdl:operationwsdl:operation name=HelloCallbackwsdl:output wsaw:Action=http://tempuri.org/IDMTService/HelloCallback; message=tns:IDMTService_HelloCallback_OutputCallbackMessage/wsdl:input wsaw:Action=http://tempuri.org/IDMTService/HelloCallbackResponse; message=tns:IDMTService_HelloCallback_InputCallbackMessage//wsdl:operation/wsdl:portTypewsdl:binding name=DMTServiceEndPoint type=tns:IDMTServicewsp:PolicyReference URI=#DMTServiceEndPoint_policy/soap12:binding transport=http://schemas.xmlsoap.org/soap/http/wsdl:operation name=Hellosoap12:operation soapAction=http://tempuri.org/IDMTService/Hello; style=document/wsdl:inputsoap12:body use=literal//wsdl:inputwsdl:outputsoap12:body use=literal//wsdl:output/wsdl:operationwsdl:operation name=HelloCallbacksoap12:operation soapAction=http://tempuri.org/IDMTService/HelloCallback; style=document/wsdl:inputsoap12:body use=literal//wsdl:inputwsdl:outputsoap12:body use=literal//wsdl:output/wsdl:operation/wsdl:bindingwsdl:service name=DMTServicewsdl:port name=DMTServiceEndPoint binding=tns:DMTServiceEndPointsoap12:address location=http://localhost:8001/DMTService/DMTService/wsa10:EndpointReferencewsa10:Addresshttp://localhost:8001/DMTService/DMTService/wsa10:Address/wsa10:EndpointReference/wsdl:port/wsdl:service/wsdl:definitions-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: When do cleanup functions need to be called?

2008-07-30 Thread David Rees
On Wed, Jul 30, 2008 at 4:22 AM, Amila Suriarachchi
[EMAIL PROTECTED] wrote:
 On Wed, Jul 30, 2008 at 2:15 PM, David Rees [EMAIL PROTECTED] wrote:

 well see this code,

 public static void clientCall1() {
  MyServiceStub stub = new MyServiceStub(http://example.com/myservice;);
  ClientCall1 req = new ClientCall1();
  ClientCall1Response res = stub.clientCall1(req);
  // Need to call this when calling using this function in a web service
  // Otherwise huge resource leak occurs
  stub._getServiceClient().
 cleanup();
  }
 }

 After this method call this class should be garbage collected. since stub
 does not have any reference after that.

Right - but I'm not having a problem with Stubs being leaked. Here's a
count of various interesting classes (I've skipped some of the Java
core classes for brevity) of which there are a high number of
instances when the heap runs out of space (using a 32mb heap):

edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap$Segment
177,023, 17% heap
edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap$HashEntry[]
177,023, 6% heap
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock$NonfairSync
177,023, 8% heap
java.util.HashMap$Entry[] 37926, 8% heap
java.util.HashMap 36789, 4% heap
java.util.HashMap$Entry 28853, 2% heap
java.util.ArrayList 13698, 1% heap
org.apache.axis2.description.ParameterIncludeImpl 11099, 0% heap
edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap 11064, 1% heap
org.apache.axis2.description.PolicySubject 11063, 0% heap
org.apache.axis2.engine.Phase 7905, 0% heap
org.apache.axis2.description.AxisBindingMessage 4668, 1% heap
org.apache.axis2.description.AxisMessage 3168

So it's pretty easy to see where the majority of the heap is being
used, about half the heap is being used by the ConcurrentHashMap and
HashMaps.

Tracing a ConcurrentHashMap$Segment to it's root goes like this (class
name w/variable name):

ConcurrentHashMap$Segment
ConcurrentHashMap$Segment[]
ConcurrentHashMap (children)
OutInAxisOperation
HashMap$Entry
HashMap$Entry[]
HashMap operationsAliasesMap
AxisService
HashMap$Entry (value)
HashMap$Entry[]
HashMap (allEndpoints)
AxisConfiguration (axisConfiguration)
AxisServlet

Hopefully that provides some insight as to where reference chain is going.

Now, after more trial and error, I believe that I've figured out a way
to keep it from leaking (the service has been running overnight now
with a 32MB heap and it has not gone OOM yet):

1. Use Axis2 1.4.1 RC1
2. Create a pool of stubs to use so that only one thread uses a Stub at a time.

#2 I tried after a lot of googling and mail archive searches where I
found a post that indicated that the creation of and use of Stubs may
not be thread safe. I don't know enough about the internals of axis2
as to why this may be an issue, but hopefully it can point the
developers in the right direction (still haven't been able to create a
small test case).

Thanks

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When do cleanup functions need to be called?

2008-07-30 Thread David Rees
On Wed, Jul 30, 2008 at 2:09 AM, Pierre Muller [EMAIL PROTECTED] wrote:
 On spec, wouldn't it be related to the scope of your services ?
 http://www.developer.com/java/web/article.php/3620661

I don't think so - The default scope (request) should be fine. I don't
care about anything longer than that.

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Invalid UTF-8 start byte 0xb8

2008-07-30 Thread Paul B. Anderson
I'm developing a C++ web service under Axis2c-1.5.0 to be called by a 
Java application using Axis2-1.4.0.  I'm trying to get a simple round 
trip working and I'm getting th above error. 


I have Axis2c running under apache 2.2 httpd on Ubuntu 8.

tcpmon shows me the following

?xml version='1.0' encoding='UTF-8'?soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyextract 
xmlns=http://.xyz;arg0 xmlns=--file_name--/arg0arg1 
xmlns=--pattern--/arg1/extract/soapenv:Body/soapenv:Envelope


and offset 180 is just after the -- in --file_name--. 


The full traceback on the client side is

make test
[INFO] Deploying module: metadataExchange-1.4 - 
file:/pub/axis2-1.4/lib/mex-1.4.jar
Exception in thread main org.apache.axiom.om.OMException: 
com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0xb8 (at char 
#180, byte #127)
   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
   at 
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.buildNext(SOAPBodyImpl.java:171)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElementImpl.java:650)
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement(OMElementImpl.java:956)
   at 
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.getFirstElementLocalName(SOAPBodyImpl.java:220)
   at 
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.java:99)
   at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.hasFault(SOAPEnvelopeImpl.java:262)
   at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:367)
   at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
   at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
   at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
   at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
   at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
   at 
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:102)

   at TestFaces.main(TestFaces.java:30)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 
0xb8 (at char #180, byte #127)
   at 
com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)
   at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:506)
   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161)

   ... 14 more
Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 
0xb8 (at char #180, byte #127)
   at 
com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)

   at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
   at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101)
   at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
   at 
com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57)

   at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:967)
   at com.ctc.wstx.sr.StreamScanner.getNext(StreamScanner.java:738)
   at 
com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2721)
   at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)

   ... 16 more
make: *** [test] Error 1





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



calling ws method from tomcat 6

2008-07-30 Thread Felipe Lorenz
Hello..


I dont know what happening with me.

But Im developing a project with Struts 2, and when i call a WS made with
Axis 1.4 a get this fault:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.SocketException: Connection reset
 faultActor:
 faultNode:
 faultDetail:
  {http://xml.apache.org/axis/}stackTrace:java.net.SocketException:
Connection reset
  at java.net.SocketInputStream.read(SocketInputStream.java:168)
  at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
  at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:739)
  at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
  at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
  at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
  at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
  at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
  at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
  at org.apache.axis.client.Call.invoke(Call.java:2767)
  at org.apache.axis.client.Call.invoke(Call.java:2443)
  at org.apache.axis.client.Call.invoke(Call.java:2366)
  at org.apache.axis.client.Call.invoke(Call.java:1812)
  at
br.com.mercur.ws.javaprogress_cliente.JavaProgress_ClienteSoapBindingStub.insert(JavaProgress_ClienteSoapBindingStub.java:181)
  at
br.com.mercur.cadCliente.action.DadosConfirmacaoAction.saveInProgress(DadosConfirmacaoAction.java:51)
  at
br.com.mercur.cadCliente.action.DadosConfirmacaoAction.load(DadosConfirmacaoAction.java:37)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)



But when i try to execute, the same method, without tomcat, just calling
from a MAIN method, everything works fine.


I guess my Tomcat 6 need something, but i dont know what!?!?!?


Someone can help me?


Tks in advise.


Re: Invalid UTF-8 start byte 0xb8

2008-07-30 Thread Paul B. Anderson
I solved this problem.  It was due to an uninitialized variable.  I ran 
the program using the axis2_http_server and it executed, revealing 
something about my problem.


Paul B. Anderson wrote:
I'm developing a C++ web service under Axis2c-1.5.0 to be called by a 
Java application using Axis2-1.4.0.  I'm trying to get a simple round 
trip working and I'm getting th above error.

I have Axis2c running under apache 2.2 httpd on Ubuntu 8.

tcpmon shows me the following

?xml version='1.0' encoding='UTF-8'?soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyextract 
xmlns=http://.xyz;arg0 xmlns=--file_name--/arg0arg1 
xmlns=--pattern--/arg1/extract/soapenv:Body/soapenv:Envelope


and offset 180 is just after the -- in --file_name--.
The full traceback on the client side is

make test
[INFO] Deploying module: metadataExchange-1.4 - 
file:/pub/axis2-1.4/lib/mex-1.4.jar
Exception in thread main org.apache.axiom.om.OMException: 
com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0xb8 (at 
char #180, byte #127)
   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249) 

   at 
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.buildNext(SOAPBodyImpl.java:171) 

   at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElementImpl.java:650) 

   at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement(OMElementImpl.java:956) 

   at 
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.getFirstElementLocalName(SOAPBodyImpl.java:220) 

   at 
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.java:99) 

   at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.hasFault(SOAPEnvelopeImpl.java:262) 

   at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:367) 

   at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) 

   at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) 

   at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
   at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
   at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
   at 
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:102) 


   at TestFaces.main(TestFaces.java:30)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 
0xb8 (at char #180, byte #127)
   at 
com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)
   at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:506) 

   at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161) 


   ... 14 more
Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 
0xb8 (at char #180, byte #127)
   at 
com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)

   at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:188)
   at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101)
   at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
   at 
com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57) 


   at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:967)
   at com.ctc.wstx.sr.StreamScanner.getNext(StreamScanner.java:738)
   at 
com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2721) 

   at 
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)

   ... 16 more
make: *** [test] Error 1





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



standalone version of Rampart?

2008-07-30 Thread Alexis Midon
Hi,

may I ask you all if a standalone version of Rampart exists? A .mar
containing all required dependencies etc.
Actually rampart.mar is  empty and all dependencies have to be added
manually.
And if you can share the reason of this distribution choise, that would be
great!

Thanks for your great job,

Alexis


Heap Space issues with Large Files?

2008-07-30 Thread James Crosson
We are attempting to utilize Axis (Currently 1.4). The data we are sending is ASCII, which we've been sending in a very basic way for some time using: Service service = new Service(); Call call = (Call) service.createCall(); String ret = (String) call.invoke( new Object [] {args[2],args[3]});The size of the data that we now need to transmit is reaching about 50MB. The computers we are using are quite robust, and we can allocate up to 10GB for the client, and a similar amount for the server. The server is Tomcat 6. Recently, while attempting to access 50MB of data (setting the heap to 10GB!) we are still receiving a Heap Space error from Java: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at org.apache.axis.message.SAX2EventRecorder$objArrayVector.add(SAX2EventRecorder.java:254)This is not an AxisFault. It occurs on the Client, and is a pure Java exception. We are having a difficult time fishing for a resolution. The server side reports nothing unusual. We know you can transmit quite large files using Axis, and are looking for some information (Maybe some sample code?) for doing this efficiently and protecting our precious heap. Thanks for your time,JamesJames Crosson[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Asynchronous connection to WCF webservice

2008-07-30 Thread keith chapman
Hi,

What is the version of Axis2 that you used?

Thanks,
Keith.

On Wed, Jul 30, 2008 at 10:50 PM, Hasnain Badami [EMAIL PROTECTED]wrote:

 Hi
 I am trying to send asynchronous requests (true non blocking as discussed
 at http://ws.apache.org/axis2/1_1/userguide.html) to a wcf service. The
 wsdl is added as an attachment. When I try to generate java proxies using
 wsdl2java specifying -d as xmlbeans, I dont get any proxy code for
 implementing the callback. I mean the callbackhandler generated i.e.
 DMTServiceCallBackHandler has no methods which listen for the callback
 coming from the webservice (i.e. no receiveResultHelloCallback method is
 generated). It should be more clear if you can please use wsdl2java on the
 attached wsdl.

 Thanks

 Waiting for your reply.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


- Axis2 Users -

2008-07-30 Thread Naga Vijayapuram
Hi,

 

Sorry to bother the list with some very generic questions -

 

Is Axis2 in Production?  If yes, for how long?

 

Is there a place in Axis2 web site that lists companies that use Axis2
in Production?

 

Thanks in advance for your help.

 

Naga

 



[axis2] error when generate code using wsdl2java with multiple binding

2008-07-30 Thread Zhuang, Guanxia (Robin)
i have got a wsdl file from
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?WSDL , and i
want to generate the sever side code and client code from it. but axis4
1.4 only generate five methods. it should generate 5 methods for each
binding i think.

 

i try to use axis2 to generate code from other wsdl file with multiple
binding, but it just generate part of the methods, not all of the
methods. can anybody try this wsdl, and let me know how to generate the
server side and the client side code from it? thanks

 

Regards

---

Guanxia Zhuang (Robin)

Sycamore Networks (SDC)

Phone: 021-24050832

 

 



Re: When do cleanup functions need to be called?

2008-07-30 Thread Amila Suriarachchi
On Wed, Jul 30, 2008 at 11:08 PM, David Rees [EMAIL PROTECTED] wrote:

 On Wed, Jul 30, 2008 at 4:22 AM, Amila Suriarachchi
 [EMAIL PROTECTED] wrote:
  On Wed, Jul 30, 2008 at 2:15 PM, David Rees [EMAIL PROTECTED] wrote:
 
  well see this code,
 
  public static void clientCall1() {
   MyServiceStub stub = new MyServiceStub(http://example.com/myservice;);
   ClientCall1 req = new ClientCall1();
   ClientCall1Response res = stub.clientCall1(req);
   // Need to call this when calling using this function in a web service
   // Otherwise huge resource leak occurs
   stub._getServiceClient().
  cleanup();
   }
  }
 
  After this method call this class should be garbage collected. since stub
  does not have any reference after that.

 Right - but I'm not having a problem with Stubs being leaked. Here's a
 count of various interesting classes (I've skipped some of the Java
 core classes for brevity) of which there are a high number of
 instances when the heap runs out of space (using a 32mb heap):

 edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap$Segment
 177,023, 17% heap

 edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap$HashEntry[]
 177,023, 6% heap

 edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock$NonfairSync
 177,023, 8% heap
 java.util.HashMap$Entry[] 37926, 8% heap
 java.util.HashMap 36789, 4% heap
 java.util.HashMap$Entry 28853, 2% heap
 java.util.ArrayList 13698, 1% heap
 org.apache.axis2.description.ParameterIncludeImpl 11099, 0% heap
 edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap 11064, 1%
 heap
 org.apache.axis2.description.PolicySubject 11063, 0% heap
 org.apache.axis2.engine.Phase 7905, 0% heap
 org.apache.axis2.description.AxisBindingMessage 4668, 1% heap
 org.apache.axis2.description.AxisMessage 3168

 So it's pretty easy to see where the majority of the heap is being
 used, about half the heap is being used by the ConcurrentHashMap and
 HashMaps.

 Tracing a ConcurrentHashMap$Segment to it's root goes like this (class
 name w/variable name):

 ConcurrentHashMap$Segment
 ConcurrentHashMap$Segment[]
 ConcurrentHashMap (children)
 OutInAxisOperation
 HashMap$Entry
 HashMap$Entry[]
 HashMap operationsAliasesMap
 AxisService
 HashMap$Entry (value)
 HashMap$Entry[]
 HashMap (allEndpoints)

this is the place this issue was fixed.


 AxisConfiguration (axisConfiguration)
 AxisServlet

 Hopefully that provides some insight as to where reference chain is going.

 Now, after more trial and error, I believe that I've figured out a way
 to keep it from leaking (the service has been running overnight now
 with a 32MB heap and it has not gone OOM yet):

 1. Use Axis2 1.4.1 RC1
 2. Create a pool of stubs to use so that only one thread uses a Stub at a
 time.

 #2 I tried after a lot of googling and mail archive searches where I
 found a post that indicated that the creation of and use of Stubs may
 not be thread safe. I don't know enough about the internals of axis2
 as to why this may be an issue, but hopefully it can point the
 developers in the right direction (still haven't been able to create a
 small test case).

then we can have a better look.

thanks,
Amila.



 Thanks

 -Dave

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Amila Suriarachchi,
WSO2 Inc.


Re: [axis2] error when generate code using wsdl2java with multiple binding

2008-07-30 Thread Amila Suriarachchi
On Thu, Jul 31, 2008 at 9:32 AM, Zhuang, Guanxia (Robin) 
[EMAIL PROTECTED] wrote:

  i have got a wsdl file from
 http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?WSDL , and i
 want to generate the sever side code and client code from it. but axis4 1.4
 only generate five methods. it should generate 5 methods for each binding i
 think.

Axis2 generates the code for one portType (per service). So it generates the
code for the portType of the port it selects.
for Axis2 what ever your service should have  one port Type. So if you can
change the wsdl  to as follows and use -ap option it generates correctly.

wsdl:service name=WeatherWebService1
−
−
wsdl:port name=WeatherWebServiceSoap
binding=tns:WeatherWebServiceSoap
soap:address location=
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/
/wsdl:port
−
wsdl:port name=WeatherWebServiceSoap12
binding=tns:WeatherWebServiceSoap12
soap12:address location=
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/
/wsdl:port

/wsdl:service
wsdl:service name=WeatherWebService2

−
wsdl:port name=WeatherWebServiceHttpGet
binding=tns:WeatherWebServiceHttpGet
http:address location=
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/
/wsdl:port
−

wsdl:service name=WeatherWebService3

wsdl:port name=WeatherWebServiceHttpPost
binding=tns:WeatherWebServiceHttpPost
http:address location=
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/
/wsdl:port
/wsdl:service

thanks,
Amila.



 i try to use axis2 to generate code from other wsdl file with multiple
 binding, but it just generate part of the methods, not all of the methods.
 can anybody try this wsdl, and let me know how to generate the server side
 and the client side code from it? thanks



 Regards

 ---

 Guanxia Zhuang (Robin)

 Sycamore Networks (SDC)

 Phone: 021-24050832








-- 
Amila Suriarachchi,
WSO2 Inc.


Code Generation Problem ( Order of constructor parameters)

2008-07-30 Thread Shripad Gokhale
 

In a certain situation, the code generated by AXIS 1.4 is giving
compilation errors. After investigation, I found that in some classes,
the super class's constructors were called with wrong order of input
parameters. For example, a class CustomerListEntity which extends
ListMessageEntity calls super(long, MessageEntity[]) from its
constructor. But, the actual definition of the constructor of
ListMessageEntity is ListMessageEntity(MessageEntity[], long).
Similarly, there are a couple of other classes also doing the same
thing. Due to this, compilation is failing.

 

 


This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp


Re: Asynchronous connection to WCF webservice

2008-07-30 Thread Amila Suriarachchi
On Wed, Jul 30, 2008 at 10:50 PM, Hasnain Badami [EMAIL PROTECTED]wrote:

 Hi
 I am trying to send asynchronous requests (true non blocking as discussed
 at http://ws.apache.org/axis2/1_1/userguide.html) to a wcf service. The
 wsdl is added as an attachment. When I try to generate java proxies using
 wsdl2java specifying -d as xmlbeans, I dont get any proxy code for
 implementing the callback. I mean the callbackhandler generated i.e.
 DMTServiceCallBackHandler has no methods which listen for the callback
 coming from the webservice

Aren't there some methods like

/**
* auto generated Axis2 call back method for get method
* override this method for handling normal response from get
operation
*/
   public void receiveResultget(
au.gov.nsw.osr.pillar.gen.xsd.GetResponseDocument result
) {
   }

  /**
   * auto generated Axis2 Error handler
   * override this method for handling error response from get
operation
   */
public void receiveErrorget(java.lang.Exception e) {
}

in this call back class. you should create a class extending this class and
override methods.

thanks,
Amila.


 (i.e. no receiveResultHelloCallback method is generated). It should be more
 clear if you can please use wsdl2java on the attached wsdl.

 Thanks

 Waiting for your reply.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Amila Suriarachchi,
WSO2 Inc.


Username token implemetation

2008-07-30 Thread Shripad Gokhale
Hi,

 

I am trying to implement user name token with Axis 1.4 and WSS4J on
server side. Where can I get a good reference material or tutorial about
the changes that are required? Some of the links I found of google
provide only partial information.

 

Thanks

Shripad


This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp