MTOM causes ADBException: Unexpected subelement

2010-01-11 Thread Mike Borozdin
Hi!

I have a Java Axis2 client that seems to encounter an error on the same exact 
XML structure if part of it is moved into an MTOM attachment.  The more 
complete stack is cited at the end.

I have checked the WSDL and the response complies with the response XML for 
more info on the WSDL you can get it here. 
https://demo.docusign.net/api/3.0/api.asmx?WSDL

The way the web service is configured is that it will only generate an MTOM 
attachment if the subelement exceeds a certain size.  I am attaching Example1 
and Example2 which show working vs. not working.

Axis Libraries used are 1.5.1.

Does anyone have any idea what could be causing this?  The element that's 
triggering an exception is ...

Thank you!


WORKING RESPONSE

http://www.w3.org/2004/08/xop/include"; 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"; 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>
 
   
http://www.docusign.net/API/3.0/RequestStatusResponse
   urn:uuid:48cbb69a-9357-4745-bc1f-83c736ba1d90
   urn:uuid:04ade417-d078-4e64-a047-0bf7876b43fd
   
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
   
 
   2010-01-11T20:41:51Z
   2010-01-11T20:46:51Z
 
   
 
 
   http://www.docusign.net/API/3.0";>
 
   
 
   Signer
   nolongema...@gmail.com
   Mike Borozdin
   1
   2010-01-11T12:41:14.62
   2010-01-11T12:41:21.013
   2010-01-11T12:41:50.12
   
   Completed
   97.65.97.246
   unknown-web-user
   
 
   93 S Jackson St
   #8329
   Seattle
   WA
   98102
 
 
   X0LT+NRxPAvOz0U6NcLadg==
 
   
   
   
 
   SignHere
   Signed
   135
   283
   
   
   
 
 
   DateSigned
   Signed
   683
   333
   
   
   1/11/2010
 
 
   FullName
   Signed
   141
   420
   
   
   Mike Borozdin
 
 
   Title
   Signed
   689
   422
   Job Title
   
   test
 
 
   Company
   Signed
   664
   616
   
   
   test
 
 
   Custom
   Active
   906
   693
   Business Type
   Radio Button
   
 
 
   Custom
   Active
   1045
   693
   Business Type
   Radio Button
   
 
 
   Custom
   Signed
   722
   716
   Business Type
   Radio Button
   X
 
 
   Custom
   Active
   1045
   718
   Business Type
   Radio Button
   
 
 
   FullName
   Signed
   658
   752
   
   
   Mike Borozdin
 
 
   Title
   Signed
   1033
   758
   Job Title
   
   test
 
 
   Custom
   Signed
   2010-01-11 12:41:51,841 DEBUG [httpclient.wire.content] - <<< ">
   662
   820
   Full Address
   Full Address
   test
 
 
   Custom
   Signed
   991
   893
   State
   
;AK;AL;AR;AZ;CA;CO;CT;DE;DC;FL;GA;HI;IA;ID;IL;IN;KS;KY;LA;MA;MD;ME;MI;MN;MO;MS;MT;NC;NE;NV;NH;NJ;NM;NY;ND;OH;OK;OR;PA;PR;RI;SC;SD;TN;TX;UT;VA;VT;WA;WI;WV;WY
   WA
 
 
   Custom
   Signed
   1108
   893
   Zip
   Zip DASH 4
   12323
 
 
   Custom
   Signed
   662
   895
   City
   City
   test
 
 
   Custom
 

WSDL optional attributes

2010-01-11 Thread Luis Rivera
Hi,

I have a problem with the wsdl2java code generation in axis2 for optional
attributes

In short, how can I make it generate Objects intead of primitives for
OPTIONAL ATTRIBUTES?

Axis1 would generate them as Objects, which was great since I could look for
nulls as a sign that the client had not include them in the message.

However, with Axis2, the class end up with primitives, instead of objects
(e.g. int instead of Integer).

. Take the following extract from my WSDL schema:

...

 
 
 
 


 
 
 
 
















...

So, how could I coerce the axis2 generator to behave like axis1 in this
particular issue?

Thanks in advance,
--Luis R.


Web service init and Custom endpoints with Tomcat/Axis2 1.5.1

2010-01-11 Thread Doughty, Michael
I mistakenly sent this request to the Rampart list last time.  Hopefully this 
list is the correct one.

The first issue I have is with Web service initialization using AXIS2.  We have 
an eventing service which keeps persistent data on events serialized to disc.  
We do this because our events are stateful in a sense -- they have a status and 
can be modified over time, meaning that the same event can be sent out multiple 
times with updated information.

The problem we are running into is that the Web service code is never unless a 
client request is made to the service to either subscribe or poll for events.  
This means that until a request is made, clients that consume events in the 
push model rather than the pull model won't receive events until a client that 
receives events through the pull model makes a request because the data and 
processes needed for this activity won't start until that time.

Another reason is for persistency in case the server goes down.  Since the 
eventing service saves persistent events on the service side in case the events 
did not send to cell or events did not retrieved by the clients. If the 
eventing service restarts, it should load the events and attempted to send to 
cell without a dependency on receiving a request from a client.

The second issue I have is that I need to be able to customize my endpoint 
address in Axis2 running in the WAR distribution on Tomcat.  I know that I can 
change the "contextRoot" root property without changing the corresponding 
property in the axis2.xml file in the WEB-INF/conf directory because Tomcat 
treats the context root as the name of the directory in its "webapps" directory 
instead.  However, I also need to change the "servicePath" property to be 
"server" instead of "services".  The reason for this is that we are translating 
an entrenched legacy Web service from another Web service stack to Axis2, and 
several customers have integrated with that Web service using a hardcoded path 
that fits the previous Web service stack's convention for forming endpoints.

The problem is that when I change the axis2.xml file's "servicePath" property, 
it only seems to affect the main services page's links to the WSDL files of 
each service.  Those links are broken, because though they are listed as 
"server" as I specified, the Web services and WSDL files are still only 
accessible from the address when "services" is the "servicePath" in the 
endpoints, not "server".

Is this a bug?  Is there any way to fix this so that we can make this work for 
a whole set of customers without requiring them to recode?



Re: Third web service invoctaion always throws Timeout Exception

2010-01-11 Thread Bruno Simioni
Rafael, tislam,

The solution in Amila's blog uses the solution posted by Deepal. But Amila's
blog gives you more control over lots of request, and how to manage memory
in that scenario.

Bruno.

On Mon, Jan 11, 2010 at 4:10 PM, Rafael Barrera Oro wrote:

> Sorry for the radio silence!
>
> I've been really short of time lately so i am a bit ashamed to say i have
> not tried the solution that Bruno proposed yet (the solution in Amila's
> blog). Nevertheless i did try what Deepal suggested and it sure did the
> trick :D (i was waiting to try both before replying)
>
> I still want to try the other approach since it seems to me that such
> solution provides more control over the web service invocation, however,
> being a newbie i'm not very sure which aspect of the web service invocation
> i want to control exactly nor how...
>
> Anyway, i guess it depends on the complexity that we want to achieve
>
> Thank you all and sorry for taking so long!
>
> Rafael
>
> 2010/1/11 tislam 
>
>  Hello Rafael, Did you ever solve this problem? Could you please share what
>> you did to solve this? I tried Amila's solution, but did not have any luck.
>> I'm not sure what I'm missing. I'd appreciate it if you can share your
>> story. Thanks, Tariq.
>>
>> Rafael Barrera Oro wrote:
>>  Thanks for the quick reply! I will definitely give it a try! As soon as i
>> finish i will report back my results. Thanks again Rafael 2010/1/5 Bruno
>> Simioni > Rafael, I had exactly the same problem over here. In my case, I
>> used Tomcat > servlet container to run Axis2 server (JAX-WS Web Services). >
>> > In this case, when I tried to shutdown my server, It throw messages >
>> accusing instances that cannot be deallocated. > > I solve that problem with
>> an Amila's blog post, >
>> http://amilachinthaka.blogspot.com/2009/05/improving-axis2-client-http-transport.html.
>> > > Good luck. > > Bruno Simioni. > > > On Tue, Jan 5, 2010 at 12:31 PM,
>> Rafael Barrera Oro wrote: > >> Hello! >> >> I have a sample axis2 client
>> where everything i do is invoking a web >> service, the problem is that the
>> third time i invoke such webservice it >> always throws a timeout exception.
>> I guess this has to do with some >> connection limit or something but after
>> checking axis2.xml i was not able to >> find out how to solve the issue. >>
>> >> I guess there is a way to tell the axis2 server to keep alive the >>
>> connection or close it after its been used. I am no expert here, but it >>
>> looks like a connection pooling issue to me. >> >> Thanks in advance! >> >>
>> Here is the code: >> >> public class Axis2Client { >> >> /** >> * @param
>> args >> */ >> public static void main(String[] args) { >> Object[]
>> datosUsuario; >> String user = "user"; >> String pass = "pass"; >> >> try{
>> >> //first invocation >> datosUsuario = invokeWebService(" >>
>> http://localhost:8180/axis2/services/LoginService";, "login", new Object[]
>> >> {user, pass},new Class[] { Long.class, String.class, String.class, >>
>> String.class}); >> >> for(int i = 0; i < datosUsuario.length; i++) >>
>> System.out.println(i + " -> " + datosUsuario[i]); >> >> //second invocation
>> >> datosUsuario = invokeWebService(" >>
>> http://localhost:8180/axis2/services/LoginService";, "login", new Object[]
>> >> {user, pass},new Class[] { Long.class, String.class, String.class, >>
>> String.class}); >> >> for(int i = 0; i < datosUsuario.length; i++) >>
>> System.out.println(i + " -> " + datosUsuario[i]); >> >> //third invocation
>> >> datosUsuario = invokeWebService(" >>
>> http://localhost:8180/axis2/services/LoginService";, "login", new Object[]
>> >> {user, pass},new Class[] { Long.class, String.class, String.class, >>
>> String.class}); >> >> for(int i = 0; i < datosUsuario.length; i++) >>
>> System.out.println(i + " -> " + datosUsuario[i]); >> >> } >> catch(Exception
>> e){ >> e.printStackTrace(); >> } >> >> } >> >> public static Object[]
>> invokeWebService(String endPoint, String op, >> Object[] opArgs, Class[]
>> returnTypes) throws AxisFault{ >> RPCServiceClient serviceClient; >> Options
>> options; >> EndpointReference targetEPR; >> QName opQName; >> Object[]
>> response = new Object[]{}; >> >> //inicializo el cliente >> serviceClient =
>> new RPCServiceClient(); >> options = serviceClient.getOptions(); >> >>
>> //establezcp el endpoint >> targetEPR = new EndpointReference(endPoint); >>
>> options.setTo(targetEPR); >> >> //establezco la operacion >> opQName = new
>> QName(" >>
>> http://services.spring.webservices.dietaclub.akyasociados.com.ar";, op);
>> >> >> //invoco el web service utilizando los parametros y los tipos que >>
>> espero que me sean devueltos >> try{ >> response =
>> serviceClient.invokeBlocking(opQName, opArgs, >> returnTypes); >> } >>
>> catch(AxisFault e){ >> e.printStackTrace(); >> throw e; >> } >>
>> catch(Exception e){ >> e.printStackTrace(); >> } >> >> return response; >> }
>> >> } >> >> Here is the exception: >> >> org.apache.axis2.AxisFault: Timeout
>> waitin

Re: Third web service invoctaion always throws Timeout Exception

2010-01-11 Thread Rafael Barrera Oro
Sorry for the radio silence!

I've been really short of time lately so i am a bit ashamed to say i have
not tried the solution that Bruno proposed yet (the solution in Amila's
blog). Nevertheless i did try what Deepal suggested and it sure did the
trick :D (i was waiting to try both before replying)

I still want to try the other approach since it seems to me that such
solution provides more control over the web service invocation, however,
being a newbie i'm not very sure which aspect of the web service invocation
i want to control exactly nor how...

Anyway, i guess it depends on the complexity that we want to achieve

Thank you all and sorry for taking so long!

Rafael

2010/1/11 tislam 

> Hello Rafael, Did you ever solve this problem? Could you please share what
> you did to solve this? I tried Amila's solution, but did not have any luck.
> I'm not sure what I'm missing. I'd appreciate it if you can share your
> story. Thanks, Tariq.
>
> Rafael Barrera Oro wrote:
>  Thanks for the quick reply! I will definitely give it a try! As soon as i
> finish i will report back my results. Thanks again Rafael 2010/1/5 Bruno
> Simioni > Rafael, I had exactly the same problem over here. In my case, I
> used Tomcat > servlet container to run Axis2 server (JAX-WS Web Services). >
> > In this case, when I tried to shutdown my server, It throw messages >
> accusing instances that cannot be deallocated. > > I solve that problem with
> an Amila's blog post, >
> http://amilachinthaka.blogspot.com/2009/05/improving-axis2-client-http-transport.html.
> > > Good luck. > > Bruno Simioni. > > > On Tue, Jan 5, 2010 at 12:31 PM,
> Rafael Barrera Oro wrote: > >> Hello! >> >> I have a sample axis2 client
> where everything i do is invoking a web >> service, the problem is that the
> third time i invoke such webservice it >> always throws a timeout exception.
> I guess this has to do with some >> connection limit or something but after
> checking axis2.xml i was not able to >> find out how to solve the issue. >>
> >> I guess there is a way to tell the axis2 server to keep alive the >>
> connection or close it after its been used. I am no expert here, but it >>
> looks like a connection pooling issue to me. >> >> Thanks in advance! >> >>
> Here is the code: >> >> public class Axis2Client { >> >> /** >> * @param
> args >> */ >> public static void main(String[] args) { >> Object[]
> datosUsuario; >> String user = "user"; >> String pass = "pass"; >> >> try{
> >> //first invocation >> datosUsuario = invokeWebService(" >>
> http://localhost:8180/axis2/services/LoginService";, "login", new Object[]
> >> {user, pass},new Class[] { Long.class, String.class, String.class, >>
> String.class}); >> >> for(int i = 0; i < datosUsuario.length; i++) >>
> System.out.println(i + " -> " + datosUsuario[i]); >> >> //second invocation
> >> datosUsuario = invokeWebService(" >>
> http://localhost:8180/axis2/services/LoginService";, "login", new Object[]
> >> {user, pass},new Class[] { Long.class, String.class, String.class, >>
> String.class}); >> >> for(int i = 0; i < datosUsuario.length; i++) >>
> System.out.println(i + " -> " + datosUsuario[i]); >> >> //third invocation
> >> datosUsuario = invokeWebService(" >>
> http://localhost:8180/axis2/services/LoginService";, "login", new Object[]
> >> {user, pass},new Class[] { Long.class, String.class, String.class, >>
> String.class}); >> >> for(int i = 0; i < datosUsuario.length; i++) >>
> System.out.println(i + " -> " + datosUsuario[i]); >> >> } >> catch(Exception
> e){ >> e.printStackTrace(); >> } >> >> } >> >> public static Object[]
> invokeWebService(String endPoint, String op, >> Object[] opArgs, Class[]
> returnTypes) throws AxisFault{ >> RPCServiceClient serviceClient; >> Options
> options; >> EndpointReference targetEPR; >> QName opQName; >> Object[]
> response = new Object[]{}; >> >> //inicializo el cliente >> serviceClient =
> new RPCServiceClient(); >> options = serviceClient.getOptions(); >> >>
> //establezcp el endpoint >> targetEPR = new EndpointReference(endPoint); >>
> options.setTo(targetEPR); >> >> //establezco la operacion >> opQName = new
> QName(" >>
> http://services.spring.webservices.dietaclub.akyasociados.com.ar";, op); >>
> >> //invoco el web service utilizando los parametros y los tipos que >>
> espero que me sean devueltos >> try{ >> response =
> serviceClient.invokeBlocking(opQName, opArgs, >> returnTypes); >> } >>
> catch(AxisFault e){ >> e.printStackTrace(); >> throw e; >> } >>
> catch(Exception e){ >> e.printStackTrace(); >> } >> >> return response; >> }
> >> } >> >> Here is the exception: >> >> org.apache.axis2.AxisFault: Timeout
> waiting for connection >> at
> org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) >> at >>
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
> >> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76) >>
> at >>
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(Common

Re: Third web service invoctaion always throws Timeout Exception

2010-01-11 Thread tislam

Hello Rafael,
 Did you ever solve this problem? Could you please share what you did to
solve this? I tried Amila's solution, but did not have any luck. I'm not
sure what I'm missing. I'd appreciate it if you can share your story.

Thanks,
Tariq.


Rafael Barrera Oro wrote:
> 
> Thanks for the quick reply! I will definitely give it a try!
> 
> As soon as i finish i will report back my results.
> 
> Thanks again
> 
> Rafael
> 
> 2010/1/5 Bruno Simioni 
> 
>> Rafael, I had exactly the same problem over here. In my case, I used
>> Tomcat
>> servlet container to run Axis2 server (JAX-WS Web Services).
>>
>> In this case, when I tried to shutdown my server, It throw messages
>> accusing instances that cannot be deallocated.
>>
>> I solve that problem with an Amila's blog post,
>> http://amilachinthaka.blogspot.com/2009/05/improving-axis2-client-http-transport.html.
>>
>> Good luck.
>>
>> Bruno Simioni.
>>
>>
>> On Tue, Jan 5, 2010 at 12:31 PM, Rafael Barrera Oro wrote:
>>
>>> Hello!
>>>
>>> I have a sample axis2 client where everything i do is invoking a web
>>> service, the problem is that the third time i invoke such webservice it
>>> always throws a timeout exception. I guess this has to do with some
>>> connection limit or something but after checking axis2.xml i was not
>>> able to
>>> find out how to solve the issue.
>>>
>>> I guess there is a way to tell the axis2 server to keep alive the
>>> connection or close it after its been used. I am no expert here, but it
>>> looks like a connection pooling issue to me.
>>>
>>> Thanks in advance!
>>>
>>> Here is the code:
>>>
>>> public class Axis2Client {
>>>
>>> /**
>>>  * @param args
>>>  */
>>> public static void main(String[] args) {
>>> Object[] datosUsuario;
>>> String user = "user";
>>> String pass = "pass";
>>>
>>> try{
>>> //first invocation
>>> datosUsuario = invokeWebService("
>>> http://localhost:8180/axis2/services/LoginService";, "login", new
>>> Object[]
>>> {user, pass},new Class[] { Long.class, String.class, String.class,
>>> String.class});
>>>
>>> for(int i = 0; i < datosUsuario.length; i++)
>>> System.out.println(i + " -> " + datosUsuario[i]);
>>>
>>> //second invocation
>>> datosUsuario = invokeWebService("
>>> http://localhost:8180/axis2/services/LoginService";, "login", new
>>> Object[]
>>> {user, pass},new Class[] { Long.class, String.class, String.class,
>>> String.class});
>>>
>>> for(int i = 0; i < datosUsuario.length; i++)
>>> System.out.println(i + " -> " + datosUsuario[i]);
>>>
>>> //third invocation
>>> datosUsuario = invokeWebService("
>>> http://localhost:8180/axis2/services/LoginService";, "login", new
>>> Object[]
>>> {user, pass},new Class[] { Long.class, String.class, String.class,
>>> String.class});
>>>
>>> for(int i = 0; i < datosUsuario.length; i++)
>>> System.out.println(i + " -> " + datosUsuario[i]);
>>>
>>> }
>>> catch(Exception e){
>>> e.printStackTrace();
>>> }
>>>
>>> }
>>>
>>> public static Object[] invokeWebService(String endPoint, String op,
>>> Object[] opArgs, Class[] returnTypes) throws AxisFault{
>>> RPCServiceClient serviceClient;
>>> Options options;
>>> EndpointReference targetEPR;
>>> QName opQName;
>>> Object[] response = new Object[]{};
>>>
>>> //inicializo el cliente
>>> serviceClient = new RPCServiceClient();
>>> options = serviceClient.getOptions();
>>>
>>> //establezcp el endpoint
>>> targetEPR = new EndpointReference(endPoint);
>>> options.setTo(targetEPR);
>>>
>>> //establezco la operacion
>>> opQName = new QName("
>>> http://services.spring.webservices.dietaclub.akyasociados.com.ar";, op);
>>>
>>> //invoco el web service utilizando los parametros y los tipos
>>> que
>>> espero que me sean devueltos
>>> try{
>>> response = serviceClient.invokeBlocking(opQName, opArgs,
>>> returnTypes);
>>> }
>>> catch(AxisFault e){
>>> e.printStackTrace();
>>> throw e;
>>> }
>>> catch(Exception e){
>>> e.printStackTrace();
>>> }
>>>
>>> return response;
>>> }
>>> }
>>>
>>> Here is the exception:
>>>
>>> org.apache.axis2.AxisFault: Timeout waiting for connection
>>> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>>> at
>>> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
>>> at
>>> org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
>>> at
>>> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
>>> at
>>> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
>>> 

RE: Axis2: Deploying a service to a Tomcat server

2010-01-11 Thread Oded Onn
Thank you Deepal,

I am still not sure about the following issues:

1. Let's say I already generated the axis2.war file once (with my service). 
Afterwards I changed my business logic. As far as I understand from your 
answer, I can now somehow deploy my service.aar to tomcat, without rebuilding 
the axis2.war (ant create.war after my service.aar is in repository/services 
dir). Can you explain in a bit more details how can I do that? Do you mean 
adding it to the axis2.war file? Is there a way with axis2 to deploy my service 
as a regular war file?

2. I would appreciate it if you can send me a pointer to a WS with schema 
validation (handler) that uses jaxb (or similar tech) to validate client 
requests. I didn't find any example in the axis2 documentation for this kind of 
validation. It seems to me that this should be a common issue with WS (server 
provider side).

3. I encountered a problem with the class loading (or at least I think so). I 
am using jdk1.5 and tomcat5.5. I generate the server side only. As far as I 
understand the axis2.war should contain under the services dir the available 
services (aar files). Now, when building the aar, I am adding external jars 
that I am using into the aar /lib dir. It looks as follows:

myservice.aar:
lib/
XBeans-packaged.jar
my-external.jar

axis2.war:
WEB-INF/services/myservice.aar

Should the external jar(s) also reside in WEB-INF/lib/ ?

At the moment, I am getting 'java.lang.NoClassDefFoundError' exceptions, 
although I believe I have all the necessary jars under the lib/ of the aar 
file. I also copied the jars to the lib/ folder of the axis2 deployed war (in 
tomcat) but to no avail. When debugging it remote with IntelliJ it tells me: 
'Class not loaded:com.xxx'. 

Any thought?

Thanks!
Oded


-Original Message-
From: Deepal Jayasinghe [mailto:dee...@opensource.lk] 
Sent: Sunday, January 10, 2010 17:42
To: axis-user@ws.apache.org
Subject: Re: Axis2: Deploying a service to a Tomcat server



Oded Onn wrote:
>
> Hi there,
>
>  
>
> I am quite new to the world of WS and Axis 2 and am sorry if my
> questions seems a bit silly. However, I looked for answers in your
> forums and documentation and didn’t find them.
>
>  
>
> I wrote my first WS using Axis2. Started from a WSDL file and
> generated the server code. Now, as far as I understand from your
> manual, I am suppose to do the following:
>
> 1.   Write the business logic (in the MyServiceSkeleton.java file)
>
> 2.   Build the WS
>
> 3.   Copy the generated AAR file into the services directory of my
> axis2 server
>
> 4.   Create the axis2.WAR file using “ant create.war”
>
You do not need to generate the war, download it and deploy to tomcat.
Then you can deploy your service there.
>
> 5.   Copy thr genearetd axis2.WAR from the dist directory into my
> tomcat server webapp directory.
>
>  
>
> I followed the above steps and it works (I tested my service with
> SOAPUI as the client).
>
> I have some questions:
>
> 1.   Is there an easier way to do the above steps in a production
> environment? Can I somehow generate the war file to be used in tomcat
> in a simpler way? At the moment, every time I change the business
> logic I have to redo all these steps…
>
You do not need, just replace the aar file.
>
> 2.   Can I deploy the service without the “axis2/services/” prefix
> in the URL? The service is to be deployed to a client, and thus I
> prefer it to have a “clean” URL. At the moment it is
> “http://localhost:8080/axis2/services/MyService”. Can I deploy it to
> be “http://localhost:8080/MyService”?
>
Yes you can, for that you need to edit axis2.xml in
webapps/axis2/WEB-INF/conf

there is a parameter called context path.
>
> 3.   I noticed that there is no complete validation of the SOAP
> request (i.e. no check that the XML passed is correct according to the
> schema described in the WSDL). Where should I add this kind of
> validation? Is there any automatic methods that I need to call? I
> assume the answer is somewhere in the
> “MyServiceMessageReceiverInOut.java file” – I am just really not sure
> how to approach this file. I read some about handlers – is this the
> right way to perform validation?
>
Axis2 does not do that because it adds additional cost. But you can
write your own handler and do the validation.

Thanks,
Deepal
>
>  
>
> Thank you very much for your help – it is much appreciated!
>
> Best,
>
> Oded
>
>  
>
> oded@mobixell.com
>

-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



Re: Static WSDL problems

2010-01-11 Thread Yashvant chauhan
Hi Vinicius,

As per my understanding you have to do folowing things,
1) create a WSDL first with proper schema...
2) generarte server side code using the Axis2 utility wsdl2Java and update
the *Impl java file your business logic
3) create a war file with whole stuff and deploy it in a webserver

once you completed above three steps your service should work.

Regards,
Yashvant



On Mon, Jan 11, 2010 at 7:19 PM, Vinicius Carvalho
wrote:

> Hello there! We have an legacy WS built with Pojo based deployment
> with Axis2. I was told that in order to override a few defaults from
> axis (soap address, and some nillable properties on elements) one
> should get the generated WSDL and copy it to the same folder that the
> services.xml resides.
>
> Problem is: When we do that, Axis simply stop working. When I get the
> exact WSDL that is generated through:
> www.myserver.com/services/MyService?WSDL copy it to the folder of
> services.xml, restart tomcat. Well things get messy, and very very
> messy: One is that the marshalling stop working, parameters do not get
> converted I get lots of \n on string parameters for instance.
>
> As I said, I was told that just putting the WSDL at the services.xml
> folder should work, but it does not seems so.
>
> Any ideas please?
>
> Regards
>



-- 

Yashvant Singh Chauhan
Mobile- 09845277271
Bangalore

*


Static WSDL problems

2010-01-11 Thread Vinicius Carvalho
Hello there! We have an legacy WS built with Pojo based deployment
with Axis2. I was told that in order to override a few defaults from
axis (soap address, and some nillable properties on elements) one
should get the generated WSDL and copy it to the same folder that the
services.xml resides.

Problem is: When we do that, Axis simply stop working. When I get the
exact WSDL that is generated through:
www.myserver.com/services/MyService?WSDL copy it to the folder of
services.xml, restart tomcat. Well things get messy, and very very
messy: One is that the marshalling stop working, parameters do not get
converted I get lots of \n on string parameters for instance.

As I said, I was told that just putting the WSDL at the services.xml
folder should work, but it does not seems so.

Any ideas please?

Regards