Is it a bug ? I defined a String array parameter in the WSDL file, but after generate server side code use wsdl2java, the parameter changed to String.

2008-04-16 Thread MailList Ryan
My software environment is JDK1.5, tomcat5.5 axis1.4 final.

I wrote a WSDL file by hand, and define a complexType "MsgSendReq". In the
complex type, I defined a string array parameter which name is "ML". After
that, i use WSDL2java  command to generate the server side Java code. All
goes well till this step. But after i compile and deploy the code to tomcat
server, the  parameter "ML" in the WSDL file  for this service show as a
string not a array of string. I tried many times and find it seems that, if
the element of a array is a simple type like string or int, the axis 1.4
treat them as a String or int rather than a array of String or a array of
int, regardless you had already defined it as array.

Following is the code of "MsgSendReq " type define. I had already define ML
as a array of String in both wsdl file and java code , but it shows as a
String parameter after deploy to server.

It is really strange, has any one even know problems like this ? Is is a
bug?  Any idea will be highly appreciate!

Ryan.


1.The "MsgSendReq" type defined in the WSDL file wrote by hand.

  

  
  
  
  
  
  
  
  
  
  

  
  

  

http://schemas.xmlsoap.org/wsdl/"/>
  

  

2. The java code "MsgSendReq" generated by WSDL2Java

public class MsgSendReq  implements java.io.Serializable {
private java.lang.String msgType;

private java.lang.String version;

private ototype.AuthInfo authInfo;

private int smsType;

private java.lang.String content;

private java.lang.String sendURL;

private java.lang.String scheduleDate;

private java.lang.String[] ML;

private java.lang.String createDate;

3. The define of "MsgSendReq" in the server-config.wsdd file of tomcat

  http://schemas.xmlsoap.org/soap/encoding/";
qname="ns32:MsgSendReq"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
type="java:ototype.MsgSendReq" xmlns:ns32="urn:ototype"/>

4.The wsdl file after deployed to tomcat


















Re: Help with namespace problem in doWriteDefaultNs (Null Pointer Exception)

2008-04-16 Thread Bartolomeo Nicolotti
Hi,

i've had some problems with namespaces and prefixes using literal/doc
soap messages, and I've solved them substituting the axis2-saaj files
with sun's ones:

https://saaj.dev.java.net/

axis2-saaj-1.3.jar <--- saaj-impl.jar 
axis2-saaj-api-1.3.jar <--- saaj-api.jar

Bye!

Il giorno gio, 17/04/2008 alle 11.45 +0530, Deepal jayasinghe ha
scritto:
> Hi Amila
> 
> Any idea about this ?
> 
> Thank you!
> Deepal
> >
> >  
> >
> > I think I’ve narrowed down the cause of a problem I’m having, but I’m 
> > not sure what the solution is. . .any help would be **greatly** 
> > appreciated.
> >
> >  
> >
> > I’m trying to consume a web service that has published a pretty simple 
> > WSDL (attached).  There’s only one method exposed via the service, and 
> > it’s called “executeService” which takes a single argument (an XML 
> > string).
> >
> >  
> >
> > I installed Axis2 v1.2 in my Java 1.4 environment and ran this command:
> >
> > WSDL2Java -uri brms.wsdl -p com.foo.brms.serviceinterface -d xmlbeans 
> > -s -o ..\java -R ..\resources
> >
> >  
> >
> > That created a bunch of xmlbean supporting classes and a 
> > BRMSServiceStub.java.  Here’s how I’m using it:
> >
> >  
> >
> > ExecuteServiceDocument executeServiceDoc = 
> > ExecuteServiceDocument.Factory./newInstance/( );
> >
> > ExecuteService executeService = 
> > executeServiceDoc.addNewExecuteService( );
> >
> > executeService.setArg0( . . . my Xml String here. . . );
> >
> >  
> >
> > myBrmsServiceStub.executeService( executeServiceDoc );
> >
> >  
> >
> > The NPE stack trace that gets thrown is shown below, but I think the 
> > problem is that there is no namespace inserted into the surrounding 
> > xml that the generated xmlbeans class (ExecuteService) wraps around my 
> > XML.  Just before the executeService( ) call is made, here is the 
> > message content of the executeServiceDoc:
> >
> >  
> >
> > 
> >
> >  > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> >
> > 
> >
> > http://endpoint.brmsservice/";>!
> >
> > 
> >
> >...my Xml String here. . .
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >  
> >
> >  
> >
> >  
> >
> > Shouldn’t the " >
> > http://endpoint.brmsservice/";>
> >
> >  
> >
> > I suspect that is the problem, because down in the stack when the 
> > doWriteDefaultNs is called, the default namespace is looked up from a 
> > map that maps the empty-string found in the executeService element to 
> > a null namespace value.
> >
> >  
> >
> > What did I do wrong?
> >
> >  
> >
> > Thanks in advance!
> >
> >  
> >
> >  
> >
> >  
> >
> >  
> >
> > java.lang.NullPointerException
> >
> >   at 
> > com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:529)
> >
> >   at 
> > com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:113)
> >
> >   at 
> > com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:121)
> >
> >   at 
> > org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:148)
> >
> >   at 
> > org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:238)
> >
> >   at 
> > org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:71)
> >
> >   at 
> > org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:54)
> >
> >   at 
> > org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:490)
> >
> >   at 
> > org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:783)
> >
> >   at 
> > org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)
> >
> >   at 
> > org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:234)
> >
> >   at 
> > org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:222)
> >
> >   at 
> > org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)
> >
> >   at 
> > org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:418)
> >
> >   at 
> > org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:55)
> >
> >   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

Re: Axis2 - How to set a header attribute from client that can be get in a Handler

2008-04-16 Thread Deepal jayasinghe

This might help you

http://wso2.org/library/327



Hi,

My Web Service is deployed in Apache Tomcat + Axis2.war and I am calling it 
using RPCServiceClient. I am tying to set a String attribute to SOAP header 
from RPC Client. But the attribute is not found in the SOAPEnvelope in the 
handler put by me on the server.

My client code is:
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new 
EndpointReference("http://localhost:8080/axis2/services/SimpleService";);
options.setTo(targetEPR);
serviceClient.addStringHeader(new QName("http://ws.practice.com";, "attr1"), 
"Attr1_Value");
QName opGetName = new QName("http://ws.practice.com";, "getName");
Object[] opGetNameArgs = new Object[] {"1"};
Class[] returnTypes = new Class[] { String.class };
Object[] response = serviceClient.invokeBlocking(opGetName, 
opGetNameArgs, returnTypes);
String result = (String) response[0];

The result obtained is fine but I am not able to get the "attr1" on the server 
side.

The handler's invoke method on server side is as follows:
public InvocationResponse invoke(MessageContext mc) throws AxisFault {
org.apache.axiom.soap.SOAPEnvelope env =  mc.getEnvelope();
SOAPHeader header = env.getHeader();
Iterator iter = header.getAllAttributes();
while(iter.hasNext()) {
System.out.println(iter.next());
}
InvocationResponse ir = InvocationResponse.CONTINUE;
return ir;
}

The iterator on server side contains no objects.

Please provide your valuable suggestions and feedback.

Thanks and regards,

Nishant Saini
Application Developer
RBS India Development Centre (P) Ltd

T  +91 124 672 4125
M +91 99 71 800 549
[EMAIL PROTECTED]
Unitech Business Park, Block F, Sector 41, South City, Phase 1,
Gurgaon - 122001, Haryana, India

The views expressed in above mail are not necessarily of my employer.

 I love the internet...Nowhere else do you find stupidity and wisdom in equal 
abundance.

***
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. 
Authorised and regulated by the Financial Services Authority 
 
This e-mail message is confidential and for use by the 
addressee only. If the message is received by anyone other 
than the addressee, please return the message to the sender 
by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The 
Royal Bank of Scotland plc does not accept responsibility for 
changes made to this message after it was sent. 

Whilst all reasonable care has been taken to avoid the 
transmission of viruses, it is the responsibility of the recipient to 
ensure that the onward transmission, opening or use of this 
message and any attachments will not adversely affect its 
systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry 
out such virus and other checks as it considers appropriate. 
Visit our websites at: 
www.rbs.com

www.rbs.com/gbm
www.rbsgc.com
***

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


-
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]



Re: excluding pojo fields from wsdl

2008-04-16 Thread Deepal jayasinghe

Hi Kraus,
Please have a look at the following article [section : How to exclude 
Bean properties?]


http://wso2.org/library/2893


I am using Axis2 1.2 and have deployed a simple service as a POJO. I 
created my client using wsld2java based on the WSDL generated from the 
POJO service.


 

One of the objects, which is returned from a web service method, has 
some */public/* */static/* fields. These fields are being included in 
the WSDL. However, since these */static/* fields don’t have 
getters/setters, they weren’t being serialized on return, which caused 
an “Unexpected element return” error at the client. Adding 
getters/setters gets rid of the problem, as long as the 
getters/setters are not */static/* ( which is strange). In any case, 
these */public/* */static/* fields do not need to be serialized, and 
their inclusion in the WSDL causes problems. Using getters/setters is 
very awkward since they aren’t really needed since the fields really 
should be */public static final/*, which I tried using.  I have also 
tried using the java */transient/* keyword, but that doesn’t seem to 
work. I have also tried using */excludeProperties/* 
(*/beanPropertyRules/*) in services.xml, and that didn’t seem to work. 
Is there a way to exclude these */public/* */static/* fields from the 
WSDL generated from the deployed POJO?


 


Example of return class below:

 


Thanks, Dave

 

 


*public* *class* EnumNormal {

  *private* String _value;

 


  *public* EnumNormal() {}

 


  *public* EnumNormal(String value)

  {

_value = value;

  }

 


  *public* String getValue()

  {

*return* _value;

  }

 


  *public* *void* setValue(String value)

  {

_value = value;

  }

 


  *public* *static* String /firstEnumVal/ = "FirstEnumVal";

  *public* *static* String /secondEnumVal/ = "SecondEnumVal";

  *public* *static* String /thirdEnumVal/ = "ThirdEnumVal";

  *public* *static* String /fourthEnumVal/ = "FourthEnumVal";

  *public* *static* String /fifthEnumVal/ = "FifthEnumVal";

 


}

   




--
Thanks,
Deepal

"The highest tower is built one brick at a time"


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



Re: Axis2 - How to set a header attribute from client that can be get in a Handler

2008-04-16 Thread Deepal jayasinghe

SAINI, Nishant, IDC wrote:

Hi,

I got the header set from client at server by using the following code:

public InvocationResponse invoke(MessageContext mc) throws AxisFault {
org.apache.axiom.soap.SOAPEnvelope env =  mc.getEnvelope();
SOAPHeader header = env.getHeader();

if(mc.getOptions().getTo().getAddress().endsWith("services/SimpleService")) {
Iterator iter = header.examineAllHeaderBlocks();
while(iter.hasNext()) {
SOAPHeaderBlock headerBlock = (SOAPHeaderBlock) iter.next();
System.out.println(headerBlock);
}
}
}
InvocationResponse ir = InvocationResponse.CONTINUE;
return ir;
}

Can anybody please tell me how can I set the header block in response from 
server so that I can access it from client?
  
You have to write a handler and deploy that in the out flow. So that 
your handler will do what you want to do.
- Get the SOAP message from the message context and then add your header 
there.


Thank you!
Deepal

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



Re: [axis2] axis2 1.3 complextype with byte[] member variable, bug?

2008-04-16 Thread Deepal jayasinghe

Holger Uhlitzsch wrote:

Hi all,

i think i found a bug in axis2 1.3 with POJOs.
  

:)

My POJO has two methods. One sending a object with a byte[] member and one 
returning a object with byte[] member.
The serialization of the object is valid and i can see in the sending out soap 
message the base64 encoded byte[]. But the deserialization fails.
  

What do you mean by fails ? did you get any exception ?

In line 382 of class org.apache.axis2.databinding.utils.BeanUtil i have to 
change:

partObj = deserialize(parameters, (OMElement)parts.getParent(),

to:

partObj = deserialize(parameters, parts,

So i do not call deserialize() with the parent of parts (which is the xml 
element of the byte[] member).

and in line 308 change:

return Base64.decode(beanElement.getFirstElement().getText());

to:

return Base64.decode(beanElement.getText());

Now i just have to call getText() to get the base64 encoded content of the 
byte[] xml element.

I have to do this because call getFirstElement() doesn't ensure that the 
element is really the byte[] element.

But i'm not sure this is the right fix.
  
as I remember correct we have done some testing with ADB stub and POJO 
services, however there we did not find any issues. So I need to double 
check this and confirm.


Thank you!
Deepal

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



Re: Help with namespace problem in doWriteDefaultNs (Null Pointer Exception)

2008-04-16 Thread Deepal jayasinghe

Hi Amila

Any idea about this ?

Thank you!
Deepal


 

I think I’ve narrowed down the cause of a problem I’m having, but I’m 
not sure what the solution is. . .any help would be **greatly** 
appreciated.


 

I’m trying to consume a web service that has published a pretty simple 
WSDL (attached).  There’s only one method exposed via the service, and 
it’s called “executeService” which takes a single argument (an XML 
string).


 


I installed Axis2 v1.2 in my Java 1.4 environment and ran this command:

WSDL2Java -uri brms.wsdl -p com.foo.brms.serviceinterface -d xmlbeans 
-s -o ..\java -R ..\resources


 

That created a bunch of xmlbean supporting classes and a 
BRMSServiceStub.java.  Here’s how I’m using it:


 

ExecuteServiceDocument executeServiceDoc = 
ExecuteServiceDocument.Factory./newInstance/( );


ExecuteService executeService = 
executeServiceDoc.addNewExecuteService( );


executeService.setArg0( . . . my Xml String here. . . );

 


myBrmsServiceStub.executeService( executeServiceDoc );

 

The NPE stack trace that gets thrown is shown below, but I think the 
problem is that there is no namespace inserted into the surrounding 
xml that the generated xmlbeans class (ExecuteService) wraps around my 
XML.  Just before the executeService( ) call is made, here is the 
message content of the executeServiceDoc:


 




xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>




http://endpoint.brmsservice/";>!



   ...my Xml String here. . .









 

 

 


Shouldn’t the "http://endpoint.brmsservice/";>

 

I suspect that is the problem, because down in the stack when the 
doWriteDefaultNs is called, the default namespace is looked up from a 
map that maps the empty-string found in the executeService element to 
a null namespace value.


 


What did I do wrong?

 


Thanks in advance!

 

 

 

 


java.lang.NullPointerException

  at 
com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:529)


  at 
com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:113)


  at 
com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:121)


  at 
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:148)


  at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:238)


  at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:71)


  at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:54)


  at 
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:490)


  at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:783)


  at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)


  at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:234)


  at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:222)


  at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)


  at 
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:418)


  at 
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:55)


  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:558)


  at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:176)


  at 
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)


  at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)


  at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:201)


  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)

  at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOp

Re: Transport error: 403 Error: access forbidden

2008-04-16 Thread Deepal Jayasinghe

hi Chris ,
Any possibility of creating test case ? if so that would be a great help 
to fix the issue.

Or even send you service aar file.

Thank you!
Deepal


Hello all,

 

I am having a strange problem. I have built a POJO web service that is 
itself an ADB client to another ws(.NET) and all works fine,  but I 
notice for some reason when I use my test client make calls multiple 
times..and I don’t even mean load testing..but just manually call via 
a button click like once a second….or even less…by 10 calls or so it 
throws an exception on the server(shown below) .   I can loop calls 
and it will run 10 or so ok, then start throwing this exception for 
several, then run a few more ok, then throw this exception back and 
forth like that.  I am not using SSL, https, or any other thing like 
that either , and as I said I’m using ADB.  It seems like some sort of 
loading/performance issue, but I never see any spike in CPU usage and 
as I said, I am doing ridiculously low call frequency.  Perhaps there 
is a resource issue by having an Axis2 web service that is both a 
service and a client to another WS? That should work fine, but maybe I 
need to take special steps?  If anyone has any ideas on this, please 
help me out…


 


Thanks,

 


Chris

 

[ERROR] org.apache.axis2.AxisFault: Transport error: 403 Error: Access 
Forbidden


java.lang.reflect.InvocationTargetException

at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


at java.lang.reflect.Method.invoke(Method.java:597)

at 
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)


at 
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)


at 
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.jav


:40)

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.Http11Processor.process(Http11Processor.java:844)


at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)


at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)


at java.lang.Thread.run(Thread.java:619)

 





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



Re: AXIS2-Document-Literal WSDL

2008-04-16 Thread Deepal Jayasinghe


using java2wsdl, how to Create Wrapped Document-Literal WSDL? what is 
the default results of java2wsdl?

The default is Wrapped Document-Literal WSDL

Thank you!
Deepal


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



Re: [axis2] axis2 1.3 base class return type trouble

2008-04-16 Thread Deepal jayasinghe

Holger Uhlitzsch wrote:

Ok, i did some debugging and found the difference between client and server 
handling.
In line 90 of class org.apache.axis2.databinding.utils.BeanUtil there is

if (typeTable != null && qualified) {

On client typeTable is null and qualified is false and on the server the 
opposite, typeTable is valid and qualified is true.
Now the server is trying to get qname for type from typeTable but the derived 
class B (coming back to my example) is not in typeTable and the exception is 
thrown.

What do i have to do now to fix this problem?
  
Thank you very much for such a detailed mail. The best thing is create a 
jira and attach your patch. Then it is just a matter of applying the 
patch  to fix the issue.


Thank you!
deepal

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



Re: Client handler tutorial

2008-04-16 Thread Deepal Jayasinghe

Hi Chau,
Are you referring to Axis2 ?
if so there is no difference between client side and server side.

Thank you!
Deepal
 
Anybody knows the link to client handler tutorial?
 
Thanks







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



Re: Swa webservice behave different in tomcat web app and axis2 standalone server.

2008-04-16 Thread Jinyuan Zhou
Thanks for you time,
I will try to that again and post my result when i am done.
Jack

On Wed, Apr 16, 2008 at 1:15 PM, Thilina Gunarathne <[EMAIL PROTECTED]>
wrote:

> Hi,
> IIRC I tested that tutorial code with tomcat... I'm guessing something
> is going wrong in your system... Let's try to figure it out exactly..
>
> > The client side
> > was't able to find the attachment althought the correct envelop was
> > arrived..
> Did you mean you got the correct soap message together with the
> attachment from the server?? Can you capture a message snapshot using
> tcpmon (http://ws.apache.org/commons/tcpmon) and see whether you have
> the MIME part for the attachment.. It would be great if you can post
> it here..
>
> thanks,
> Thilina
>
> > I am using axis 2-1.3. My own arr has the similar behavior.  It
> > seems that the all samples and tutorial sare based on Stand alone
> server, I
> > just want see any one had the simliar experiences to deploy an aar into
> > tomcat and was able to include an attachment in the response message to
> > client.
> >  Thanks,
> > Jack
> >
> >
> > On Wed, Apr 16, 2008 at 7:39 AM, Thilina Gunarathne <[EMAIL PROTECTED]>
> > wrote:
> > > Hi,
> > > Just a quick reply...
> > > The sample used in the following tutorial is based on Tomcat
> deployment..
> > > Downloading a Binary File from a Web Service using Axis2 and SOAP with
> > Attachments - http://wso2.org/library/1675
> > >
> > > Also are you using the same axis2 version in both cases..
> > > thanks,
> > > Thilina
> > >
> > >
> > >
> > >
> > >
> > > On 4/16/08, Jinyuan Zhou <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Thank Thilina,
> > > > There are no error message. The usual soap request/response goes
> well.
> > > > I also tried to deploy the one  arr file from a tutorial. Same thing
> > happend.
> > > > I just don't get it. I have build aar file using the standalone
> server's
> > lib. I'll try to build uisng the jar in WEB_INF/lib. See it will work.
> I
> > wonder if DataHandler classes are different?   It looks like all
> examples
> > and tutorials are based on stand alone server.
> > > > Regards,
> > > > Jack
> > > >
> > > >
> > > >
> > > > On Tue, Apr 15, 2008 at 8:20 PM, Thilina Gunarathne <
> [EMAIL PROTECTED]>
> > wrote:
> > > >
> > > > > Hi,
> > > > > Can you let us know more information, like any error messages,
> message
> > traces...
> > > > >
> > > > > thanks,
> > > > > Thilina
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou <
> [EMAIL PROTECTED]>
> > wrote:
> > > > >
> > > > > > Hi,
> > > > > > I have developed a websevice that will include an attachment to
> the
> > client. It worked in the standalone server not inside tomcat's webapp.
> > > > > > I have  true in the
> > service.xml inside arr file. Inside tomcat server, I also  have this
> line in
> > the
> > > > > > ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml.
> > > > > > What I am missing?
> > > > > > Thanks for you time,
> > > > > > Jack
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Thilina Gunarathne - http://thilinag.blogspot.com
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Some people lived like they will never die
> > > > and died like they have never lived
> > >
> > >
> > >
> > > --
> > > Thilina Gunarathne  - http://thilinag.blogspot.com
> >
> >
> >
> > --
> >
> > Some people lived like they will never die
> > and died like they have never lived
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 

Some people lived like they will never die
and died like they have never lived


Re: [axis2 java client] ArrayList cannot be cast to Set

2008-04-16 Thread Martin Gainty
I agree..
The answer should be
If you want a Set returned to your client by invokeBlocking as with Spring
SetFactoryBean
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/
beans/factory/config/SetFactoryBean.html
then Please insert enahncement request to jira..

Good Point Andreas and Mehdi
Martin-
- Original Message -
From: "Andreas Veithen" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, April 16, 2008 7:21 PM
Subject: Re: [axis2 java client] ArrayList cannot be cast to Set


>
> On 16 Apr 2008, at 17:57, Smallwood, Rob wrote:
> > Without being unkind (and I really mean that), I think a java tutorial
> > explaining the fundamentals would fill in the missing gaps..
>
> Rob,
>
> Without being unkind, I think you should read Mehdi's post more
> carefully before referring him to a Java tutorial...
>
> His code contains the following instructions:
>
> Class[] returnTypes = new Class[] { Set.class };
> Object[] response = serviceClient.invokeBlocking(opFindEntry,
> opFindEntryArgs, returnTypes);
>
> The point is actually not that his WS returns a Set (this information
> obviously gets lost when serializing to XML), but that on the client
> side he explicitly specifies the expected Java type as Set and that
> RPCServiceClient#invokeBlocking returns an ArrayList instead. I'm
> neither an expert of RPC nor of ADB, but I'm a bit surprised to see
> this.
>
> The code in Axis2 that causes this behavior can be found in
> org.apache.axis2.databinding.utils.BeanUtil#processObject:
>
> if (SimpleTypeMapper.isCollection(classType)) {
>  return SimpleTypeMapper.getArrayList(omElement);
> }
>
> The logic behind this is indeed a bit questionable, and I think
> Mehdi's question is perfectly relevant.
>
> Regards,
>
> Andreas
>
>
> -
> 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]



Axis2 Client error NoSuchMethodError - Weblogic jrockit

2008-04-16 Thread Qureshi, Affan
Hi,

I am trying to call a web service using Axis2. I am getting a weird error when 
deploying my application to Weblogic running jrockit 1.4.2_05. My code is 
really simple, all I am doing is using the ADB generated stub, I call the web 
service with required parameters.

It works fine when I run the same code in a stand alone main() class. I use 
Sun's JDK 1.4.2 to run that.

java.lang.NoSuchMethodError: 
at org.apache.axis2.engine.DispatchPhase.()V(DispatchPhase.java:270)
at jrockit.vm.Reflect$IClass.runClinit(I)V(Unknown Source)
at jrockit.vm.Reflect$IClass.ensureInitialized(Ljava.lang.Class;)V(Unknown 
Source)
at java.lang.Class.newInstanceCached(I)Ljava.lang.Object;(Unknown Source)
at java.lang.Class.newInstance(I)Ljava.lang.Object;(Unknown Source)
at
org.apache.axis2.deployment.AxisConfigBuilder.getPhase(Ljava.lang.String;)Lorg.apache.axis2.engine.Phase;(AxisConfigBuilder.java:638)
  at 
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseList(Lorg.apache.axiom.om.OMElement;)Ljava.util.ArrayList;(AxisConfigBuilder.java
:390)
at 
org.apache.axis2.deployment.AxisConfigBuilder.processPhaseOrders(Ljava.util.Iterator;)V(AxisConfigBuilder.java:433)
at 
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig()V(AxisConfigBuilder.java:133)
at 
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(Ljava.io.InputStream;)Lorg.apache.axis2.engine.AxisConfiguration;(De
ploymentEngine.java:615)
at 
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration()Lorg.apache.axis2.engine.AxisConfiguration;(FileSystemConfigurator
.java:115)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(Lorg.apache.axis2.engine.AxisConfigurator;)Lorg.apache.axis
2.context.ConfigurationContext;(ConfigurationContextFactory.java:64)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(Ljava.lang.String;Ljava.lang.String;)Lorg.apa
che.axis2.context.ConfigurationContext;(ConfigurationContextFactory.java:180)
at 
org.apache.axis2.client.ServiceClient.configureServiceClient(Lorg.apache.axis2.context.ConfigurationContext;Lorg.apache.axis2.description.A
xisService;)V(ServiceClient.java:146)
at 
org.apache.axis2.client.ServiceClient.(Lorg.apache.axis2.context.ConfigurationContext;Lorg.apache.axis2.description.AxisService;)V(Se
rviceClient.java:139)
at 
com.frequencymarketing.citi.ws.sonar.generated.EchoWebServiceStub.(Lorg.apache.axis2.context.ConfigurationContext;Ljava.lang.String;Z
)V(EchoWebServiceStub.java:235)

Any clues to fix this?

Thanks a lot!

Affan


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



Re: SecurityOutflow Configuration

2008-04-16 Thread Davanum Srinivas

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Anthony, Sean,

Please raise a stink on rampart-dev@ that these should not be remove in a 
future version and should not be marked
deprecated :)

Thanks,
dims

PS: Background, There are some people who don't listen to logic and wanted to 
get rid of these useful API's...

Anthony Bull wrote:
| We've got the same problem in production.  It basically isn't a risk
| unless you upgrade to a future version of Axis 2/Rampart that they have
| decided to remove those classes or the functionality they provide is
| turned off.
| To minimise the effect of this, all our production web services and web
| clients (we have 5 independent axis 2 web services running in
| production) use the same re-usable security library that abstracts the
| rampart configuration code.  So, when we change the ouflowConfiguration
| code, we only need to rebuild that jar and re-release it, instead of
| having to do full release builds of all our web services.
|
| Sean Conlon wrote:
|> I am using the deprecated class OutflowConfiguration in order to set my
|> dynamic usernames and passwords in the OutflowSecurity parameter.  Below
|> are the methods that I use to do this.
|> What is an alternative approach for me to set my username and password
|> dynamically?  What are my risks with launching this into production with
|> a deprecated class?
|> This may be more specific to Rampart then Axis2, but I am hoping that
|> someone else has had this issue too.  Others have documented this
|> problem, but I have not found a viable solution.
|> Thanks!
|> 
|>  getStub () 
|> 
|> private PartnerAPIStub getStub() throws EmailException {
|> PartnerAPIStub myStub = null;
|>
|> try {
|> EndpointReference endPointReference = new
|> EndpointReference(endpoint);
|> ConfigurationContext configurationContext =
|> ConfigurationContextFactory.createConfigurationContextFromFileSystem(
|> null, ABSOLUTE_AXIS2_CLIENT_CONFIG_PATH);
|>
|> myStub = new PartnerAPIStub(configurationContext, endpoint);
|> ServiceClient serviceClient = myStub._getServiceClient();
|>
|> Options options = serviceClient.getOptions();
|>
|> options.setTo(endPointReference);
|>
|> this.updateOutflowSecurity(myStub);
|> }
|> catch (AxisFault e) {
|> // TODO JL - temp code
|> throw new EmailException(e);
|> }
|>
|> return myStub;
|> }
|>
|> 
|> // updateOutflowSecurity() /
|> 
|> private void updateOutflowSecurity(PartnerAPIStub stub) {
|>
|> ServiceClient serviceClient = stub._getServiceClient();
|> Options options = serviceClient.getOptions();
|>
|> OutflowConfiguration ofc = new OutflowConfiguration();
|> ofc.setActionItems("UsernameToken");
|> ofc.setUser(apiUsername);
|> ofc.setPasswordType("PasswordText");
|>
|> options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
|> ofc.getProperty());
|>
|>  //pwcbhandler is of type PWCBHandler that is injected via
|> Springoptions.setProperty(WSHandlerConstants.PW_CALLBACK_REF,
|> pwcbhandler);
|> }
|>
|> -
|> To unsubscribe, e-mail: [EMAIL PROTECTED]
|> For additional commands, e-mail: [EMAIL PROTECTED]
|>
|>
|>
|>
|
|
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)

iD8DBQFIBpt9gNg6eWEDv1kRAsyoAKDfwCuYBUzXdsj7aS3UqZ5Zq4+ylwCfaf9K
7C6gjnRqIqXt/Gu80rDgoSY=
=4NRi
-END PGP SIGNATURE-

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



Re: SecurityOutflow Configuration

2008-04-16 Thread Anthony Bull
We've got the same problem in production.  It basically isn't a risk 
unless you upgrade to a future version of Axis 2/Rampart that they have 
decided to remove those classes or the functionality they provide is 
turned off. 

To minimise the effect of this, all our production web services and web 
clients (we have 5 independent axis 2 web services running in 
production) use the same re-usable security library that abstracts the 
rampart configuration code.  So, when we change the ouflowConfiguration 
code, we only need to rebuild that jar and re-release it, instead of 
having to do full release builds of all our web services.


Sean Conlon wrote:

I am using the deprecated class OutflowConfiguration in order to set my
dynamic usernames and passwords in the OutflowSecurity parameter.  Below
are the methods that I use to do this.


What is an alternative approach for me to set my username and password
dynamically?  What are my risks with launching this into production with
a deprecated class? 


This may be more specific to Rampart then Axis2, but I am hoping that
someone else has had this issue too.  Others have documented this
problem, but I have not found a viable solution.  

Thanks! 



 getStub () 

private PartnerAPIStub getStub() throws EmailException {
PartnerAPIStub myStub = null;

try {
EndpointReference endPointReference = new
EndpointReference(endpoint);
ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
null, ABSOLUTE_AXIS2_CLIENT_CONFIG_PATH);

myStub = new PartnerAPIStub(configurationContext, endpoint);
ServiceClient serviceClient = myStub._getServiceClient();

Options options = serviceClient.getOptions();

options.setTo(endPointReference);

this.updateOutflowSecurity(myStub);
}
catch (AxisFault e) {
// TODO JL - temp code
throw new EmailException(e);
}

return myStub;
}


// updateOutflowSecurity() /

private void updateOutflowSecurity(PartnerAPIStub stub) {

ServiceClient serviceClient = stub._getServiceClient();
Options options = serviceClient.getOptions();

OutflowConfiguration ofc = new OutflowConfiguration();
ofc.setActionItems("UsernameToken");
ofc.setUser(apiUsername); 
ofc.setPasswordType("PasswordText");


options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
ofc.getProperty());

 //pwcbhandler is of type PWCBHandler that is injected via
Spring 
   options.setProperty(WSHandlerConstants.PW_CALLBACK_REF,

pwcbhandler);
}

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



  



--

Anthony
- 
Anthony Bull

Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand

[EMAIL PROTECTED]
Ph  +64 4 472 8818
Fax +64 4 472 8811
- 
www.bcsoft.co.nz
--- 
This email may contain confidential or privileged information, 
and is intended for use only by the addressee, or addressees. 
If you are not the intended recipient please advise the sender 
immediately and do not copy, use or disclose the contents to 
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses 
received with this email, or to any changes made to the original 
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black 
Coffee Software Ltd.
--- 




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



Re: [axis2 java client] ArrayList cannot be cast to Set

2008-04-16 Thread Andreas Veithen


On 16 Apr 2008, at 17:57, Smallwood, Rob wrote:

Without being unkind (and I really mean that), I think a java tutorial
explaining the fundamentals would fill in the missing gaps..


Rob,

Without being unkind, I think you should read Mehdi's post more  
carefully before referring him to a Java tutorial...


His code contains the following instructions:

Class[] returnTypes = new Class[] { Set.class };
Object[] response = serviceClient.invokeBlocking(opFindEntry,  
opFindEntryArgs, returnTypes);


The point is actually not that his WS returns a Set (this information  
obviously gets lost when serializing to XML), but that on the client  
side he explicitly specifies the expected Java type as Set and that  
RPCServiceClient#invokeBlocking returns an ArrayList instead. I'm  
neither an expert of RPC nor of ADB, but I'm a bit surprised to see  
this.


The code in Axis2 that causes this behavior can be found in  
org.apache.axis2.databinding.utils.BeanUtil#processObject:


if (SimpleTypeMapper.isCollection(classType)) {
return SimpleTypeMapper.getArrayList(omElement);
}

The logic behind this is indeed a bit questionable, and I think  
Mehdi's question is perfectly relevant.


Regards,

Andreas


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



RE: Excluding POJO fields from WSDL?

2008-04-16 Thread Kraus, David
Glen Verran also asked a similar question in his email: "How can I
exclude classes from Axis2?"

 

Does anyone know how to exclude a field from a class, or the whole class
from being included in the WSDL? We both tried the transient approach,
which didn't work.

 

Are there improvements in Axis2 1.3, 1.4 in this area?

 

Thanks, Dave

 



From: Kraus, David 
Sent: Tuesday, April 15, 2008 5:51 PM
To: axis-user@ws.apache.org
Subject: excluding pojo fields from wsdl

 

I am using Axis2 1.2 and have deployed a simple service as a POJO. I
created my client using wsld2java based on the WSDL generated from the
POJO service.

 

One of the objects, which is returned from a web service method, has
some public static fields. These fields are being included in the WSDL.
However, since these static fields don't have getters/setters, they
weren't being serialized on return, which caused an "Unexpected element
return" error at the client. Adding getters/setters gets rid of the
problem, as long as the getters/setters are not static ( which is
strange). In any case, these public static fields do not need to be
serialized, and their inclusion in the WSDL causes problems. Using
getters/setters is very awkward since they aren't really needed since
the fields really should be public static final, which I tried using.  I
have also tried using the java transient keyword, but that doesn't seem
to work. I have also tried using excludeProperties (beanPropertyRules)
in services.xml, and that didn't seem to work. Is there a way to exclude
these public static fields from the WSDL generated from the deployed
POJO?

 

Example of return class below:

 

Thanks, Dave

 

 

public class EnumNormal {

  private String _value;

  

  public EnumNormal() {}

  

  public EnumNormal(String value)

  {

_value = value;

  }

  

  public String getValue()

  {

return _value;

  }

  

  public void setValue(String value)

  {

_value = value;

  }

  

  public static String firstEnumVal = "FirstEnumVal";

  public static String secondEnumVal = "SecondEnumVal";

  public static String thirdEnumVal = "ThirdEnumVal";

  public static String fourthEnumVal = "FourthEnumVal";

  public static String fifthEnumVal = "FifthEnumVal";

  

}

   



SecurityOutflow Configuration

2008-04-16 Thread Sean Conlon
I am using the deprecated class OutflowConfiguration in order to set my
dynamic usernames and passwords in the OutflowSecurity parameter.  Below
are the methods that I use to do this.

What is an alternative approach for me to set my username and password
dynamically?  What are my risks with launching this into production with
a deprecated class? 

This may be more specific to Rampart then Axis2, but I am hoping that
someone else has had this issue too.  Others have documented this
problem, but I have not found a viable solution.  

Thanks! 


 getStub () 

private PartnerAPIStub getStub() throws EmailException {
PartnerAPIStub myStub = null;

try {
EndpointReference endPointReference = new
EndpointReference(endpoint);
ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
null, ABSOLUTE_AXIS2_CLIENT_CONFIG_PATH);

myStub = new PartnerAPIStub(configurationContext, endpoint);
ServiceClient serviceClient = myStub._getServiceClient();

Options options = serviceClient.getOptions();

options.setTo(endPointReference);

this.updateOutflowSecurity(myStub);
}
catch (AxisFault e) {
// TODO JL - temp code
throw new EmailException(e);
}

return myStub;
}


// updateOutflowSecurity() /

private void updateOutflowSecurity(PartnerAPIStub stub) {

ServiceClient serviceClient = stub._getServiceClient();
Options options = serviceClient.getOptions();

OutflowConfiguration ofc = new OutflowConfiguration();
ofc.setActionItems("UsernameToken");
ofc.setUser(apiUsername); 
ofc.setPasswordType("PasswordText");

options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
ofc.getProperty());

 //pwcbhandler is of type PWCBHandler that is injected via
Spring 
   options.setProperty(WSHandlerConstants.PW_CALLBACK_REF,
pwcbhandler);
}

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



adding handler to client (generated with WSDL2Java) (AXIS 1.4)

2008-04-16 Thread A Andrew
I've generated with WSDL2Java Client for this web-service:
http://www.w3schools.com/webservices/tempconvert.asmx?WSDL

in my program I use this code:

TempConvert service = new TempConvertLocator();
TempConvertSoap port = service.getTempConvertSoap();
System.out.println(port.celsiusToFahrenheit("20"));//returns 68

But how to recieve SOAP request and response messages content that stand upon 
this call?(without client-config.wsdd)

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



Re: Swa webservice behave different in tomcat web app and axis2 standalone server.

2008-04-16 Thread Thilina Gunarathne
Hi,
IIRC I tested that tutorial code with tomcat... I'm guessing something
is going wrong in your system... Let's try to figure it out exactly..

> The client side
> was't able to find the attachment althought the correct envelop was
> arrived..
Did you mean you got the correct soap message together with the
attachment from the server?? Can you capture a message snapshot using
tcpmon (http://ws.apache.org/commons/tcpmon) and see whether you have
the MIME part for the attachment.. It would be great if you can post
it here..

thanks,
Thilina

> I am using axis 2-1.3. My own arr has the similar behavior.  It
> seems that the all samples and tutorial sare based on Stand alone server, I
> just want see any one had the simliar experiences to deploy an aar into
> tomcat and was able to include an attachment in the response message to
> client.
>  Thanks,
> Jack
>
>
> On Wed, Apr 16, 2008 at 7:39 AM, Thilina Gunarathne <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> > Just a quick reply...
> > The sample used in the following tutorial is based on Tomcat deployment..
> > Downloading a Binary File from a Web Service using Axis2 and SOAP with
> Attachments - http://wso2.org/library/1675
> >
> > Also are you using the same axis2 version in both cases..
> > thanks,
> > Thilina
> >
> >
> >
> >
> >
> > On 4/16/08, Jinyuan Zhou <[EMAIL PROTECTED]> wrote:
> > >
> > > Thank Thilina,
> > > There are no error message. The usual soap request/response goes well.
> > > I also tried to deploy the one  arr file from a tutorial. Same thing
> happend.
> > > I just don't get it. I have build aar file using the standalone server's
> lib. I'll try to build uisng the jar in WEB_INF/lib. See it will work.   I
> wonder if DataHandler classes are different?   It looks like all examples
> and tutorials are based on stand alone server.
> > > Regards,
> > > Jack
> > >
> > >
> > >
> > > On Tue, Apr 15, 2008 at 8:20 PM, Thilina Gunarathne <[EMAIL PROTECTED]>
> wrote:
> > >
> > > > Hi,
> > > > Can you let us know more information, like any error messages, message
> traces...
> > > >
> > > > thanks,
> > > > Thilina
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou <[EMAIL PROTECTED]>
> wrote:
> > > >
> > > > > Hi,
> > > > > I have developed a websevice that will include an attachment to the
> client. It worked in the standalone server not inside tomcat's webapp.
> > > > > I have  true in the
> service.xml inside arr file. Inside tomcat server, I also  have this line in
> the
> > > > > ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml.
> > > > > What I am missing?
> > > > > Thanks for you time,
> > > > > Jack
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Thilina Gunarathne - http://thilinag.blogspot.com
> > >
> > >
> > >
> > > --
> > >
> > > Some people lived like they will never die
> > > and died like they have never lived
> >
> >
> >
> > --
> > Thilina Gunarathne  - http://thilinag.blogspot.com
>
>
>
> --
>
> Some people lived like they will never die
> and died like they have never lived



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

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



Memory footprints

2008-04-16 Thread Demetris G


Hi guys,

   I may have asked this one before a while back. Has anyone does a 
memory footprint

analysis of Axis1 and Axis2? .

Thanks in advance
Demetris


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



Generated Stub code design issue

2008-04-16 Thread Martin.Barrs
Using WSDL2Java, I'm looking for a way to update the
ConfigurationContext without touching the generated Stub.

One promising method in the stub is the intantiation method that takes a
ConfigurationContext as a parameter. There's an issue with this though.
See below:


/**
 * Constructor that takes in a configContext  and useseperate
listner
 */
public MyStub(
org.apache.axis2.context.ConfigurationContext
configurationContext,
java.lang.String targetEndpoint, boolean useSeparateListener)
throws org.apache.axis2.AxisFault {
//To populate AxisService
populateAxisService();
populateFaults();

_serviceClient = new
org.apache.axis2.client.ServiceClient(configurationContext,
_service);

configurationContext = _serviceClient.getServiceContext()
// **  Issue
 .getConfigurationContext();
// **

_serviceClient.getOptions()
  .setTo(new
org.apache.axis2.addressing.EndpointReference(
targetEndpoint));
 
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);
}


As you can see, the passed-in context is overwritten when I would have
hoped it would become a reference in the context to be used by the
service. There is, AFAIK, no other way to get a reference to the context
other than by modifying the Stub code, which I'd dearly like to avoid.
This feels like an oportunity to tweak the stub generation and/or
ConfigurationContext class... but in the mean time would anyone else
have an idea of how to access the ConfigurationContext without touching
the generated code?

Thanks in advance,

Martin


RE: REST Services

2008-04-16 Thread Chris Richmond
The example in the documentation has a call to the GetVersion call.and like
most sample is completely simplistic .no parameters..no complex types.no
complex return..so it's difficult to glean from that what should be done.

 

Thanks,


Chris

 

 



RE:REST Services

2008-04-16 Thread Chris Richmond
Hey Keith,

 

I am using the latest version(I believe) downloaded about 2 months ago.

 

So what you are saying is that if my service currently lives at 

 

http://localhost:8080/axis2/services/MyService 

 

then that is the same url to post to?

 

What I can't figure out is where is a sample for posting an http rest type
request to the endpoints.  I saw an example client using the axis client
tools, but I want to see the raw format of exactly what I need to post to
that endpoint to perform various function calls?  What does the URL need to
look like? So that I can craft those from non axis/java
environements(javascript, python, php, etc).  I can't seem to find any
documentation on how the url should be crafted to perform my calls.and how
to perform calls where they are expecting a complex type in the SOAP call
currently.

 

Those are the kinds of questions I cannot figure out.


Thanks,

 

Chris

 



replying to posts

2008-04-16 Thread Chris Richmond
Whenever I try to reply to a message that came from the mailing list, it
gets bounced as spam.  What gives.?


Chris

 

 



test post

2008-04-16 Thread Chris Richmond
Keep getting undeliverable bounces saying my posts are above the spam limit.
Testing



RE: .mar file

2008-04-16 Thread Sean Conlon
Awesome, thanks Richard.  I knew someone would think of the obvious,
which I had overlooked.  

 



From: RICHARD FEATHERSTONE [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 1:13 PM
To: axis-user@ws.apache.org
Subject: Re: .mar file

 

You're right, I was sure I'd done this but I must have been mistaken.

 

go to control panel - folder options - file types tab

delete the mar type (if you don't use it as m$ intended)

 

you can then click on the mar and set the program you want open it with

 

I'm usually looking in mars when developing. In eclipse I select open
with and then browse to the external program I want to open mars and
aars. 

 

Although now I've the default I can use the system default.

 

HTH

 

Ric


 

- Original Message 
From: Sean Conlon <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Wednesday, 16 April, 2008 5:29:58 PM
Subject: RE: .mar file

Yes, that was my first instinct too.  However, that option is not
provided for whatever reason.  The "Open With" option is available on
other shortcuts on my machine, but not for this one.  

 

I have also tried restarting my computer, and that did not work either.


 

Any other suggestions? 

 

Thanks, 

Sean  

 

 



From: RICHARD FEATHERSTONE [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 11:26 AM
To: axis-user@ws.apache.org
Subject: Re: .mar file

 

Try right click - open with

 

Its a rather poorly chosen file extension already overloaded
(http://en.wikipedia.org/wiki/Alphabetical_list_of_file_extensions).

- Original Message 
From: Sean Conlon <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Wednesday, 16 April, 2008 5:08:38 PM
Subject: .mar file

I am trying to unzip my .mar file, but my Windows XP environment
continues to think that the file is a "Microsoft Office Access Report
Shortcut".  I have changed my settings for the .mar file to be
associated with WinZip (Tools > Folder Options > File Types.), but
it is to no avail b/c Windows still associates that file as the
aforementioned Microsoft file type.  

 

Has anyone else had this problem within their Windows environment?  More
importantly, has anyone fixed this problem in their Windows environment?


 

Thanks, 

Sean  

 

 



Re: .mar file

2008-04-16 Thread RICHARD FEATHERSTONE
You're right, I was sure I'd done this but I must have been mistaken.

go to control panel - folder options - file types tab
delete the mar type (if you don't use it as m$ intended)

you can then click on the mar and set the program you want open it with

I'm usually looking in mars when developing. In eclipse I select open with and 
then browse to the external program I want to open mars and aars. 

Although now I've the default I can use the system default.

HTH

Ric


- Original Message 
From: Sean Conlon <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Wednesday, 16 April, 2008 5:29:58 PM
Subject: RE: .mar file


Yes, that was my first instinct too.  However, that option is not provided for 
whatever reason.  The “Open With” option is available on other shortcuts on my 
machine, but not for this one.  
 
I have also tried restarting my computer, and that did not work either.  
 
Any other suggestions? 
 
Thanks, 
Sean  
 
 



From: RICHARD FEATHERSTONE [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 11:26 AM
To: axis-user@ws.apache.org
Subject: Re: .mar file
 
Try right click - open with
 
Its a rather poorly chosen file extension already overloaded 
(http://en.wikipedia.org/wiki/Alphabetical_list_of_file_extensions).
- Original Message 
From: Sean Conlon <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Wednesday, 16 April, 2008 5:08:38 PM
Subject: .mar file
I am trying to unzip my .mar file, but my Windows XP environment continues to 
think that the file is a “Microsoft Office Access Report Shortcut”.  I have 
changed my settings for the .mar file to be associated with WinZip (Tools > 
Folder Options > File Types…..), but it is to no avail b/c Windows still 
associates that file as the aforementioned Microsoft file type.  
 
Has anyone else had this problem within their Windows environment?  More 
importantly, has anyone fixed this problem in their Windows environment? 
 
Thanks, 
Sean  
 

RE: .mar file

2008-04-16 Thread SGruverman
Sean,

Since I know I've run into this in the past, I looked into it some more.
There's a thread on annoyances.org under Windows XP that may be helpful:
http://www.annoyances.org/exec/forum/winxp/t1114363841

- Steve

__
Steve Gruverman
IntelliCare, Inc. | A Medco Health Solutions Company
500 Southborough Drive | South Portland ME 04106

"Sean Conlon" <[EMAIL PROTECTED]> wrote on 04/16/2008 12:50:47 PM:

> That will work, but that is only a bandage and does not completely fix
> my annoying little extension problem.  Oh well, I guess I will have to
> just deal with the inconvenience of opening WinZip every time.
>
> Thanks for your help.
>
>


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



Help with namespace problem in doWriteDefaultNs (Null Pointer Exception)

2008-04-16 Thread Thomas Vaughan
Hi,

 

I think I've narrowed down the cause of a problem I'm having, but I'm
not sure what the solution is. . .any help would be *greatly*
appreciated.

 

I'm trying to consume a web service that has published a pretty simple
WSDL (attached).  There's only one method exposed via the service, and
it's called "executeService" which takes a single argument (an XML
string).

 

I installed Axis2 v1.2 in my Java 1.4 environment and ran this command:

WSDL2Java -uri brms.wsdl -p com.foo.brms.serviceinterface -d xmlbeans -s
-o ..\java -R ..\resources

 

That created a bunch of xmlbean supporting classes and a
BRMSServiceStub.java.  Here's how I'm using it:

 

ExecuteServiceDocument executeServiceDoc =
ExecuteServiceDocument.Factory.newInstance( );

ExecuteService executeService =
executeServiceDoc.addNewExecuteService( );

executeService.setArg0( . . . my Xml String here. . . );

 

myBrmsServiceStub.executeService( executeServiceDoc );

 

The NPE stack trace that gets thrown is shown below, but I think the
problem is that there is no namespace inserted into the surrounding xml
that the generated xmlbeans class (ExecuteService) wraps around my XML.
Just before the executeService( ) call is made, here is the message
content of the executeServiceDoc:

 



http://schemas.xmlsoap.org/soap/envelope/";>



http://endpoint.brmsservice/";>!



   ...my Xml String here. . .









 

 

 

Shouldn't the "http://endpoint.brmsservice/";>

 

I suspect that is the problem, because down in the stack when the
doWriteDefaultNs is called, the default namespace is looked up from a
map that maps the empty-string found in the executeService element to a
null namespace value.

 

What did I do wrong?

 

Thanks in advance!

 

 

 

 

java.lang.NullPointerException

  at
com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.j
ava:529)

  at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStrea
mWriter.java:113)

  at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter
.java:121)

  at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStrea
mWriter.java:148)

  at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElemen
t(StreamingOMSerializer.java:238)

  at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S
treamingOMSerializer.java:71)

  at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea
mingOMSerializer.java:54)

  at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS
erializerUtil.java:490)

  at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:783)

  at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:808)

  at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOA
PEnvelopeImpl.java:234)

  at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
nvelopeImpl.java:222)

  at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:808)

  at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
java:418)

  at
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessage
Formatter.java:55)

  at
org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisReque
stEntity.java:84)

  at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
Body(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(HttpMe
thodDirector.java:397)

  at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:170)

  at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
96)

  at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
46)

  at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
tHTTPSender.java:558)

  at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1
76)

  at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)

  at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:305)

  at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
sHTTPTransportSender.java:201)

  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)

  at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:330)

  at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:294)

  at

RE: .mar file

2008-04-16 Thread Sean Conlon
That will work, but that is only a bandage and does not completely fix
my annoying little extension problem.  Oh well, I guess I will have to
just deal with the inconvenience of opening WinZip every time.  

Thanks for your help.  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 11:44 AM
To: axis-user@ws.apache.org
Subject: RE: .mar file

Sean,

What about opening Winzip and then opening the .mar from WinZip's file
menu?

- Steve

__
Steve Gruverman
IntelliCare, Inc. | A Medco Health Solutions Company

500 Southborough Drive | South Portland ME 04106





"Sean Conlon" <[EMAIL PROTECTED]> wrote on 04/16/2008 12:29:58 PM:

> Yes, that was my first instinct too.  However, that option is not
> provided for whatever reason.  The "Open With" option is available
> on other shortcuts on my machine, but not for this one.
>
> I have also tried restarting my computer, and that did not work
either.
>
> Any other suggestions?
>
> Thanks,
> Sean
>

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



RE: .mar file

2008-04-16 Thread SGruverman
Sean,

What about opening Winzip and then opening the .mar from WinZip's file
menu?

- Steve

__
Steve Gruverman
IntelliCare, Inc. | A Medco Health Solutions Company

500 Southborough Drive | South Portland ME 04106





"Sean Conlon" <[EMAIL PROTECTED]> wrote on 04/16/2008 12:29:58 PM:

> Yes, that was my first instinct too.  However, that option is not
> provided for whatever reason.  The “Open With” option is available
> on other shortcuts on my machine, but not for this one.
>
> I have also tried restarting my computer, and that did not work either.
>
> Any other suggestions?
>
> Thanks,
> Sean
>

RE: .mar file

2008-04-16 Thread Sean Conlon
Yes, that was my first instinct too.  However, that option is not
provided for whatever reason.  The "Open With" option is available on
other shortcuts on my machine, but not for this one.  

 

I have also tried restarting my computer, and that did not work either.


 

Any other suggestions? 

 

Thanks, 

Sean  

 

 



From: RICHARD FEATHERSTONE [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 16, 2008 11:26 AM
To: axis-user@ws.apache.org
Subject: Re: .mar file

 

Try right click - open with

 

Its a rather poorly chosen file extension already overloaded
(http://en.wikipedia.org/wiki/Alphabetical_list_of_file_extensions).

- Original Message 
From: Sean Conlon <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Wednesday, 16 April, 2008 5:08:38 PM
Subject: .mar file

I am trying to unzip my .mar file, but my Windows XP environment
continues to think that the file is a "Microsoft Office Access Report
Shortcut".  I have changed my settings for the .mar file to be
associated with WinZip (Tools > Folder Options > File Types.), but
it is to no avail b/c Windows still associates that file as the
aforementioned Microsoft file type.  

 

Has anyone else had this problem within their Windows environment?  More
importantly, has anyone fixed this problem in their Windows environment?


 

Thanks, 

Sean  

 



Re: .mar file

2008-04-16 Thread RICHARD FEATHERSTONE
Try right click - open with

Its a rather poorly chosen file extension already overloaded 
(http://en.wikipedia.org/wiki/Alphabetical_list_of_file_extensions).


- Original Message 
From: Sean Conlon <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Wednesday, 16 April, 2008 5:08:38 PM
Subject: .mar file


I am trying to unzip my .mar file, but my Windows XP environment continues to 
think that the file is a “Microsoft Office Access Report Shortcut”.  I have 
changed my settings for the .mar file to be associated with WinZip (Tools > 
Folder Options > File Types…..), but it is to no avail b/c Windows still 
associates that file as the aforementioned Microsoft file type.  
 
Has anyone else had this problem within their Windows environment?  More 
importantly, has anyone fixed this problem in their Windows environment? 
 
Thanks, 
Sean  

.mar file

2008-04-16 Thread Sean Conlon
I am trying to unzip my .mar file, but my Windows XP environment
continues to think that the file is a "Microsoft Office Access Report
Shortcut".  I have changed my settings for the .mar file to be
associated with WinZip (Tools > Folder Options > File Types.), but
it is to no avail b/c Windows still associates that file as the
aforementioned Microsoft file type.  

 

Has anyone else had this problem within their Windows environment?  More
importantly, has anyone fixed this problem in their Windows environment?


 

Thanks, 

Sean  



Re: [axis2 java client] ArrayList cannot be cast to Set

2008-04-16 Thread Mehdi Rabah
Hi Michele, thanks for your answer,

In fact, I'm sending a *Set* from my WebService, so I expect to receive a
*Set*. I've looked what contain the ArrayList I receive and it appear to be
an ArrayList of org.apache.axiom.om.impl.llom.OMTextImpl. It has nothing to
do with the basic Set of Integer I sent! Here is the soap response of my WS:

http://eventlogger.ws";
xmlns:ax21="http://interaction.ws/xsd";
xmlns:ax22="http://util.java/xsd";>
0
1
2


Don't tell me this is a java problem... and Rob, thanks for your kindness...

---
Mehdi


On Wed, Apr 16, 2008 at 5:47 PM, Michele Mazzucco <
[EMAIL PROTECTED]> wrote:

> This is a java problem, it has nothing to do with web services. You cannot
> cast an ArrayList to a Set!, they have different features. Try to
> send/receive array of values and work with your set after that.
>
> Michele
>
>
>
> On 16 Apr 2008, at 16:37, Mehdi Rabah wrote:
>
> > Hi everyone, I'm a new user of webservices/axis/soap, etc.
> >
> > I've deployed a simple WS (using axis2) which return a set, and I want
> > to deserialize it in my java client (also using axis2). But I get this error
> > :
> >
> > Exception in thread "main" java.lang.ClassCastException:
> > java.util.ArrayList cannot be cast to java.util.Set
> >
> > Is this a common error ? If so, can you point me some doc which I must
> > positively absolutely read to avoid basic problems like this ?
> >
> > Thanks in advance,
> > --
> > Mehdi
> > ---
> >
> > here is a part of my java lient code
> >
> >RPCServiceClient serviceClient = new RPCServiceClient();
> >
> >Options options = serviceClient.getOptions();
> >
> >EndpointReference targetEPR = new EndpointReference(endPointStr);
> >options.setTo(targetEPR);
> >
> >QName opFindEntry = new QName(namespaceStr, methodNameStr);
> >
> >Object[] opFindEntryArgs = new Object[] { };
> >
> >Class[] returnTypes = new Class[] { Set.class };
> >
> >
> >Object[] response = serviceClient.invokeBlocking
> > (opFindEntry,
> >opFindEntryArgs, returnTypes);
> >
> >Set result = (Set) response[0];
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


How can I exclude classes from Axis2?

2008-04-16 Thread Glen Verran
Hi there,
 
I have a jaxb java bean which extends the following class below.  The
problem is that Axis2 includes this class as part of the WSDL as well as
underlying logic.  I had this problem with JAXB 2.1.6 when it marshalled
the object - adding @XmlTransient solved that problem.
 
@XmlTransient
public class JaxbInternalMsg implements InternalMsg {
  
  public String getEchoData() {
return null;
  }
 
  public String getMsgType() throws GenericException {
return null;
  }
  
  public void setEchoData(String echoData) {
  }
 
  public byte[] toExternal() throws GenericException {
return null;
  }
 
  public String verboseToString() {
return null;
  }
 
}
 
But when AXIS 2 generates the WSDL, it doesn't take @XmlTransient into
account. I even added @XmlTransient to each method and that didn't work
either.  I don't want this class to be included in the WSDL and
underlying logic at all. i.e. AXIS2 must not publish the class at all.

 
I even added a modified WSDL into my aar file too.  I got the modified
version of the WSDL when I called ?wsdl, but when I called the web
service, things went pearshaped because Axis2 still sent msgType and
echoData from this class in the SOAP message.
 
Is there a way to solve this?  
Thanks
~Glen
 


RE: [axis2 java client] ArrayList cannot be cast to Set

2008-04-16 Thread Smallwood, Rob
> Object[] response = serviceClient.invokeBlocking
> (opFindEntry,
> opFindEntryArgs, returnTypes);
>
> Set result = (Set) response[0];

Try casting the ArrayList to a "Collection" and then use an iterator on
the Collection..

Without being unkind (and I really mean that), I think a java tutorial
explaining the fundamentals would fill in the missing gaps..


-Original Message-
From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
Sent: 16 April 2008 16:48
To: axis-user@ws.apache.org
Subject: Re: [axis2 java client] ArrayList cannot be cast to Set

This is a java problem, it has nothing to do with web services. You  
cannot cast an ArrayList to a Set!, they have different features. Try  
to send/receive array of values and work with your set after that.

Michele


On 16 Apr 2008, at 16:37, Mehdi Rabah wrote:
> Hi everyone, I'm a new user of webservices/axis/soap, etc.
>
> I've deployed a simple WS (using axis2) which return a set, and I  
> want to deserialize it in my java client (also using axis2). But I  
> get this error :
>
> Exception in thread "main" java.lang.ClassCastException:  
> java.util.ArrayList cannot be cast to java.util.Set
>
> Is this a common error ? If so, can you point me some doc which I  
> must positively absolutely read to avoid basic problems like this ?
>
> Thanks in advance,
> --
> Mehdi
> ---
>
> here is a part of my java lient code
>
> RPCServiceClient serviceClient = new RPCServiceClient();
>
> Options options = serviceClient.getOptions();
>
> EndpointReference targetEPR = new EndpointReference 
> (endPointStr);
> options.setTo(targetEPR);
>
> QName opFindEntry = new QName(namespaceStr, methodNameStr);
>
> Object[] opFindEntryArgs = new Object[] { };
>
> Class[] returnTypes = new Class[] { Set.class };
>
>
> Object[] response = serviceClient.invokeBlocking
> (opFindEntry,
> opFindEntryArgs, returnTypes);
>
> Set result = (Set) response[0];


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

If you've received this email by mistake, we're sorry for bothering you. It may 
contain information that's confidential, so please delete it without sharing 
it. And if you let us know, we can try to stop it from happening again. Thank 
you. 

We may monitor any emails sent or received by us, or on our behalf. If we do, 
this will be in line with relevant law and our own policies.

Sage (UK) Limited. Registered in England at North Park, Newcastle upon Tyne, 
NE13 9AA. Registered number 1045967.

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



Re: [axis2 java client] ArrayList cannot be cast to Set

2008-04-16 Thread Michele Mazzucco
This is a java problem, it has nothing to do with web services. You  
cannot cast an ArrayList to a Set!, they have different features. Try  
to send/receive array of values and work with your set after that.


Michele


On 16 Apr 2008, at 16:37, Mehdi Rabah wrote:

Hi everyone, I'm a new user of webservices/axis/soap, etc.

I've deployed a simple WS (using axis2) which return a set, and I  
want to deserialize it in my java client (also using axis2). But I  
get this error :


Exception in thread "main" java.lang.ClassCastException:  
java.util.ArrayList cannot be cast to java.util.Set


Is this a common error ? If so, can you point me some doc which I  
must positively absolutely read to avoid basic problems like this ?


Thanks in advance,
--
Mehdi
---

here is a part of my java lient code

RPCServiceClient serviceClient = new RPCServiceClient();

Options options = serviceClient.getOptions();

EndpointReference targetEPR = new EndpointReference 
(endPointStr);

options.setTo(targetEPR);

QName opFindEntry = new QName(namespaceStr, methodNameStr);

Object[] opFindEntryArgs = new Object[] { };

Class[] returnTypes = new Class[] { Set.class };


Object[] response = serviceClient.invokeBlocking
(opFindEntry,
opFindEntryArgs, returnTypes);

Set result = (Set) response[0];



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



[axis2 java client] ArrayList cannot be cast to Set

2008-04-16 Thread Mehdi Rabah
Hi everyone, I'm a new user of webservices/axis/soap, etc.

I've deployed a simple WS (using axis2) which return a set, and I want to
deserialize it in my java client (also using axis2). But I get this error :

Exception in thread "main" java.lang.ClassCastException: java.util.ArrayList
cannot be cast to java.util.Set

Is this a common error ? If so, can you point me some doc which I must
positively absolutely read to avoid basic problems like this ?

Thanks in advance,
--
Mehdi
---

here is a part of my java lient code

RPCServiceClient serviceClient = new RPCServiceClient();

Options options = serviceClient.getOptions();

EndpointReference targetEPR = new EndpointReference(endPointStr);
options.setTo(targetEPR);

QName opFindEntry = new QName(namespaceStr, methodNameStr);

Object[] opFindEntryArgs = new Object[] { };

Class[] returnTypes = new Class[] { Set.class };


Object[] response = serviceClient.invokeBlocking(opFindEntry,
opFindEntryArgs, returnTypes);

Set result = (Set) response[0];


Re: Swa webservice behave different in tomcat web app and axis2 standalone server.

2008-04-16 Thread Jinyuan Zhou
Thilina,
The link you provided is the tutorial I followed. I downloaded the all file
and build the aar. When this one deployed to stand alone server, it worked
as tutorial descrbed. When it was deployed to tomcat 6.016. The client side
was't able to find the attachment althought the correct envelop was
arrived.. I am using axis 2-1.3. My own arr has the similar behavior.  It
seems that the all samples and tutorial sare based on Stand alone server, I
just want see any one had the simliar experiences to deploy an aar into
tomcat and was able to include an attachment in the response message to
client.
Thanks,
Jack
On Wed, Apr 16, 2008 at 7:39 AM, Thilina Gunarathne <[EMAIL PROTECTED]>
wrote:

> Hi,
> Just a quick reply...
> The sample used in the following tutorial is based on Tomcat deployment..
> Downloading a Binary File from a Web Service using Axis2 and SOAP with
> Attachments - http://wso2.org/library/1675
>
> Also are you using the same axis2 version in both cases..
> thanks,
> Thilina
>
>
> On 4/16/08, Jinyuan Zhou <[EMAIL PROTECTED]> wrote:
> >
> > Thank Thilina,
> > There are no error message. The usual soap request/response goes well.
> > I also tried to deploy the one  arr file from a tutorial. Same thing
> > happend.
> > I just don't get it. I have build aar file using the standalone server's
> > lib. I'll try to build uisng the jar in WEB_INF/lib. See it will work.   I
> > wonder if DataHandler classes are different?   It looks like all examples
> > and tutorials are based on stand alone server.
> > Regards,
> > Jack
> >
> > On Tue, Apr 15, 2008 at 8:20 PM, Thilina Gunarathne <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Hi,
> > > Can you let us know more information, like any error messages, message
> > > traces...
> > >
> > > thanks,
> > > Thilina
> > >
> > > On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Hi,
> > > > I have developed a websevice that will include an attachment to the
> > > > client. It worked in the standalone server not inside tomcat's webapp.
> > > > I have  true in the
> > > > service.xml inside arr file. Inside tomcat server, I also  have this 
> > > > line in
> > > > the
> > > > ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml.
> > > > What I am missing?
> > > > Thanks for you time,
> > > > Jack
> > > >
> > > >
> > >
> > >
> > > --
> > > Thilina Gunarathne - http://thilinag.blogspot.com
> >
> >
> >
> >
> > --
> >
> > Some people lived like they will never die
> > and died like they have never lived
>
>
>
>
> --
> Thilina Gunarathne  - http://thilinag.blogspot.com
>



-- 

Some people lived like they will never die
and died like they have never lived


Re: How to disconnect from ServiceClient connection

2008-04-16 Thread Michele Mazzucco

Try with ServiceClient.cleanup().

Michele

On 16 Apr 2008, at 13:21, lekkie wrote:


Hi guys,

after sending a transaction with ServiceClient.sendreceive(OMElement);

How can I break off this connection?

I use Axis2 1.1.1.

Rgds,



--  
View this message in context: http://www.nabble.com/How-to- 
disconnect-from-ServiceClient-connection-tp16721261p16721261.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]




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



Re: Swa webservice behave different in tomcat web app and axis2 standalone server.

2008-04-16 Thread Thilina Gunarathne
Hi,
Just a quick reply...
The sample used in the following tutorial is based on Tomcat deployment..
Downloading a Binary File from a Web Service using Axis2 and SOAP with
Attachments - http://wso2.org/library/1675

Also are you using the same axis2 version in both cases..
thanks,
Thilina

On 4/16/08, Jinyuan Zhou <[EMAIL PROTECTED]> wrote:
>
> Thank Thilina,
> There are no error message. The usual soap request/response goes well.
> I also tried to deploy the one  arr file from a tutorial. Same thing
> happend.
> I just don't get it. I have build aar file using the standalone server's
> lib. I'll try to build uisng the jar in WEB_INF/lib. See it will work.   I
> wonder if DataHandler classes are different?   It looks like all examples
> and tutorials are based on stand alone server.
> Regards,
> Jack
>
> On Tue, Apr 15, 2008 at 8:20 PM, Thilina Gunarathne <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> > Can you let us know more information, like any error messages, message
> > traces...
> >
> > thanks,
> > Thilina
> >
> > On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Hi,
> > > I have developed a websevice that will include an attachment to the
> > > client. It worked in the standalone server not inside tomcat's webapp.
> > > I have  true in the
> > > service.xml inside arr file. Inside tomcat server, I also  have this line 
> > > in
> > > the
> > > ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml.
> > > What I am missing?
> > > Thanks for you time,
> > > Jack
> > >
> > >
> >
> >
> > --
> > Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
>
> Some people lived like they will never die
> and died like they have never lived




-- 
Thilina Gunarathne  - http://thilinag.blogspot.com


How to send the XML-Declaration

2008-04-16 Thread joschi

Hello,

how can i send a rest-request with a xml-declaration?

Thanks
Joschi
-- 
View this message in context: 
http://www.nabble.com/How-to-send-the-XML-Declaration-tp16722298p16722298.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]



FW: Woden[Fatal Error],0:0,WSDL501,Expected a "{http://www.w3.org/ns/wsdl}description" element, but found a "{http://schemas.xmlsoap.org/wsdl/}definitions" element instead.

2008-04-16 Thread anan.rapheal

Hi,

  I am using AXIS 2 .when I try to generate  java files from WSDL its
throwing error given below.
 Could any body help me ..   what could be the reason for this error.

Woden[Fatal Error],0:0,WSDL501,Expected a
"{http://www.w3.org/ns/wsdl}description"; element, but found a
"{http://schemas.xmlsoap.org/wsdl/}definitions"; element instead.

org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(Lorg.apache.ax
is2.util.CommandLineOptionParser;)V(CodeGenerationEngine.java:153)
at
org.apache.axis2.wsdl.WSDL2Code.main([Ljava.lang.String;)V(WSDL2Code.jav
a:35)
at
org.apache.axis2.wsdl.WSDL2Java.main([Ljava.lang.String;)V(WSDL2Java.jav
a:24)
Caused by: WSDLException: faultCode=INVALID_WSDL: Fatal WSDL error:
0:0,WSDL501,Expected a "{http://www.w3.org/ns/wsdl}description"; element,
but found a "{http://schemas.xmlsoap.org/wsdl/}definitions"; element
instead.:
at
org.apache.woden.internal.ErrorReporterImpl.reportError(Lorg.apache.wode
n.ErrorLocator;Ljava.lang.String;Ljava.lang.String;SLjava.lang.Exception
;)V(ErrorReporterImpl.java:229)
at
org.apache.woden.internal.ErrorReporterImpl.reportError(Lorg.apache.wode
n.ErrorLocator;Ljava.lang.String;[Ljava.lang.Object;SLjava.lang.Exceptio
n;)V(ErrorReporterImpl.java:184)
at
org.apache.woden.internal.ErrorReporterImpl.reportError(Lorg.apache.wode
n.ErrorLocator;Ljava.lang.String;[Ljava.lang.Object;S)V(ErrorReporterImp
l.java:169)
at
org.apache.woden.internal.BaseWSDLReader.parseDescription(Ljava.lang.Str
ing;Lorg.apache.woden.XMLElement;Ljava.util.Map;)Lorg.apache.woden.wsdl2
0.xml.DescriptionElement;(BaseWSDLReader.java
:357)
at
org.apache.woden.internal.DOMWSDLReader.readWSDL(Ljava.lang.String;Lorg.
w3c.dom.Element;)Lorg.apache.woden.wsdl20.Description;(DOMWSDLReader.jav
a:203)
at
org.apache.woden.internal.DOMWSDLReader.readWSDL(Ljava.lang.String;Lorg.
w3c.dom.Document;)Lorg.apache.woden.wsdl20.Description;(DOMWSDLReader.ja
va:234)
at
org.apache.woden.internal.DOMWSDLReader.readWSDL(Ljava.lang.String;Lorg.
xml.sax.InputSource;)Lorg.apache.woden.wsdl20.Description;(DOMWSDLReader
.java:247)
at
org.apache.woden.internal.DOMWSDLReader.readWSDL(Ljava.lang.String;)Lorg
.apache.woden.wsdl20.Description;(DOMWSDLReader.java:122)
at
org.apache.axis2.description.WSDL20ToAxisServiceBuilder.readInTheWSDLFil
e(Ljava.lang.String;)Lorg.apache.woden.wsdl20.Description;(WSDL20ToAxisS
erviceBuilder.java:1027)
at
org.apache.axis2.description.WSDL20ToAxisServiceBuilder.(Ljava.lan
g.String;Ljava.lang.String;Ljava.lang.String;)V(WSDL20ToAxisServiceBuild
er.java:143)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(Lorg.apache.ax
is2.util.CommandLineOptionParser;)V(CodeGenerationEngine.java:97)


Thanks
Anan

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com


[axis2] axis2 1.3 complextype with byte[] member variable, bug?

2008-04-16 Thread Holger Uhlitzsch
Hi all,

i think i found a bug in axis2 1.3 with POJOs.

My POJO has two methods. One sending a object with a byte[] member and one 
returning a object with byte[] member.
The serialization of the object is valid and i can see in the sending out soap 
message the base64 encoded byte[]. But the deserialization fails.
In line 382 of class org.apache.axis2.databinding.utils.BeanUtil i have to 
change:

partObj = deserialize(parameters, (OMElement)parts.getParent(),

to:

partObj = deserialize(parameters, parts,

So i do not call deserialize() with the parent of parts (which is the xml 
element of the byte[] member).

and in line 308 change:

return Base64.decode(beanElement.getFirstElement().getText());

to:

return Base64.decode(beanElement.getText());

Now i just have to call getText() to get the base64 encoded content of the 
byte[] xml element.

I have to do this because call getFirstElement() doesn't ensure that the 
element is really the byte[] element.

But i'm not sure this is the right fix.

Regards
-- 
Pt! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

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



How to disconnect from ServiceClient connection

2008-04-16 Thread lekkie

Hi guys,

after sending a transaction with ServiceClient.sendreceive(OMElement);

How can I break off this connection?

I use Axis2 1.1.1.

Rgds,



-- 
View this message in context: 
http://www.nabble.com/How-to-disconnect-from-ServiceClient-connection-tp16721261p16721261.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]



[Axis2] Axis2 1.3 difference between reaching webservice via browser or via API

2008-04-16 Thread Mike Waldman
Hello there,



I'm working on  migrating my webservice from Axis 1 to Axis2!

I took the databinding wsdl sample from the axis2 package, and deployed it
with my server

Basically:

1/ used the intellij idea plugin to create the classes from the wsdl

2/ implemented some logic inside StockQuoteServiceSkeleton.java

3/ used the ant task jar.server to create the aar file

4/deployed in on my server



I can see the newly deployed service just fine, and I can even reach it (and
it work with my browser)

http://server/axis2/services/StockQuoteService/getStockQuote?symbol=test



now when I try to use the generated test client, or XML Spy I get 2 very
different results:

I'll only talk about XML Spy for now

It goes into the StockQuoteServiceSkeleton.java getStockQuote method (I've
added some print lines)

But when I ask to display the symbol that I've passes it returns a empty
string!



If you have any idea, please please let me know

 Thanks a lot in advance

-Mike


Re: REST Services

2008-04-16 Thread keith chapman
What is the version of Axis2 you are using? Axis2 used to support separate
endpoints for REST and SOAP but now they are served from the same endpoint.
So sending a REST request to the normal endpoint will work.

Thanks,
Keith.

On Tue, Apr 15, 2008 at 11:47 PM, Chris Richmond <[EMAIL PROTECTED]>
wrote:

>  Well I developed a service and client using SOAP(adb), but heard I could
>
> create rest clients(easier for scripters to do) as well.  So I want to now
>
> find the REST endpoints for my service.  How do I view them or access them
>
> if they are turned on by default as you say?
>
>
>
> Thanks,
>
> Chris
>
>
>
>  --
>
> *From:* keith chapman [mailto:[EMAIL PROTECTED]
> *Sent:* Monday, April 14, 2008 7:16 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: REST services
>
>
>
> All services in axis2 support both REST and SOAP by default. You can
> explicitly turn REST off though. Are you looking to wrote REST services or
> clients? (Axis2 supports both)
>
> Thanks,
> Keith.
>
> On Tue, Apr 15, 2008 at 12:13 AM, Chris Richmond <[EMAIL PROTECTED]>
> wrote:
>
> Hey all,
>
>
>
> I thought I remembered reading somewhere that Axis2 could just "throw a
> switch" and expose soap services as REST type calls, but I was wondering if
> anyone has actually tried to use this functionality and what their
> experience or opinion on whether or not it works is.  I have soap clients
> but might start supporting very much simpler scripting clients, so REST
> would be much easier for them to work with.
>
>
>
> Thanks,
>
>
> Chris
>
>
>
>
>



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

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