Re: Periodic query of client

2008-09-02 Thread Michael Sutter

Hello Keith,

thanks for your hint. It seems that the reuse solves my problems.
Also thanks for the link, by searching I found nothing which seems
to solve my problem, but the link is very useful for my development .

Kind regards
Michael

keith chapman wrote:

Hi Michael,

I think I gave you a reply on a different thread. But as you have
specified your client code here its more clearer to me now. In this
scenario it might help if you set the following property [1],

stub._getServiceClient().getOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT,
true);

Thanks,
Keith.

[1] http://wso2.org/library/230#REUSE_HTTP_CLIENT

On Thu, Aug 28, 2008 at 10:23 PM, Michael Sutter
<[EMAIL PROTECTED]> wrote:
  

Hello list,

I have a strange problem with a Axis2 service and the corresponding client
and maybe somebody
can help me understanding what I'm doing wrong.

I have a status service implemented with Axis2C running under a tomcat and
the corresponding Java
client for accessing the service. The java client is called every ten
seconds from a thread and I can
access the service without any problems.

The problem is when the thread is running for some hours - normally between
two or four I got a AxisFault
with the message: Too many open files. First I thought that the service is
implemented wrong, but this isn't
the problem. I monitored the client and there I saw that on the client side
the number of open files increases.

The thread is implemented as follows:
//instantiate the stub for the service
statusStub = new Stub(..);

after that I query the service every ten seconds until a boolean is set to
false from outside
while (!bStopThread) {
   resp = statusStub.getStatus();
   staResp = resp.get_return();
   Thread.currentThread().sleep(lStatusQueryTime);
}

When I do this I can monitor that the number of open files increases and so
I get the AxisFault
after some hours of runtime.

Have I done something wrong in my code? Have I to release some objects or to
instantiate the stub
for every request? I don't understand whats my error.

Kind regards
Michael






  


Re: Periodic query of client

2008-09-02 Thread keith chapman
Hi Michael,

Nice to hear that you solved your issue. You cant find quite a few articles
on wso2.org which relate to Axis2/Java as well as Axis2/C

Thanks,
Keith.

On Tue, Sep 2, 2008 at 2:42 PM, Michael Sutter <[EMAIL PROTECTED]>wrote:

>  Hello Keith,
>
> thanks for your hint. It seems that the reuse solves my problems.
> Also thanks for the link, by searching I found nothing which seems
> to solve my problem, but the link is very useful for my development .
>
> Kind regards
> Michael
>
>
> keith chapman wrote:
>
> Hi Michael,
>
> I think I gave you a reply on a different thread. But as you have
> specified your client code here its more clearer to me now. In this
> scenario it might help if you set the following property [1],
>
> stub._getServiceClient().getOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT,
> true);
>
> Thanks,
> Keith.
>
> [1] http://wso2.org/library/230#REUSE_HTTP_CLIENT
>
> On Thu, Aug 28, 2008 at 10:23 PM, Michael Sutter<[EMAIL PROTECTED]> <[EMAIL 
> PROTECTED]> wrote:
>
>
>  Hello list,
>
> I have a strange problem with a Axis2 service and the corresponding client
> and maybe somebody
> can help me understanding what I'm doing wrong.
>
> I have a status service implemented with Axis2C running under a tomcat and
> the corresponding Java
> client for accessing the service. The java client is called every ten
> seconds from a thread and I can
> access the service without any problems.
>
> The problem is when the thread is running for some hours - normally between
> two or four I got a AxisFault
> with the message: Too many open files. First I thought that the service is
> implemented wrong, but this isn't
> the problem. I monitored the client and there I saw that on the client side
> the number of open files increases.
>
> The thread is implemented as follows:
> //instantiate the stub for the service
> statusStub = new Stub(..);
>
> after that I query the service every ten seconds until a boolean is set to
> false from outside
> while (!bStopThread) {
>resp = statusStub.getStatus();
>staResp = resp.get_return();
>Thread.currentThread().sleep(lStatusQueryTime);
> }
>
> When I do this I can monitor that the number of open files increases and so
> I get the AxisFault
> after some hours of runtime.
>
> Have I done something wrong in my code? Have I to release some objects or to
> instantiate the stub
> for every request? I don't understand whats my error.
>
> Kind regards
> Michael
>
>
>
>


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

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


Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread StrongSteve

Hi Everybody!

I have currently developed a simple Axis handler, that logs all
incoming/outgoing messages to files on the local HDD.

Here is my current code:

@Override
public InvocationResponse invoke(MessageContext arg0) throws AxisFault {

logger.debug("entering invoke");

SOAPEnvelope env = arg0.getEnvelope();   

String fileName = this.MESSAGE_LOGGING_DIR + this.FILE_PRAEFIX 
+ new
Date().getTime() +".xml";

try {
File msgFile = new File(fileName);
FileWriter out = new FileWriter(msgFile);
out.write(env.toString());
out.close();
} catch (IOException ioex) {
logger.error(ioex.getMessage());
}

return InvocationResponse.CONTINUE;
}


Unfortunately this code fails as soon as I send attachments. In this case,
the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an OutOfMemory
Exception as not the whole SOAPEnvelope can be read into the memory.

Does anyone have a solution or a hint on how to achive this goal with a
Streaming approach?

Thanks in Advance for both your time and your knowledge!

Greetings
Stefan
-- 
View this message in context: 
http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread keith chapman
Does it happen when you performSOAPEnvelope env =
arg0.getEnvelope(); or  env.toString(). Ithink it should be at the later
cause env.toString() would cause the whole message to be read into memory.
May be you can try env.serialize(out); instead of out.write(env.toString());

Thanks,
Keith.

On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve <[EMAIL PROTECTED]> wrote:

>
> Hi Everybody!
>
> I have currently developed a simple Axis handler, that logs all
> incoming/outgoing messages to files on the local HDD.
>
> Here is my current code:
>
> @Override
>public InvocationResponse invoke(MessageContext arg0) throws
> AxisFault {
>
>logger.debug("entering invoke");
>
>SOAPEnvelope env = arg0.getEnvelope();
>
>String fileName = this.MESSAGE_LOGGING_DIR +
> this.FILE_PRAEFIX + new
> Date().getTime() +".xml";
>
>try {
>File msgFile = new File(fileName);
>FileWriter out = new FileWriter(msgFile);
>out.write(env.toString());
>out.close();
>} catch (IOException ioex) {
>logger.error(ioex.getMessage());
>}
>
>return InvocationResponse.CONTINUE;
>}
>
>
> Unfortunately this code fails as soon as I send attachments. In this case,
> the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an OutOfMemory
> Exception as not the whole SOAPEnvelope can be read into the memory.
>
> Does anyone have a solution or a hint on how to achive this goal with a
> Streaming approach?
>
> Thanks in Advance for both your time and your knowledge!
>
> Greetings
> Stefan
> --
> View this message in context:
> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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


Re: Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread StrongSteve

I am not quite sure where the exception occurs, but your approach with
env.serialize(out) does not work either... :(



keith chapman wrote:
> 
> Does it happen when you performSOAPEnvelope env =
> arg0.getEnvelope(); or  env.toString(). Ithink it should be at the later
> cause env.toString() would cause the whole message to be read into memory.
> May be you can try env.serialize(out); instead of
> out.write(env.toString());
> 
> Thanks,
> Keith.
> 
> On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi Everybody!
>>
>> I have currently developed a simple Axis handler, that logs all
>> incoming/outgoing messages to files on the local HDD.
>>
>> Here is my current code:
>>
>> @Override
>>public InvocationResponse invoke(MessageContext arg0) throws
>> AxisFault {
>>
>>logger.debug("entering invoke");
>>
>>SOAPEnvelope env = arg0.getEnvelope();
>>
>>String fileName = this.MESSAGE_LOGGING_DIR +
>> this.FILE_PRAEFIX + new
>> Date().getTime() +".xml";
>>
>>try {
>>File msgFile = new File(fileName);
>>FileWriter out = new FileWriter(msgFile);
>>out.write(env.toString());
>>out.close();
>>} catch (IOException ioex) {
>>logger.error(ioex.getMessage());
>>}
>>
>>return InvocationResponse.CONTINUE;
>>}
>>
>>
>> Unfortunately this code fails as soon as I send attachments. In this
>> case,
>> the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an
>> OutOfMemory
>> Exception as not the whole SOAPEnvelope can be read into the memory.
>>
>> Does anyone have a solution or a hint on how to achive this goal with a
>> Streaming approach?
>>
>> Thanks in Advance for both your time and your knowledge!
>>
>> Greetings
>> Stefan
>> --
>> View this message in context:
>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
> 
> blog: http://www.keith-chapman.org
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread keith chapman
Oh this is because env.serialize will still build the axiom object model for
you.  env.serializeAndConsume can do the trick (serializes the message
without building the object model) but the issue is that it will also
consume the stream. May be you can try this as a workaround.

Have you enabled file caching on the server? you can do this by setting the
following properties in the axis2.xml

optional
true
work/mtom
4000

This will write the attachments which are large in size to the file system.

Thanks,
Keith.

On Tue, Sep 2, 2008 at 4:08 PM, StrongSteve <[EMAIL PROTECTED]> wrote:

>
> I am not quite sure where the exception occurs, but your approach with
> env.serialize(out) does not work either... :(
>
>
>
> keith chapman wrote:
> >
> > Does it happen when you performSOAPEnvelope env =
> > arg0.getEnvelope(); or  env.toString(). Ithink it should be at the later
> > cause env.toString() would cause the whole message to be read into
> memory.
> > May be you can try env.serialize(out); instead of
> > out.write(env.toString());
> >
> > Thanks,
> > Keith.
> >
> > On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve <[EMAIL PROTECTED]>
> wrote:
> >
> >>
> >> Hi Everybody!
> >>
> >> I have currently developed a simple Axis handler, that logs all
> >> incoming/outgoing messages to files on the local HDD.
> >>
> >> Here is my current code:
> >>
> >> @Override
> >>public InvocationResponse invoke(MessageContext arg0) throws
> >> AxisFault {
> >>
> >>logger.debug("entering invoke");
> >>
> >>SOAPEnvelope env = arg0.getEnvelope();
> >>
> >>String fileName = this.MESSAGE_LOGGING_DIR +
> >> this.FILE_PRAEFIX + new
> >> Date().getTime() +".xml";
> >>
> >>try {
> >>File msgFile = new File(fileName);
> >>FileWriter out = new FileWriter(msgFile);
> >>out.write(env.toString());
> >>out.close();
> >>} catch (IOException ioex) {
> >>logger.error(ioex.getMessage());
> >>}
> >>
> >>return InvocationResponse.CONTINUE;
> >>}
> >>
> >>
> >> Unfortunately this code fails as soon as I send attachments. In this
> >> case,
> >> the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an
> >> OutOfMemory
> >> Exception as not the whole SOAPEnvelope can be read into the memory.
> >>
> >> Does anyone have a solution or a hint on how to achive this goal with a
> >> Streaming approach?
> >>
> >> Thanks in Advance for both your time and your knowledge!
> >>
> >> Greetings
> >> Stefan
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > Keith Chapman
> > Senior Software Engineer
> > WSO2 Inc.
> > Oxygenating the Web Service Platform.
> > http://wso2.org/
> >
> > blog: http://www.keith-chapman.org
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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


WSDL for attachments and WSDL2Java

2008-09-02 Thread Ian Ashley
I am trying to create a WSDL for sending attachments that works with
WSDL2Java from Axis1 and Axis2. The following WSDL works fine with WSDL2Java
from Axis1 but fails with Axis2 reporting

[ERROR] More than one part for message GetAssetSoapOut
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingExcept
ion: More than one part for message GetAssetSoapOut

Does anyone know either what I would need to change to make the WSDL work
with Axis1 and 2 or if there is an example anywhere (I have tried to find
one but failed)?



http://schemas.xmlsoap.org/wsdl/";
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
  xmlns:s="http://www.w3.org/2001/XMLSchema";
  xmlns:tns="~/WebServices/"
  targetNamespace="~/WebServices/">



















































































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



































http://localhost:8080/axis/services/VersionCueService"/>




Thanks in advance,
Ian



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



Re: Axis2 Web App on Geronimo?

2008-09-02 Thread jcaristi

Hi Keith:  

I did verify that commons-fileupload-1.2.jar is present in the war and the
missing class is present in the jar.  I used Axis 1.4.1 and tried to deploy
it to Geronimo 2.1.2.  I set JAVA_OPTS to -Xmx512m to try to deal with the
memory condition (this worked).

When I try to deploy, I get a warning that there isn't any Geronimo
deployment plan in the war.  Then I see more than 10,000 lines of errors
scroll by on the Geronimo console and at the end I get the same
NoClassDefFoundError as before.  The errors that scroll by all seem to be
like the one copied below, with a different class listed each time.  I have
also attached a copy of my Geronimo log file.

Thanks, 

Joe 

java.lang.Exception: Could not load
1/0/com/sun/xml/xsom/parser/AnnotationParser.class
at
org.apache.xbean.finder.ClassFinder.readClassDef(ClassFinder.java:695)
at org.apache.xbean.finder.ClassFinder.(ClassFinder.java:139)
at
org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServices(WARWebServiceFinder.java:154)
at
org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverPOJOWebServices(AdvancedWARWebServiceFinder.java:73)
at
org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverWebServices(AdvancedWARWebServiceFinder.java:45)
at
org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServices(WARWebServiceFinder.java:70)
at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServices(JAXWSServiceBuilder.java:97)
at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices(JAXWSServiceBuilder.java:80)
at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:364)
at
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext(TomcatModuleBuilder.java:330)
at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:159)
at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
at java.lang.Thread.run(Thread.java:595)



keith chapman wrote:
> 
> Hi,
> 
> The axis2.war contains commons-fileupload-1.2.jar in its lib. Can you try
> the 1.4.1 version please. Also do let us know how it goes ;)
> 
> Thanks,
> Keith.
> 
> On Thu, Aug 28, 2008 at 1:46 AM, jcaristi <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> I understand that Axis2 is integrated into Geronimo, but I could not find
>> the
>> Axis2 web app.
>>
>> Is it possible to deploy the web app to Geronimo?  I noticed multiple web
>> posts stating that this doesn't work (without any solutions).  It didn't
>> work for me either.  When I attempt to deploy the Axis2.war file, it
>> results
>> in an out-of-memory error.  It seems to have the following exception as a
>> root cause:
>>
>> java.lang.NoClassDefFoundError:
>> org/apache/commons/fileupload/FileUploadException
>>
>> Is this a supported configuration, or must we do without the Axis2 web
>> app
>> on Geronimo?
>> --
>> View this message in context:
>> http://www.nabble.com/Axis2-Web-App-on-Geronimo--tp19188874p19188874.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
> 
> blog: http://www.keith-chapman.org
> 
> 
http://www.nabble.com/file/p19269398/geronimo%2B-%2BCopy.log
geronimo+-+Copy.log 
-- 
View this message in context: 
http://www.nabble.com/Axis2-Web-App-on-Geronimo--tp19188874p19269398.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsub

Re: Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread Thilina Gunarathne
Also do u really need to log all the large attachments in your log file...
I would recommend logging only the SOAP part..

thanks,
Thilina

On Tue, Sep 2, 2008 at 7:07 AM, keith chapman <[EMAIL PROTECTED]>wrote:

> Oh this is because env.serialize will still build the axiom object model
> for you.  env.serializeAndConsume can do the trick (serializes the message
> without building the object model) but the issue is that it will also
> consume the stream. May be you can try this as a workaround.
>
> Have you enabled file caching on the server? you can do this by setting the
> following properties in the axis2.xml
>
> optional
> true
> work/mtom
> 4000
>
> This will write the attachments which are large in size to the file system.
>
>
> Thanks,
> Keith.
>
>
> On Tue, Sep 2, 2008 at 4:08 PM, StrongSteve <[EMAIL PROTECTED]> wrote:
>
>>
>> I am not quite sure where the exception occurs, but your approach with
>> env.serialize(out) does not work either... :(
>>
>>
>>
>> keith chapman wrote:
>> >
>> > Does it happen when you performSOAPEnvelope env =
>> > arg0.getEnvelope(); or  env.toString(). Ithink it should be at the later
>> > cause env.toString() would cause the whole message to be read into
>> memory.
>> > May be you can try env.serialize(out); instead of
>> > out.write(env.toString());
>> >
>> > Thanks,
>> > Keith.
>> >
>> > On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve <[EMAIL PROTECTED]>
>> wrote:
>> >
>> >>
>> >> Hi Everybody!
>> >>
>> >> I have currently developed a simple Axis handler, that logs all
>> >> incoming/outgoing messages to files on the local HDD.
>> >>
>> >> Here is my current code:
>> >>
>> >> @Override
>> >>public InvocationResponse invoke(MessageContext arg0) throws
>> >> AxisFault {
>> >>
>> >>logger.debug("entering invoke");
>> >>
>> >>SOAPEnvelope env = arg0.getEnvelope();
>> >>
>> >>String fileName = this.MESSAGE_LOGGING_DIR +
>> >> this.FILE_PRAEFIX + new
>> >> Date().getTime() +".xml";
>> >>
>> >>try {
>> >>File msgFile = new File(fileName);
>> >>FileWriter out = new FileWriter(msgFile);
>> >>out.write(env.toString());
>> >>out.close();
>> >>} catch (IOException ioex) {
>> >>logger.error(ioex.getMessage());
>> >>}
>> >>
>> >>return InvocationResponse.CONTINUE;
>> >>}
>> >>
>> >>
>> >> Unfortunately this code fails as soon as I send attachments. In this
>> >> case,
>> >> the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an
>> >> OutOfMemory
>> >> Exception as not the whole SOAPEnvelope can be read into the memory.
>> >>
>> >> Does anyone have a solution or a hint on how to achive this goal with a
>> >> Streaming approach?
>> >>
>> >> Thanks in Advance for both your time and your knowledge!
>> >>
>> >> Greetings
>> >> Stefan
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
>> >> Sent from the Axis - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > Keith Chapman
>> > Senior Software Engineer
>> > WSO2 Inc.
>> > Oxygenating the Web Service Platform.
>> > http://wso2.org/
>> >
>> > blog: http://www.keith-chapman.org
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>



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


Re: changing the Http request URI

2008-09-02 Thread pierre betz
hi, so how can I do that ? :)


WebService Read Timed out

2008-09-02 Thread Tirumala Damacharla
 

Hi,

When number of users increased, we are getting the following error.

Please suggest me the solution for this.

 

^[[?6c[#|2008-09-02T15:17:21.470+0100|INFO|sun-appserver9.1|javax.enterp
rise.system.stream.out|_ThreadID=15;_ThreadName=httpSSLWorkerThread-2080
-3;|02/09/08 15:17:21.466 INFO  [httpSSLWorkerThread-2080-3]
(org.apache.axis2.transport.http.HTTPSender.sendViaPost:194) - Unable to
sendViaPost to
url[http://3.229.188.73:2080/PCADCSWeb/services/PCADCSWebService]

java.net.SocketTimeoutException: Read timed out

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(SocketInputStream.java:129)

at
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)

at
java.io.BufferedInputStream.read(BufferedInputStream.java:237)

at
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)

at
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)

at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.jav
a:1115)

at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon
nectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)

at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBa
se.java:1832)

at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase
.java:1590)

at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:995)

at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe
thodDirector.java:397)

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

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

at org.apache.comm

Thanks & Regards

_

Tirumala Damacharla

Capgemini Financial Services Strategic Business Unit

# 5, Software Units Layout, Madhapur, Hyderabad -  500 081, INDIA 
Office: +91 40 2312 5000 Extn: 28213
Mobile: +91 9848030699   / http://www.capgemini.com
   
Fax:+91 40 2312 5002

 



Web Services Addressing 1.0 - Metadata

2008-09-02 Thread Erwin Reinhoud
Hello All,
 
I am using the Web Services Addressing 1.0 - Metadata standard to define
the WS-Addressing action in the WSDL. This WSDL also contains the
SOAPAction in the binding. When the WSDL is consumed by axis2 to
generate the service  i notice that the SOAPAction (for request) is used
for the the actionMapping in the service.xml. Of course the service.xml
can be modified afterwards, but i am wondering why not the wsa:action in
the WSDL is used bij default. Is there a wsdl2java option that enables
this?
 
Thanks in advance.
 
Kind regards,
Erwin


RE: Strong types in Axis2 wsdl

2008-09-02 Thread Pugalia, Jai P (JP)
Hi Keith,
 
I tried your suggestion of updating the wsdl and including it in the
aar. (Also set the "useOriginalWSDL" parameter to true). However when I
make a web service call which returns the Field object, I get this
exception:
 
reason:org.apache.axis2.databinding.ADBException: Unexpected subelement

If I do not include the updated wsdl, then everything works properly. 

Any suggestions on what could be wrong? 

Thanks,

Jai




From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 01, 2008 9:25 PM
To: axis-user@ws.apache.org
Subject: Re: Strong types in Axis2 wsdl 

Hi,

You cannot get this into a auto generated WSDL.  The workaround for you
will be to save the auto generated WSDL, edit it to your needs and pack
it into the aar file and deploy the service in Axis2. You will need to
use restictions on your dataType in order to achieve this. Here is an
example of a WSDL that has restrictions
   [1]

Thanks,
Keith.

[1] http://mooshup.com/services/system/digit2image?wsdl2



On Tue, Sep 2, 2008 at 9:42 AM, Pugalia, Jai P (JP) <[EMAIL PROTECTED]>
wrote:


Hi Keith,

I have written the Java class and then generating the WSDL from
that.

The WSDL generates this:

   
   

 

   

   

   

   
   

I want to restrict the values of objectType to actual string
values like
"Array", "Structure" & "Table".

Thanks,
Jai


-Original Message-
From: keith chapman [mailto:[EMAIL PROTECTED]
Sent: Monday, September 01, 2008 9:41 AM
To: axis-user@ws.apache.org

Subject: Re: Strong types in Axis2 wsdl

Hi Jai,

Could you elaborate on what you mean by "Array" and "Structure"?
Do you
mean the string values "Array" and "Structure"? or the actual
structure
of an Array and Structure?

Thanks,
Keith.

On Thu, Aug 28, 2008 at 6:31 PM, Pugalia, Jai P (JP)
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have an Axis2 wsdl which exposes an ObjectType as
>
>  type="xs:string"/>
>
> I want to restrict the valid values to say "Array" and
"Structure". If

> I change the element to be an enumeration, it does not work as
looks
> like
> Axis2 does not support enumerations yet. Is there any other
way I can
> make this strongly typed in the wsdl.
>
> Thanks,
> Jai



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

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



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






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

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



Re: Strong types in Axis2 wsdl

2008-09-02 Thread keith chapman
Hi Jai,

Can you try using TCPMonitor and capture the messages in the two scenarios.
That would help figure out wats going on. You may use this link on how
TCPMonitor could be set up on Idea or
Eclipse.[1]

Thanks,
Keith.

[1]
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html
On Tue, Sep 2, 2008 at 9:35 PM, Pugalia, Jai P (JP) <[EMAIL PROTECTED]>wrote:

>  Hi Keith,
>
> I tried your suggestion of updating the wsdl and including it in the aar.
> (Also set the "useOriginalWSDL" parameter to true). However when I make a
> web service call which returns the Field object, I get this exception:
>
> *reason:org.apache.axis2.databinding.ADBException*: Unexpected subelement
>
> If I do not include the updated wsdl, then everything works properly.
>
> Any suggestions on what could be wrong?
>
> Thanks,
>
> Jai
>
>  --
> *From:* keith chapman [mailto:[EMAIL PROTECTED]
> *Sent:* Monday, September 01, 2008 9:25 PM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Strong types in Axis2 wsdl
>
>  Hi,
>
> You cannot get this into a auto generated WSDL.  The workaround for you
> will be to save the auto generated WSDL, edit it to your needs and pack it
> into the aar file and deploy the service in Axis2. You will need to use
> restictions on your dataType in order to achieve this. Here is an example
> of a WSDL that has 
> restrictions
> [1]
>
> Thanks,
> Keith.
>
> [1] http://mooshup.com/services/system/digit2image?wsdl2
>
>
> On Tue, Sep 2, 2008 at 9:42 AM, Pugalia, Jai P (JP) <[EMAIL PROTECTED]>wrote:
>
>> Hi Keith,
>>
>> I have written the Java class and then generating the WSDL from that.
>>
>> The WSDL generates this:
>>
>>
>>
>>  > nillable="true" type="xs:string"/>
>>> nillable="true" type="xs:string"/>
>>> nillable="true" type="xs:string"/>
>>> nillable="true" type="xs:string"/>
>>
>>
>>
>> I want to restrict the values of objectType to actual string values like
>> "Array", "Structure" & "Table".
>>
>> Thanks,
>> Jai
>>
>> -Original Message-
>> From: keith chapman [mailto:[EMAIL PROTECTED]
>> Sent: Monday, September 01, 2008 9:41 AM
>> To: axis-user@ws.apache.org
>>  Subject: Re: Strong types in Axis2 wsdl
>>
>> Hi Jai,
>>
>> Could you elaborate on what you mean by "Array" and "Structure"? Do you
>> mean the string values "Array" and "Structure"? or the actual structure
>> of an Array and Structure?
>>
>> Thanks,
>> Keith.
>>
>> On Thu, Aug 28, 2008 at 6:31 PM, Pugalia, Jai P (JP)
>> <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> >
>> > I have an Axis2 wsdl which exposes an ObjectType as
>> >
>> > > > type="xs:string"/>
>> >
>> > I want to restrict the valid values to say "Array" and "Structure". If
>>
>> > I change the element to be an enumeration, it does not work as looks
>> > like
>> > Axis2 does not support enumerations yet. Is there any other way I can
>> > make this strongly typed in the wsdl.
>> >
>> > Thanks,
>> > Jai
>>
>>
>>
>> --
>> Keith Chapman
>> Senior Software Engineer
>> WSO2 Inc.
>> Oxygenating the Web Service Platform.
>> http://wso2.org/
>>
>> blog: http://www.keith-chapman.org
>>
>> -
>> 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]
>>
>>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>



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

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


RE: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found

2008-09-02 Thread Moni
Here is the wsdl file.  Any inputs on resolving this will be much appreciated.
 
Thanks,
 
Monisha


--- On Mon, 9/1/08, Martin Gainty <[EMAIL PROTECTED]> wrote:

From: Martin Gainty <[EMAIL PROTECTED]>
Subject: RE: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the 
Operation not found
To: axis-user@ws.apache.org
Date: Monday, September 1, 2008, 6:21 PM




#yiv1835264586 .hmmessage P
{
margin:0px;padding:0px;}
#yiv1835264586 {
FONT-SIZE:10pt;FONT-FAMILY:Tahoma;}

please supply wsdl

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 

> 
> 
> I deployed a web service on axis2 and when I write web service client to
> invoke and test the web service, I get the following exception. Any inputs
> on resolving this will be much appreciated.
> 
> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
> not f
> ound is /axis2/services/wsInsertDB and the WSA Action = null
> at
> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
> se.java:89)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
> at
> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
> il.java:136)
> at
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
> til.java:130)
> at
> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
> essURLRequest(AxisServlet.java:829)
> at
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
> 5)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:191)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:286)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :845)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ss(Http11Protocol.java:583)
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
> 7)
> at java.lang.Thread.run(Thread.java:619)
> [ERROR] The endpoint reference (EPR) for the Operation not found is
> /axis2/servi
> ces/wsInsertDB/ and the WSA Action = null
> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
> not f
> ound is /axis2/services/wsInsertDB/ and the WSA Action = null
> at
> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
> se.java:89)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
> at
> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
> il.java:136)
> at
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
> til.java:130)
> at
> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
> essURLRequest(AxisServlet.java:829)
> at
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
> 5)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:191)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:286)
> at
> org.apache.coyote.http11.Http11Processo

Re: Hot update: Too Many Open Files

2008-09-02 Thread Talbott, Thomas
Hello Martin,

Forgive me, but I am having a hard time figuring out what your are
responding to.  Must be the long weekend...

What exactly do you intend these to be applied to?  The temporary files?

Personally, I still think we are dealing with a leak of class loaders
(aren't being cleaned up when they are no longer in use).  In the case of
Steve, it is likely a similar issue.  The only difference is that when he
shuts down, there is still no cleanup of the class loaders.

-Tom


On 8/29/08 6:36 PM, "Martin Gainty" <[EMAIL PROTECTED]> wrote:

> set sticky bit off so other users (other than root) can access
> chmod chmod [OPTION]... MODE[,MODE]... FILE...
> http://linux.die.net/man/1/chmod
>
> chown --from=CURRENT_OWNER:CURRENT_GROUP file
> http://linux.die.net/man/1/chown
>
> if the file is located on linux extended file use
> chattr [ -RV ] [ -v version ] [ mode ] files...
> http://linux.die.net/man/1/chattr
>
> Martin
>
> __
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official business
> of Sender. This transmission is of a confidential nature and Sender does not
> endorse distribution to any party other than intended recipient. Sender does
> not necessarily endorse content contained within this transmission.
>
>
>> From: [EMAIL PROTECTED]
>> To: axis-user@ws.apache.org
>> Date: Fri, 29 Aug 2008 21:04:25 -0400
>> Subject: Re: Hot update: Too Many Open Files
>>
>> Hello Steve,
>>
>> We are not running under VMWare. I would say that our situation is similar,
>> but not the same. In your previous messages you say:
>>
>> ³A new set gets generated each time I restart Tomcat. On my Windows XP
>> system, these are deleted each time Tomcat stops, but not on our Linux
>> (CentOS) systems.²
>>
>> In our case, we are trying to deploy without restarting Tomcat. We have the
>> following set in axis2.xml:
>>
>> true
>> true
>>
>> When we copy the updated aar file into the WEB-INF/services directory of the
>> axis2 webapp, temporary files are created in the work directory. The next
>> time we update aar file, more files are created in the work directory. When
>> I shutdown tomcat, the files ARE cleaned up. But, if I don't shutdown
>> tomcat, file handles are left open for every one of these temporary files!
>> So, soon, we run out of file handles.
>>
>> As I mentioned in my original message, we want to do this for staging and we
>> are not looking for this to be a production solution. As far as I can tell,
>> we should be able to shutdown tomcat, deploy the aar, and restart tomcat in
>> production without the problems you are seeing. We may just need to resort
>> to the same solution in production.
>>
>> It would seem, given our joint experience, that there is an issue with the
>> the temporary files used for deployment and update. Given what Deepal says:
>>
>> "Yes , Axis2 creates temp files from your services and modules , and
>> create a class loader from that. In that way we can ensure better
>> performance. This help us a lot when we have service aar or mar with
>> third party library inside it."
>>
>> It would appear that there is an issue with the class loader that is
>> created. In the "update" scenario, I wonder if the class loaders are
>> leaking (old class loaders not going away) after a service is updated.
>> Current evidence for this is that my files do eventually get cleaned up and
>> I assume that the class loader is doing this once it finally goes away.
>> But, there may be some management process that is responsible for this. I
>> have not looked into the code.
>>
>> Anyone with insight into this?
>>
>> Thanks,
>> -Tom
>>
>> On 8/29/08 2:22 PM, "[EMAIL PROTECTED]"
>> <[EMAIL PROTECTED]> wrote:
>>
>>> Thomas,
>>>
>>> This is very similar to two threads I started, one in May ("cached archive
>>> files not deleted") and one in July ("Axis2 work files not deleted").
>>>
>>> I did not here reports from anyone else experiencing this. Particularly
>>> interesting because our environment is similar:
>>> Tomcat 5.5.17
>>> CentOS 4.3
>>> Axis2 1.3
>>>
>>> Are you by any chance running your OS under VMWare??
>>>
>>> Anyway, the solution (or workaround) is to deploy your web services and
>>> modules as an exploded directory structure rather than an AAR or MAR
>>> archive. One of the posts in the second thread has more details.
>>>
>>> - Steve
>>>
>>> __
>>> Steve Gruverman, Programmer
>>> IntelliCare, Inc. | A Medco Health Solutions Company
>>>
>>> 500 Southborough Drive | South Portland ME 04106
>>>
>>>
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>
> Be the filmmaker you always wanted to be—learn how to burn a DVD with
> Windows®. Make your smash hit
> 



Re: Axis2 REST client and server questions (Data bindings, Headers, Performance)

2008-09-02 Thread Nick Steel

I have now generated the httpbindings using wsdl2java with a version 2.0 wsdl
and the operation has been added to the EPR as desired and I can do POST
getGigsIn("London"), POST getMostActiveArtist() and GET
getMostActiveArtist() without any problems which is great.  The headers for
both GET and POST are also now the same (see below) which makes a lot more
sense to me.
Content-Type: application/xml; charset=UTF-8
SOAPAction: ""


However, when I try to do GET getGigsIn("London") I get the error
unknown.  The request according to TCPmon is:
GET
/NicksGigs-war-Axis2/services/GigListingsService/NicksGigsServiceV2/getGigsIn
HTTP/1.1
Content-Type: application/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 10.4.39.241:8089

The operation is there in the URL but the parameter "London" is not so it's
obviously not going to work.  I was expecting something more like
GET
/NicksGigs-war-Axis2/services/GigListingsService/NicksGigsServiceV2/getGigsIn?city=London
HTTP/1.1 

Whats going wrong here?

Also, just to see what would happen, I tried to make some httpbindings using
a version 1.1 wsdl but the generated stub had methods like void getGigsIn()
and void getMostActiveArtist() which don't take or return any values so I
couldn't work out how I could possibly use them.  Is this normal or is this
the reason you said to use a version 2.0 wsdl?

Cheers,
Nick


keith chapman wrote:
> 
> On Tue, Sep 2, 2008 at 2:11 AM, Nick Steel
> <[EMAIL PROTECTED]> wrote:
>>
>> Keith,
>>
>> I had no idea ?wsdl2 even existed,
> 
> Axis2 supports both WSDL 1.1 and WSDL 2.0. And the WSDL 2.0
> HTTPBinding can describe a REST interface for your service in a nice
> manner.
> 
> I've no idea how I managed to miss this
>> but I will hunt for it tomorrow and give it a go.  Thanks very much this
>> reply, what you say aout the EPR has definitely cleared some things up
>> for
>> me and hopefully I can now go on to get this to work.
>>
>> Just to be clear though, you say I should generate the client stub for
>> the
>> httpbinding, how exactly do I do this? I thought the stub I already had
>> could handle all the bindings in my wsdl and that setting the portal
>> parameters was what controlled which binding was being used.  Is this
>> wrong?
> 
> When codegeneration is used to generate the server side code its only
> the portType (or the interface if WSDL 2.0) that we care about when
> generating code. But when its generating code for the client side we
> generate it for a particular port and you can specify this by using
> the -pn option. If a port if not provided it faults to use the first
> SOAP 1.2 port it finds. You could generate code for all ports too this
> can be done by using the -ap options. This will generate stubs for all
> ports in the WSDL. So for example if I take the same RESTSample that I
> used yesterday this is how I would generate code for its HTTPBinding.
> 
> wsdl2java.sh -uri http://mooshup.com/services/samples/RESTSample?wsdl2
> -pn HTTPEndpoint -wv 2
> 
> I use "-wv 2" to specify that this is indeed a WSDL 2.0 file.
> 
> Thanks,
> Keith.
>>
>> Cheers,
>> Nick
>>
>>
>> keith chapman wrote:
>>>
>>> Hi Nick,
>>>
>>> If you want to invoke a service using REST then its better to generate
>>> the client stub for the httpBinding (and when doing so I recommend you
>>> to use ?wsdl2 instead of ?wsdl). This is what describes the REST
>>> interface of the service. This is where it will contain details of the
>>> URL the operation is available at hence if this binding is used to
>>> invoke the service it will automatically add the operation name to the
>>> end of the EPR. This does not happen for the SOAP bindings though.
>>> This is the reason for the behavior you observed below.
>>>
>>> In the request you have sent below does not contain enough information
>>> to dispatch it to the correct operation of the service. If you had the
>>> operation name at the end of it it would have worked. And BTW when you
>>> are using service client directly it will not append the operation
>>> name to the EPR. Note that you have to configure the ServiceClient
>>> your self when using this. (This is not the case for stubs generated
>>> for the httpBinding though).
>>>
>>> On Mon, Sep 1, 2008 at 9:07 PM, Nick Steel
>>> <[EMAIL PROTECTED]> wrote:

 Thank you Jay and Keith for your replies.  I've upgraded to version
 1.4.1
 but
 this had made no difference.  Below is a really simple version of my
 code
 taking the options used by Jay in his working service but I can still
 only
 get the correct response using getGigsIn() with POST, every other
 combination else fails with:
 >>> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
The endpoint reference (EPR) for
 the
 Operation not found is /NicksGigs-war-Axis2/services/GigListingsService
 and
 the WSA Action = null"

 SimpleREST.java:
 String epr =
 "http://localhost:8089/NicksGigs-war-Axis2/services/G

Re: Want to use the same message receiver for all operations!!

2008-09-02 Thread Saminda Abeyruwan
As Synapse guys are doing, one could  write a custom dispatcher to dispatch
all request to a specific service with a custom MR given.

Saminda

On Mon, Sep 1, 2008 at 6:00 AM, Amila Suriarachchi <
[EMAIL PROTECTED]> wrote:

> Resending this seems to be problem with my mail client. Please ignore if
> already received.
>
> try something like this
>
> 
> 
> http://www.w3.org/ns/wsdl/in-out";
> class="test.kp.service.POJOServiceMessageReceiverInOut"/>
> 
> true
> http://www.w3.org/ns/wsdl/in-out";
> namespace="http://service.kp.test";>
> urn:echoPerson
> 
> 
>
> Here when you set supportSingleOperation it dispatch it to any available
> operation. regardless of the
> soap action.
>
> thanks,
> Amila.
>
>
> On Fri, Aug 29, 2008 at 8:50 PM, murugess <[EMAIL PROTECTED]> wrote:
>
>>
>> Thanks Chinthaka. I am so glad to see active participation from axis2 team
>> in
>> this forum.
>>   I feel many folks might be having this requirement wherein they want to
>> write a single gateway service that recieves all the requests and then
>> dispatches it to the right handler dynamically. This gateway service need
>> not be changed each time a new handler ( operation) is added. It should by
>> default recieve all the requests directed to it.
>> I am waiting to hear from dev team.
>>
>> Regards,
>> Sanjay
>>
>>
>>
>> Eran Chinthaka-3 wrote:
>> >
>> > This is an interesting scenario.
>> >
>> > Axis2, by design, requires every message to be associated with a service
>> > and
>> > an operation. And this is checked in the dispatching phase. If you don't
>> > have operations defined, then you might have to hack a little bit. IIRC,
>> > you
>> > can now add handlers before the dispatching phase.
>> >
>> > I'm forwarding this message to dev list also, so that people over there
>> > knows better than I do about this.
>> >
>> > Thanks,
>> > Chinthaka
>> >
>> > On Thu, Aug 28, 2008 at 7:25 PM, murugess <[EMAIL PROTECTED]> wrote:
>> >
>> >>
>> >> Hi Chinthaka,
>> >>Really appreciate your quick reply. yes, I am trying to tackle the
>> >> second case where in all the requests directed to the service
>> regardless
>> >> of
>> >> operation should go to the same reciever. Basically, I have a servlet
>> >> which
>> >> recieves all the soap requests sent through http. This servlet will
>> >> receive
>> >> all the requests sent to a given url ( say
>> >> http://www.foo.com/abc/servlet)
>> >> with any soap action header. Now, I am trying to replace this servlet
>> >> with
>> >> axis2. I want to deal directly with XML using axiom apis and avoid
>> >> marshalling and de marshalling of xmls to java objects.
>> >>As per my understanding, and by what you explained, axis2 dispatcher
>> >> identifies the service and the operation name and then finds the
>> >> corresponding entry in the services.xml.  Since, I don't have any
>> >> operations
>> >> specified in the services.xml, it throws up an error.
>> >>What kind of handler should I write in order to avoid the above
>> error?
>> >>
>> >> Thanks,
>> >> Sanjay
>> >>
>> >>
>> >> Eran Chinthaka-3 wrote:
>> >> >
>> >> > Do you want to get all the message related to a given service in to
>> one
>> >> > message receiver? Or is it that you want to get all the messages,
>> >> > irrespective of the service to get to one message receiver?
>> >> >
>> >> > If it is the first case, then register one message receiver class
>> name
>> >> for
>> >> > all the MEPs.
>> >> >
>> >> > IIRC, this is how Axis2 internals work. When you get a SOAP message,
>> we
>> >> > will
>> >> > first identify the service and the operation this message is going
>> to.
>> >> > Every
>> >> > operation is connected to a MEP (http://wso2.org/library/335), and a
>> >> > message
>> >> > receiver is also bound to a message receiver for a given service. One
>> >> the
>> >> > operation and the service is found, service.xml details are used to
>> >> > retrieve
>> >> > the message receiver connected to the MEP of that operation.
>> >> >
>> >> > If it is the second case, then you might have to write a handler to
>> do
>> >> > this.
>> >> >
>> >> >
>> >> > HTH.
>> >> > Chinthaka
>> >> >
>> >> > On Wed, Aug 27, 2008 at 7:56 PM, murugess <[EMAIL PROTECTED]> wrote:
>> >> >
>> >> >>
>> >> >> I want the same message reciever to be invoked for a service
>> >> regardless
>> >> >> of
>> >> >> whatever the soap action comes in the request. Basically I am trying
>> >> to
>> >> >> simulate a servlet which will get all the requests targeted to it. I
>> >> dont
>> >> >> have any service implementation class and no wsdl in the services
>> >> folder.
>> >> >>
>> >> >> Here is what I have in services.xml:
>> >> >>
>> >> >>
>> >> >>
>> >> >>http://www.w3.org/ns/wsdl/in-out";
>> >> >> class="com.xyz.GenericMessageReceiverInOut"/>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> I can't put any opertions name as I want the same
>> >> >> GenericMessageRe

RE: Axis2 REST client and server questions (Data bindings, Headers, Performance)

2008-09-02 Thread Martin Gainty

virtually impossible to tell without looking at the wsdl specifically
published operations
  parameters for those operations

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Tue, 2 Sep 2008 10:40:26 -0700
> From: [EMAIL PROTECTED]
> To: axis-user@ws.apache.org
> Subject: Re: Axis2 REST client and server questions (Data bindings, Headers, 
> Performance)
> 
> 
> I have now generated the httpbindings using wsdl2java with a version 2.0 wsdl
> and the operation has been added to the EPR as desired and I can do POST
> getGigsIn("London"), POST getMostActiveArtist() and GET
> getMostActiveArtist() without any problems which is great.  The headers for
> both GET and POST are also now the same (see below) which makes a lot more
> sense to me.
> Content-Type: application/xml; charset=UTF-8
> SOAPAction: ""
> 
> 
> However, when I try to do GET getGigsIn("London") I get the error
> unknown.  The request according to TCPmon is:
> GET
> /NicksGigs-war-Axis2/services/GigListingsService/NicksGigsServiceV2/getGigsIn
> HTTP/1.1
> Content-Type: application/xml; charset=UTF-8
> SOAPAction: ""
> User-Agent: Axis2
> Host: 10.4.39.241:8089
> 
> The operation is there in the URL but the parameter "London" is not so it's
> obviously not going to work.  I was expecting something more like
> GET
> /NicksGigs-war-Axis2/services/GigListingsService/NicksGigsServiceV2/getGigsIn?city=London
> HTTP/1.1 
> 
> Whats going wrong here?
> 
> Also, just to see what would happen, I tried to make some httpbindings using
> a version 1.1 wsdl but the generated stub had methods like void getGigsIn()
> and void getMostActiveArtist() which don't take or return any values so I
> couldn't work out how I could possibly use them.  Is this normal or is this
> the reason you said to use a version 2.0 wsdl?
> 
> Cheers,
> Nick
> 
> 
> keith chapman wrote:
> > 
> > On Tue, Sep 2, 2008 at 2:11 AM, Nick Steel
> > <[EMAIL PROTECTED]> wrote:
> >>
> >> Keith,
> >>
> >> I had no idea ?wsdl2 even existed,
> > 
> > Axis2 supports both WSDL 1.1 and WSDL 2.0. And the WSDL 2.0
> > HTTPBinding can describe a REST interface for your service in a nice
> > manner.
> > 
> > I've no idea how I managed to miss this
> >> but I will hunt for it tomorrow and give it a go.  Thanks very much this
> >> reply, what you say aout the EPR has definitely cleared some things up
> >> for
> >> me and hopefully I can now go on to get this to work.
> >>
> >> Just to be clear though, you say I should generate the client stub for
> >> the
> >> httpbinding, how exactly do I do this? I thought the stub I already had
> >> could handle all the bindings in my wsdl and that setting the portal
> >> parameters was what controlled which binding was being used.  Is this
> >> wrong?
> > 
> > When codegeneration is used to generate the server side code its only
> > the portType (or the interface if WSDL 2.0) that we care about when
> > generating code. But when its generating code for the client side we
> > generate it for a particular port and you can specify this by using
> > the -pn option. If a port if not provided it faults to use the first
> > SOAP 1.2 port it finds. You could generate code for all ports too this
> > can be done by using the -ap options. This will generate stubs for all
> > ports in the WSDL. So for example if I take the same RESTSample that I
> > used yesterday this is how I would generate code for its HTTPBinding.
> > 
> > wsdl2java.sh -uri http://mooshup.com/services/samples/RESTSample?wsdl2
> > -pn HTTPEndpoint -wv 2
> > 
> > I use "-wv 2" to specify that this is indeed a WSDL 2.0 file.
> > 
> > Thanks,
> > Keith.
> >>
> >> Cheers,
> >> Nick
> >>
> >>
> >> keith chapman wrote:
> >>>
> >>> Hi Nick,
> >>>
> >>> If you want to invoke a service using REST then its better to generate
> >>> the client stub for the httpBinding (and when doing so I recommend you
> >>> to use ?wsdl2 instead of ?wsdl). This is what describes the REST
> >>> interface of the service. This is where it will contain details of the
> >>> URL the operation is available at hence if this binding is used to
> >>> invoke the service it will automatically add the operation name to the
> >>> end of the EPR. This does not happen for the SOAP bindings though.
> >>> This is the reason for the behavior you observed below.
> >>>
> >>> In the request you have sent below does not contain enough information
> >>> to dispatch it to the correct operation of the service. If you had the
> >>> operation name at the end of it it would have worked. And BTW when you
> >>> are using service client directly it will not append the operation
> >>> name to the EPR. Note that you have

Using Axis2/C with Windows root/cimv2..

2008-09-02 Thread joe131

Hi All,

I'm interested in using the Axis2/C Client to do Put, Get and Enum with
Windows root/cimv2 Win32 Classes.

Has anyone done that?  Is there any sample source out there that does
some of that?

I started to use IDispatch with the non-existent, :-(, WinRM C/C++ API
and got fairly far, but there are still some things that I can't figure out
how to implement, so I thought I'd try to use WS-Management "directly"..

If I had an example to get me started, that would be great!

Thanks!

-- 
View this message in context: 
http://www.nabble.com/Using-Axis2-C-with-Windows-root-cimv2..-tp19275545p19275545.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Option to Remove Strict Schema Validation

2008-09-02 Thread Peter Conrey
I have been developing web services and web service clients in a large
corporate environment for several years now.  We employed several Perl web
services (using SOAP::Lite) to feed both Java-based web clients (using Axis
1) and .NET clients in other departments.  While the architecture works very
well, we¹ve run into a very frustrating scenario that limits our ability to
respond quickly to change requests.  Whenever we need to add data to a web
service (say, a new field to a customer profile object), we have to
completely re-deploy any Java application that uses that service/object,
even if that new field is not relevant to the application.

When we discovered that Axis 2 provided a means of turning off strict schema
validation, we were excited to covert our code.  However, according to the
Axis documentation, the only client format that supports the ³-Eosv² option
is ADB, which also carries the following limitation:

³It is not meant to be a full schema binding application, and has
difficulty with structures such as XML Schema element extensions and
restrictions.²

--http://ws.apache.org/axis2/1_4/userguide-creatingclients.html#createclient
s

Unfortunately, we use both extensions and restrictions in our schema, as
they best define our data structure.  How difficult would it be to add the
³Eosv² option (or equivalent) to all data binding formats?  As much as I
hate to tout Microsoft, .NET has no such limitation, so adding information
to serialized objects has no effect on .NET clients.  While this may not be
the ³correct² behavior from a strict standards-based perspective, from a
practical, enterprise perspective, it is unacceptable to have to rebuild
8-10 client applications just to support a change required only by one or
two, especially when one of the unaffected applications is beyond the
service developer¹s control.

Has anyone else discovered a solution to this issue, or found a way around
it?


Re: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found

2008-09-02 Thread MShah

I used TCP Monitor and the SOAP Request and Response are as under:
http://www.w3.org/2003/05/soap-envelope";>http://wsDB";>Information
Technology


RESPONSE:

http://www.w3.org/2003/05/soap-envelope";>soapenv:Receiverjava.lang.UnsupportedOperationException: An access occurred
that is not valid.

Still not quite certain on how to resolve this.  Any inputs or guidance will
ber much appreciated.

Thanks,

Monisha


keith chapman wrote:
> 
> Hi,
> 
> The root cause of this problem is that the axis2 server could not find the
> service and operation the request was destined to. Basically the request
> did
> not contain enough information for it to get dispatched. This article
> [1] describes
> how axis2 dispatching works.  Reading though
> it
> will point you in the right direction. You may also use TCPMonitor in
> order
> to have a look at the
> request[2]
> to identify weather the request has any information for it to get
> dispatched correctly.
> 
> [1] http://wso2.org/library/176
> [2]
> http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html
> 
> Thanks,
> Keith.
> 
> On Tue, Sep 2, 2008 at 6:42 AM, MShah <[EMAIL PROTECTED]> wrote:
> 
>>
>> I deployed a web service on axis2 and when I write web service client to
>> invoke and test the web service, I get the following exception.  Any
>> inputs
>> on resolving this will be much appreciated.
>>
>> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
>> Operation
>> not f
>> ound is /axis2/services/wsInsertDB and the WSA Action = null
>>at
>> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
>> se.java:89)
>>at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
>>at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>>at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
>>at
>> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
>> il.java:136)
>>at
>> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
>> til.java:130)
>>at
>> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
>> essURLRequest(AxisServlet.java:829)
>>at
>> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
>> 5)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>> icationFilterChain.java:290)
>>at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>> ilterChain.java:206)
>>at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
>> alve.java:233)
>>at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
>> alve.java:191)
>>at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
>> ava:128)
>>at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
>> ava:102)
>>at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
>> ve.java:109)
>>at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
>> a:286)
>>at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>> :845)
>>at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
>> ss(Http11Protocol.java:583)
>>at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
>> 7)
>>at java.lang.Thread.run(Thread.java:619)
>> [ERROR] The endpoint reference (EPR) for the Operation not found is
>> /axis2/servi
>> ces/wsInsertDB/ and the WSA Action = null
>> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
>> Operation
>> not f
>> ound is /axis2/services/wsInsertDB/ and the WSA Action = null
>>at
>> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
>> se.java:89)
>>at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
>>at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>>at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
>>at
>> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
>> il.java:136)
>>at
>> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
>> til.java:130)
>>at
>> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
>> essURLRequest(AxisServlet.java:829)
>>at
>> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
>> 5)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>> icat

Re: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found

2008-09-02 Thread Moni
I figured this.  Thanks it works.
 
Monisha

--- On Mon, 9/1/08, keith chapman <[EMAIL PROTECTED]> wrote:

From: keith chapman <[EMAIL PROTECTED]>
Subject: Re: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the 
Operation not found
To: axis-user@ws.apache.org
Date: Monday, September 1, 2008, 7:00 PM



Hi,

The root cause of this problem is that the axis2 server could not find the 
service and operation the request was destined to. Basically the request did 
not contain enough information for it to get dispatched. This article [1] 
describes how axis2 dispatching works. Reading though it will point you in the 
right direction. You may also use TCPMonitor in order to have a look at the 
request [2] to identify weather the request has any information for it to get 
dispatched correctly.

[1] http://wso2.org/library/176
[2] 
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html

Thanks,
Keith.


On Tue, Sep 2, 2008 at 6:42 AM, MShah <[EMAIL PROTECTED]> wrote:


I deployed a web service on axis2 and when I write web service client to
invoke and test the web service, I get the following exception.  Any inputs
on resolving this will be much appreciated.

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not f
ound is /axis2/services/wsInsertDB and the WSA Action = null
       at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
se.java:89)
       at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
       at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
       at
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
il.java:136)
       at
org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
til.java:130)
       at
org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
essURLRequest(AxisServlet.java:829)
       at
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
5)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
       at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
       at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
       at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
       at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
       at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
       at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
       at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
       at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
       at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
       at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
       at java.lang.Thread.run(Thread.java:619)
[ERROR] The endpoint reference (EPR) for the Operation not found is
/axis2/servi
ces/wsInsertDB/ and the WSA Action = null
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not f
ound is /axis2/services/wsInsertDB/ and the WSA Action = null
       at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
se.java:89)
       at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
       at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
       at
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
il.java:136)
       at
org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
til.java:130)
       at
org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
essURLRequest(AxisServlet.java:829)
       at
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
5)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
       at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
       at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
       at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
       at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
       at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
       at
org.apache.catalina.core.StandardEngineValve.invoke(

Re: Option to Remove Strict Schema Validation

2008-09-02 Thread Anthony Bull
Title: Option to Remove Strict Schema Validation




Hi Peter,

I strictly use XML Beans as the data-binding for all my contract-first
web services in Axis 2, and have actually had quite a few problems due
to lack of schema validation.  That is, unless we specifically validate
the XML Beans DOM and throw an error, Axis 2/XML Beans doesn't validate
against the schema.

Peter Conrey wrote:

  
  I have
been developing web services and web service clients in a large
corporate environment for several years now.  We employed several Perl
web services (using SOAP::Lite) to feed both Java-based web clients
(using Axis 1) and .NET clients in other departments.  While the
architecture works very well, we’ve run into a very frustrating
scenario that limits our ability to respond quickly to change requests.
 Whenever we need to add data to a web service (say, a new field to a
customer profile object), we have to completely re-deploy any Java
application that uses that service/object, even if that new field is
not relevant to the application.
  
When we discovered that Axis 2 provided a means of turning off strict
schema validation, we were excited to covert our code.  However,
according to the Axis documentation, the only client format that
supports the “-Eosv” option is ADB, which also carries the following
limitation:
  
“It is not meant to be a full schema binding application, and has
difficulty with structures such as XML Schema element extensions and
restrictions.”
--http://ws.apache.org/axis2/1_4/userguide-creatingclients.html#createclients
  
Unfortunately, we use both extensions and restrictions in our schema,
as they best define our data structure.  How difficult would it be to
add the “Eosv” option (or equivalent) to all data binding formats?  As
much as I hate to tout Microsoft, .NET has no such limitation, so
adding information to serialized objects has no effect on .NET clients.
 While this may not be the “correct” behavior from a strict
standards-based perspective, from a  practical, enterprise perspective,
it is unacceptable to have to rebuild 8-10 client applications just to
support a change required only by one or two, especially when one of
the unaffected applications is beyond the service developer’s control.
  
Has anyone else discovered a solution to this issue, or found a way
around it?



-- 

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 REST client and server questions (Data bindings, Headers, Performance)

2008-09-02 Thread keith chapman
Hi Nick,

See My comments inline

On Tue, Sep 2, 2008 at 11:10 PM, Nick Steel <[EMAIL PROTECTED]
> wrote:

>
> I have now generated the httpbindings using wsdl2java with a version 2.0
> wsdl
> and the operation has been added to the EPR as desired and I can do POST
> getGigsIn("London"), POST getMostActiveArtist() and GET
> getMostActiveArtist() without any problems which is great.


Cool, thats good news.


> The headers for
> both GET and POST are also now the same (see below) which makes a lot more
> sense to me.
> Content-Type: application/xml; charset=UTF-8
> SOAPAction: ""
>

I've already opened a JIRA against axis2 for the above. The client should
not sent the SOAP action when it is a REST request. Will fix this soon


>
>
>
> However, when I try to do GET getGigsIn("London") I get the error
> unknown.  The request according to TCPmon is:
> GET
>
> /NicksGigs-war-Axis2/services/GigListingsService/NicksGigsServiceV2/getGigsIn
> HTTP/1.1
> Content-Type: application/xml; charset=UTF-8
> SOAPAction: ""
> User-Agent: Axis2
> Host: 10.4.39.241:8089


Something is obviously wrong here. You cannot send a GET using
application/xml. A get should always be application/x-www-form-urlencoded.
Can yu check your WSDL2 section for this operation please. Does it say what
its inputSerialization is?


> 
>
> The operation is there in the URL but the parameter "London" is not so it's
> obviously not going to work.  I was expecting something more like
> GET
>
> /NicksGigs-war-Axis2/services/GigListingsService/NicksGigsServiceV2/getGigsIn?city=London
> HTTP/1.1
>
> Whats going wrong here?


Just answered above ;).

>
>
> Also, just to see what would happen, I tried to make some httpbindings
> using
> a version 1.1 wsdl but the generated stub had methods like void getGigsIn()
> and void getMostActiveArtist() which don't take or return any values so I
> couldn't work out how I could possibly use them.  Is this normal or is this
> the reason you said to use a version 2.0 wsdl?httpBinding.
>

WSDL 2.0 has a much richer That is the reason I recommended you to use that.
But ?wsdl should have worked as well, we map the properties of ?wsdl to the
ones of ?wsdl2 during code generation. Is it possible for you to share your
wsdl and wsdl2 as well.

Thanks,
Keith.


>
>
> Cheers,
> Nick
>
>
> keith chapman wrote:
> >
> > On Tue, Sep 2, 2008 at 2:11 AM, Nick Steel
> > <[EMAIL PROTECTED]> wrote:
> >>
> >> Keith,
> >>
> >> I had no idea ?wsdl2 even existed,
> >
> > Axis2 supports both WSDL 1.1 and WSDL 2.0. And the WSDL 2.0
> > HTTPBinding can describe a REST interface for your service in a nice
> > manner.
> >
> > I've no idea how I managed to miss this
> >> but I will hunt for it tomorrow and give it a go.  Thanks very much this
> >> reply, what you say aout the EPR has definitely cleared some things up
> >> for
> >> me and hopefully I can now go on to get this to work.
> >>
> >> Just to be clear though, you say I should generate the client stub for
> >> the
> >> httpbinding, how exactly do I do this? I thought the stub I already had
> >> could handle all the bindings in my wsdl and that setting the portal
> >> parameters was what controlled which binding was being used.  Is this
> >> wrong?
> >
> > When codegeneration is used to generate the server side code its only
> > the portType (or the interface if WSDL 2.0) that we care about when
> > generating code. But when its generating code for the client side we
> > generate it for a particular port and you can specify this by using
> > the -pn option. If a port if not provided it faults to use the first
> > SOAP 1.2 port it finds. You could generate code for all ports too this
> > can be done by using the -ap options. This will generate stubs for all
> > ports in the WSDL. So for example if I take the same RESTSample that I
> > used yesterday this is how I would generate code for its HTTPBinding.
> >
> > wsdl2java.sh -uri http://mooshup.com/services/samples/RESTSample?wsdl2
> > -pn HTTPEndpoint -wv 2
> >
> > I use "-wv 2" to specify that this is indeed a WSDL 2.0 file.
> >
> > Thanks,
> > Keith.
> >>
> >> Cheers,
> >> Nick
> >>
> >>
> >> keith chapman wrote:
> >>>
> >>> Hi Nick,
> >>>
> >>> If you want to invoke a service using REST then its better to generate
> >>> the client stub for the httpBinding (and when doing so I recommend you
> >>> to use ?wsdl2 instead of ?wsdl). This is what describes the REST
> >>> interface of the service. This is where it will contain details of the
> >>> URL the operation is available at hence if this binding is used to
> >>> invoke the service it will automatically add the operation name to the
> >>> end of the EPR. This does not happen for the SOAP bindings though.
> >>> This is the reason for the behavior you observed below.
> >>>
> >>> In the request you have sent below does not contain enough information
> >>> to dispatch it to the correct operation of the service. If you had the
> >>> operation name at the end of it it wo

Re: Axis2 and Tomcat 5.0.28 commons-logging-api

2008-09-02 Thread Marc F.

I think I figured out what´s going on, and I think now I know how to solve my
problem. If I am wrong, anyone, please tell me.

When I tried to replace the [CATALINA_HOME]/bin/commons-logging-api.jar by
that one that comes with Axis2 (commons-logging-1.1.1.jar), actually, I
tried to replace the API (Application Programming Interface) by the FULL
IMPLEMENTATION. This jar file replacement is not correct, according to the
following web page from the commons-logging official site I´ve found, where
explains exactly what I want to know:

http://commons.apache.org/logging/troubleshooting.html#Apache%20Tomcat
Containers With Custom ClassLoading Behaviour for Logging (Tomcat) 

Thanks again, and again, and again, for all those detailed informations you,
commons-logging development team, provide to us. Oh, no surprise, we are
talking about Apache, we are talking about the Apache team! Congratulations
for this very well done work, guys, especially when it comes to providing
useful, detailed, and essential informations.

I quoted a piece of the text that I consider important:

If you do wish to update Tomcat's version of commons-logging, then you must
use the commons-logging-1.1-api jar only, not the full jar.

Then, after reading this web page, I simply downloaded
"commons-logging-api-1.1.1.jar", and put in in the [CATALINA_HOME]/bin/
directory. I´ve also renamed this jar file to "commons-logging-api.jar".

Certainly the commons-logging jar file that comes with Axis2 is the full
jar, not the API jar. That´s probably why when I tried to put this jar file
in the [CATALINA_HOME]/bin/ directory I had problems in the initialization
of the axis2 context.

Now I am not having any kind of problem.


I think there are two possible solutions:

(1)In the [CATALINA_HOME]/bin/ directory, replace the version 1.0.4 of
commons-logging-api.jar by the newer version 1.1.1 of the API, without
forgetting to rename the jar file (the jar file name must be
"commons-logging-api.jar", if we decide to put in in the
[CATALINA_HOME]/bin/ directory).

(2)Maintain the version 1.0.4 in the [CATALINA_HOME]/bin/ directory, and put
the newer version 1.1.1 in the [CATALINA_HOME]common/endorsed/. This
solution does not require jar file renaming.

I tested these two solutions, and apparently both works fine, both works
equally. At least until now everything is working according to my
expectations. If I have to choose one, I´d choose the solution (1), but I
really do not know which is better.
-- 
View this message in context: 
http://www.nabble.com/Axis2-and-Tomcat-5.0.28-commons-logging-api-tp19242773p19280982.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Log Incoming/Outgoing SOAP Messages

2008-09-02 Thread StrongSteve

The SOAP Part would be enough.
Can you give my an example on how to achive this goal?

Thanks!
Stefan


Thilina Gunarathne wrote:
> 
> Also do u really need to log all the large attachments in your log file...
> I would recommend logging only the SOAP part..
> 
> thanks,
> Thilina
> 
> On Tue, Sep 2, 2008 at 7:07 AM, keith chapman
> <[EMAIL PROTECTED]>wrote:
> 
>> Oh this is because env.serialize will still build the axiom object model
>> for you.  env.serializeAndConsume can do the trick (serializes the
>> message
>> without building the object model) but the issue is that it will also
>> consume the stream. May be you can try this as a workaround.
>>
>> Have you enabled file caching on the server? you can do this by setting
>> the
>> following properties in the axis2.xml
>>
>> optional
>> true
>> work/mtom
>> 4000
>>
>> This will write the attachments which are large in size to the file
>> system.
>>
>>
>> Thanks,
>> Keith.
>>
>>
>> On Tue, Sep 2, 2008 at 4:08 PM, StrongSteve <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I am not quite sure where the exception occurs, but your approach with
>>> env.serialize(out) does not work either... :(
>>>
>>>
>>>
>>> keith chapman wrote:
>>> >
>>> > Does it happen when you performSOAPEnvelope env =
>>> > arg0.getEnvelope(); or  env.toString(). Ithink it should be at the
>>> later
>>> > cause env.toString() would cause the whole message to be read into
>>> memory.
>>> > May be you can try env.serialize(out); instead of
>>> > out.write(env.toString());
>>> >
>>> > Thanks,
>>> > Keith.
>>> >
>>> > On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve <[EMAIL PROTECTED]>
>>> wrote:
>>> >
>>> >>
>>> >> Hi Everybody!
>>> >>
>>> >> I have currently developed a simple Axis handler, that logs all
>>> >> incoming/outgoing messages to files on the local HDD.
>>> >>
>>> >> Here is my current code:
>>> >>
>>> >> @Override
>>> >>public InvocationResponse invoke(MessageContext arg0) throws
>>> >> AxisFault {
>>> >>
>>> >>logger.debug("entering invoke");
>>> >>
>>> >>SOAPEnvelope env = arg0.getEnvelope();
>>> >>
>>> >>String fileName = this.MESSAGE_LOGGING_DIR +
>>> >> this.FILE_PRAEFIX + new
>>> >> Date().getTime() +".xml";
>>> >>
>>> >>try {
>>> >>File msgFile = new File(fileName);
>>> >>FileWriter out = new FileWriter(msgFile);
>>> >>out.write(env.toString());
>>> >>out.close();
>>> >>} catch (IOException ioex) {
>>> >>logger.error(ioex.getMessage());
>>> >>}
>>> >>
>>> >>return InvocationResponse.CONTINUE;
>>> >>}
>>> >>
>>> >>
>>> >> Unfortunately this code fails as soon as I send attachments. In this
>>> >> case,
>>> >> the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an
>>> >> OutOfMemory
>>> >> Exception as not the whole SOAPEnvelope can be read into the memory.
>>> >>
>>> >> Does anyone have a solution or a hint on how to achive this goal with
>>> a
>>> >> Streaming approach?
>>> >>
>>> >> Thanks in Advance for both your time and your knowledge!
>>> >>
>>> >> Greetings
>>> >> Stefan
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
>>> >> Sent from the Axis - User mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >> -
>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Keith Chapman
>>> > Senior Software Engineer
>>> > WSO2 Inc.
>>> > Oxygenating the Web Service Platform.
>>> > http://wso2.org/
>>> >
>>> > blog: http://www.keith-chapman.org
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html
>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> Keith Chapman
>> Senior Software Engineer
>> WSO2 Inc.
>> Oxygenating the Web Service Platform.
>> http://wso2.org/
>>
>> blog: http://www.keith-chapman.org
>>
> 
> 
> 
> -- 
> Thilina Gunarathne - http://thilinag.blogspot.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19283273.html
Sent from the Axis - User mailing list archive at Nabble.com.


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