Re: [axis2] About multiple thread

2007-10-09 Thread Deepal Jayasinghe


Todd Allen wrote:
 What is the default scope in Axis2?
Request .




 At 01:35 AM 10/9/2007, Deepal jayasinghe wrote:
 Hi ,

 If you deploy the service in application scope then there will be only
 one service instance , however if you deploy the service in other scope
 there will be a number of service instances. For example if you deploy
 the service in request scope then there will be service instance for
 each and every request.




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



Re: [axis2] About multiple thread

2007-10-09 Thread zhongliang zhang
The default scope is request scope,so,if I did not specify it in my
services.xml,then there will be service instance for each and every
request.
thanks a lot.

On 09/10/2007, Todd Allen [EMAIL PROTECTED] wrote:
 What is the default scope in Axis2?


 At 01:35 AM 10/9/2007, Deepal jayasinghe wrote:
 Hi ,
 
 If you deploy the service in application scope then there will be only
 one service instance , however if you deploy the service in other scope
 there will be a number of service instances. For example if you deploy
 the service in request scope then there will be service instance for
 each and every request.
 
 Thanks
 Deepal
   Hi,everyone,
   I have got a question about the web service class,for example,I
   got the following class that provides the web service of getting the
   price of the potato and tomato:
  
   import statements;
   public class Service {
 /**
 * The soap response that will return to the client.
 */
 private OMElement response = null;
  
 public OMElement getPotatoPrice(OMElement soap){
 some operations;
 return response;
 }
 public OMElement getTomatoPrice(OMElement soap){
 some operations;
 return response;
 }
   }
  
   Here,I did some operations,etc,database query,and then return the
   constructed response object.If there are multiple client call the web
   service at the same time,is it safe to declare the response object as
   the Service class's member variable?Does the axis2 just create one
   Service instance and maintain it in the whole service life cycle?
  
   any advice will be appreciated!
  


 -
 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: axis2 1.3 wsa:MessageID not in generated service skeleton response

2007-10-09 Thread Erwin Reinhoud
Hello Deepal,

We have to comply with a standard (governmental) that prescribes the use of a  
messageid in request/response. In case on application level the communbication 
is with jms the messages can be linked. Until now i have used the contract 
first principle to make a service, do i have to let that go now? How about 
that message below, i guess it will not be implemented?

Thanks in advance.


Kind regards,
Erwin


-Oorspronkelijk bericht-
Van: Deepal jayasinghe [mailto:[EMAIL PROTECTED]
Verzonden: maandag 8 oktober 2007 17:23
Aan: axis-user@ws.apache.org
Onderwerp: Re: axis2 1.3 wsa:MessageID not in generated service skeleton
response


Erwin Reinhoud wrote:
 Hello All,
  
 I generated a serviceskeleton with adb and enabled ws-addressing both
 on service and client. In the response i don't see the MessageID. How
 do you set your own messageID in the serviceskeleton code?
In Axis2 1.3 you do not have a way to set the message ID when you use
codegeneration (skel). In the meantime having a message id is not an
mandatory , so may I know why do you want this message id ?

Thanks
Deepal
  
  
 I found this message, but no related issue in jira:
 http://mail-archives.apache.org/mod_mbox/ode-user/200707.mbox/[EMAIL 
 PROTECTED]
  
 Anybody know if there is an issue and how to set a certain value for
 the wsa:messageid from the serviceskeleton?
  
 Thanks in advance.
  
 Kind regards,
  
 Erwin
  
  




-
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 1.3 configuring client authentication

2007-10-09 Thread Jon Wilmoth
I've gone through the user guide and the http transport guide, but I
haven't found how I can configure an Axis2 web service client (generated
from WSDL) to pass authentication info to the http client.  Any pointers
would be greatly appreciated.

Thanks,
Jon


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



Re: axis2 1.3 configuring client authentication

2007-10-09 Thread keith chapman
Hi Jon,

This mail thread should help you
http://www.nabble.com/wsdl2java-with-Basic-Authentication-t4551192.html

Thanks,
Keith.

On 10/9/07, Jon Wilmoth [EMAIL PROTECTED] wrote:

 I've gone through the user guide and the http transport guide, but I
 haven't found how I can configure an Axis2 web service client (generated
 from WSDL) to pass authentication info to the http client.  Any pointers
 would be greatly appreciated.

 Thanks,
 Jon


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




-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Difficulty in using proxy setting for Axis2 AXIOMClient

2007-10-09 Thread Subhash.NarayananDroupathy

Hi,

 

I am trying to set proxy configurations to AXIOM Client. My proxy
configuration code looks like the following : 

 

OMElement getPricePayload = getPricePayload(WSO);

OMElement updatePayload = updatePayload(WSO, 123.42);

Options options = new Options();

options.setTo(targetEPR);

options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

/*

* PROXY Properties - Begin

*/

ProxyProperties proxyProperties = new ProxyProperties();

proxyProperties.setProxyName(127.0.0.1);

proxyProperties.setProxyPort(8090);

options.setProperty(HTTPConstants.PROXY, proxyProperties);

options.setProperty(HTTPConstants.PROTOCOL_VERSION, HTTP/1.0);



/* 

* PROXY Properties - End

*/

 

ServiceClient sender = new ServiceClient();

sender.setOptions(options);

 

somewhere in the mailing list, I read that, inorder to make this work,
we have to try it with HTTP/1.0. hence I tried that also. But no matter
whatever I try, I always get this error message

 

 [java] org.apache.axis2.AxisFault: Read timed out

 [java] at
org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)

 [java] at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSe

nder.java:195)

 [java] at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.ja

va:77)

 [java] at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.wr

iteMessageWithCommons(CommonsHTTPTransportSender.java:327)

 [java] at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.in

voke(CommonsHTTPTransportSender.java:206)

 [java] at
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)

 [java] at
org.apache.axis2.description.OutInAxisOperationClient.send(Ou

tInAxisOperation.java:374)

 [java] at
org.apache.axis2.description.OutInAxisOperationClient.execute

Impl(OutInAxisOperation.java:211)

 [java] at
org.apache.axis2.client.OperationClient.execute(OperationClie

nt.java:163)

 [java] at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie

-

-

-

 [java] at
org.apache.commons.httpclient.HttpMethodDirector.executeWithR

etry(HttpMethodDirector.java:397)

 [java] at
org.apache.commons.httpclient.HttpMethodDirector.executeMetho

d(HttpMethodDirector.java:170)

 [java] at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpCl

ient.java:396)

 [java] at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpCl

ient.java:346)

 [java] at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMet

hod(AbstractHTTPSender.java:520)

 [java] at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSe

nder.java:191)

 [java] ... 36 more

 

Plz help me as this has dragged for the past few days!

 

Thanks,

-Subhash-



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message. 
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly 
prohibited and may be unlawful.

Peculiar Issue while testing a service

2007-10-09 Thread Gudla, Natraj (GE Money, consultant)
Hi,

I am reporting a peculiar issue which i am facing since yesterday working with 
AXIS2 1.2. Addition of an extra simple element to an existing complex type of 
an xsd throws an Un Expected Element error. Following is the brief.

The current set up : Working Fine.

The complext type part of my xsd 
xsd:complexType name=GEM_Ln_LoanRequestDetails
xsd:sequence
xsd:element name=LoanPreference 
type=GEM_Ln_LoanPreference/
xsd:element name=CustomerDetails 
type=GEM_Ln_CustomerDetails/
xsd:element name=CustomerAddr 
type=GEM_Ln_CustomerAddr/
xsd:element name=EmployerDetails 
type=GEM_Ln_EmployerDetails/
xsd:element name=CustomerFinances 
type=GEM_Ln_CustomerFinances/
xsd:element name=CardDetails 
type=GEM_Ln_CardDetails minOccurs=0/
xsd:element name=LoanDetails 
type=GEM_Ln_LoanDetails minOccurs=0/
/xsd:sequence
/xsd:complexType

I used a wsdl, generated binding ( ADB ) classes using WSDL to Java tool on 
Axis2 1.2. Using the build.xml, running the jar.server task i created the 
services.aar and deployed on tomcat. Created a sample java class, which reads a 
sample loan request xml ( formed using IDE based on the xsd ) and submits a 
request to the service. 
Every thing works fine, i get the response as i coded within the skeleton 
method. This looks fine end to end.

Change to the existing schema: : Not Working

xsd:complexType name=GEM_Ln_LoanRequestDetails
xsd:sequence
xsd:element name=ProductId type=xsd:string/
xsd:element name=LoanPreference 
type=GEM_Ln_LoanPreference/
xsd:element name=CustomerDetails 
type=GEM_Ln_CustomerDetails/
xsd:element name=CustomerAddr 
type=GEM_Ln_CustomerAddr/
xsd:element name=EmployerDetails 
type=GEM_Ln_EmployerDetails/
xsd:element name=CustomerFinances 
type=GEM_Ln_CustomerFinances/
xsd:element name=CardDetails 
type=GEM_Ln_CardDetails minOccurs=0/
xsd:element name=LoanDetails 
type=GEM_Ln_LoanDetails minOccurs=0/
/xsd:sequence
/xsd:complexType

I have a need to add new field to hold a product id. after this, i generated 
the binding classes again ( to make sure, i deleted all the existing classes, 
and re generated every thing ). Then did the same procedure as above to 
generated the services.aar, then created the sample java class callling the 
stub. Changed the sample xml file to add a product id tag and then executed the 
program. This time un expectedley i get the Un expected sub element Product 
Id error repeatedly.

Not sure what is the problem, this looks to be simple. I tried various 
combinations adding a test tag, then making product id a simple type etc etc. 
Any idea why this occurs. I made sure, i replaced the correct services.aar on 
the server. The new resource folder generated second time, properly refers to 
the product id which was included.

Just as a work around, i tested with some sample test and test simple tags, 
observed the xml input on TCP Monitor. For your reference attached is the 
request and response xmls from the monitory. Observe for the test and 
testsimple tags. The actual loan request xml read by my program is also 
attached for reference.

 Response.txt  Request.txt  LnRq.xml 

Cheers
-Natraj.




HTTP/1.1 500 Internal Server Error

Content-Type: text/xml;charset=UTF-8

Transfer-Encoding: chunked

Date: Tue, 09 Oct 2007 08:55:18 GMT

Server: Apache-Coyote/1.1

Connection: close



147

?xml version='1.0' encoding='UTF-8'?
   soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  soapenv:Body
 soapenv:Fault
faultcodesoapenv:Client/faultcode
faultstringjava.lang.RuntimeException: Unexpected subelement 
testsimple/faultstring
detail /
 /soapenv:Fault
  /soapenv:Body
   /soapenv:Envelope
0


POST /axis/services/LoanOriginationService HTTP/1.1

Content-Type: text/xml; charset=UTF-8

SOAPAction: LoanOrigination

User-Agent: Axis2

Host: 127.0.0.1:

Transfer-Encoding: chunked



bce

?xml version='1.0' encoding='UTF-8'?
   soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  soapenv:Body
 ns3:LoanRequest xmlns:ns3=GEMoney:XMLI:LoanReq
HeaderInfo
   Header
  field-nameUser-Agent/field-name
  field-valueIE/5.0 libwww/2.17b3/field-value
   /Header
   Header
  field-nameDate/field-name
  field-valueTue, Aug 21 2007 15:46:00 GMT/field-value
   /Header
   Header
  field-nameClientIP/field-name
  

faultstringThe endpoint reference (EPR) for the Operation not found is http://172.31.4.49:9090/outboundws/services/Outbound and the WSA Action = /faultstring

2007-10-09 Thread G71

Hi,
i've this problem with axis2:
 i've two services in the same wsdl but  the response of one of this service
is faultstringThe endpoint reference (EPR) for the Operation not found is
http://172.31.4.49:9090/outboundws/services/Outbound and the WSA Action =
/faultstring

i've read the but i didn't found the solution: http://wso2.org/library/176


Why the response of one of this is correct and the second is not correct? 
The soap action is null in all this message 

I post the example:

POST /outboundws/services/Outbound HTTP/1.0
Host: 172.31.4.49:9090
Content-Type: text/xml; charset=utf-8
Content-Length: 1432
SOAPAction: 

?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance;
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsd=http://www.w3.org/1999/XMLSchema;
soapenv:Body
m:outboundService dataSetVersion=1.0
xmlns:m=http://www.fasfafdw.it/outboundService/outboundService;
appuntamento bla bla bla/appuntamento
/m:outboundService
/soapenv:Body
/soapenv:Envelope

In this case the response is not correct:

Instead in the call of this service is correct:

POST /outboundws/services/Outbound HTTP/1.0
Host: 172.31.4.49:9090
Content-Type: text/xml; charset=utf-8
Content-Length: 654
SOAPAction: 

?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance;
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsd=http://www.w3.org/1999/XMLSchema;
soapenv:Body
m:SMSService dataSetVersion=1.0
xmlns:m=xmlns:m=http://www.fasfafdw.it/outboundService/SMSService;
message cell=+393358478769
textMessagetestomessagio./textMessage
/message
/m:SMSService
/soapenv:Body
/soapenv:Envelope

-- 
View this message in context: 
http://www.nabble.com/faultstring%3EThe-endpoint-reference-%28EPR%29-for-the-Operation-not-found-is-http%3A--172.31.4.49%3A9090-outboundws-services-Outbound-and-the-WSA-Action-%3D-%3C-faultstring%3E-tf4592781.html#a13111387
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-soapmonitor.jar

2007-10-09 Thread Antonio Manuel Muñiz Martín
Hi.

Where is axis2-soapmonitor.jar? This file appears in the doc but I do not find 
it.
The command javac -classpath axis2-soapmonitor.jar SOAPMonitorApplet-java uses 
it.

Regards.


__
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
 puede contener informacion clasificada por su emisor como confidencial
 en el marco de su Sistema de Gestion de Seguridad de la 
Informacion siendo para uso exclusivo del destinatario, quedando 
prohibida su divulgacion copia o distribucion a terceros sin la 
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje 
 erroneamente, se ruega lo notifique al remitente y proceda a su borrado. 
Gracias por su colaboracion.
__
This message including any attachments may contain confidential 
information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are addressed.
 Any unauthorised copy, disclosure or distribution of this message
 is strictly forbidden. If you have received this transmission in error,
 please notify the sender immediately and delete it.
__


Unexpected subelement return exception

2007-10-09 Thread George H
I have created a webservice and client using the Axis2 eclipse
plugin tools v1.3.0. Using Eclipse (J2EE) Version: 3.3.0 Build id:
I20070621-1340.
Axis2 v1.3

I have a webservice with many methods. Some reaturn boolean some
return an custom
class serialized as an array of bytes. They all work, except for all the methods
that have only 1 thing in common. They both return a Vector of that
custom class.
That vector is serialized into bytes and sent back like all the others, but it
always fails with Unexpected subelement return error.

The wsdl file is generated by the tools and so are the stub classes.
Thanks in advance to anyone who can help me figure out the problem.

The code calling the service
--- 
VectorCustomClass customClasses = null;

try {
byte[] barray = serializeToBytes(myMessage);
ByteArrayDataSource byteDataSource = new ByteArrayDataSource(barray);
DataHandler dh = new DataHandler(byteDataSource);

CoreServiceStub.GetCustomClasses getCustomClassesParam = new
CoreServiceStub.GetCustomClasses();
getCustomClassesParam.setCustomClass(dh);

CoreServiceStub stub = new CoreServiceStub(TARGET_ENDPOINT);
CoreServiceStub.GetCustomClassesResponse response =
stub.getCustomClasses(getCustomClassesParam);

DataHandler dh2 = response.get_return();
Object obj = deserializeFromBytes(dh2);
if(obj instanceof Vector) {
customClasses = (VectorCustomClass)obj;
}
}
catch(Exception ex) {
ex.printStackTrace();
}



The stack trace, identical each time it is run.
---
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement return
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at serv.core.ws.CoreServiceStub.fromOM(CoreServiceStub.java:10032)
at 
serv.core.ws.CoreServiceStub.getCustomClasses(CoreServiceStub.java:675)
at 
serv.core.client.CoreServiceClient.getCustomClasses.CoreServiceClient.java:403)
at serv.core.client.CoreServiceClient.main(CoreServiceClient.java:583)
Caused by: java.lang.Exception:
org.apache.axis2.databinding.ADBException: Unexpected subelement
return
at 
serv.core.ws.CoreServiceStub$GetCustomClassesResponse$Factory.parse(CoreServiceStub.java:7156)
at serv.core.ws.CoreServiceStub.fromOM(CoreServiceStub.java:9930)
... 3 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected
subelement return
at 
serv.core.ws.CoreServiceStub$GetCustomClassesResponse$Factory.parse(CoreServiceStub.java:7152)
... 4 more
--
George H
[EMAIL PROTECTED]

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



[AXIS2] Unwrapped adb question

2007-10-09 Thread Lorenzo
Hi all,

i generate and compile unrapped adb stubs from wsdl.

Now i can call methods passing direcly my api object and not wrapped,
but it still return wrapped one... i saw some samples code and it should
return unrapped object... maybe i use wrong options in stub generation?

I did this:

java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
  arg value=-d/
  arg value=adb/
  arg value=-o/
  arg value=${build}/src_stub/
  arg value=-uri/
  arg
value=${appServer_url}/openspcoopRegistroServiziSearch/Search?wsdl/
  arg value=-uw/
  classpath
fileset dir=${libs_openspcoop}/
  /classpath
/java

Then i compile and use them:


SearchStub locator = new SearchStub(location);
SearchStub.AccordoServizio accServ = 
  locator.getAccordoServizio((String) nomeAccordo);



locator.getAccordoServizio should return my lib AccordoServizio and not
wrapped SearchStub.AccordoServizio... 


What i have to do?

Thx,
Lorenzo






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



Re: axis2 1.3 configuring client authentication

2007-10-09 Thread Peter Hrastnik
Take a look at http://wso2.org/library/161.
You can access the options object mentioned in the article using my
SoapClientStub._getServiceClient().getOptions()

Best Regards,
Peter.


Jon Wilmoth [EMAIL PROTECTED] schrieb am 09.10.2007 08:57:02:

 I've gone through the user guide and the http transport guide, but I
 haven't found how I can configure an Axis2 web service client (generated
 from WSDL) to pass authentication info to the http client.  Any pointers
 would be greatly appreciated.
 
 Thanks,
 Jon
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


Re: axis2-soapmonitor.jar

2007-10-09 Thread robert lazarski
axis2-soapmonitor.jar got renamed to soapmonitor.jar during the
conversion to maven2 for the 1.3 release. Thanks for pointing that
out, I'll update the docs.

HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote:



 Hi.

  Where is axis2-soapmonitor.jar? This file appears in the doc but I do not
 find it.
  The command javac -classpath axis2-soapmonitor.jar SOAPMonitorApplet-java
 uses it.

  Regards.



 
  Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
 contener información clasificada por su emisor como confidencial en el marco
 de su Sistema de Gestión de Seguridad de la Información siendo para uso
 exclusivo del destinatario, quedando prohibida su divulgación copia o
 distribución a terceros sin la autorización expresa del remitente. Si Vd. ha
 recibido este mensaje erróneamente, se ruega lo notifique al remitente y
 proceda a su borrado. Gracias por su colaboración.
 
  This message including any attachments may contain confidential
 information, according to our Information Security Management System, and
 intended solely for a specific individual to whom they are addressed. Any
 unauthorised copy, disclosure or distribution of this message is strictly
 forbidden. If you have received this transmission in error, please notify
 the sender immediately and delete it. 




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



Rampart cannot instantiate my TokenIssuer

2007-10-09 Thread Massimiliano Masi

Hi all,

I've a problem with rampart 1.3. I create a security policy for my rampart
WS-Trust, and I put in the services.xml the following:

parameter name=token-dispatcher-configuration
  token-dispatcher-configuration
issuer class=com.test.TokenIssuer default=true
  tokenType
urn:oasis:names:tc:SAML:2.0:assertion
  /tokenType
/issuer
  /token-dispatcher-configuration
/parameter

Everything goes ok, but I've the following problem, when the security
policy has validated:

12:27:39,463 ERROR [STDERR] org.apache.rahas.TrustException: Error in  
loading and instantiating the class com.test.TokenIssuer
12:27:39,465 ERROR [STDERR] at  
org.apache.rahas.TokenRequestDispatcherConfig.getIssuer(TokenRequestDispatcherConfig.java:212)



Where I've to put my class? It is in the aar.


Thanks,

 Massimiliano


This message was sent using IMP, the Internet Messaging Program.



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



Re: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread Dennis Sosnoski
XMLBeans actually does very little in the way of schema enforcement, not
even checking for required elements and attributes.

For anyone who *does* want to validate messages (generally a good idea
at least in testing), there's a validation module I wrote for use in
Axis2 training classes and made public. You can find the details at
http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/validation

  - Dennis

-- 
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Thilina Gunarathne wrote:
 Hi,
 AFAIK Axis2 does not do any XSD validation unless you use data binding.
 XML to java object conversion that happens when you have used data
 binding, expects the message to conform to the schema.

 IIRC XMLBeans enforces this heavily, while ADB use it only when
 absolutely necessary.  There are some switches like backword
 compatibility mode which you can use when code generating(data
 binding) to reduce the enforcement of some schema constructs.

 In other words, you cannot turn off schema validation completely if
 you are using data binding.

 thanks,
 Thilina

 On 10/8/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
   
 Is there a way to turn off XSD validation in production env? I would want it
 to be a flag in axis configuration to turn off validation globally for all
 deployed services?

 platform information : Axis2/Java Version 1.3 , deployed on tomcat or
 websphere, using sun's JVM ( jdk 1.5.0)
 --
 Ritesh Tarway
 Bangalore, India
 +91-9945365635

 Matrix:Revolution
 Seraph: Did you always know?
 The Oracle: Oh, no. No, I didn't. But I believed... I believed.

 --
 Ritesh Tarway
 Bangalore, India
 +91-9945365635

 Matrix:Revolution
 Seraph: Did you always know?
 The Oracle: Oh, no. No, I didn't. But I believed... I believed.
 


   

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



Re: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread Dennis Sosnoski
Hi Ritesh,

I'm surprised to see this, since as I said in my prior email XMLBeans
does very little in the way of schema validation by default. You can
manually validate the data, but unless the generated code includes the
validation I don't know why you'd be running into problems.

What kind of error are you getting?

  - Dennis

-- 
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Ritesh Tarway wrote:
 Unluckily my service has been generated using wsdl2java tool with xmlbeans
 bindingso xsd validation will be turned on.
 alright.i think there is some 3rd party custom module to turn off
 validation if i use jibx bindingis there any such thing for xml beans??


 On 10/8/07, Thilina Gunarathne [EMAIL PROTECTED] wrote:
   
 Hi,
 AFAIK Axis2 does not do any XSD validation unless you use data binding.
 XML to java object conversion that happens when you have used data
 binding, expects the message to conform to the schema.

 IIRC XMLBeans enforces this heavily, while ADB use it only when
 absolutely necessary.  There are some switches like backword
 compatibility mode which you can use when code generating(data
 binding) to reduce the enforcement of some schema constructs.

 In other words, you cannot turn off schema validation completely if
 you are using data binding.

 thanks,
 Thilina

 On 10/8/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
 
 Is there a way to turn off XSD validation in production env? I would
   
 want it
 
 to be a flag in axis configuration to turn off validation globally for
   
 all
 
 deployed services?

 platform information : Axis2/Java Version 1.3 , deployed on tomcat or
 websphere, using sun's JVM ( jdk 1.5.0)
 --
 Ritesh Tarway
 Bangalore, India
 +91-9945365635

 Matrix:Revolution
 Seraph: Did you always know?
 The Oracle: Oh, no. No, I didn't. But I believed... I believed.

 --
 Ritesh Tarway
 Bangalore, India
 +91-9945365635

 Matrix:Revolution
 Seraph: Did you always know?
 The Oracle: Oh, no. No, I didn't. But I believed... I believed.
   
 --
 Thilina Gunarathne  - http://thilinag.blogspot.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]



saving web service result as an xml file

2007-10-09 Thread loredana loredana
Ok, long story short. a web service result is an xml file of this type:

?xml version=1.0 encoding=utf-8?

  soap:Body

  CelsiusToFahrenheitResult10/CelsiusToFahrenheitResult
/CelsiusToFahrenheitResponse
  /soap:Body
/soap:Envelope

I want to know if there is any way to save this response directly in a web 
client...
So in other words, I can do a web service client in java which queries the web 
service and returns me the response(10 in that case). 
But I would actually need to save the resulted xml(like the one above) on my 
local drive. Is there any way to do this?
10x in advance





   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow


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



[Axis2] JAX-WS async server

2007-10-09 Thread Michele Mazzucco
Hi all,

is the axis2 implementation of JAX-WS capable of serving requests in an
asynchronous way like this [1]?


Thanks,
Michele


[1] https://jax-ws.dev.java.net/nonav/2.1.2/docs/asyncprovider.html


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



Re: saving web service result as an xml file

2007-10-09 Thread Antonio Muñiz
Use FileWriter class in java.io

2007/10/9, loredana loredana [EMAIL PROTECTED]:

 Ok, long story short. a web service result is an xml file of this type:

 ?xml version=1.0 encoding=utf-8?

   soap:Body

   CelsiusToFahrenheitResult10/CelsiusToFahrenheitResult
 /CelsiusToFahrenheitResponse
   /soap:Body
 /soap:Envelope

 I want to know if there is any way to save this response directly in a web
 client...
 So in other words, I can do a web service client in java which queries the
 web service and returns me the response(10 in that case).
 But I would actually need to save the resulted xml(like the one above) on
 my local drive. Is there any way to do this?
 10x in advance







 
 Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated
 for today's economy) at Yahoo! Games.
 http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow


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




Database connection

2007-10-09 Thread VF
Hi all,
I would like to ask u, how can i utilize database connection in my web
service. I have one web service with more methods in it. Id like to create
database connection just once and not with each call (each operation works
with the same database connection) Is it enough to create this service with
application scope?

It looks like this:

Available services
stkdds

Service Description : stkdds
Service Status : Active
Available Operations

* getFinishedOrderBin
* getOrderInfo
* updateOrder
* getUserInfo
* cancelOrder
* updateUser
* testOperation
* getOrdersOverview
* getAllAccountsInfo
* getFinishedOrder
* getAccountInfo
* newOrder


And my code for database connection smth like this:

public Connection setConnection() throws Exception {

if(conn != null){
return conn;
}

Class.forName(org.firebirdsql.jdbc.FBDriver);
conn = DriverManager.getConnection (p_connect_string,
sqlProps);
return conn;




 Thanks Vladi


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



Re: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread Ritesh Tarway
I tested it and actually found that none of bindings enforce full schema
validation. So the issue is 2-fold,
1. There should be a schema validation which can be turned on during
testing.
2. Schema validation can be turned off during production without any code
change in web service, preferably with same set of modules as used in test
machines.

As far as manual validation is concerned , I can write custom code inside
the service to validate it against any schema. but that is not what I want.

I am going through your module for jibx and probably would use that. Thanks
for pointers.

On 10/9/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:

 Hi Ritesh,

 I'm surprised to see this, since as I said in my prior email XMLBeans
 does very little in the way of schema validation by default. You can
 manually validate the data, but unless the generated code includes the
 validation I don't know why you'd be running into problems.

 What kind of error are you getting?

   - Dennis

 --
 Dennis M. Sosnoski
 SOA and Web Services in Java
 Axis2 Training and Consulting
 http://www.sosnoski.com - http://www.sosnoski.co.nz
 Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



 Ritesh Tarway wrote:
  Unluckily my service has been generated using wsdl2java tool with
 xmlbeans
  bindingso xsd validation will be turned on.
  alright.i think there is some 3rd party custom module to turn off
  validation if i use jibx bindingis there any such thing for xml
 beans??
 
 
  On 10/8/07, Thilina Gunarathne [EMAIL PROTECTED] wrote:
 
  Hi,
  AFAIK Axis2 does not do any XSD validation unless you use data binding.
  XML to java object conversion that happens when you have used data
  binding, expects the message to conform to the schema.
 
  IIRC XMLBeans enforces this heavily, while ADB use it only when
  absolutely necessary.  There are some switches like backword
  compatibility mode which you can use when code generating(data
  binding) to reduce the enforcement of some schema constructs.
 
  In other words, you cannot turn off schema validation completely if
  you are using data binding.
 
  thanks,
  Thilina
 
  On 10/8/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
 
  Is there a way to turn off XSD validation in production env? I would
 
  want it
 
  to be a flag in axis configuration to turn off validation globally for
 
  all
 
  deployed services?
 
  platform information : Axis2/Java Version 1.3 , deployed on tomcat or
  websphere, using sun's JVM ( jdk 1.5.0)
  --
  Ritesh Tarway
  Bangalore, India
  +91-9945365635
 
  Matrix:Revolution
  Seraph: Did you always know?
  The Oracle: Oh, no. No, I didn't. But I believed... I believed.
 
  --
  Ritesh Tarway
  Bangalore, India
  +91-9945365635
 
  Matrix:Revolution
  Seraph: Did you always know?
  The Oracle: Oh, no. No, I didn't. But I believed... I believed.
 
  --
  Thilina Gunarathne  - http://thilinag.blogspot.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]




-- 
Ritesh Tarway
Bangalore, India
+91-9945365635

Matrix:Revolution
Seraph: Did you always know?
The Oracle: Oh, no. No, I didn't. But I believed... I believed.


Re: saving web service result as an xml file

2007-10-09 Thread loredana loredana
how to save it isn't the hard part...obtaining that xml is. How do I obtain the 
whole response??
because in my web service client if I call invoke method, that returns directly 
the result(10) not the whole xml response.

- Original Message 
From: Antonio Muñiz [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, October 9, 2007 1:49:52 PM
Subject: Re: saving web service result as an xml file

Use FileWriter class in java.io

2007/10/9, loredana loredana [EMAIL PROTECTED]:
Ok, long story short. a web service result is an xml file of this type:

?xml version=1.0 encoding=utf-8?

  soap:Body

  CelsiusToFahrenheitResult10/CelsiusToFahrenheitResult

/CelsiusToFahrenheitResponse
  /soap:Body
/soap:Envelope

I want to know if there is any way to save this response directly in a web 
client...
So in other words, I can do a web service client in java which queries the web 
service and returns me the response(10 in that case).

But I would actually need to save the resulted xml(like the one above) on my 
local drive. Is there any way to do this?
10x in advance








Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow



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










   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

SOAPMonitor Problem

2007-10-09 Thread Antonio Manuel Muñiz Martín
Ok. Thanks.

I extract the soapmonitor.jar file in root directory (/axis2) and I
configured the axis2.xml and web.xml in axis2 distribution.
When I put the URL localhost:8080/axis2/SOAPMonitor in the browser the
response is The requested resource is not available.
I forgot anything?

Thanks a lot for your effort.
Regards,
Antonio.

axis2-soapmonitor.jar got renamed to soapmonitor.jar during the conversion
to maven2 for the 1.3 release. Thanks for pointing that out, I'll update the
docs.

HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote:



 Hi.

  Where is axis2-soapmonitor.jar? This file appears in the doc but I do
 not find it.
  The command javac -classpath axis2-soapmonitor.jar
 SOAPMonitorApplet-java uses it.

  Regards.



 
  Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
 contener información clasificada por su emisor como confidencial en el
 marco de su Sistema de Gestión de Seguridad de la Información siendo
 para uso exclusivo del destinatario, quedando prohibida su divulgación
 copia o distribución a terceros sin la autorización expresa del
 remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo
 notifique al remitente y proceda a su borrado. Gracias por su
colaboración.
 
  This message including any attachments may contain confidential
 information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are
 addressed. Any unauthorised copy, disclosure or distribution of this
 message is strictly forbidden. If you have received this transmission
 in error, please notify the sender immediately and delete it.
 




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


Re: saving web service result as an xml file

2007-10-09 Thread Upul Godage
After call,
String ret = (String) call.invoke(new Object[] { 10 });
Try,
call.getMessageContext().getMessage().writeTo(System.out); // whatever
OutputStream


If you are starting out, it is better you take a look at Axis2.

Upul


On 10/9/07, loredana loredana [EMAIL PROTECTED] wrote:

 how to save it isn't the hard part...obtaining that xml is. How do I
 obtain the whole response??
 because in my web service client if I call invoke method, that returns
 directly the result(10) not the whole xml response.

 - Original Message 
 From: Antonio Muñiz [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Tuesday, October 9, 2007 1:49:52 PM
 Subject: Re: saving web service result as an xml file

 Use FileWriter class in java.io

 2007/10/9, loredana loredana [EMAIL PROTECTED]:
 
  Ok, long story short. a web service result is an xml file of this type:
 
  ?xml version=1.0 encoding=utf-8?
 
soap:Body
 
CelsiusToFahrenheitResult10/CelsiusToFahrenheitResult
  /CelsiusToFahrenheitResponse
/soap:Body
  /soap:Envelope
 
  I want to know if there is any way to save this response directly in a
  web client...
  So in other words, I can do a web service client in java which queries
  the web service and returns me the response(10 in that case).
  But I would actually need to save the resulted xml(like the one above)
  on my local drive. Is there any way to do this?
  10x in advance
 
 
 
 
 
 
  
 
  Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's
  updated for today's economy) at Yahoo! Games.
  http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Building a website is a piece of cake.
 Yahoo! Small Business gives you all the tools to get 
 online.http://us.rd.yahoo.com/evt=48251/*http://smallbusiness.yahoo.com/webhosting/?p=PASSPORTPLUS



Re: SOAPMonitor Problem

2007-10-09 Thread Fátima Milla Olaya

Antonio Manuel Muñiz Martín a écrit :

Ok. Thanks.

I extract the soapmonitor.jar file in root directory (/axis2) and I 
configured the axis2.xml and web.xml in axis2 distribution.
When I put the URL localhost:8080/axis2/SOAPMonitor in the browser the 
response is The requested resource is not available.

I forgot anything?

Thanks a lot for your effort.
Regards,
Antonio.

axis2-soapmonitor.jar got renamed to soapmonitor.jar during the 
conversion to maven2 for the 1.3 release. Thanks for pointing that 
out, I'll update the docs.


HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:




 Hi.

  Where is axis2-soapmonitor.jar ? This file appears in the doc but I do
 not find it.
  The command javac -classpath axis2-soapmonitor.jar
 SOAPMonitorApplet-java uses it.

  Regards.



 
  Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
 contener información clasificada por su emisor como confidencial en el
 marco de su Sistema de Gestión de Seguridad de la Información siendo
 para uso exclusivo del destinatario, quedando prohibida su divulgación
 copia o distribución a terceros sin la autorización expresa del
 remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo
 notifique al remitente y proceda a su borrado. Gracias por su 
colaboración.

 
  This message including any attachments may contain confidential
 information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are
 addressed. Any unauthorised copy, disclosure or distribution of this
 message is strictly forbidden. If you have received this transmission
 in error, please notify the sender immediately and delete it.
 




-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]
Unzip the applet classes and place them at the root of the war - for 
example axis2/SOAPMonitorApplet*.class


Suerte!

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



Re: SOAPMonitor Problem

2007-10-09 Thread Antonio Manuel Muñiz Martín
This is exactly what I do. And the response is The requested resource is
not available when I try /axis2/SOAPMonitor
Another idea?
Thanks.


2007/10/9, Fátima Milla Olaya [EMAIL PROTECTED]:
Unzip the applet classes and place them at the root of the war - for
example axis2/SOAPMonitorApplet*.class

Suerte!

 Antonio Manuel Muñiz Martín a écrit :
  Ok. Thanks.
 
  I extract the soapmonitor.jar file in root directory (/axis2) and I
  configured the axis2.xml and web.xml in axis2 distribution.
  When I put the URL localhost:8080/axis2/SOAPMonitor in the browser the
  response is The requested resource is not available.
  I forgot anything?
 
  Thanks a lot for your effort.
  Regards,
  Antonio.
 
  axis2-soapmonitor.jar got renamed to soapmonitor.jar during the
  conversion to maven2 for the 1.3 release. Thanks for pointing that
  out, I'll update the docs.
  
  HTH,
  Robert
  
  On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
  
  
  
   Hi.
  
Where is axis2-soapmonitor.jar ? This file appears in the doc but I
 do
   not find it.
The command javac -classpath axis2-soapmonitor.jar
   SOAPMonitorApplet-java uses it.
  
Regards.
  
  
  
   
Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
   contener información clasificada por su emisor como confidencial en el
   marco de su Sistema de Gestión de Seguridad de la Información siendo
   para uso exclusivo del destinatario, quedando prohibida su divulgación
   copia o distribución a terceros sin la autorización expresa del
   remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo
   notifique al remitente y proceda a su borrado. Gracias por su
  colaboración.
   
This message including any attachments may contain confidential
   information, according to our Information Security Management System,
   and intended solely for a specific individual to whom they are
   addressed. Any unauthorised copy, disclosure or distribution of this
   message is strictly forbidden. If you have received this transmission
   in error, please notify the sender immediately and delete it.
   
  
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]


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




No service is available at this URL--Calculator.jws

2007-10-09 Thread H.Z
Hello,
   
  I copy Calculator.java to my webapp directory, and rename it Calculator.jws.
  Then 
  http://localhost:8080/axis/Calculator.jws
   
  I get No service is available at this URL.
  However I tried another example EchoHeaders.jws that is included in the 
installation package. It does work.
   
  Why?
   
  Thanks

   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

Axis2: how to generate services.xml

2007-10-09 Thread Peter A. Kirk
Hi there

I have written a small program which generates and compiles a
web-service class and then creates a wsdl for this class.

But how do I generate services.xml for the class?

For example, to generate the wsdl file programmatically, I do this (and
I would appreciate it if someone could tell me a better way):

String[] parms = new String[] {-cp, ., -cn,
dk.alpha.ws.MyService, -o, c:/myservice, -of, MyService.wsdl};

Java2WSDLCommandLineOptionParser commandLineOptionParser = new
Java2WSDLCommandLineOptionParser(parms);

try 
{
new
Java2WSDLCodegenEngine(commandLineOptionParser.getAllOptions()).generate
();
} 
catch (Exception e) 
{
//
}

But I have not yet found out how to generate the services.xml file
programmatically.


Thanks,
Peter

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



Re: SOAPMonitor Problem

2007-10-09 Thread robert lazarski
Did you edit the web.xml ? Please read the docs carefully - the
required info is all there.

HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote:
 This is exactly what I do. And the response is The requested resource is
 not available when I try /axis2/SOAPMonitor
 Another idea?
 Thanks.


 2007/10/9, Fátima Milla Olaya  [EMAIL PROTECTED]:
 Unzip the applet classes and place them at the root of the war - for
 example axis2/SOAPMonitorApplet*.class
 
 Suerte!
 
  Antonio Manuel Muñiz Martín a écrit :
   Ok. Thanks.
  
   I extract the soapmonitor.jar file in root directory (/axis2) and I
   configured the axis2.xml and web.xml in axis2 distribution.
   When I put the URL localhost:8080/axis2/SOAPMonitor in
 the browser the
   response is The requested resource is not available.
   I forgot anything?
  
   Thanks a lot for your effort.
   Regards,
   Antonio.
  
   axis2-soapmonitor.jar got renamed to soapmonitor.jar during the
   conversion to maven2 for the 1.3 release. Thanks for pointing that
   out, I'll update the docs.
   
   HTH,
   Robert
   
   On 10/9/07, Antonio Manuel Muñiz Martín  [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] wrote:
   
   
   
Hi.
   
 Where is axis2-soapmonitor.jar ? This file appears in the doc but I
 do
not find it.
 The command javac -classpath axis2-soapmonitor.jar
SOAPMonitorApplet-java uses it.
   
 Regards.
   
   
   

 Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
contener información clasificada por su emisor como confidencial en el
marco de su Sistema de Gestión de Seguridad de la Información siendo
para uso exclusivo del destinatario, quedando prohibida su divulgación
copia o distribución a terceros sin la autorización expresa del
remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo
notifique al remitente y proceda a su borrado. Gracias por su
   colaboración.

 This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are
addressed. Any unauthorised copy, disclosure or distribution of this
message is strictly forbidden. If you have received this transmission
in error, please notify the sender immediately and delete it.

   
   
   
  
  
 -
   To unsubscribe, e-mail:
 [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
 
 
 
 -
  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: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread robert lazarski
Look at the xmlbeans api for the validate() method. For example:

XmlError error =
validateSolicitacaoProcedimentoDocument(solicitacaoProcedimentoDocument);
if (error != null) {
throw new Exception(Objeto
solicitacaoDemonstrativoRetornoDocument 
+ is invalid: 
+ error);
}

public static XmlError validateSolicitacaoProcedimentoDocument (
   
br.gov.ans.www.tiss.ws.tipos.tisssolicitacaoprocedimento.SolicitacaoProcedimentoDocument
   solicitacaoProcedimentoDocument) {
   // Create an XmlOptions instance and set the error listener.
   XmlOptions validateOptions = new XmlOptions();
   ListXmlError errorList = new ArrayListXmlError();
   validateOptions.setErrorListener(errorList);
   if (!solicitacaoProcedimentoDocument.validate(validateOptions)) {
   for (int i = 0; i  errorList.size(); i++) {
   XmlError error = (XmlError)errorList.get(i);
   System.out.println(Object solicitacaoProcedimentoDocument 
   + is invalid, 
   + The following field is empty: );
   System.out.println(\n);
   System.out.println(Error Message:  +
error.getMessage() + \n);
   System.out.println(Location of invalid XML: 
   + error.getCursorLocation().xmlText() + \n);
   }
   return errorList.get(0);
   }
   System.out.println(solicitacaoProcedimentoDocument seems to be
valid\n);
   return null;
   }

Not exactly pretty, but xmlbeans has the unique advantage that it has
arguably 100% xml schema compliance - the only databinding in axis2
that does. It also is arguably the most stable api. In alot of cases,
in axis2 its the only choice.

The disadvantage is slightly slower performance, though still very
good compared to axis1,  an awkward api, etc.

HTH,
Robert

On 10/9/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
 I tested it and actually found that none of bindings enforce full schema
 validation. So the issue is 2-fold,
 1. There should be a schema validation which can be turned on during
 testing.
 2. Schema validation can be turned off during production without any code
 change in web service, preferably with same set of modules as used in test
 machines.

 As far as manual validation is concerned , I can write custom code inside
 the service to validate it against any schema. but that is not what I want.

 I am going through your module for jibx and probably would use that. Thanks
 for pointers.


 On 10/9/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:
  Hi Ritesh,
 
  I'm surprised to see this, since as I said in my prior email XMLBeans
  does very little in the way of schema validation by default. You can
  manually validate the data, but unless the generated code includes the
  validation I don't know why you'd be running into problems.
 
  What kind of error are you getting?
 
- Dennis
 
  --
  Dennis M. Sosnoski
  SOA and Web Services in Java
  Axis2 Training and Consulting
  http://www.sosnoski.com - http://www.sosnoski.co.nz
  Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
 
 
 
  Ritesh Tarway wrote:
   Unluckily my service has been generated using wsdl2java tool with
 xmlbeans
   bindingso xsd validation will be turned on.
   alright.i think there is some 3rd party custom module to turn off
   validation if i use jibx bindingis there any such thing for xml
 beans??
  
  
   On 10/8/07, Thilina Gunarathne [EMAIL PROTECTED] wrote:
  
   Hi,
   AFAIK Axis2 does not do any XSD validation unless you use data binding.
   XML to java object conversion that happens when you have used data
   binding, expects the message to conform to the schema.
  
   IIRC XMLBeans enforces this heavily, while ADB use it only when
   absolutely necessary.  There are some switches like backword
   compatibility mode which you can use when code generating(data
   binding) to reduce the enforcement of some schema constructs.
  
   In other words, you cannot turn off schema validation completely if
   you are using data binding.
  
   thanks,
   Thilina
  
   On 10/8/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
  
   Is there a way to turn off XSD validation in production env? I would
  
   want it
  
   to be a flag in axis configuration to turn off validation globally for
  
   all
  
   deployed services?
  
   platform information : Axis2/Java Version 1.3 , deployed on tomcat or
   websphere, using sun's JVM ( jdk 1.5.0)
   --
   Ritesh Tarway
   Bangalore, India
   +91-9945365635
  
   Matrix:Revolution
   Seraph: Did you always know?
   The Oracle: Oh, no. No, I didn't. But I believed... I believed.
  
   --
   Ritesh Tarway
   Bangalore, India
   +91-9945365635
  
   Matrix:Revolution
   Seraph: Did you always know?
   The Oracle: Oh, no. No, I didn't. But I believed... I believed.
  
   --
   Thilina Gunarathne  - http://thilinag.blogspot.com
  
  
 

Re: SOAPMonitor Problem

2007-10-09 Thread Fátima Milla Olaya

robert lazarski a écrit :

Did you edit the web.xml ? Please read the docs carefully - the
required info is all there.

HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote:
  

This is exactly what I do. And the response is The requested resource is
not available when I try /axis2/SOAPMonitor
Another idea?
Thanks.


2007/10/9, Fátima Milla Olaya  [EMAIL PROTECTED]:


Unzip the applet classes and place them at the root of the war - for
example axis2/SOAPMonitorApplet*.class

Suerte!

Antonio Manuel Muñiz Martín a écrit :
  

Ok. Thanks.

I extract the soapmonitor.jar file in root directory (/axis2) and I
configured the axis2.xml and web.xml in axis2 distribution.
When I put the URL localhost:8080/axis2/SOAPMonitor in


the browser the


response is The requested resource is not available.
I forgot anything?

Thanks a lot for your effort.
Regards,
Antonio.



axis2-soapmonitor.jar got renamed to soapmonitor.jar during the
  

conversion to maven2 for the 1.3 release. Thanks for pointing that
out, I'll update the docs.


HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín  [EMAIL PROTECTED]
  

mailto:[EMAIL PROTECTED] wrote:



Hi.

 Where is axis2-soapmonitor.jar ? This file appears in the doc but I
  

do


not find it.
 The command javac -classpath axis2-soapmonitor.jar
SOAPMonitorApplet-java uses it.

 Regards.




 Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
contener información clasificada por su emisor como confidencial en el
marco de su Sistema de Gestión de Seguridad de la Información siendo
para uso exclusivo del destinatario, quedando prohibida su divulgación
copia o distribución a terceros sin la autorización expresa del
remitente. Si Vd. ha recibido este mensaje erróneamente, se ruega lo
notifique al remitente y proceda a su borrado. Gracias por su
  

colaboración.



 This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are
addressed. Any unauthorised copy, disclosure or distribution of this
message is strictly forbidden. If you have received this transmission
in error, please notify the sender immediately and delete it.




  


-


To unsubscribe, e-mail:


[EMAIL PROTECTED]


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



  

-


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]


  

These are the two files that I have written. Take a look or copy them. Bye

*Web.xml*

?xml version=1.0 encoding=ISO-8859-1?

!--
 ~ Licensed to the Apache Software Foundation (ASF) under one
 ~ or more contributor license agreements. See the NOTICE file
 ~ distributed with this work for additional information
 ~ regarding copyright ownership. The ASF licenses this file
 ~ to you under the Apache License, Version 2.0 (the
 ~ License); you may not use this file except in compliance
 ~ with the License. You may obtain a copy of the License at
 ~
 ~ http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing,
 ~ software distributed under the License is distributed on an
 ~ AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 ~ KIND, either express or implied. See the License for the
 ~ specific language governing permissions and limitations
 ~ under the License.
 --
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;


web-app
   display-nameApache-Axis2/display-name
   servlet
   servlet-nameAxisServlet/servlet-name
   display-nameApache-Axis Servlet/display-name
   
servlet-classorg.apache.axis2.transport.http.AxisServlet/servlet-class

   !--init-param--
   !--param-nameaxis2.xml.path/param-name--
   !--param-value/WEB-INF/conf/axis2.xml/param-value--
   !--param-nameaxis2.xml.url/param-name--
   !--param-valuehttp://localhot/myrepo/axis2.xml/param-value--
   !--param-nameaxis2.repository.path/param-name--
   !--param-value/WEB-INF/param-value--
   !--param-nameaxis2.repository.url/param-name--
   !--param-valuehttp://localhot/myrepo/param-value--
   !--/init-param--
   load-on-startup1/load-on-startup
   /servlet
   servlet
   servlet-nameAxisAdminServlet/servlet-name
   display-nameApache-Axis 

RE: Is Java2WSDL WRAPPED style WS-I conform?

2007-10-09 Thread Walker, Jeff
Hi Michael,
wrapped is a subtype of Doc/Lit. Its full name is Document Literal
Wrapped. Go here to learn differences between RPC, Doc/Lit and
Doc/Lit-Wrapped:
http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/

Axis1: With Axis1 you can build web services that use RPC, Doc/Lit and
Doc/Lit-Wrapped.
Axis2: With Axis2 you can build web services that use Doc/Lit and
Doc/Lit-Wrapped, but not RPC. (This is my belief).

Now, RPC is the 'old' way of doing web services and is quickly dying
out. Axis1 is the old version of Axis and it is recommended that you
switch to Axis2.
-jeff


 

-Original Message-
From: Deepal jayasinghe [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 09, 2007 1:42 AM
To: axis-user@ws.apache.org
Subject: Re: Is Java2WSDL WRAPPED style WS-I conform?


 I'm referring to Axis1. Does this matter??
   
If you are referring to Axis1 then my knowledge about Axis1 not enough
to answer this question.

Thanks
Deepal
 Michael

 Deepal Jayasinghe wrote:
   
 Hi Michael,
 Were you referring to Axis1 or Axis2.

 
 The only types of SOAP bindings supported is document/literal and
 rpc/literal.
 If I generate my wsdl using Java2WSDL with style WRAPPED, i get a
 document/literal wsdl.

 But I don't understand the difference between WRAPPED and DOCUMENT
style?
 Are both WS-I conform?

 Regards,
 Michael

   
   


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



 

   


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



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



Re: SOAPMonitor Problem

2007-10-09 Thread robert lazarski
On 10/9/07, Fátima Milla Olaya [EMAIL PROTECTED] wrote:
 robert lazarski a écrit :
  Did you edit the web.xml ? Please read the docs carefully - the
  required info is all there.
 
  HTH,
  Robert
 
 FaultFlow
 phase name=Addressing
  handler name=AddressingBasedDispatcher

 class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
  order phase=Addressing/
 /handler
 /phase
 phase name=Security/
 phase name=PreDispatch/
 phase name=Dispatch
 class=org.apache.axis2.engine.DispatchPhase
 handler name=RequestURIBasedDispatcher

 class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
 handler name=SOAPActionBasedDispatcher

 class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
 handler name=RequestURIOperationDispatcher

 class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
 handler name=SOAPMessageBodyBasedDispatcher

 class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher/

 handler name=HTTPLocationBasedDispatcher

 class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher/
 /phase
 phase name=RMPhase/
 !--  user can add his own phases to this area  --
 phase name=userphase1/
 phase name=OperationInFaultPhase/
 phase name=soapmonitorPhase/
 /phaseOrder
 phaseOrder type=OutFaultFlow
 !--  user can add his own phases to this area  --
 phase name=userphase1/
 phase name=soapmonitorPhase/
 phase name=OperationOutFaultPhase/
 phase name=RMPhase/
 phase name=PolicyDetermination/
 phase name=MessageOut/
 /phaseOrder
 /axisconfig


Where in the axis2.xml are you engaging the module ?

HTH,
Robert

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



Re: [AXIS2] ADBException: Unexpected subelement contentType

2007-10-09 Thread Etienne Giraudy
Create an issue for this with wsdl, request and response.
see https://issues.apache.org/jira/browse/AXIS2-3259

Thanks,
Etienne


Rampart, XACML and SAML

2007-10-09 Thread Gul Onural

Hi,

Rampart documentation states that the Rampart supports SAML. 

Does Rampart also support XACML ?

Which version of SAML (and XACML if it does) is supported by Rampart ?

Gul


Re: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread Thilina Gunarathne
On 10/9/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:
 XMLBeans actually does very little in the way of schema enforcement, not
 even checking for required elements and attributes.
Ooops My bad... I remembered it the other way :(

thanks,
Thilina

 For anyone who *does* want to validate messages (generally a good idea
 at least in testing), there's a validation module I wrote for use in
 Axis2 training classes and made public. You can find the details at
 http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/validation

   - Dennis

 --
 Dennis M. Sosnoski
 SOA and Web Services in Java
 Axis2 Training and Consulting
 http://www.sosnoski.com - http://www.sosnoski.co.nz
 Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



 Thilina Gunarathne wrote:
  Hi,
  AFAIK Axis2 does not do any XSD validation unless you use data binding.
  XML to java object conversion that happens when you have used data
  binding, expects the message to conform to the schema.
 
  IIRC XMLBeans enforces this heavily, while ADB use it only when
  absolutely necessary.  There are some switches like backword
  compatibility mode which you can use when code generating(data
  binding) to reduce the enforcement of some schema constructs.
 
  In other words, you cannot turn off schema validation completely if
  you are using data binding.
 
  thanks,
  Thilina
 
  On 10/8/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
 
  Is there a way to turn off XSD validation in production env? I would want 
  it
  to be a flag in axis configuration to turn off validation globally for all
  deployed services?
 
  platform information : Axis2/Java Version 1.3 , deployed on tomcat or
  websphere, using sun's JVM ( jdk 1.5.0)
  --
  Ritesh Tarway
  Bangalore, India
  +91-9945365635
 
  Matrix:Revolution
  Seraph: Did you always know?
  The Oracle: Oh, no. No, I didn't. But I believed... I believed.
 
  --
  Ritesh Tarway
  Bangalore, India
  +91-9945365635
 
  Matrix:Revolution
  Seraph: Did you always know?
  The Oracle: Oh, no. No, I didn't. But I believed... I believed.
 
 
 
 

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




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

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



first post. question on complex types

2007-10-09 Thread Vaduvoiu Tiberiu
Hi to everyone. This is my first post and I have a small question about 
retrieving a complex type from a client. Read the documentation on 
axis(Building stubs, skeletons, and data types from WSDL)basic examples 
worked out well, I'm a little stuck on one example ...there is a web service 
that returns a complex type ...the response looks like

types:UserName id=id2 xsi:type=types:UserName
  Name xsi:type=xsd:stringstring/Name
  Last_name xsi:type=xsd:stringstring/Last_name
...

so from what I understood I need to use wsdl2java to generate a UserName class 
that implements 
java.io.Serializable. Ok I done that..created that class with getters and 
setters. But how do I set the variables in that class with the results from the 
invoke method?

I keep getting: No deserializer defined for array type {http}UserName

it's probably easy but I'm missing something here.
some pointers would be appreciate.

Cheers
Tibi







   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos  more. 
http://mobile.yahoo.com/go?refer=1GNXIC

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



Re: Axis2 SWA client communicating Axis2 MTOM service

2007-10-09 Thread Yogesh . Dhake
Hi 

I would like to answer my question for benifit of others.  I solved my 
issue well now. 
If wrong just correct it

1)  While using SWA we need to use  OperationClient API at client side. 
using MessageContext on service side to attach a attachment . Don't forget 
to send messageId back as pay load so that you can extract  actual 
attachment client side.
2) Yes caching is supported while using SWA.
3) if SOAP 1.2 version works with SWA ? I need to to try yet.

regards
Yogesh 






[EMAIL PROTECTED] 
10/08/2007 03:12 PM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: Axis2 SWA client communicating Axis2 MTOM service







Hi 
Thanks for insight   
Sorry but two small question. 
1) For enabling SWA do  i need to do any changes on service code or 
Just changing axis conf file is ok 
  parameter name=enableMTOM locked=falsefalse/parameter 
  parameter name=enableSwA locked=falsetrue/parameter 

As I see in SWA sample I see usage of MessageContext Variable and usage of 
OMelement variables/SenderClient at client side.In my case we really don't 
use them. or it will be transparent to me if I use stub client. 

2) Is use of SOAP 1.2 is ok ? in sample i see 


2) Caching is supported in SWA? 



regards 
Yogesh 


Thilina Gunarathne [EMAIL PROTECTED] 
10/08/2007 01:22 PM 

Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org 
cc

Subject
Re: Axis2 SWA client communicating Axis2 MTOM service








 I have a web service running with AXIS2 with MTOM and I am trying to
 communicate it with  Axis2 Client with SWA enabled ( Soap with 
attachment).
 Is this possible to do ?
Nope.. Not if you are going to use the MTOM binding features, such as
automatic binding of bianry attachments to the XML tree... Things will
fail miserably if you r using data binding to generate the service
skeleton, as the message no longer conforms to the schema.

You can access the attachments using the attachments API..But then you
are essentially doing SwA in the server side.. Also you won't be able
to use data binding.


 Reason I need to do it as  I am using ALSB 2.6   in between which does 
not
 support MTOM.

 If yes  Can any one tell me what is wrong in this SOAP response received 
at
 client. It fails with ClassCastException at client side.   I am having
 problem at client side .
Looking at the source you pasted below, you seems to be using data
binding together with a WSDL which has base64Binary in it. Your
response is SwA, which does not conforms to the data bounded schema.
Also the response message is broken, as it's header tells that it's
SwA, but the body has XOP:include.

Mixing SwA with MTOM when data binding is used is not a good idea..

thanks,
Thilina

I tried to debug found It try to cast
 getBuilder() to
 org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder
 which is not in actually for my binaryData node.
 I am finding difficult why  it try to use MTOMstax event I enabled only 
SWA
 at client side.  If you can make anything out of SOAP message what is 
wrong
 let me know.

 My Stub setting
 EMISEPServiceStub serviceStub = new
 EMISEPServiceStub(http://localhost:8085/EMISProxyService;);

 serviceStub._getServiceClient().getOptions().setProperty(
 Constants.Configuration.ENABLE_MTOM,
 Constants.VALUE_FALSE);
 serviceStub._getServiceClient().getOptions().setProperty(

 Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE);



 SOAP message response

 HTTP/1.1 200 OK
 Date: Mon, 08 Oct 2007 14:32:13 GMT
 Transfer-Encoding: chunked
 Content-Type: multipart/related; type=application/soap+xml;

 start=0.urn:uuid:[EMAIL PROTECTED];
 boundary=MIME_Boundary; charset=UTF-8
 X-Powered-By: Servlet/2.4 JSP/2.0

 0670
 --MIME_Boundary
 Content-ID:
 0.urn:uuid:[EMAIL PROTECTED]
 Content-Type: application/soap+xml; charset=utf-8
 Content-Transfer-Encoding: 8bit

 ?xml version='1.0' encoding='utf-8'?
soapenv:Envelope
 xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
   soapenv:Body
  ns1:getFileResponse
 xmlns:ns1=http://mizuho.com/emis/ep/paraminfo;
 ns1:methodgetFile/ns1:method
 ns1:parameters
ns1:FileDataInfo

 ns1:fileExtensiontxt/ns1:fileExtension

 ns1:wildCardIndicatorN/ns1:wildCardIndicator
   ns1:fileNametest/ns1:fileName
   ns1:folderNamec:\TEMP/ns1:folderName
   ns1:scriptName*/ns1:scriptName
   ns1:attachment
  ns1:size1231/ns1:size
  ns1:checksum1231/ns1:checksum
   /ns1:attachment
/ns1:FileDataInfo
 /ns1:parameters
 ns1:response
ns1:attachment
   ns1:binaryNode
  xop:Include
 href=cid:1.urn:uuid:[EMAIL PROTECTED]
 xmlns:xop=http://www.w3.org/2004/08/xop/include; /
   /ns1:binaryNode
   ns1:size121/ns1:size
   

Re: Axis2 SWA client communicating Axis2 MTOM service

2007-10-09 Thread Thilina Gunarathne
I missed your earlier mail...sorry abt that..

1)  While using SWA we need to use  OperationClient API at client side.
  using MessageContext on service side to attach a attachment . Don't forget
 to send messageId back as pay load so that you can extract  actual
 attachment client side.


Yes.. sending the ID is the recommended and most useful way.. But you can
also send unreferenced attachments with SWA, without putting a MessageID in
the body.. Then in the other side you can access them by getting an iterator
out of attachment map.

2) Yes caching is supported while using SWA.
 3) if SOAP 1.2 version works with SWA ? I need to to try yet.


It works with SOAP 1.2 too...

thanks,
Thilina

regards
 Yogesh





  [EMAIL PROTECTED]

 10/08/2007 03:12 PM
  Please respond to
 axis-user@ws.apache.org

   To
 axis-user@ws.apache.org  cc

  Subject
 Re: Axis2 SWA client communicating Axis2 MTOM service







 Hi
 Thanks for insight
 Sorry but two small question.
 1) For enabling SWA do  i need to do any changes on service code or
 Just changing axis conf file is ok
  parameter name=enableMTOM locked=falsefalse/parameter
  parameter name=enableSwA locked=falsetrue/parameter

 As I see in SWA sample I see usage of MessageContext Variable and usage of
 OMelement variables/SenderClient at client side.In my case we really don't
 use them. or it will be transparent to me if I use stub client.

 2) Is use of SOAP 1.2 is ok ? in sample i see


 2) Caching is supported in SWA?



 regards
 Yogesh

   *Thilina Gunarathne [EMAIL PROTECTED]*

 10/08/2007 01:22 PM
   Please respond to
 axis-user@ws.apache.org

   To
 axis-user@ws.apache.org  cc

  Subject
 Re: Axis2 SWA client communicating Axis2 MTOM service








  I have a web service running with AXIS2 with MTOM and I am trying to
  communicate it with  Axis2 Client with SWA enabled ( Soap with
 attachment).
  Is this possible to do ?
 Nope.. Not if you are going to use the MTOM binding features, such as
 automatic binding of bianry attachments to the XML tree... Things will
 fail miserably if you r using data binding to generate the service
 skeleton, as the message no longer conforms to the schema.

 You can access the attachments using the attachments API..But then you
 are essentially doing SwA in the server side.. Also you won't be able
 to use data binding.

 
  Reason I need to do it as  I am using ALSB 2.6   in between which does
 not
  support MTOM.
 
  If yes  Can any one tell me what is wrong in this SOAP response received
 at
  client. It fails with ClassCastException at client side.   I am having
  problem at client side .
 Looking at the source you pasted below, you seems to be using data
 binding together with a WSDL which has base64Binary in it. Your
 response is SwA, which does not conforms to the data bounded schema.
 Also the response message is broken, as it's header tells that it's
 SwA, but the body has XOP:include.

 Mixing SwA with MTOM when data binding is used is not a good idea..

 thanks,
 Thilina

 I tried to debug found It try to cast
  getBuilder() to
  org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder
  which is not in actually for my binaryData node.
  I am finding difficult why  it try to use MTOMstax event I enabled only
 SWA
  at client side.  If you can make anything out of SOAP message what is
 wrong
  let me know.
 
  My Stub setting
  EMISEPServiceStub serviceStub = new
  EMISEPServiceStub(http://localhost:8085/EMISProxyService;);
 
  serviceStub._getServiceClient().getOptions().setProperty(
  Constants.Configuration.ENABLE_MTOM,
  Constants.VALUE_FALSE);
  serviceStub._getServiceClient().getOptions().setProperty(
 
  Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE);
 
 
 
  SOAP message response
 
  HTTP/1.1 200 OK
  Date: Mon, 08 Oct 2007 14:32:13 GMT
  Transfer-Encoding: chunked
  Content-Type: multipart/related; type=application/soap+xml;
 
  start=0.urn:uuid:[EMAIL PROTECTED];
  boundary=MIME_Boundary; charset=UTF-8
  X-Powered-By: Servlet/2.4 JSP/2.0
 
  0670
  --MIME_Boundary
  Content-ID:
  0.urn:uuid:[EMAIL PROTECTED]
  Content-Type: application/soap+xml; charset=utf-8
  Content-Transfer-Encoding: 8bit
 
  ?xml version='1.0' encoding='utf-8'?
 soapenv:Envelope
  xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
soapenv:Body
   ns1:getFileResponse
  xmlns:ns1=http://mizuho.com/emis/ep/paraminfo;
  ns1:methodgetFile/ns1:method
  ns1:parameters
 ns1:FileDataInfo
 
  ns1:fileExtensiontxt/ns1:fileExtension
 
  ns1:wildCardIndicatorN/ns1:wildCardIndicator
ns1:fileNametest/ns1:fileName
ns1:folderNamec:\TEMP/ns1:folderName
ns1:scriptName*/ns1:scriptName
ns1:attachment
   ns1:size1231/ns1:size
   ns1:checksum1231/ns1:checksum
/ns1:attachment
 /ns1:FileDataInfo
  

Re: SOAPMonitor Problem

2007-10-09 Thread Antonio Manuel Muñiz Martín
I do all steps in documentation. I don´t modify phaseOrder content, because
the phase soapmonitorPhase already exists.
Perhaps I don´t understand the phase filosofy.

In my axis2.xml I have:

...
module ref=soapmonitor/
...
phaseOrder type=InFlow
!--  System predefined phases   --
phase name=Transport
handler name=RequestURIBasedDispatcher
 class=
org.apache.axis2.dispatchers.RequestURIBasedDispatcher
order phase=Transport/
/handler
handler name=SOAPActionBasedDispatcher
 class=
org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
order phase=Transport/
/handler
/phase
phase name=Addressing
 handler name=AddressingBasedDispatcher
 class=
org.apache.axis2.dispatchers.AddressingBasedDispatcher
 order phase=Addressing/
/handler
/phase
phase name=Security/
phase name=PreDispatch/
phase name=Dispatch class=org.apache.axis2.engine.DispatchPhase

handler name=RequestURIBasedDispatcher
 class=
org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
handler name=SOAPActionBasedDispatcher
 class=
org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
handler name=RequestURIOperationDispatcher
 class=
org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
handler name=SOAPMessageBodyBasedDispatcher
 class=
org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher/

handler name=HTTPLocationBasedDispatcher
 class=
org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher/
/phase
phase name=RMPhase/
!--  System predefined phases   --
!--   After Postdispatch phase module author or service author can
add any phase he want  --
phase name=OperationInPhase/
phase name=soapmonitorPhase/
/phaseOrder
phaseOrder type=OutFlow
!--  user can add his own phases to this area  --
phase name=soapmonitorPhase/
phase name=OperationOutPhase/
!--system predefined phase--
!--these phase will run irrespective of the service--
phase name=RMPhase/
phase name=PolicyDetermination/
phase name=MessageOut/
phase name=Security/
/phaseOrder
phaseOrder type=InFaultFlow
phase name=Addressing
 handler name=AddressingBasedDispatcher
 class=
org.apache.axis2.dispatchers.AddressingBasedDispatcher
 order phase=Addressing/
/handler
/phase
phase name=Security/
phase name=PreDispatch/
phase name=Dispatch class=org.apache.axis2.engine.DispatchPhase

handler name=RequestURIBasedDispatcher
 class=
org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
handler name=SOAPActionBasedDispatcher
 class=
org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
handler name=RequestURIOperationDispatcher
 class=
org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
handler name=SOAPMessageBodyBasedDispatcher
 class=
org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher/

handler name=HTTPLocationBasedDispatcher
 class=
org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher/
/phase
phase name=RMPhase/
!--  user can add his own phases to this area  --
phase name=OperationInFaultPhase/
phase name=soapmonitorPhase/
/phaseOrder
phaseOrder type=OutFaultFlow
!--  user can add his own phases to this area  --
phase name=soapmonitorPhase/
phase name=OperationOutFaultPhase/
phase name=RMPhase/
phase name=PolicyDetermination/
phase name=MessageOut/
/phaseOrder

2007/10/9, robert lazarski [EMAIL PROTECTED]:

 On 10/9/07, Fátima Milla Olaya [EMAIL PROTECTED] wrote:
  robert lazarski a écrit :
   Did you edit the web.xml ? Please read the docs carefully - the
   required info is all there.
  
   HTH,
   Robert
  
  FaultFlow
  phase name=Addressing
   handler name=AddressingBasedDispatcher
 
  class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
   order phase=Addressing/
  /handler
  /phase
  phase name=Security/
  phase name=PreDispatch/
  phase name=Dispatch
  class=org.apache.axis2.engine.DispatchPhase
  handler name=RequestURIBasedDispatcher
 
  class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
  handler name=SOAPActionBasedDispatcher
 
  class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
  handler 

[Axis2] [bug?] from MessageContext to jaxwsMessage loose Attachments

2007-10-09 Thread Lorenzo
Hi all,

I tryed to convert from 
org.apache.axis2.context.MessageContext
to 
org.apache.axis2.saaj.SOAPMessageImpl 
passing by 
org.apache.axis2.jaxws.message.impl.MessageImpl



Using 
org.apache.axis2.jaxws.message.impl.MessageImpl jaxMessage = 
(org.apache.axis2.jaxws.message.impl.MessageImpl) 
org.apache.axis2.jaxws.message.util.MessageUtils.getMessageFromMessageContext(reqMessageContext);

jaxMessage has no attachments (reqMessageContext had 2 attachments)...

I miss something or its bugged?

Thx,
Lorenzo



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



Re: SOAPMonitor Problem

2007-10-09 Thread robert lazarski
In your axis2.xml , you need to have:

module ref=addressing/
module ref=soapmonitor/

As the docs say, don't copy and paste the phases. In fact, you
shouldn't need to change those at all.

HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote:
 I do all steps in documentation. I don´t modify phaseOrder content, because
 the phase soapmonitorPhase already exists.
 Perhaps I don´t understand the phase filosofy.

 In my axis2.xml I have:

 ...
 module ref=soapmonitor/
 ...
 phaseOrder type=InFlow
 !--  System predefined phases   --
 phase name=Transport
 handler name=RequestURIBasedDispatcher

 class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
 order phase=Transport/
 /handler
 handler name=SOAPActionBasedDispatcher

 class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
 order phase=Transport/
 /handler
 /phase
 phase name=Addressing
  handler name=AddressingBasedDispatcher

 class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
  order phase=Addressing/
 /handler
 /phase
 phase name=Security/
 phase name=PreDispatch/
 phase name=Dispatch
 class=org.apache.axis2.engine.DispatchPhase
 handler name=RequestURIBasedDispatcher

 class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
 /
 handler name=SOAPActionBasedDispatcher

 class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
 handler name=RequestURIOperationDispatcher

 class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
 handler name=SOAPMessageBodyBasedDispatcher

 class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher
 /

 handler name=HTTPLocationBasedDispatcher

 class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher/
 /phase
  phase name=RMPhase/
 !--  System predefined phases   --
 !--   After Postdispatch phase module author or service author can
 add any phase he want  --
 phase name=OperationInPhase/
 phase name=soapmonitorPhase/
 /phaseOrder
 phaseOrder type=OutFlow
 !--  user can add his own phases to this area  --
 phase name=soapmonitorPhase/
 phase name=OperationOutPhase/
 !--system predefined phase--
 !--these phase will run irrespective of the service--
 phase name=RMPhase/
 phase name=PolicyDetermination/
 phase name=MessageOut/
 phase name=Security/
  /phaseOrder
 phaseOrder type=InFaultFlow
 phase name=Addressing
  handler name=AddressingBasedDispatcher
  class=
 org.apache.axis2.dispatchers.AddressingBasedDispatcher
  order phase=Addressing/
 /handler
 /phase
 phase name=Security/
 phase name=PreDispatch/
 phase name=Dispatch
 class=org.apache.axis2.engine.DispatchPhase
 handler name=RequestURIBasedDispatcher

 class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
 handler name=SOAPActionBasedDispatcher

 class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
 /
 handler name=RequestURIOperationDispatcher

 class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
 handler name=SOAPMessageBodyBasedDispatcher

 class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher/

 handler name=HTTPLocationBasedDispatcher

 class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher
 /
 /phase
 phase name=RMPhase/
 !--  user can add his own phases to this area  --
 phase name=OperationInFaultPhase/
 phase name=soapmonitorPhase/
 /phaseOrder
 phaseOrder type=OutFaultFlow
 !--  user can add his own phases to this area  --
 phase name=soapmonitorPhase/
 phase name=OperationOutFaultPhase/
 phase name=RMPhase/
 phase name=PolicyDetermination/
 phase name=MessageOut/
 /phaseOrder

 2007/10/9, robert lazarski [EMAIL PROTECTED]:
  On 10/9/07, Fátima Milla Olaya [EMAIL PROTECTED] wrote:
   robert lazarski a écrit :
Did you edit the web.xml ? Please read the docs carefully - the
required info is all there.
   
HTH,
Robert
   
   FaultFlow
   phase name=Addressing
handler name=AddressingBasedDispatcher
  
  
 class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
order phase=Addressing/
   /handler
   /phase
   phase name=Security/
   phase name=PreDispatch/
   phase name=Dispatch
   class=org.apache.axis2.engine.DispatchPhase 
   handler name=RequestURIBasedDispatcher
  
  
 class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
   handler 

Re: AxisCallback vs. the deprecated Callback

2007-10-09 Thread Rajith Attapattu
Deepal,

I agree that an isComplete method is convinient, but it can be easily added
as I have shown in the example.
So it's not a major issue.
Perhaps if we document the behaviour properly we don't really need to add
that method in a hurry.

But I also agree that for the sake of backward compatibility it is good to
add that method.
It will also allow an easy migration path to the users.

Regards,

Rajith

On 10/8/07, Deepal Jayasinghe [EMAIL PROTECTED] wrote:

 Hi Huitang ,
 Yes I also agree with you that is one of the missing API in the
 AxisCallback , and even I have found it difficult without that. So
 please create a JIRA I am more than happy to fix that  , though it is
 going to be a API changes.

 Thanks
 Deepal
  Hi,
 
  I created a web service client following Async/One Channel model using
  axis2-generated stub. In the stub code, AxisCallback interface is used.
 
  For almost all tests, no soap message response is received before the
  client is finished. This is verified with the help of the excellent
  tool tcpmon.
 
  In AxisCallback, I did not see something like isComplete() to test
  whether a whole message is retrieved or not. So I had to replace the
  AxisCallback with the depreciated Callback, and then put the following
  code in the stub.
 
  while (!callback.isComplete()) {
 Thread.sleep(1000);
  }
 
  Does anyone have a better solution without having to use the
  deprecated API?
 
  Thanks.
 
 
 




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




RE: axis2 1.3 configuring client authentication

2007-10-09 Thread Jon Wilmoth
This was exactly what I was looking for.  Based on 
http://ws.apache.org/axis2/1_3/http-transport.html#preemptive_auth, I'd tried 
something similar, but the key was this line:

authenticator.setPreemptiveAuthentication(true);

Just out of curiosity is there a deployment (vs. runtime) mechanism to do the 
same thing?

Thanks,
Jon


From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 09, 2007 12:01 AM
To: axis-user@ws.apache.org
Subject: Re: axis2 1.3 configuring client authentication

Hi Jon,

This mail thread should help you 
http://www.nabble.com/wsdl2java-with-Basic-Authentication-t4551192.html

Thanks, 
Keith.
On 10/9/07, Jon Wilmoth [EMAIL PROTECTED] wrote:
I've gone through the user guide and the http transport guide, but I
haven't found how I can configure an Axis2 web service client (generated
from WSDL) to pass authentication info to the http client.  Any pointers 
would be greatly appreciated.

Thanks,
Jon


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



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers. 
http://wso2.org/ 


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



Re: SOAPMonitor Problem

2007-10-09 Thread robert lazarski
Ehh, looks like you are already engaging the module.

The requested resource is not available.

Where do you see that, in the browser? I think that's a tomcat error.
So you've edited web.xml, engaged the module, you have expanded the
soapmonitor.jar to webapps/axis2 and there is a module under
WEB-INF/modules ? Hmm, this does work in 1.3 because I use it.

Try looking in the tomcat logs for some clues - you might be getting
an error somewhere. Also verify you are in fact binding to port 5001
and some other program has stolen the port - you should get lots of
error messages in the logs if that happens.

If all else fails, put axis2 in debug mode via the log4j.properties.

HTH,
Robert

On 10/9/07, robert lazarski [EMAIL PROTECTED] wrote:
 In your axis2.xml , you need to have:

 module ref=addressing/
 module ref=soapmonitor/

 As the docs say, don't copy and paste the phases. In fact, you
 shouldn't need to change those at all.

 HTH,
 Robert

 On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote:
  I do all steps in documentation. I don´t modify phaseOrder content, because
  the phase soapmonitorPhase already exists.
  Perhaps I don´t understand the phase filosofy.
 
  In my axis2.xml I have:
 
  ...
  module ref=soapmonitor/
  ...
  phaseOrder type=InFlow
  !--  System predefined phases   --
  phase name=Transport
  handler name=RequestURIBasedDispatcher
 
  class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
  order phase=Transport/
  /handler
  handler name=SOAPActionBasedDispatcher
 
  class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
  order phase=Transport/
  /handler
  /phase
  phase name=Addressing
   handler name=AddressingBasedDispatcher
 
  class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
   order phase=Addressing/
  /handler
  /phase
  phase name=Security/
  phase name=PreDispatch/
  phase name=Dispatch
  class=org.apache.axis2.engine.DispatchPhase
  handler name=RequestURIBasedDispatcher
 
  class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
  /
  handler name=SOAPActionBasedDispatcher
 
  class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
  handler name=RequestURIOperationDispatcher
 
  class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
  handler name=SOAPMessageBodyBasedDispatcher
 
  class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher
  /
 
  handler name=HTTPLocationBasedDispatcher
 
  class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher/
  /phase
   phase name=RMPhase/
  !--  System predefined phases   --
  !--   After Postdispatch phase module author or service author can
  add any phase he want  --
  phase name=OperationInPhase/
  phase name=soapmonitorPhase/
  /phaseOrder
  phaseOrder type=OutFlow
  !--  user can add his own phases to this area  --
  phase name=soapmonitorPhase/
  phase name=OperationOutPhase/
  !--system predefined phase--
  !--these phase will run irrespective of the service--
  phase name=RMPhase/
  phase name=PolicyDetermination/
  phase name=MessageOut/
  phase name=Security/
   /phaseOrder
  phaseOrder type=InFaultFlow
  phase name=Addressing
   handler name=AddressingBasedDispatcher
   class=
  org.apache.axis2.dispatchers.AddressingBasedDispatcher
   order phase=Addressing/
  /handler
  /phase
  phase name=Security/
  phase name=PreDispatch/
  phase name=Dispatch
  class=org.apache.axis2.engine.DispatchPhase
  handler name=RequestURIBasedDispatcher
 
  class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
  handler name=SOAPActionBasedDispatcher
 
  class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
  /
  handler name=RequestURIOperationDispatcher
 
  class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
  handler name=SOAPMessageBodyBasedDispatcher
 
  class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher/
 
  handler name=HTTPLocationBasedDispatcher
 
  class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher
  /
  /phase
  phase name=RMPhase/
  !--  user can add his own phases to this area  --
  phase name=OperationInFaultPhase/
  phase name=soapmonitorPhase/
  /phaseOrder
  phaseOrder type=OutFaultFlow
  !--  user can add his own phases to this area  --
  phase name=soapmonitorPhase/
  phase name=OperationOutFaultPhase/
  phase name=RMPhase/
  phase 

Re: AxisCallback vs. the deprecated Callback

2007-10-09 Thread Huitang Li
Excellent. Thanks. Probably I just cannot help missing the old and good 
isComplete() method though its era is over.


Rajith Attapattu wrote:
There are several ways you can use AxisCallback to notify the 
completion to interested parties.
What I showed you was a way to implement something simillar to the way 
the old Callback class was used.


We could add a sample on how to use the new API.
The general idea is for you to hook up your notification logic in the 
onComplete method.
How this notification should happen depends on your implementation 
stratergy.

Above is just one example.

Regards,

Rajith

On 10/8/07, *Huitang Li* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Thanks very much. I will try it. I hope axis2 developers will  use the
new API in the sample codes (under userguide folder) for next axis2
release so that they can give me an idea on how to use it without
having
the spawning thread die prematurely.


Rajith Attapattu wrote:
 Here is an idea on how to use the new AxisCallback in a similar
 fashion to the old Callback. (if thats what you are looking for)

 When you implement your callback, in the onComplete method you could
 do the following.

 void onComplete()
 {
_complete = true;
 }

 you can add an additional method to your implementation called
 isComplete().

 void boolean isComplete()
 {
   return _complete;
 }

 Now you have the same functionality as the old Callback.

 You can poll for isComplete to know if it's done and the java
doc for
 onComplete says that it will be called at the end of a MEP no matter
 what happens.
 (I looked at the code and I see that it is the case)
 So you can be sure that the MEP is completed when the _complete
 boolean is set to true.

 Regards,

 Rajith Attapattu.
 Red Hat Canada.

 On 10/8/07, * Huitang Li*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

 Any thought here, please? I would love to use new API, but I do
 not know
 how to fit it into the product.


 Huitang Li wrote:
  Thanks for your input. I saw the thread you mentioned
before I sent
  out my question to the list. However, I cannot see the
solution
 to the
  question. The main thread can be finished before the
spawning thread
  finishes getting the response from the web service server.
Also, in
  axis2 1.3 sample codes, it still uses the old Callback class.
 
  I just wonder how the main thread can detect whether the
spawning
  thread is complete or not with the new AxisCallback API.
 
  Any idea?
 
 
 
 
  Suran Jayathilaka wrote:
  Huitang Li wrote:
  Hi,
 
  I created a web service client following Async/One
Channel model
  using axis2-generated stub. In the stub code, AxisCallback
 interface
  is used.
 
  For almost all tests, no soap message response is
received before
  the client is finished. This is verified with the help
of the
  excellent tool tcpmon.
 
  In AxisCallback, I did not see something like
isComplete() to test
  whether a whole message is retrieved or not. So I had to
 replace the
  AxisCallback with the depreciated Callback, and then put the
  following code in the stub.
 
  while (!callback.isComplete()) {
 Thread.sleep(1000);
  }
 
  Does anyone have a better solution without having to use
the
  deprecated API?
 
  Thanks.
 
 
 
 
 
 
 

-

  To unsubscribe, e-mail:
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 
 
  Hi!
  Please refer to this thread.
 

http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html

 
http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
 
  Cheers.
  Suran
 
 

-

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

Re: SOAPMonitor Problem

2007-10-09 Thread Todd Allen

This can also be done in the services.xml file (instead of axis2.xml).


robert lazarski wrote:

In your axis2.xml , you need to have:

module ref=addressing/
module ref=soapmonitor/

As the docs say, don't copy and paste the phases. In fact, you
shouldn't need to change those at all.

HTH,
Robert

On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote:
  

I do all steps in documentation. I don´t modify phaseOrder content, because
the phase soapmonitorPhase already exists.
Perhaps I don´t understand the phase filosofy.

In my axis2.xml I have:

...
module ref=soapmonitor/
...
phaseOrder type=InFlow
!--  System predefined phases   --
phase name=Transport
handler name=RequestURIBasedDispatcher

class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
order phase=Transport/
/handler
handler name=SOAPActionBasedDispatcher

class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
order phase=Transport/
/handler
/phase
phase name=Addressing
 handler name=AddressingBasedDispatcher

class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
 order phase=Addressing/
/handler
/phase
phase name=Security/
phase name=PreDispatch/
phase name=Dispatch
class=org.apache.axis2.engine.DispatchPhase
handler name=RequestURIBasedDispatcher

class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
/
handler name=SOAPActionBasedDispatcher

class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
handler name=RequestURIOperationDispatcher

class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
handler name=SOAPMessageBodyBasedDispatcher

class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher
/

handler name=HTTPLocationBasedDispatcher

class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher/
/phase
 phase name=RMPhase/
!--  System predefined phases   --
!--   After Postdispatch phase module author or service author can
add any phase he want  --
phase name=OperationInPhase/
phase name=soapmonitorPhase/
/phaseOrder
phaseOrder type=OutFlow
!--  user can add his own phases to this area  --
phase name=soapmonitorPhase/
phase name=OperationOutPhase/
!--system predefined phase--
!--these phase will run irrespective of the service--
phase name=RMPhase/
phase name=PolicyDetermination/
phase name=MessageOut/
phase name=Security/
 /phaseOrder
phaseOrder type=InFaultFlow
phase name=Addressing
 handler name=AddressingBasedDispatcher
 class=
org.apache.axis2.dispatchers.AddressingBasedDispatcher
 order phase=Addressing/
/handler
/phase
phase name=Security/
phase name=PreDispatch/
phase name=Dispatch
class=org.apache.axis2.engine.DispatchPhase
handler name=RequestURIBasedDispatcher

class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
handler name=SOAPActionBasedDispatcher

class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
/
handler name=RequestURIOperationDispatcher

class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
handler name=SOAPMessageBodyBasedDispatcher

class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher/

handler name=HTTPLocationBasedDispatcher

class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher
/
/phase
phase name=RMPhase/
!--  user can add his own phases to this area  --
phase name=OperationInFaultPhase/
phase name=soapmonitorPhase/
/phaseOrder
phaseOrder type=OutFaultFlow
!--  user can add his own phases to this area  --
phase name=soapmonitorPhase/
phase name=OperationOutFaultPhase/
phase name=RMPhase/
phase name=PolicyDetermination/
phase name=MessageOut/
/phaseOrder

2007/10/9, robert lazarski [EMAIL PROTECTED]:


On 10/9/07, Fátima Milla Olaya [EMAIL PROTECTED] wrote:
  

robert lazarski a écrit :


Did you edit the web.xml ? Please read the docs carefully - the
required info is all there.

HTH,
Robert

  

FaultFlow
phase name=Addressing
 handler name=AddressingBasedDispatcher




class=org.apache.axis2.dispatchers.AddressingBasedDispatcher


 order phase=Addressing/
/handler
/phase
phase name=Security/
phase name=PreDispatch/
phase name=Dispatch
class=org.apache.axis2.engine.DispatchPhase 
handler name=RequestURIBasedDispatcher




class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/


handler 

Axis2 v1.3 client sending unwanted soapenv:mustUnderstand=0 attribute in the SOAP Header

2007-10-09 Thread djhess post
I am trying to use a SOAP service I don't control.  The service does not
like the SOAP Header attribute: soapenv:mustUnderstand=0
My client input data does not contain the  mustUnderstand  attribute, Axis2
is adding it! (see debug excerpt below)

How can I make the unwanted  mustUnderstand=0  attribute in the SOAP
Header go away?

I generated Axis2 client databindings using wsdl2java.sh and the -d option
  wsdl2java.sh  -uri simple.wsdl -p ... -s -d none
I wrote an Axis2 client ;-)  I set options:
  stub._getServiceClient().getOptions().setSoapVersionURI(
Constants.URI_SOAP11_ENV);
  stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED ,
false);
  stub._getServiceClient().getOptions().setProperty(
AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, true);
The Axis2 client code generates and sends a beautiful SOAP request:
  [DEBUG]  POST /SOAP HTTP/1.1[\r][\n]
  [DEBUG]  Content-Type: text/xml; charset=UTF-8[\r][\n]
  [DEBUG]  SOAPAction: Sync[\r][\n]
  [DEBUG]  User-Agent: Axis2[\r][\n]
  [DEBUG]  Host: somewhere.com:7443[\r][\n]
  [DEBUG]  Content-Length: 2734[\r][\n]
  [DEBUG]  [\r][\n]
  [DEBUG]  ?xml version=' 1.0' encoding='UTF-8'?
  soapenv:Envelope xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/;
  soapenv:Headerns:HdrElement xmlns:ns=...
soapenv:mustUnderstand=0
  ...
The SOAP response has:
  [DEBUG]  faultcodeSOAP-ENV:Client/faultcode
  [DEBUG]  faultstringRequest not conforming to schema/faultstring
  [DEBUG]  description error parsing apos;XML documentapos;:: Error
at line 1: /soapenv:Envelope/soapenv:Header/ns:HdrElement: undeclared
attribute: quot;mustUnderstandquot;:
/soapenv:Envelope/soapenv:Header/ns:HdrElement: undeclared attribute:
quot;mustUnderstandquot;#10; /description

dana j hess


Re: Database connection

2007-10-09 Thread Rajith Attapattu
If you deploy this service in Application Scope, then there will be one and
only one instance of this service throught out the life time of the
application.
This way you only create your database connection once.

Is it enough to create this service with application scope?
So the answer is yes.

Rajith Attapattu
Red Hat.

On 10/9/07, VF [EMAIL PROTECTED] wrote:

 Hi all,
 I would like to ask u, how can i utilize database connection in my web
 service. I have one web service with more methods in it. Id like to create
 database connection just once and not with each call (each operation works
 with the same database connection) Is it enough to create this service
 with
 application scope?

 It looks like this:

 Available services
 stkdds

 Service Description : stkdds
 Service Status : Active
 Available Operations

 * getFinishedOrderBin
 * getOrderInfo
 * updateOrder
 * getUserInfo
 * cancelOrder
 * updateUser
 * testOperation
 * getOrdersOverview
 * getAllAccountsInfo
 * getFinishedOrder
 * getAccountInfo
 * newOrder


 And my code for database connection smth like this:

 public Connection setConnection() throws Exception {

 if(conn != null){
 return conn;
 }

 Class.forName(org.firebirdsql.jdbc.FBDriver);
 conn = DriverManager.getConnection (p_connect_string,
 sqlProps);
 return conn;




 Thanks Vladi


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




Re: SOAPMonitor Problem

2007-10-09 Thread Antonio Manuel Muñiz Martín
Mmm, I´m using axis distribution deployed on Glassfish server. ¿Is this a
problem?
I think that axis is independent of the servlet container.

2007/10/9, robert lazarski [EMAIL PROTECTED]:

 Ehh, looks like you are already engaging the module.

 The requested resource is not available.

 Where do you see that, in the browser? I think that's a tomcat error.
 So you've edited web.xml, engaged the module, you have expanded the
 soapmonitor.jar to webapps/axis2 and there is a module under
 WEB-INF/modules ? Hmm, this does work in 1.3 because I use it.

 Try looking in the tomcat logs for some clues - you might be getting
 an error somewhere. Also verify you are in fact binding to port 5001
 and some other program has stolen the port - you should get lots of
 error messages in the logs if that happens.

 If all else fails, put axis2 in debug mode via the log4j.properties.

 HTH,
 Robert

 On 10/9/07, robert lazarski [EMAIL PROTECTED] wrote:
  In your axis2.xml , you need to have:
 
  module ref=addressing/
  module ref=soapmonitor/
 
  As the docs say, don't copy and paste the phases. In fact, you
  shouldn't need to change those at all.
 
  HTH,
  Robert
 
  On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED]
 wrote:
   I do all steps in documentation. I don´t modify phaseOrder content,
 because
   the phase soapmonitorPhase already exists.
   Perhaps I don´t understand the phase filosofy.
  
   In my axis2.xml I have:
  
   ...
   module ref=soapmonitor/
   ...
   phaseOrder type=InFlow
   !--  System predefined phases   --
   phase name=Transport
   handler name=RequestURIBasedDispatcher
  
   class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
   order phase=Transport/
   /handler
   handler name=SOAPActionBasedDispatcher
  
   class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
   order phase=Transport/
   /handler
   /phase
   phase name=Addressing
handler name=AddressingBasedDispatcher
  
   class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
order phase=Addressing/
   /handler
   /phase
   phase name=Security/
   phase name=PreDispatch/
   phase name=Dispatch
   class=org.apache.axis2.engine.DispatchPhase
   handler name=RequestURIBasedDispatcher
  
   class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
   /
   handler name=SOAPActionBasedDispatcher
  
   class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
   handler name=RequestURIOperationDispatcher
  
   class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
   handler name=SOAPMessageBodyBasedDispatcher
  
   class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher
   /
  
   handler name=HTTPLocationBasedDispatcher
  
   class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher/
   /phase
phase name=RMPhase/
   !--  System predefined phases   --
   !--   After Postdispatch phase module author or service
 author can
   add any phase he want  --
   phase name=OperationInPhase/
   phase name=soapmonitorPhase/
   /phaseOrder
   phaseOrder type=OutFlow
   !--  user can add his own phases to this area  --
   phase name=soapmonitorPhase/
   phase name=OperationOutPhase/
   !--system predefined phase--
   !--these phase will run irrespective of the service--
   phase name=RMPhase/
   phase name=PolicyDetermination/
   phase name=MessageOut/
   phase name=Security/
/phaseOrder
   phaseOrder type=InFaultFlow
   phase name=Addressing
handler name=AddressingBasedDispatcher
class=
   org.apache.axis2.dispatchers.AddressingBasedDispatcher
order phase=Addressing/
   /handler
   /phase
   phase name=Security/
   phase name=PreDispatch/
   phase name=Dispatch
   class=org.apache.axis2.engine.DispatchPhase
   handler name=RequestURIBasedDispatcher
  
   class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
   handler name=SOAPActionBasedDispatcher
  
   class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
   /
   handler name=RequestURIOperationDispatcher
  
   class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
   handler name=SOAPMessageBodyBasedDispatcher
  
   class=org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher/
  
   handler name=HTTPLocationBasedDispatcher
  
   class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher
   /
   /phase
   phase name=RMPhase/
   !--  user can add his own phases to this area  --
   phase 

Re: [Axis2] [bug?] from MessageContext to jaxwsMessage loose Attachments

2007-10-09 Thread Lorenzo
I added attachment manually with 


for(int att=0;attids.length;att++){
String id = ids[att];
jaxMessage.addDataHandler(req.getAttachmentMap().getDataHandler(id),id);
}

and seems that also saajMessage have them.

now if i write the message with saajMessage.writeTo(System.out) i get
only the envelope and not the attachment...

why?

thx, Lorenzo


On mar, 2007-10-09 at 16:33 +0200, Lorenzo wrote:
 Hi all,
 
 I tryed to convert from 
 org.apache.axis2.context.MessageContext
 to 
 org.apache.axis2.saaj.SOAPMessageImpl 
 passing by 
 org.apache.axis2.jaxws.message.impl.MessageImpl
 
 
 
 Using 
 org.apache.axis2.jaxws.message.impl.MessageImpl jaxMessage = 
   (org.apache.axis2.jaxws.message.impl.MessageImpl) 
 org.apache.axis2.jaxws.message.util.MessageUtils.getMessageFromMessageContext(reqMessageContext);
 
 jaxMessage has no attachments (reqMessageContext had 2 attachments)...
 
 I miss something or its bugged?
 
 Thx,
 Lorenzo
 


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



Re: SOAPMonitor Problem

2007-10-09 Thread Antonio Manuel Muñiz Martín
Problem solved.

SOAPMonitor not runs on Glassfish.
I have do the same on Tomcat and it runs.


Thaks for all.

2007/10/9, Antonio Manuel Muñiz Martín [EMAIL PROTECTED]:

 Mmm, I´m using axis distribution deployed on Glassfish server. ¿Is this a
 problem?
 I think that axis is independent of the servlet container.

 2007/10/9, robert lazarski  [EMAIL PROTECTED]:
 
  Ehh, looks like you are already engaging the module.
 
  The requested resource is not available.
 
  Where do you see that, in the browser? I think that's a tomcat error.
  So you've edited web.xml, engaged the module, you have expanded the
  soapmonitor.jar to webapps/axis2 and there is a module under
  WEB-INF/modules ? Hmm, this does work in 1.3 because I use it.
 
  Try looking in the tomcat logs for some clues - you might be getting
  an error somewhere. Also verify you are in fact binding to port 5001
  and some other program has stolen the port - you should get lots of
  error messages in the logs if that happens.
 
  If all else fails, put axis2 in debug mode via the log4j.properties.
 
  HTH,
  Robert
 
  On 10/9/07, robert lazarski [EMAIL PROTECTED] wrote:
   In your axis2.xml , you need to have:
  
   module ref=addressing/
   module ref=soapmonitor/
  
   As the docs say, don't copy and paste the phases. In fact, you
   shouldn't need to change those at all.
  
   HTH,
   Robert
  
   On 10/9/07, Antonio Manuel Muñiz Martín [EMAIL PROTECTED]
  wrote:
I do all steps in documentation. I don´t modify phaseOrder content,
  because
the phase soapmonitorPhase already exists.
Perhaps I don´t understand the phase filosofy.
   
In my axis2.xml I have:
   
...
module ref=soapmonitor/
...
phaseOrder type=InFlow
!--  System predefined phases   --
phase name=Transport
handler name=RequestURIBasedDispatcher
   
class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
order phase=Transport/
/handler
handler name=SOAPActionBasedDispatcher
   
class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
order phase=Transport/
/handler
/phase
phase name=Addressing
 handler name=AddressingBasedDispatcher
   
class=org.apache.axis2.dispatchers.AddressingBasedDispatcher
 order phase=Addressing/
/handler
/phase
phase name=Security/
phase name=PreDispatch/
phase name=Dispatch
class= org.apache.axis2.engine.DispatchPhase
handler name=RequestURIBasedDispatcher
   
class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher
/
handler name=SOAPActionBasedDispatcher
   
class=org.apache.axis2.dispatchers.SOAPActionBasedDispatcher/
handler name=RequestURIOperationDispatcher
   
class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
handler name=SOAPMessageBodyBasedDispatcher
   
class= org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher
/
   
handler name=HTTPLocationBasedDispatcher
   
class=org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher /
/phase
 phase name=RMPhase/
!--  System predefined phases   --
!--   After Postdispatch phase module author or service
  author can
add any phase he want  --
phase name=OperationInPhase/
phase name=soapmonitorPhase/
/phaseOrder
phaseOrder type=OutFlow
!--  user can add his own phases to this area  --
phase name=soapmonitorPhase/
phase name=OperationOutPhase/
!--system predefined phase--
!--these phase will run irrespective of the service--
phase name=RMPhase/
phase name=PolicyDetermination/
phase name=MessageOut/
phase name=Security/
 /phaseOrder
phaseOrder type=InFaultFlow
phase name=Addressing
 handler name=AddressingBasedDispatcher
 class=
org.apache.axis2.dispatchers.AddressingBasedDispatcher 
 order phase=Addressing/
/handler
/phase
phase name=Security/
phase name=PreDispatch/
phase name=Dispatch
class=org.apache.axis2.engine.DispatchPhase
handler name=RequestURIBasedDispatcher
   
class=org.apache.axis2.dispatchers.RequestURIBasedDispatcher/
handler name=SOAPActionBasedDispatcher
   
class= org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
/
handler name=RequestURIOperationDispatcher
   
class=org.apache.axis2.dispatchers.RequestURIOperationDispatcher/
handler name=SOAPMessageBodyBasedDispatcher
   

JSON using a POJO service

2007-10-09 Thread Anas Mughal
I am unable to respond with pure JSON using a POJO service. Here is my POJO:

public class AxisTest {
public String getVersion() throws Exception {
return { customer : { name : { $ : Jane Doe } } };
}
}


The response I get in the browser includes the wrapper:

ns:getVersionResponse xmlns:ns=http://axisversion.sample;
  ns:return{ customer : { name : Jane Doe, company : Acme
Enterprises}/ns:return
/ns:getVersionResponse

Instead, I would like get back only:

{ customer : { name : Jane Doe, company : Acme Enterprises}



In the browser, I see the content-type showing up as : application/xml.
I might be able to resolve this problem by setting the content type to
application/json. How do I set the content type on a POJO service?

Do I need return XML and Axis2 will automatically convert it to JSON (based
on the message formatter setting of JSONMessageFormatter)?


Here is my services.xml:

service name=AxisTest3 scope=application

descriptionThis service is to JSON in Axis./description

parameter name=ServiceClasssample.axisversion.AxisTest/parameter

messageReceivers
messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only;
 class=
org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver/
messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out;
 class=
org.apache.axis2.rpc.receivers.RPCMessageReceiver/
/messageReceivers

 messageFormatters
messageFormatter contentType=application/json class=
org.apache.axis2.json.JSONMessageFormatter/
/messageFormatters

messageBuilders
messageBuilder contentType=application/json class=
org.apache.axis2.json.JSONOMBuilder/
/messageBuilders

/service


Re: JSON using a POJO service

2007-10-09 Thread keith chapman
Hi Anas,

The messageFormatters and messageBuilders should be in the Axis2.xml and not
the services.xml. You can return the response as Json by setting the correct
MessageType on the outgoing messageContext.

Actually today I wrote a module that can do what you request. All you need
to do it add a query parameter called response with the value of the
contentType that you require as the response.

For e.g.
http://localhost:8080/axis2/services/version/getVersion?response=application/jsonwould
give you a JSON response.

I just added this module as a WSO2 commons project. You can check it out at
http://wso2.org/repos/wso2/trunk/commons/dynamic-response/

Just take a checkout and build it using maven clean install. That will
create wso2dynamic-response-SNAPSHOT.mar in the target dir. You can drop
this into your modules directory and engage it on any service you need.

Let us know what you think about it.

Thanks,
Keith.

On 10/9/07, Anas Mughal [EMAIL PROTECTED] wrote:

 I am unable to respond with pure JSON using a POJO service. Here is my
 POJO:

 public class AxisTest {
 public String getVersion() throws Exception {
 return  { customer : { name : { $ : Jane Doe } }
 };
 }
 }


 The response I get in the browser includes the wrapper:

 
 ns:getVersionResponse xmlns:ns=http://axisversion.sample;
   
 ns:return{ customer : { name : Jane Doe, company : Acme 
 Enterprises}/ns:return
 
 /ns:getVersionResponse

 Instead, I would like get back only:

 { customer : { name : Jane Doe, company : Acme Enterprises}



 In the browser, I see the content-type showing up as :
 application/xml.   I might be able to resolve this problem by setting the
 content type to application/json. How do I set the content type on a POJO
 service?

 Do I need return XML and Axis2 will automatically convert it to JSON
 (based on the message formatter setting of JSONMessageFormatter)?


 Here is my services.xml:

 service name=AxisTest3 scope=application

 descriptionThis service is to JSON in Axis./description

 parameter name=ServiceClasssample.axisversion.AxisTest/parameter

 messageReceivers
 messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only;
  class=
 org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver /
 messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out;
  class=
 org.apache.axis2.rpc.receivers.RPCMessageReceiver /
 /messageReceivers

  messageFormatters
 messageFormatter contentType=application/json class=
 org.apache.axis2.json.JSONMessageFormatter/
 /messageFormatters

 messageBuilders
 messageBuilder contentType= application/json class=
 org.apache.axis2.json.JSONOMBuilder/
 /messageBuilders

 /service




-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Re: No service is available at this URL--Calculator.jws

2007-10-09 Thread H.Z
  I forgot the code.
  The code is 
  
  public class Calculator {
  public int add(int i1, int i2)
  {
return i1 + i2; 
  }
   
  public int subtract(int i1, int i2)
  {
   return i1 - i2;
  }
  }


H.Z [EMAIL PROTECTED] wrote:Hello,
   
  I copy Calculator.java to my webapp directory, and rename it Calculator.jws.
  Then 
  http://localhost:8080/axis/Calculator.jws
   
  I get No service is available at this URL.
  However I tried another example EchoHeaders.jws that is included in the 
installation package. It does work.
   
  Why?
   
  Thanks

-
  Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

   
-
Catch up on fall's hot new shows on Yahoo! TV.  Watch previews, get listings, 
and more!

Re: Database connection

2007-10-09 Thread Anthony Bull
If this is a service that more than one user can access I'd recommend 
you use commons connection pooling to handle your connections.  That way 
you just ask for a connection when you need one, and the commons library 
handles the creation.  Its not going to work very well if multiple 
requests are being serviced using a single JDBC connection - and I'm not 
even sure if it is threadsafe to do so.


Rajith Attapattu wrote:
If you deploy this service in Application Scope, then there will be 
one and only one instance of this service throught out the life time 
of the application.

This way you only create your database connection once.

Is it enough to create this service with application scope?
So the answer is yes.

Rajith Attapattu
Red Hat.

On 10/9/07, *VF*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Hi all,
I would like to ask u, how can i utilize database connection in my
web
service. I have one web service with more methods in it. Id like
to create
database connection just once and not with each call (each
operation works
with the same database connection) Is it enough to create this
service with
application scope?

It looks like this:

Available services
stkdds

Service Description : stkdds
Service Status : Active
Available Operations

* getFinishedOrderBin
* getOrderInfo
* updateOrder
* getUserInfo
* cancelOrder
* updateUser
* testOperation
* getOrdersOverview
* getAllAccountsInfo
* getFinishedOrder
* getAccountInfo
* newOrder


And my code for database connection smth like this:

public Connection setConnection() throws Exception {

if(conn != null){
return conn;
}

 Class.forName(org.firebirdsql.jdbc.FBDriver);
conn = DriverManager.getConnection (p_connect_string,
sqlProps);
return conn;




Thanks Vladi


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mailto:[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: Database connection

2007-10-09 Thread Rajith Attapattu
Since only one instance of the Service is used to serve all requests, your
code needs to be able to handle concurrency.
As anthony mentioned you may need to either use a connection pool or
synchronize access to the getConnection method.
Apart from the connection method, if there is any shared state that is
modified as part of a request you may need to ensure it is done a in thread
safe way.

I would say that it depends on how frequently your service is accessed.
If it's accessed once in a while then a synchronized getConnection method
might be cheaper than a thread pool.
Downfall is that concurrent requests are handled serially as they will block
on getConnection.

If it's accessed more often then offloading the burden of maintaining
connections to a connection pool might be a good idea.

Regards,

Rajith Attapattu
Red Hat.

On 10/9/07, Anthony Bull [EMAIL PROTECTED] wrote:

 If this is a service that more than one user can access I'd recommend
 you use commons connection pooling to handle your connections.  That way
 you just ask for a connection when you need one, and the commons library
 handles the creation.  Its not going to work very well if multiple
 requests are being serviced using a single JDBC connection - and I'm not
 even sure if it is threadsafe to do so.

 Rajith Attapattu wrote:
  If you deploy this service in Application Scope, then there will be
  one and only one instance of this service throught out the life time
  of the application.
  This way you only create your database connection once.
 
  Is it enough to create this service with application scope?
  So the answer is yes.
 
  Rajith Attapattu
  Red Hat.
 
  On 10/9/07, *VF*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  Hi all,
  I would like to ask u, how can i utilize database connection in my
  web
  service. I have one web service with more methods in it. Id like
  to create
  database connection just once and not with each call (each
  operation works
  with the same database connection) Is it enough to create this
  service with
  application scope?
 
  It looks like this:
 
  Available services
  stkdds
 
  Service Description : stkdds
  Service Status : Active
  Available Operations
 
  * getFinishedOrderBin
  * getOrderInfo
  * updateOrder
  * getUserInfo
  * cancelOrder
  * updateUser
  * testOperation
  * getOrdersOverview
  * getAllAccountsInfo
  * getFinishedOrder
  * getAccountInfo
  * newOrder
 
 
  And my code for database connection smth like this:
 
  public Connection setConnection() throws Exception {
 
  if(conn != null){
  return conn;
  }
 
   Class.forName(org.firebirdsql.jdbc.FBDriver);
  conn = DriverManager.getConnection(p_connect_string,
  sqlProps);
  return conn;
 
 
 
 
  Thanks Vladi
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  mailto:[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 1.2] Axis2 attachment interoperability???

2007-10-09 Thread skudx


Hi Thilina/ Xinjun,

Could you pl have a look at https://issues.apache.org/jira/browse/AXIS2-3245
 give me some pointers to move ahead?

My current requirements force me to use jax-ws-ri on the server-side  axis2
on the client-side. The request/ response messages typically have more than
one binary attachments and the order of attachments must be preserved.

Thanks 
Regards


-- 
View this message in context: 
http://www.nabble.com/-Axis2-1.2--Axis2-attachment-interoperabilitytf3906797.html#a13125936
Sent from the Axis - User mailing list archive at Nabble.com.


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



SOAP vs REST request

2007-10-09 Thread Ganesan, Chandru

Hi

I'm newbie to Axis, so pardon my rudimentary question?

What factors should I consider before choosing between  REST vs SOAP
request processing in Axis 2.0?
In case of SOAP I'd use axis2/services URI path in the WSDL soap port
(AxisServlet)
In case of REST I'd use axis2/rest URI path in the WSDL soap port
(AxisRESTServlet)

If you could also provide some basic info on the difference between REST
and AXIS request processing, it w'd be very helpful


thanks
Chandru Ganesan
HP Select Identity
972.497.2403 (Work)
3000 Waterview Pkwy
Richardson TX 75080


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



[Axis2] How to remove namespaces from SOAP response in Axis2

2007-10-09 Thread Raghu Upadhyayula
Hi,

 

Does anyone know how to remove namespaces from SOAP response in Axis2?

 

Here is an example of what I wanted.

 

Original SOAP Envelope

 

soapenv:Envelope

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

   soapenv:Body

  ns1:loginResponse xmlns:ns1=urn:ws.rsys.com

 ns1:loginReturn-31853ad2:1157fefd8cf:5b3c/ns1:loginReturn

  /ns1:loginResponse

   /soapenv:Body

/soapenv:Envelope

 

SOAP Envelope After removing namespaces

 

soapenv:Envelope

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

xmlns=urn:ws.rsys.com

   soapenv:Body

  loginResponse

 loginReturn-31853ad2:1157fefd8cf:5b3c/loginReturn

  /loginResponse

   /soapenv:Body

/soapenv:Envelope

 

Thanks in advance

Raghu



Re: SOAP vs REST request

2007-10-09 Thread Martin Gainty
One of the better SOAP vs Rest 1 page comparisons..

http://www.devx.com/DevX/Article/8155

M-
- Original Message - 
From: Ganesan, Chandru [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, October 09, 2007 6:59 PM
Subject: SOAP vs REST request



Hi

I'm newbie to Axis, so pardon my rudimentary question?

What factors should I consider before choosing between  REST vs SOAP
request processing in Axis 2.0?
In case of SOAP I'd use axis2/services URI path in the WSDL soap port
(AxisServlet)
In case of REST I'd use axis2/rest URI path in the WSDL soap port
(AxisRESTServlet)

If you could also provide some basic info on the difference between REST
and AXIS request processing, it w'd be very helpful


thanks
Chandru Ganesan
HP Select Identity
972.497.2403 (Work)
3000 Waterview Pkwy
Richardson TX 75080


-
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: [Axis2] How to remove namespaces from SOAP response in Axis2

2007-10-09 Thread Alick Buckley
Did you try the suppress-prefixes option in WSDL2Java?

 http://svn.apache.org/viewvc?view=revrevision=480336
http://svn.apache.org/viewvc?view=revrevision=480336

Fix for AXIS2-1784 - [ADB] Suppress prefixes in the soap request/response
for performance

 https://issues.apache.org/jira/browse/AXIS2-1784
https://issues.apache.org/jira/browse/AXIS2-1784

added an option -sp to suppress namespace prefixes in
WSDL2Java/SchemaCompiler.

===

-Original Message-
From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 October 2007 9:54 AM
To: axis-user@ws.apache.org
Subject: [Axis2] How to remove namespaces from SOAP response in Axis2



Hi,

 

Does anyone know how to remove namespaces from SOAP response in Axis2?

 

Here is an example of what I wanted.

 

Original SOAP Envelope

 

soapenv:Envelope

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

   soapenv:Body

  ns1:loginResponse xmlns:ns1=urn:ws.rsys.com

 ns1:loginReturn-31853ad2:1157fefd8cf:5b3c/ns1:loginReturn

  /ns1:loginResponse

   /soapenv:Body

/soapenv:Envelope

 

SOAP Envelope After removing namespaces

 

soapenv:Envelope

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

xmlns=urn:ws.rsys.com

   soapenv:Body

  loginResponse

 loginReturn-31853ad2:1157fefd8cf:5b3c/loginReturn

  /loginResponse

   /soapenv:Body

/soapenv:Envelope

 

Thanks in advance

Raghu



Re: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread Martin Gainty
Ritesh-

Which schema are you validating with?
Also which schemaLocation are you pointing to ?

M--
- Original Message -
From: robert lazarski [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, October 09, 2007 8:41 AM
Subject: Re: Question : Turning Off XSD Validation in Axis 2


 Look at the xmlbeans api for the validate() method. For example:

 XmlError error =
 validateSolicitacaoProcedimentoDocument(solicitacaoProcedimentoDocument);
 if (error != null) {
 throw new Exception(Objeto
 solicitacaoDemonstrativoRetornoDocument 
 + is invalid: 
 + error);
 }

 public static XmlError validateSolicitacaoProcedimentoDocument (

br.gov.ans.www.tiss.ws.tipos.tisssolicitacaoprocedimento.SolicitacaoProcedim
entoDocument
solicitacaoProcedimentoDocument) {
// Create an XmlOptions instance and set the error listener.
XmlOptions validateOptions = new XmlOptions();
ListXmlError errorList = new ArrayListXmlError();
validateOptions.setErrorListener(errorList);
if (!solicitacaoProcedimentoDocument.validate(validateOptions)) {
for (int i = 0; i  errorList.size(); i++) {
XmlError error = (XmlError)errorList.get(i);
System.out.println(Object solicitacaoProcedimentoDocument

+ is invalid, 
+ The following field is empty: );
System.out.println(\n);
System.out.println(Error Message:  +
 error.getMessage() + \n);
System.out.println(Location of invalid XML: 
+ error.getCursorLocation().xmlText() + \n);
}
return errorList.get(0);
}
System.out.println(solicitacaoProcedimentoDocument seems to be
 valid\n);
return null;
}

 Not exactly pretty, but xmlbeans has the unique advantage that it has
 arguably 100% xml schema compliance - the only databinding in axis2
 that does. It also is arguably the most stable api. In alot of cases,
 in axis2 its the only choice.

 The disadvantage is slightly slower performance, though still very
 good compared to axis1,  an awkward api, etc.

 HTH,
 Robert

 On 10/9/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
  I tested it and actually found that none of bindings enforce full schema
  validation. So the issue is 2-fold,
  1. There should be a schema validation which can be turned on during
  testing.
  2. Schema validation can be turned off during production without any
code
  change in web service, preferably with same set of modules as used in
test
  machines.
 
  As far as manual validation is concerned , I can write custom code
inside
  the service to validate it against any schema. but that is not what I
want.
 
  I am going through your module for jibx and probably would use that.
Thanks
  for pointers.
 
 
  On 10/9/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:
   Hi Ritesh,
  
   I'm surprised to see this, since as I said in my prior email XMLBeans
   does very little in the way of schema validation by default. You can
   manually validate the data, but unless the generated code includes the
   validation I don't know why you'd be running into problems.
  
   What kind of error are you getting?
  
 - Dennis
  
   --
   Dennis M. Sosnoski
   SOA and Web Services in Java
   Axis2 Training and Consulting
   http://www.sosnoski.com - http://www.sosnoski.co.nz
   Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
  
  
  
   Ritesh Tarway wrote:
Unluckily my service has been generated using wsdl2java tool with
  xmlbeans
bindingso xsd validation will be turned on.
alright.i think there is some 3rd party custom module to turn
off
validation if i use jibx bindingis there any such thing for xml
  beans??
   
   
On 10/8/07, Thilina Gunarathne [EMAIL PROTECTED] wrote:
   
Hi,
AFAIK Axis2 does not do any XSD validation unless you use data
binding.
XML to java object conversion that happens when you have used data
binding, expects the message to conform to the schema.
   
IIRC XMLBeans enforces this heavily, while ADB use it only when
absolutely necessary.  There are some switches like backword
compatibility mode which you can use when code generating(data
binding) to reduce the enforcement of some schema constructs.
   
In other words, you cannot turn off schema validation completely if
you are using data binding.
   
thanks,
Thilina
   
On 10/8/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
   
Is there a way to turn off XSD validation in production env? I
would
   
want it
   
to be a flag in axis configuration to turn off validation globally
for
   
all
   
deployed services?
   
platform information : Axis2/Java Version 1.3 , deployed on tomcat
or
websphere, using sun's JVM ( jdk 1.5.0)
--
Ritesh Tarway
Bangalore, India

Re: SOAP vs REST request

2007-10-09 Thread Anas Mughal
Your question seems to be a generic comparison between REST and SOAP. Good
discussion and comparison could be found thru Google:

http://www.google.com/search?q=rest+vs+soaprls=com.microsoft:en-us:IE-SearchBoxie=UTF-8oe=UTF-8sourceid=ie7




On 10/9/07, Ganesan, Chandru [EMAIL PROTECTED] wrote:


 Hi

 I'm newbie to Axis, so pardon my rudimentary question?

 What factors should I consider before choosing between  REST vs SOAP
 request processing in Axis 2.0?
 In case of SOAP I'd use axis2/services URI path in the WSDL soap port
 (AxisServlet)
 In case of REST I'd use axis2/rest URI path in the WSDL soap port
 (AxisRESTServlet)

 If you could also provide some basic info on the difference between REST
 and AXIS request processing, it w'd be very helpful


 thanks
 Chandru Ganesan
 HP Select Identity
 972.497.2403 (Work)
 3000 Waterview Pkwy
 Richardson TX 75080


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




-- 
Anas Mughal


Re: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread Ritesh Tarway
schema as defined in wsdl types. it contains definition for input and output
of the web service method.

ideally I would want to validate only the payload in soap request against an
XSD file.

Is there any other way I can validate ?

On 10/9/00, Martin Gainty [EMAIL PROTECTED] wrote:

 Ritesh-

 Which schema are you validating with?
 Also which schemaLocation are you pointing to ?

 M--
 - Original Message -
 From: robert lazarski [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Tuesday, October 09, 2007 8:41 AM
 Subject: Re: Question : Turning Off XSD Validation in Axis 2


  Look at the xmlbeans api for the validate() method. For example:
 
  XmlError error =
 
 validateSolicitacaoProcedimentoDocument(solicitacaoProcedimentoDocument);
  if (error != null) {
  throw new Exception(Objeto
  solicitacaoDemonstrativoRetornoDocument 
  + is invalid: 
  + error);
  }
 
  public static XmlError validateSolicitacaoProcedimentoDocument (
 

 br.gov.ans.www.tiss.ws.tipos.tisssolicitacaoprocedimento.SolicitacaoProcedim
 entoDocument
 solicitacaoProcedimentoDocument) {
 // Create an XmlOptions instance and set the error listener.
 XmlOptions validateOptions = new XmlOptions();
 ListXmlError errorList = new ArrayListXmlError();
 validateOptions.setErrorListener(errorList);
 if (!solicitacaoProcedimentoDocument.validate(validateOptions)) {
 for (int i = 0; i  errorList.size(); i++) {
 XmlError error = (XmlError)errorList.get(i);
 System.out.println(Object
 solicitacaoProcedimentoDocument
 
 + is invalid, 
 + The following field is empty: );
 System.out.println(\n);
 System.out.println(Error Message:  +
  error.getMessage() + \n);
 System.out.println(Location of invalid XML: 
 + error.getCursorLocation().xmlText() + \n);
 }
 return errorList.get(0);
 }
 System.out.println(solicitacaoProcedimentoDocument seems to be
  valid\n);
 return null;
 }
 
  Not exactly pretty, but xmlbeans has the unique advantage that it has
  arguably 100% xml schema compliance - the only databinding in axis2
  that does. It also is arguably the most stable api. In alot of cases,
  in axis2 its the only choice.
 
  The disadvantage is slightly slower performance, though still very
  good compared to axis1,  an awkward api, etc.
 
  HTH,
  Robert
 
  On 10/9/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
   I tested it and actually found that none of bindings enforce full
 schema
   validation. So the issue is 2-fold,
   1. There should be a schema validation which can be turned on during
   testing.
   2. Schema validation can be turned off during production without any
 code
   change in web service, preferably with same set of modules as used in
 test
   machines.
  
   As far as manual validation is concerned , I can write custom code
 inside
   the service to validate it against any schema. but that is not what I
 want.
  
   I am going through your module for jibx and probably would use that.
 Thanks
   for pointers.
  
  
   On 10/9/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:
Hi Ritesh,
   
I'm surprised to see this, since as I said in my prior email
 XMLBeans
does very little in the way of schema validation by default. You can
manually validate the data, but unless the generated code includes
 the
validation I don't know why you'd be running into problems.
   
What kind of error are you getting?
   
  - Dennis
   
--
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
   
   
   
Ritesh Tarway wrote:
 Unluckily my service has been generated using wsdl2java tool with
   xmlbeans
 bindingso xsd validation will be turned on.
 alright.i think there is some 3rd party custom module to turn
 off
 validation if i use jibx bindingis there any such thing for
 xml
   beans??


 On 10/8/07, Thilina Gunarathne [EMAIL PROTECTED] wrote:

 Hi,
 AFAIK Axis2 does not do any XSD validation unless you use data
 binding.
 XML to java object conversion that happens when you have used
 data
 binding, expects the message to conform to the schema.

 IIRC XMLBeans enforces this heavily, while ADB use it only when
 absolutely necessary.  There are some switches like backword
 compatibility mode which you can use when code generating(data
 binding) to reduce the enforcement of some schema constructs.

 In other words, you cannot turn off schema validation completely
 if
 you are using data binding.

 thanks,
 Thilina

 On 10/8/07, 

Re: SOAP vs REST request

2007-10-09 Thread Rajith Attapattu
Sorry to say but the article listed below is very misleading.
Comparing REST vs SOAP is the same as apples vs oranges.
REST is an architectural style while SOAP is just a message format.
REST vs WS-* or SOA in general is a more meaningful comparison.
All though there are quite a few folks who think REST is one way to realize
SOA.

For most folks REST means XML over HTTP/GET which is not correct at all.
Read this blog post by Sanjiva
http://www.bloglines.com/blog/sanjiva?id=227to get a more balanced
view.

It is important to understand that in order for your service to be RESTful
your service needs to obey the REST constraints.
Flipping the switch disableREST doesn't make your service RESTful or not.
All it does is to change the message format from POX to SOAP.
You have a greater responsibility to ensure that you design your service in
such a way that it obeys the REST constraints.

Regards,

Rajith Attapattu.
Red Hat.

On 10/9/07, Ganesan, Chandru [EMAIL PROTECTED] wrote:


 Hi

 I'm newbie to Axis, so pardon my rudimentary question?

 What factors should I consider before choosing between  REST vs SOAP
 request processing in Axis 2.0?
 In case of SOAP I'd use axis2/services URI path in the WSDL soap port
 (AxisServlet)
 In case of REST I'd use axis2/rest URI path in the WSDL soap port
 (AxisRESTServlet)

 If you could also provide some basic info on the difference between REST
 and AXIS request processing, it w'd be very helpful


 thanks
 Chandru Ganesan
 HP Select Identity
 972.497.2403 (Work)
 3000 Waterview Pkwy
 Richardson TX 75080


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




Re: Question : Turning Off XSD Validation in Axis 2

2007-10-09 Thread Martin Gainty
Please display wsdl

Thanks/
M-
  - Original Message - 
  From: Ritesh Tarway 
  To: axis-user@ws.apache.org 
  Sent: Tuesday, October 09, 2007 9:17 PM
  Subject: Re: Question : Turning Off XSD Validation in Axis 2


  schema as defined in wsdl types. it contains definition for input and output 
of the web service method.

  ideally I would want to validate only the payload in soap request against an 
XSD file. 

  Is there any other way I can validate ? 


  On 10/9/00, Martin Gainty [EMAIL PROTECTED] wrote:
Ritesh-

Which schema are you validating with?
Also which schemaLocation are you pointing to ?

M--
- Original Message -
From: robert lazarski  [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, October 09, 2007 8:41 AM
Subject: Re: Question : Turning Off XSD Validation in Axis 2 


 Look at the xmlbeans api for the validate() method. For example:

 XmlError error =
 validateSolicitacaoProcedimentoDocument(solicitacaoProcedimentoDocument);
 if (error != null) { 
 throw new Exception(Objeto
 solicitacaoDemonstrativoRetornoDocument 
 + is invalid: 
 + error);
 }

 public static XmlError validateSolicitacaoProcedimentoDocument (

br.gov.ans.www.tiss.ws.tipos.tisssolicitacaoprocedimento.SolicitacaoProcedim
entoDocument
solicitacaoProcedimentoDocument) { 
// Create an XmlOptions instance and set the error listener.
XmlOptions validateOptions = new XmlOptions();
ListXmlError errorList = new ArrayListXmlError();
validateOptions.setErrorListener(errorList);
if (!solicitacaoProcedimentoDocument.validate(validateOptions)) {
for (int i = 0; i  errorList.size(); i++) {
XmlError error = (XmlError)errorList.get(i); 
System.out.println(Object solicitacaoProcedimentoDocument

+ is invalid, 
+ The following field is empty: ); 
System.out.println(\n);
System.out.println(Error Message:  +
 error.getMessage() + \n);
System.out.println(Location of invalid XML:  
+ error.getCursorLocation().xmlText() + \n);
}
return errorList.get(0);
}
System.out.println(solicitacaoProcedimentoDocument seems to be 
 valid\n);
return null;
}

 Not exactly pretty, but xmlbeans has the unique advantage that it has
 arguably 100% xml schema compliance - the only databinding in axis2 
 that does. It also is arguably the most stable api. In alot of cases,
 in axis2 its the only choice.

 The disadvantage is slightly slower performance, though still very
 good compared to axis1,  an awkward api, etc. 

 HTH,
 Robert

 On 10/9/07, Ritesh Tarway [EMAIL PROTECTED] wrote:
  I tested it and actually found that none of bindings enforce full 
schema 
  validation. So the issue is 2-fold,
  1. There should be a schema validation which can be turned on during
  testing.
  2. Schema validation can be turned off during production without any 
code
  change in web service, preferably with same set of modules as used in
test
  machines.
 
  As far as manual validation is concerned , I can write custom code
inside 
  the service to validate it against any schema. but that is not what I
want.
 
  I am going through your module for jibx and probably would use that.
Thanks
  for pointers. 
 
 
  On 10/9/07, Dennis Sosnoski [EMAIL PROTECTED] wrote:
   Hi Ritesh,
  
   I'm surprised to see this, since as I said in my prior email XMLBeans 
   does very little in the way of schema validation by default. You can
   manually validate the data, but unless the generated code includes the
   validation I don't know why you'd be running into problems. 
  
   What kind of error are you getting?
  
 - Dennis
  
   --
   Dennis M. Sosnoski
   SOA and Web Services in Java 
   Axis2 Training and Consulting
   http://www.sosnoski.com - http://www.sosnoski.co.nz
   Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 
  
  
  
   Ritesh Tarway wrote:
Unluckily my service has been generated using wsdl2java tool with
  xmlbeans
bindingso xsd validation will be turned on. 
alright.i think there is some 3rd party custom module to turn
off
validation if i use jibx bindingis there any such thing for xml
  beans??

   
On 10/8/07, Thilina Gunarathne [EMAIL PROTECTED] wrote:
   
Hi,
AFAIK Axis2 does not do any XSD validation 

Re: SOAP vs REST request

2007-10-09 Thread keith chapman
Hi,

If you are using the Axis2 1.3 release (If your not better upgrade to that)
you wouldnt fine a seperate RESTServlet. both REST and SOAP request are
handled by the same servlet now. Also as a newbie if you want to have better
REST support I'd advice you to deploy your service via a WSDL 2.0 document
(If you need help I can help you on that), cause WSDL 2.0 HTTPBinding gives
you full control of the request URI.

Thanks,
Keith.

On 10/10/07, Ganesan, Chandru [EMAIL PROTECTED] wrote:


 Hi

 I'm newbie to Axis, so pardon my rudimentary question?

 What factors should I consider before choosing between  REST vs SOAP
 request processing in Axis 2.0?
 In case of SOAP I'd use axis2/services URI path in the WSDL soap port
 (AxisServlet)
 In case of REST I'd use axis2/rest URI path in the WSDL soap port
 (AxisRESTServlet)

 If you could also provide some basic info on the difference between REST
 and AXIS request processing, it w'd be very helpful


 thanks
 Chandru Ganesan
 HP Select Identity
 972.497.2403 (Work)
 3000 Waterview Pkwy
 Richardson TX 75080


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




-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Re: SOAP vs REST request

2007-10-09 Thread Demetris G


And I second Rajith's response below ... I am surprised that some people
actually found articles about this comparison that does not seem to be
at the same level .. messaging vs a SOA architecture ...

Interesting ...

Rajith Attapattu wrote:

Sorry to say but the article listed below is very misleading.
Comparing REST vs SOAP is the same as apples vs oranges.
REST is an architectural style while SOAP is just a message format.
REST vs WS-* or SOA in general is a more meaningful comparison.
All though there are quite a few folks who think REST is one way to 
realize SOA.


For most folks REST means XML over HTTP/GET which is not correct at all.
Read this blog post by Sanjiva 
http://www.bloglines.com/blog/sanjiva?id=227 to get a more balanced view.


It is important to understand that in order for your service to be 
RESTful your service needs to obey the REST constraints.
Flipping the switch disableREST doesn't make your service RESTful or 
not. All it does is to change the message format from POX to SOAP.
You have a greater responsibility to ensure that you design your 
service in such a way that it obeys the REST constraints.


Regards,

Rajith Attapattu.
Red Hat.

On 10/9/07, *Ganesan, Chandru* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



Hi

I'm newbie to Axis, so pardon my rudimentary question?

What factors should I consider before choosing between  REST vs SOAP
request processing in Axis 2.0?
In case of SOAP I'd use axis2/services URI path in the WSDL soap port
(AxisServlet)
In case of REST I'd use axis2/rest URI path in the WSDL soap port
(AxisRESTServlet)

If you could also provide some basic info on the difference
between REST
and AXIS request processing, it w'd be very helpful


thanks
Chandru Ganesan
HP Select Identity
972.497.2403 (Work)
3000 Waterview Pkwy
Richardson TX 75080


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




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



Re: [AXIS2] Unwrapped adb question

2007-10-09 Thread Amila Suriarachchi
the response only is unwrapped if it has exactly one argument.
i.e if the response complex type has only one element.

Amila,


On 10/9/07, Lorenzo [EMAIL PROTECTED] wrote:

 Hi all,

 i generate and compile unrapped adb stubs from wsdl.

 Now i can call methods passing direcly my api object and not wrapped,
 but it still return wrapped one... i saw some samples code and it should
 return unrapped object... maybe i use wrong options in stub generation?

 I did this:

 java classname=org.apache.axis2.wsdl.WSDL2Java fork=true
   arg value=-d/
   arg value=adb/
   arg value=-o/
   arg value=${build}/src_stub/
   arg value=-uri/
   arg
 value=${appServer_url}/openspcoopRegistroServiziSearch/Search?wsdl/
   arg value=-uw/
   classpath
 fileset dir=${libs_openspcoop}/
   /classpath
 /java

 Then i compile and use them:


 SearchStub locator = new SearchStub(location);
 SearchStub.AccordoServizio accServ =
   locator.getAccordoServizio((String) nomeAccordo);



 locator.getAccordoServizio should return my lib AccordoServizio and not
 wrapped SearchStub.AccordoServizio...


 What i have to do?

 Thx,
 Lorenzo






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




-- 
Amila Suriarachchi,
WSO2 Inc.


RE: [Axis2] How to remove namespaces from SOAP response in Axis2

2007-10-09 Thread Raghu Upadhyayula
Thanks Alick.  I haven't tried this option.  I'll try and see.

 

Thanks

Raghu

 



From: Alick Buckley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 09, 2007 5:03 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] How to remove namespaces from SOAP response in
Axis2

 

Did you try the suppress-prefixes option in WSDL2Java?

http://svn.apache.org/viewvc?view=revrevision=480336
http://svn.apache.org/viewvc?view=revrevision=480336 

Fix for AXIS2-1784 - [ADB] Suppress prefixes in the soap
request/response for performance

https://issues.apache.org/jira/browse/AXIS2-1784
https://issues.apache.org/jira/browse/AXIS2-1784 

added an option -sp to suppress namespace prefixes in
WSDL2Java/SchemaCompiler.


===

-Original Message-
From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 October 2007 9:54 AM
To: axis-user@ws.apache.org
Subject: [Axis2] How to remove namespaces from SOAP response in Axis2

Hi,

 

Does anyone know how to remove namespaces from SOAP response in
Axis2?

 

Here is an example of what I wanted.

 

Original SOAP Envelope

 

soapenv:Envelope

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

   soapenv:Body

  ns1:loginResponse xmlns:ns1=urn:ws.rsys.com


ns1:loginReturn-31853ad2:1157fefd8cf:5b3c/ns1:loginReturn

  /ns1:loginResponse

   /soapenv:Body

/soapenv:Envelope

 

SOAP Envelope After removing namespaces

 

soapenv:Envelope

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

xmlns=urn:ws.rsys.com

   soapenv:Body

  loginResponse

 loginReturn-31853ad2:1157fefd8cf:5b3c/loginReturn

  /loginResponse

   /soapenv:Body

/soapenv:Envelope

 

Thanks in advance

Raghu



int array type is not recognized in .Net client (AXIS2)

2007-10-09 Thread harsha kilangodi
Hi all,
  We have deployed webservices using AXIS 2.0.We are facing problems in .NET 
client which is unable to recognise the int Array type. Once the stubs are 
generated (Reference.cs file ) in the .NET client we have tried to assign int[] 
to one of the request parameters. But it is giving compile time error saying 
Cannot implicitly convert int[] to int?[].
   
  Please help us to solve this problem 
   
  Regards 
  harsha

   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 

Re: Peculiar Issue while testing a service

2007-10-09 Thread Amila Suriarachchi
this request does not have any productID (the new manadatory field you have
added)

it has

testsimpleTest Simple/testsimple
   testTest/test
   LoanPreference xmlns=
  LoanAmt34546.78/LoanAmt
  LoanTerm1/LoanTerm
  PaymentProtection02/PaymentProtection
  PaymentBreak0/PaymentBreak
  Purpose01/Purpose
   /LoanPreference

I guess this testsimple and test elements are wrong elements.

Can you test with Axis2 1.3 and send the whole stack trace?

Amila.



On 10/9/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED]
wrote:

 Hi,

 I am reporting a peculiar issue which i am facing since yesterday working
 with AXIS2 1.2. Addition of an extra simple element to an existing complex
 type of an xsd throws an Un Expected Element error. Following is the
 brief.

 The current set up : Working Fine.

 The complext type part of my xsd
 xsd:complexType name=GEM_Ln_LoanRequestDetails
 xsd:sequence
 xsd:element name=LoanPreference
 type=GEM_Ln_LoanPreference/
 xsd:element name=CustomerDetails
 type=GEM_Ln_CustomerDetails/
 xsd:element name=CustomerAddr
 type=GEM_Ln_CustomerAddr/
 xsd:element name=EmployerDetails
 type=GEM_Ln_EmployerDetails/
 xsd:element name=CustomerFinances
 type=GEM_Ln_CustomerFinances/
 xsd:element name=CardDetails
 type=GEM_Ln_CardDetails minOccurs=0/
 xsd:element name=LoanDetails
 type=GEM_Ln_LoanDetails minOccurs=0/
 /xsd:sequence
 /xsd:complexType

 I used a wsdl, generated binding ( ADB ) classes using WSDL to Java tool
 on Axis2 1.2. Using the build.xml, running the jar.server task i created
 the services.aar and deployed on tomcat. Created a sample java class,
 which reads a sample loan request xml ( formed using IDE based on the xsd )
 and submits a request to the service.
 Every thing works fine, i get the response as i coded within the skeleton
 method. This looks fine end to end.

 Change to the existing schema: : Not Working

 xsd:complexType name=GEM_Ln_LoanRequestDetails
 xsd:sequence
 xsd:element name=ProductId type=xsd:string/
 xsd:element name=LoanPreference
 type=GEM_Ln_LoanPreference/
 xsd:element name=CustomerDetails
 type=GEM_Ln_CustomerDetails/
 xsd:element name=CustomerAddr
 type=GEM_Ln_CustomerAddr/
 xsd:element name=EmployerDetails
 type=GEM_Ln_EmployerDetails/
 xsd:element name=CustomerFinances
 type=GEM_Ln_CustomerFinances/
 xsd:element name=CardDetails
 type=GEM_Ln_CardDetails minOccurs=0/
 xsd:element name=LoanDetails
 type=GEM_Ln_LoanDetails minOccurs=0/
 /xsd:sequence
 /xsd:complexType

 I have a need to add new field to hold a product id. after this, i
 generated the binding classes again ( to make sure, i deleted all the
 existing classes, and re generated every thing ). Then did the same
 procedure as above to generated the services.aar, then created the sample
 java class callling the stub. Changed the sample xml file to add a product
 id tag and then executed the program. This time un expectedley i get the Un
 expected sub element Product Id error repeatedly.

 Not sure what is the problem, this looks to be simple. I tried various
 combinations adding a test tag, then making product id a simple type etc
 etc. Any idea why this occurs. I made sure, i replaced the correct
 services.aar on the server. The new resource folder generated second time,
 properly refers to the product id which was included.

 Just as a work around, i tested with some sample test and test simple
 tags, observed the xml input on TCP Monitor. For your reference attached is
 the request and response xmls from the monitory. Observe for the test and
 testsimple tags. The actual loan request xml read by my program is also
 attached for reference.

 Response.txt  Request.txt  LnRq.xml

 Cheers
 -Natraj.





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




-- 
Amila Suriarachchi,
WSO2 Inc.