Re: wsdl2java ... _operationClient.execute

2008-08-09 Thread axis-user

Amila,
THANX A TON FOR PIN POINTING MY IGNORANCE/DUMPNESS


Amila Suriarachchi wrote:
> 
> On Tue, Aug 5, 2008 at 4:05 PM, axis-user <[EMAIL PROTECTED]> wrote:
> 
>>
>> 2)We are using this command to generate the client stubs
>> WSDL2Java -uri DDP.wsdl  -d xmlbeans
>>
>> 3)When calling stub's startxyz() method through our Client Program 
>> for
>> asynchronous calling of our web service, the request is not going to
>> server
>> side and it is not showing any client side exception.
>>
>> 4)But when we change _operationClient.execute(true); line in startxyz()
>> method of the client stub which was earlier
>> _operationClient.execute(false);
>> the request went to server side.
>> Axis 1.4 version is used
>>
>> Not able to figure out where we went wrong?
> 
> 
> this is because your client dies before axis2 able to send the request.
> Try
> putting a Thread.sleep(2) after the .startxx method call.
> 
> thanks,
> Amila.
> 
>>
>> --
>> View this message in context:
>> http://www.nabble.com/wsdl2java-...-_operationClient.execute-tp18828514p18828514.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]
>>
>>
> 
> 
> -- 
> Amila Suriarachchi,
> WSO2 Inc.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wsdl2java-...-_operationClient.execute-tp18828514p18903874.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]



wsdl2java ... _operationClient.execute

2008-08-05 Thread axis-user

2)We are using this command to generate the client stubs
WSDL2Java -uri DDP.wsdl  -d xmlbeans

3)When calling stub’s startxyz() method through our Client Program  for
asynchronous calling of our web service, the request is not going to server
side and it is not showing any client side exception.
 
4)But when we change _operationClient.execute(true); line in startxyz()
method of the client stub which was earlier _operationClient.execute(false);
the request went to server side.
Axis 1.4 version is used

Not able to figure out where we went wrong?
-- 
View this message in context: 
http://www.nabble.com/wsdl2java-...-_operationClient.execute-tp18828514p18828514.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]



com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x1) not a valid XML character

2008-06-23 Thread Axis User
Hi All,

I'm developing a WS client that communicates with Microsoft Exchange Web 
Service (EWS), however at several occasions I have experienced that the 
response from EWS contains characters that are illegal within XML (at 
least according to Apache Axis2 and also how I/we undertsand the XML 
specs). It seems to be related to unicode control characters (range x1 - 
x1F).

This problem may be related to the fact that EWS return xml version 1.0 
(according to the XML) but maybe (just maybe) what is returned is in fact 
adhering to the XML 1.1 spec (which does allow unicode control characters) 
- please see attached example (XML version highlighted in blue - invalid 
character highlighted by red). Is it possible to instruct Axis to treat 
the response XML as 1.1 regardless of the specified version in the XML? 
and do you think that will solve the problem?

Any idea as to how I can get Axis to accept there illegal characters?

Regards
Mads



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

http://schemas.microsoft.com/exchange/services/2006/types"; />


http://schemas.microsoft.com/exchange/services/2006/types";
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages";>


NoError





[RealTime Service] Error has occured


thr ead:2424, process:1392, mem:28Mb,VM:28Mb Dump of exception type
'System.Data.SqlClient.SqlException'
Message: SQL Server does not exist or
access denied. Stack trace: 
at 
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&isInTransaction) 

at 
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isIn Transaction)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection()
at 
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrappercommand)
 

at 
AddOn.Configuration.ConfigurationManager.GetRtsSynchronization(GuidrtsId) 
at AddOn.Configuration.ConfigurationManager.(Object)


2008-06-12T03:10:07Z

Normal
false

2008-06-12T03:08:18Z


2008-06-12T03:10:07Z

false



/Inbox/[RealTime Service] Error has occured-7.EML





[EMAIL PROTECTED]


[EMAIL PROTECTED]

SMTP




sysadm

[EMAIL PROTECTED]

SMTP





[EMAIL PROTECTED]


[EMAIL PROTECTED]

SMTP


false








Does non-blocking / Async in AXIS2 really work ?

2007-11-16 Thread Axis User
Hi there,
 
I have AXIS2 release 1.3 installed (on PC, Windows XP)
I compile and deploy the ECHO service from 
\axis2\samples\userguide\src\userguide\example1 (MyService.java)
I start the server from \axis2\bin\axis2server.bat
I compile and run different  clients from 
\axis2\samples\userguide\src\userguide\clients
Everything works fine and I can run different clients and request is sent to 
server and response comes back.
Now I want to test the Async (non-blocking) aspect of Axis2:
 
In server code in echo() function I put a thread sleep so that it keeps it busy 
before returning to client and I am expecting that Axis2 engine will take care 
of non-blocking aspect and will return back to Client in another channel 
(non-blocking async dual channel client) :
 
I put below Thread sleep in server code in Echo() function:
 
public class MyService {
public OMElement echo(OMElement element) throws XMLStreamException 
   {
element.build();
element.detach();
  
//This is put with Try/Catch but is removed here to see it better
Thread.sleep(6);
  
return element;
}
  
So when I run the client the server will simulate doing a job of 60 seconds (1 
minute) which is more than the default Axis2 timeout of 30 seconds. What I 
would expect to see on client side is :
 
OK - 1) If Sync client is run it should timeout as axis2 timeout is 30s and the 
server is not done with its job. So I run the EchoBlockingClient.java that's 
what I see it means it times out and the FAULT() function in client is called. 
So far so good.
 
Not OK - 2) If Async(non-blocking dual or regular) is run I would expect that 
finaly I will receive the complete method of Client called (onComplete()) but 
it doesn't happen. I only get onError() or Axis.Fault() called.
 
It means I assume that when I run the example EchoNonBlockingDualClient.java it 
is going to use 2 HTTP transport channels. The first one should timeout during 
request but the second one should be used when responese is sent back after 
60seconds. 
 
But what happens is after 30 seconds the onError() function :
 
  public void onError(Exception e)
 
inside Callback class is called. Then it just hangs and when the sleep on 
server side wakes up after 60 seconds I don't receive any callback anymore on 
Client side. 
 
In case of EchoNonBlockingDualClient.java the thread (eclipse IDE) or Dos 
Prompt is still active and waiting but in case of EchoNonBlockingClient.java 
the thread dies and you get the Dos Prompt released.
 
I checked this article :
http://www.ibm.com/developerworks/webservices/library/ws-axis2/
 
And tried to play with services.xml with below:
 
Listing 4. Associating message receivers with the IN-OUT MEP variable


// other message receivers 
   http://www.w3.org/2004/08/wsdl/in-out"; class=
  "org.apache.axis2.async.AsyncMessageReceiver"/>

 
But I get class not found error for 
org.apache.axis2.async.AsyncMessageReceiver. So probably this article is old 
and this class doesn't exist anymore in new Axis release ?
 
I tried the code in this article:
http://www.onjava.com/lpt/a/6076
 
But most probably this article is old too as I get error in eclipse that it 
can't resolve this clas CALL :
 
Call call = new Call();
 
And nothing to import.
 
In eclipse I also get depreciated warning for the included client code for 
Callback:
 
   Callback callback = new Callback()
 
I even change it to AxisCallback class in stead and its methods and run it but 
still same problem I only get one callback which is during axis2 timeout.
 
So Question:
Has anybody got this non-blocking working? 
 
[I mean make it working when your server job is longer than the Axis2 timeout, 
as we have a lot of tasks which will take half a day or day etc and we want to 
return to client longer than Axis2 timeout. I know you can change the Axis2 
timeout to maximum 6 days or so (maximum of int) but that's not a good solution 
as we want to have network timeout in place don't want to wait 6 days if it's 
network problem but our job might take longer than 6 days or so]
 
Best Regards,
Jan


  

Be a better pen pal. 
Text or chat with friends inside Yahoo! Mail. See how.  
http://overview.mail.yahoo.com/

Re: reading large attachments

2005-08-02 Thread Axis User
hi,
problem solved - it seemed to be caused by the stub reference being
shared amongst threads. Having each thread construct a locator and get
a new reference or synchronizing the attachment adding works fine.

Thanks,
M

On 8/2/05, Tom Ziemer <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I cannot confirm this, but my use case is slightly different. I have a
> server, that always sends exactly one attachment. During testing we have
> setup a cluster of multiple machines to access this server
> simultaneously and request binary data (which was sent as an
> attachment). The attachmentCount was always 1, as expected.
> 
> Regards,
> Tom
> 
> Axis User wrote:
> > Hi,
> > Further investigation has shown that the attachments are not in fact
> > lost but appear in a different SOAP message! e.g. if 30 clients send
> > an attachment one message will return getAttachmentCount() == 30 and
> > the other 29 messages return getAttachmentCount() == 0.
> > I have found this problem also to occur with reasonably small
> > attachments (i.e. 4k)
> >
> > This looks like a bug - can anyone comment?
> >
> > M
> >
> > On 8/1/05, Axis User <[EMAIL PROTECTED]> wrote:
> >
> >>Hi Tom,
> >>Thanks for your reply. Further to my last mail I should say that
> >>sending large attachments sequentially works fine. The problem for me
> >>arises when I have multiple clients sending in parallel (i.e.
> >>concurrent invocation of the service method) - sometimes
> >>getAttachmentCount() returns 0 other times it works fine (with your
> >>code fragment it becomes a NoSuchElement exception thrown
> >>occasionally)
> >>
> >>Have you encountered or tested this situation before?
> >>
> >>Does anyone know if Axis supports writing multiple attachments at the same 
> >>time?
> >>
> >>Thanks,
> >>Michael
> >>
> >>On 8/1/05, Tom Ziemer <[EMAIL PROTECTED]> wrote:
> >>
> >>>Hi,
> >>>
> >>>try this:
> >>>
> >>>DataHandler dh = null;
> >>> Message m = context.getCurrentMessage();
> >>> logger.info("[client]: Found attachments: "+m.countAttachments());
> >>> Iterator it = m.getAttachments();
> >>> while(it.hasNext())
> >>> {
> >>> AttachmentPart ap = (AttachmentPart)it.next();
> >>> dh = ap.getDataHandler();
> >>>...
> >>> }
> >>>
> >>>I am using Axis 1.3 (CVS) and can send (Server->Client) large files (up
> >>>to 1.2GB) without a problem.
> >>>
> >>>Hope this helps,
> >>>Regards,
> >>>Tom
> >>>
> >>>
> >>>Axis User wrote:
> >>>
> >>>>Hi,
> >>>>First some info...
> >>>>
> >>>>Platform: Axis 1.2.1, Java 1.5.0_04-b05, Linux 2.6.11.4-20a-default
> >>>>
> >>>>Aim: to send a zip file attached to a SOAP message and save it to a
> >>>>directory. Zip files will on average be around 50Mb.
> >>>>
> >>>>Code:
> >>>>//On the client side I add attachments as below:
> >>>>
> >>>>DataHandler handler = new DataHandler(new FileDataSource(file));
> >>>>stub.addAttachment(handler);
> >>>>
> >>>>//server side retrieval
> >>>>MessageContext msgContext = MessageContext.getCurrentContext();
> >>>>Message requestMessage = msgContext.getRequestMessage();
> >>>>int numAttachments = 
> >>>>requestMessage.getAttachmentsImpl().getAttachmentCount();
> >>>>
> >>>>Problem:
> >>>>The problem seems to be to me that my service method is being invoked
> >>>>before the entire attachment has been transferred hence numAttachments
> >>>>== 0 even though the client always sends an attachment. Is there a way
> >>>>to determine that the entire message has been received before querying
> >>>>the number of attachments? In this case the attachments are ~45mb
> >>>>
> >>>>Thanks,
> >>>>Mike
> >>>
>


Re: reading large attachments

2005-08-02 Thread Axis User
Hi,
Further investigation has shown that the attachments are not in fact
lost but appear in a different SOAP message! e.g. if 30 clients send
an attachment one message will return getAttachmentCount() == 30 and
the other 29 messages return getAttachmentCount() == 0.
I have found this problem also to occur with reasonably small
attachments (i.e. 4k)

This looks like a bug - can anyone comment?

M

On 8/1/05, Axis User <[EMAIL PROTECTED]> wrote:
> Hi Tom,
> Thanks for your reply. Further to my last mail I should say that
> sending large attachments sequentially works fine. The problem for me
> arises when I have multiple clients sending in parallel (i.e.
> concurrent invocation of the service method) - sometimes
> getAttachmentCount() returns 0 other times it works fine (with your
> code fragment it becomes a NoSuchElement exception thrown
> occasionally)
> 
> Have you encountered or tested this situation before?
> 
> Does anyone know if Axis supports writing multiple attachments at the same 
> time?
> 
> Thanks,
> Michael
> 
> On 8/1/05, Tom Ziemer <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > try this:
> >
> > DataHandler dh = null;
> >  Message m = context.getCurrentMessage();
> >  logger.info("[client]: Found attachments: "+m.countAttachments());
> >  Iterator it = m.getAttachments();
> >  while(it.hasNext())
> >  {
> >  AttachmentPart ap = (AttachmentPart)it.next();
> >  dh = ap.getDataHandler();
> > ...
> >  }
> >
> > I am using Axis 1.3 (CVS) and can send (Server->Client) large files (up
> > to 1.2GB) without a problem.
> >
> > Hope this helps,
> > Regards,
> > Tom
> >
> >
> > Axis User wrote:
> > > Hi,
> > > First some info...
> > >
> > > Platform: Axis 1.2.1, Java 1.5.0_04-b05, Linux 2.6.11.4-20a-default
> > >
> > > Aim: to send a zip file attached to a SOAP message and save it to a
> > > directory. Zip files will on average be around 50Mb.
> > >
> > > Code:
> > > //On the client side I add attachments as below:
> > >
> > > DataHandler handler = new DataHandler(new FileDataSource(file));
> > > stub.addAttachment(handler);
> > >
> > > //server side retrieval
> > > MessageContext msgContext = MessageContext.getCurrentContext();
> > > Message requestMessage = msgContext.getRequestMessage();
> > > int numAttachments = 
> > > requestMessage.getAttachmentsImpl().getAttachmentCount();
> > >
> > > Problem:
> > > The problem seems to be to me that my service method is being invoked
> > > before the entire attachment has been transferred hence numAttachments
> > > == 0 even though the client always sends an attachment. Is there a way
> > > to determine that the entire message has been received before querying
> > > the number of attachments? In this case the attachments are ~45mb
> > >
> > > Thanks,
> > > Mike
> >
>


Re: reading large attachments

2005-08-01 Thread Axis User
Hi Tom,
Thanks for your reply. Further to my last mail I should say that
sending large attachments sequentially works fine. The problem for me
arises when I have multiple clients sending in parallel (i.e.
concurrent invocation of the service method) - sometimes
getAttachmentCount() returns 0 other times it works fine (with your
code fragment it becomes a NoSuchElement exception thrown
occasionally)

Have you encountered or tested this situation before?

Does anyone know if Axis supports writing multiple attachments at the same time?

Thanks,
Michael

On 8/1/05, Tom Ziemer <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> try this:
> 
> DataHandler dh = null;
>  Message m = context.getCurrentMessage();
>  logger.info("[client]: Found attachments: "+m.countAttachments());
>  Iterator it = m.getAttachments();
>  while(it.hasNext())
>  {
>  AttachmentPart ap = (AttachmentPart)it.next();
>  dh = ap.getDataHandler();
> ...
>  }
> 
> I am using Axis 1.3 (CVS) and can send (Server->Client) large files (up
> to 1.2GB) without a problem.
> 
> Hope this helps,
> Regards,
> Tom
> 
> 
> Axis User wrote:
> > Hi,
> > First some info...
> >
> > Platform: Axis 1.2.1, Java 1.5.0_04-b05, Linux 2.6.11.4-20a-default
> >
> > Aim: to send a zip file attached to a SOAP message and save it to a
> > directory. Zip files will on average be around 50Mb.
> >
> > Code:
> > //On the client side I add attachments as below:
> >
> > DataHandler handler = new DataHandler(new FileDataSource(file));
> > stub.addAttachment(handler);
> >
> > //server side retrieval
> > MessageContext msgContext = MessageContext.getCurrentContext();
> > Message requestMessage = msgContext.getRequestMessage();
> > int numAttachments = 
> > requestMessage.getAttachmentsImpl().getAttachmentCount();
> >
> > Problem:
> > The problem seems to be to me that my service method is being invoked
> > before the entire attachment has been transferred hence numAttachments
> > == 0 even though the client always sends an attachment. Is there a way
> > to determine that the entire message has been received before querying
> > the number of attachments? In this case the attachments are ~45mb
> >
> > Thanks,
> > Mike
>


reading large attachments

2005-08-01 Thread Axis User
Hi,
First some info...
 
Platform: Axis 1.2.1, Java 1.5.0_04-b05, Linux 2.6.11.4-20a-default

Aim: to send a zip file attached to a SOAP message and save it to a
directory. Zip files will on average be around 50Mb.

Code:
//On the client side I add attachments as below:

DataHandler handler = new DataHandler(new FileDataSource(file));
stub.addAttachment(handler);

//server side retrieval
MessageContext msgContext = MessageContext.getCurrentContext();
Message requestMessage = msgContext.getRequestMessage();
int numAttachments = requestMessage.getAttachmentsImpl().getAttachmentCount();

Problem:
The problem seems to be to me that my service method is being invoked
before the entire attachment has been transferred hence numAttachments
== 0 even though the client always sends an attachment. Is there a way
to determine that the entire message has been received before querying
the number of attachments? In this case the attachments are ~45mb

Thanks,
Mike