AUTO: Katherine Sanders is out of the office. (returning 02/03/2009)

2009-02-26 Thread Katherine Sanders

I am out of the office until 02/03/2009.

I will respond to your message when I return.

For urgent Web Services issues please contact my team leader Ben
Bakowski/UK/IBM.


Note: This is an automated response to your message  "Re: Bug in "Code
Generator Wizard - Eclipse Plug-in"" sent on 27/2/09 0:20:42.

This is the only notification you will receive while this person is away.



How to remove namespaces

2009-02-26 Thread Chisholm, Paul
Hi,

I have an Axis2 web service that was running for some time without any
namespaces. Just recently I found out that at some point a few months
ago namespaces started appearing in the response. Since I only just got
a report its difficult to recall what changed. I am certain my service
and the version of Axis (1.4) did not change, though I did upgrade from
Java 5 to java 6.

Could changes to the XML libraries have caused the addition of the
namespaces?

Given the namespaces are included, is there any way I can configure
Axis2/XMLBeans/Java to just not include namespaces in the response.

Here is an example request

http://asa/met";>
  
  IDQ60010
  BoM
  Text
  LO
  
  cGF1bCB0ZXN0Mg==


And the response is

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

The XML above was generated with the toString method on the the
Axis2/XMLBeans generated classes.

Note I start with XSD and generate everything from there. Originally I
started with elementFormDefault="qualified". I tried changing it to
elementFormDefault="unqualified" but still got the namespace
decorations.

Thanks,
Paul


Re: Bug in "Code Generator Wizard - Eclipse Plug-in"

2009-02-26 Thread Car Toper
Also, I just tried running in the debugger, like the article and the
stack isn't anything like the article:

Thread [main] (Suspended (exception CodeGenerationException))   
AxisServiceBasedMultiLanguageEmitter.emitSkeleton() line: 1370  
CodeGenerationEngine.generate() line: 253   
CodeGenWizard$1.execute(IProgressMonitor) line: 270 
WorkspaceModifyOperation$1.run(IProgressMonitor) line: 104  
Workspace.run(IWorkspaceRunnable, ISchedulingRule, int,
IProgressMonitor) line: 1800
CodeGenWizard$1(WorkspaceModifyOperation).run(IProgressMonitor) line: 
116   
ModalContext.runInCurrentThread(IRunnableWithProgress,
IProgressMonitor) line: 458
ModalContext.run(IRunnableWithProgress, boolean, IProgressMonitor,
Display) line: 366
WizardDialog.run(boolean, boolean, IRunnableWithProgress) line: 934 
CodeGenWizard.doFinishWSDL2Java() line: 353 
CodeGenWizard.performFinish() line: 171 
WizardDialog.finishPressed() line: 742  
WizardDialog.buttonPressed(int) line: 373   
Dialog$2.widgetSelected(SelectionEvent) line: 624   
TypedListener.handleEvent(Event) line: 228  
EventTable.sendEvent(Event) line: 84
Button(Widget).sendEvent(Event) line: 1003  
Display.runDeferredEvents() line: 3823  
Display.readAndDispatch() line: 3422
WizardDialog(Window).runEventLoop(Shell) line: 825  
WizardDialog(Window).open() line: 801   
WizardHandler$New.executeHandler(ExecutionEvent) line: 253  
WizardHandler$New(WizardHandler).execute(ExecutionEvent) line: 273  
HandlerProxy.execute(ExecutionEvent) line: 281  
Command.executeWithChecks(ExecutionEvent) line: 476 
ParameterizedCommand.executeWithChecks(Object, Object) line: 508
HandlerService.executeCommand(ParameterizedCommand, Event) line: 169
SlaveHandlerService.executeCommand(ParameterizedCommand, Event) line: 
247   
ActionFactory$WorkbenchCommandAction(CommandAction).runWithEvent(Event)
line: 157
ActionContributionItem.handleWidgetSelection(Event, boolean) line: 583  
ActionContributionItem.access$2(ActionContributionItem, Event,
boolean) line: 500
ActionContributionItem$5.handleEvent(Event) line: 411   
EventTable.sendEvent(Event) line: 84
MenuItem(Widget).sendEvent(Event) line: 1003
Display.runDeferredEvents() line: 3823  
Display.readAndDispatch() line: 3422
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2382
Workbench.runUI() line: 2346
Workbench.access$4(Workbench) line: 2198
Workbench$5.run() line: 493 
Realm.runWithDefault(Realm, Runnable) line: 288 
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 488
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149   
IDEApplication.start(IApplicationContext) line: 113 
EclipseAppHandle.run(Object) line: 193  
EclipseAppLauncher.runApplication(Object) line: 110 
EclipseAppLauncher.start(Object) line: 79   
EclipseStarter.run(Object) line: 386
EclipseStarter.run(String[], Runnable) line: 179
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available   
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not 
available   
Method.invoke(Object, Object...) line: not available
Main.invokeFramework(String[], URL[]) line: 549 
Main.basicRun(String[]) line: 504   
Main.run(String[]) line: 1236   
Main.main(String[]) line: 1212


Re: REST not working after upgrade from 1.1.1 to 1.4.1

2009-02-26 Thread keith chapman
Would you mind posting your complete WSDL? That may help figure out what
happened.

Thanks,
Keith.

On Fri, Feb 27, 2009 at 3:06 AM, Ben Williams wrote:

> I got this working after much stepping through Axis code with the
> debugger. What finally worked was switching the order of the GET and
> POST bindings in the wsdl. I noticed that Axis was fetching the POST
> binding while processing my GET request so I thought swapping them in
> the wsdl might make GET work and break POST but now it seems to get a
> generic http binding for all http requests and GET and POST both work.
> I don't fully understand it but it works so I'm happy.
>
> -Ben
>
> On Thu, Feb 26, 2009 at 12:18 PM, Ben Williams 
> wrote:
> > Yep, my URL looks just like that. When I look at the OMElement that
> > gets passed to my service method, though, it is just an empty tag like
> > this:
> >
> > http://myhost.com/rest/certify";
> />
> >
> > -Ben
> >
> > On Thu, Feb 26, 2009 at 11:23 AM, keith chapman 
> wrote:
> >> Hi Ben,
> >>
> >> What is the URL you used when sending request (including the query
> >> parameters).
> >>
> >> According to your wsdl if you send a request to
> >>
> /certifyContact?clientUserID=someUserID&licenseID=someLicenseID&phoneNumbers=SomePhoneNumbers
> >> it should work.
> >>
> >> Thanks,
> >> Keith.
> >>
> >> On Thu, Feb 26, 2009 at 9:28 PM, Ben Williams 
> >> wrote:
> >>>
> >>> I'm not sure if my wsdl is generated or hand-written (I inherited this
> >>> project) but here's what it looks like.
> >>>
> >>> Operation definition:
> >>>
> >>>  >>> type="tns:CertifyChannelPortType">
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> 
> >>>
> >>> Input message schema:
> >>>
> >>> 
> >>>
> >>>
> >>> >>> minOccurs="0"/>
> >>> type="xsd:string">
> >>> >>> type="xsd:string">
> >>>
> >>>
> >>> 
> >>>
> >>> -Ben
> >>>
> >>> On Wed, Feb 25, 2009 at 10:18 PM, keith chapman <
> keithgchap...@gmail.com>
> >>> wrote:
> >>> > Could you post some extracts from your generated wsdl please. The
> >>> > extracts
> >>> > that I need would be the segment defining the operation and the
> schema
> >>> > of
> >>> > the input message.
> >>> >
> >>> > Thanks,
> >>> > Keith.
> >>> >
> >>> > On Thu, Feb 26, 2009 at 2:08 AM, Ben Williams 
> >>> > wrote:
> >>> >>
> >>> >> Hi,
> >>> >> I'm upgrading my Axis2 1.1.1 based service to 1.4.1. REST behavior
> >>> >> seems to have changed in 1.4.1. When I made a GET request to my
> >>> >> service under 1.1.1 Axis would pass a simple XML OMElement to my
> >>> >> service method that looked something like this:
> >>> >>
> >>> >>
> >>> >>
> >>> >>
> blahblahblahblah99
> >>> >>
> >>> >> where licenseID, clientUserID, etc. were parameters in the query
> >>> >> string of my request. Under 1.4.1, Axis seems to pass a valid SOAP
> >>> >> request as an OMElement to my service method, but it's an empty one
> >>> >> and looks like this:
> >>> >>
> >>> >>  >>> >> xmlns:axis2ns1="http://myhost.com/rest/certify";
> >>> >> />
> >>> >>
> >>> >> So the question is, what happened to my request parameters? Do I
> have
> >>> >> to do something special to get 1.4.1 to include the query parameters
> >>> >> in the OMElement that it constructs?
> >>> >>
> >>> >> Thanks,
> >>> >> -Ben
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > 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
> >>
> >
>



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

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


org.apache.xmlbeans does not exist error

2009-02-26 Thread Claire Loto

Hi,
I used wsdl2java tool to generate classes for my axis2 implementation.I 
used xmlbeans for the databinding. However, I am getting a lot of 
compilation errors such as below :

javac

C:\project\vanilla\src\net\brokerhub\xml\bhml\BHml.java (16:49)package 
org.apache.xmlbeans does not exist
C:\project\vanilla\src\net\brokerhub\xml\bhml\BHml.java:16: package 
org.apache.xmlbeans does not exist
C:\project\vanilla\src\net\brokerhub\xml\bhml\Market.java (10:26)package 
org.apache.xmlbeans does not exist
C:\project\vanilla\src\net\brokerhub\xml\bhml\Market.java:10: package 
org.apache.xmlbeans does not exist
C:\project\vanilla\src\net\brokerhub\xml\bhml\Trade.java (16:50)package 
org.apache.xmlbeans does not exist
C:\project\vanilla\src\net\brokerhub\xml\bhml\Trade.java:16: package 
org.apache.xmlbeans does not exist
C:\project\vanilla\src\net\brokerhub\xml\bhml\Confirmation.java 
(18:38)cannot find symbol
C:\project\vanilla\src\net\brokerhub\xml\bhml\Confirmation.java:18: 
cannot find symbol

symbol: class XmlObject

I have added all the necessary libraries for xmlbeans, i.e. 
xmlbeans-2.4.0.jar, xml-apis-1.3.02.jar, xmlgraphics-commons-1.2.jar, 
xmlParserAPIs.jar,XmlSchema-1.3.2.jar. What seems to be the problem here? 


regards

Claire


Re: HTTP connection leak and other related issues

2009-02-26 Thread Alexis Midon
no taker for an easy patch?

Alexis


On Wed, Feb 25, 2009 at 6:45 PM, Alexis Midon  wrote:

>
> Hi everyone,
>
> All the issues relatives to AXIS2-935 are really messy, some of them are
> closed but their clones are not. Some are flagged as fixed but are obviously
> not. All these issues are really old, so I'd like to take a chance to bring
> them back to your attention, especially before releasing 1.5.
>
> I'll post a description of the issue in this email as a summary all the
> jiras.
>
> By default, ServiceClient uses one HttpConnectionManager per invocation
> [2]. This connection manager will create and provide one connection to
> HTTPSender. The first issue is that by default this connection is never
> released to the pool [3]. if you do zillions of invocations, this leak will
> max out your number of file descriptors.
>
> Your investigations in Axis2 options quickly lead you to the
> REUSE_HTTP_CLIENT option. But this first issue has some unfortunate
> consequences if you activate it. Actually if you do so, a single connection
> manager is shared across all invocations. But because connections are not
> release, the pool is starved after two invocations, and the third invocation
> hangs out indefinitely. :(
>
> If you keep digging you will find the AUTO_RELEASE_CONNECTION option. Its
> sounds like a good lead! Let's try it. If you activate this option the
> connection is properly released -Yah! the leak is fixed - but
> unfortunately a new issue shows up (issue #2, aka AXIS2-3478).
> AbstractHTTPSender passes the stream of the connection to the message
> context [4] , but that the connection is now properly released, so this
> stream is closed before the SOAPBuilder gets a chance to read the response
> body.
> Boom! "IOException: Attempted read on closed stream"
>
> These issues are easily reproducible in versions 1.3, 1.4, 1.5.
>
> I submitted and documented a fix in AXIS2-2931 [5], if you had a chance to
> look at it that would be much appreciate.
>
>
> Alexis
>
>
> [1]
> https://issues.apache.org/jira/browse/AXIS2-935?focusedCommentId=12513543#action_12513543
> [2] see method getHttpClient in
> https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
> [3] see method cleanup in
> https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/HTTPSender.java
> [4] see method processResponse in AbstractHTTPSender.java
> [5]
> https://issues.apache.org/jira/browse/AXIS2-2931?focusedCommentId=12676837#action_12676837
>


Daylight savings problem in Australia

2009-02-26 Thread Felix Castanar
Hi,

I'm in Sydney (Australia) where actually there is daylight savings (DST).
The problem I have is the following:

I'm accessing a web service server (in Australia) which sends the following:
2009-02-26T19:10:00

But the response object (generated using Axis2 1.4.1) creates a Calendar object 
that is equivalent to:

2009-02-26 20:10:00

(so it added one hour to what it was sent)

Since this conversion was working in Axis2 1.0 I investigated the issue.

This is the calendar object returned by Axis2 1.0 (please note the value for 
the 
last field: DST_OFFSET=360)

java.util.GregorianCalendar[time=123563580,areFieldsSet=true,areAllFieldsSet=true,
lenient=true,zone=sun.util.calendar.ZoneInfo[id="Australia/Sydney",offset=3600,dstSavings=360,
useDaylight=true,transitions=142,lastRule=java.util.SimpleTimeZone[id=Australia/Sydney,offset=3600,
dstSavings=360,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,
startTime=720,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=720,
endTimeMode=1]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2009,MONTH=1,
WEEK_OF_YEAR=9,WEEK_OF_MONTH=4,DAY_OF_MONTH=26,DAY_OF_YEAR=57,DAY_OF_WEEK=5,
DAY_OF_WEEK_IN_MONTH=4,AM_PM=1,HOUR=7,HOUR_OF_DAY=19,MINUTE=10,SECOND=0,MILLISECOND=0,
ZONE_OFFSET=3600,DST_OFFSET=360]

Whereas the same Calendar object returned by Axis2 1.4.1 returns:

java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,
lenient=true,zone=sun.util.calendar.ZoneInfo[id="Australia/Sydney",offset=3600,dstSavings=360,
useDaylight=true,transitions=142,lastRule=java.util.SimpleTimeZone[id=Australia/Sydney,offset=3600,
dstSavings=360,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,
startTime=720,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=720,
endTimeMode=1]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=1,
WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=26,DAY_OF_YEAR=?,DAY_OF_WEEK=?,
DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=19,MINUTE=10,SECOND=0,MILLISECOND=0,
ZONE_OFFSET=3600,DST_OFFSET=0]

Note the last field for this version: DST_OFFSET=0

I dig down the source code till I found the method responsible for the 
conversion from "2009-02-26T19:10:00" to the Calendar object.

This method is "public static Calendar convertToDateTime(String source) " in 
the class org.apache.axis2.databinding.utils.ConvertUtils

This method explicitly sets DST_OFFSSET=0 regardless the TimeZone being in DST 
or not, so for the entry "2009-02-26T19:10:00" I will get one extra added in 
DST but the correct time when DST finishes (I already tested it changing my 
computer's clock).

I'm aware that JIRA issue 3916 
(https://issues.apache.org/jira/browse/AXIS2-3916) introduced the code where 
DST_OFFSET is set always to 0.

So... 
a) This is still a problem and the issue 3916 should be reopened
b) The web service should be sending the dates in a way we get the right time 
regardless of the DST. Any suggestion how? (AFAIK "2009-02-26T19:10:00" is the 
correct way)

It would be great if someone could put some light here.

Thanks
Felix








How to get Content-Length of SOAP response message!

2009-02-26 Thread Seshi Patibanda
Hello all,

I need to get the content length of the SOAP response message. Following is
the SOAP response seen coming over the wire.

[java] DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod]
Request body sent
[java] DEBUG [httpclient.wire.header] << "HTTP/1.1 200 OK[\r][\n]"
[java] DEBUG [httpclient.wire.header] << "HTTP/1.1 200 OK[\r][\n]"
[java] DEBUG [httpclient.wire.header] << "Server: Apache-Coyote/1.1[\r][\n]"
[java] DEBUG [httpclient.wire.header] << "Content-Type:
text/xml;charset=UTF-8[\r][\n]"
[java] DEBUG [httpclient.wire.header] << "Content-Length: 205[\r][\n]"
[java] DEBUG [httpclient.wire.header] << "Date: Fri, 27 Feb 2009 00:25:48
GMT[\r][\n]"
[java] DEBUG [httpclient.wire.header] << "[\r][\n]"


I have attempted to use _returnMessageContext.getProperty(HT
TPConstants.HEADER_CONTENT_LENGTH) but unable to get the content length
object.

However, I was able to get the status code using
_returnMessageContext.getProperty(HTTPConstants.MC_HTTP_STATUS_CODE);

Are there any methods available in Axis2 API to get the content length
either from the return message context or by other means?

My configuration: Using Axi2 1.4 client stub implementation to call remote
web services.

Any feedback is appreciated.

Thanks,

Seshi


Re: Bug in "Code Generator Wizard - Eclipse Plug-in"

2009-02-26 Thread Car Toper
On Thu, Feb 26, 2009 at 2:23 AM, ibrahim demir  wrote:
> Eclipse configuration is not important . System java version is important
> here ant just check it with command prompt
>
> Just write java -verison and if it is not set to 1.6 than go and add java
> path to system variables and set java home also on system variables.

I have 1.6 and it still does not work:

C:\Apps\eclipse>java -version
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)

C:\Apps\eclipse>eclipse -clean


axis2java Vs jax-ws

2009-02-26 Thread Jason Fister
Hello folks,

We need to write and host a webservice which will act as both a server as
well as a client to a 3rd party webservice. let me make it more clear:

My webservice will receive requests from applications with in our company,
process the requests, call a webservice hosted by a third party outside our
company, receive and process the response and finally respond to the client.

we are in the process of evaluating different soap frameworks. the first 2
that I came across were axis2java and jax-ws v2.1.5.

i am not even sure if the 2 are competing, comparable products. can someone
pls enlighten me on the differences?

is one more stable than the other?
is one more popular than the other?
how about features?
performance?

I would greatly appreciate any help in this regard

Jason


Re: REST not working after upgrade from 1.1.1 to 1.4.1

2009-02-26 Thread Ben Williams
I got this working after much stepping through Axis code with the
debugger. What finally worked was switching the order of the GET and
POST bindings in the wsdl. I noticed that Axis was fetching the POST
binding while processing my GET request so I thought swapping them in
the wsdl might make GET work and break POST but now it seems to get a
generic http binding for all http requests and GET and POST both work.
I don't fully understand it but it works so I'm happy.

-Ben

On Thu, Feb 26, 2009 at 12:18 PM, Ben Williams  wrote:
> Yep, my URL looks just like that. When I look at the OMElement that
> gets passed to my service method, though, it is just an empty tag like
> this:
>
> http://myhost.com/rest/certify"; />
>
> -Ben
>
> On Thu, Feb 26, 2009 at 11:23 AM, keith chapman  
> wrote:
>> Hi Ben,
>>
>> What is the URL you used when sending request (including the query
>> parameters).
>>
>> According to your wsdl if you send a request to
>> /certifyContact?clientUserID=someUserID&licenseID=someLicenseID&phoneNumbers=SomePhoneNumbers
>> it should work.
>>
>> Thanks,
>> Keith.
>>
>> On Thu, Feb 26, 2009 at 9:28 PM, Ben Williams 
>> wrote:
>>>
>>> I'm not sure if my wsdl is generated or hand-written (I inherited this
>>> project) but here's what it looks like.
>>>
>>> Operation definition:
>>>
>>> >> type="tns:CertifyChannelPortType">
>>>    
>>>    
>>>        
>>>        
>>>            
>>>        
>>>        
>>>            
>>>        
>>>    
>>> 
>>>
>>> Input message schema:
>>>
>>> 
>>>    
>>>        
>>>            >> minOccurs="0"/>
>>>            
>>>            >> type="xsd:string">
>>>        
>>>    
>>> 
>>>
>>> -Ben
>>>
>>> On Wed, Feb 25, 2009 at 10:18 PM, keith chapman 
>>> wrote:
>>> > Could you post some extracts from your generated wsdl please. The
>>> > extracts
>>> > that I need would be the segment defining the operation and the schema
>>> > of
>>> > the input message.
>>> >
>>> > Thanks,
>>> > Keith.
>>> >
>>> > On Thu, Feb 26, 2009 at 2:08 AM, Ben Williams 
>>> > wrote:
>>> >>
>>> >> Hi,
>>> >> I'm upgrading my Axis2 1.1.1 based service to 1.4.1. REST behavior
>>> >> seems to have changed in 1.4.1. When I made a GET request to my
>>> >> service under 1.1.1 Axis would pass a simple XML OMElement to my
>>> >> service method that looked something like this:
>>> >>
>>> >>
>>> >>
>>> >> blahblahblahblah99
>>> >>
>>> >> where licenseID, clientUserID, etc. were parameters in the query
>>> >> string of my request. Under 1.4.1, Axis seems to pass a valid SOAP
>>> >> request as an OMElement to my service method, but it's an empty one
>>> >> and looks like this:
>>> >>
>>> >> >> >> xmlns:axis2ns1="http://myhost.com/rest/certify";
>>> >> />
>>> >>
>>> >> So the question is, what happened to my request parameters? Do I have
>>> >> to do something special to get 1.4.1 to include the query parameters
>>> >> in the OMElement that it constructs?
>>> >>
>>> >> Thanks,
>>> >> -Ben
>>> >
>>> >
>>> >
>>> > --
>>> > 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
>>
>


Option to not generate inner factory classes for stubs

2009-02-26 Thread Harshad Chavan
Hi all,

I am generating stubs with wsdl2java with -s -g -u options.

It generates individual file for each complex type in the wsdl, which is fine. 
But I also see that it generates an inner Factory class for each of these java 
files.

Is there any any way I can tell wsdl2java to not to generate these Factory 
classes/inner classes.

Any help will be greatly appreciated.

Thanks,

Harshad

LongJump - Platform as a Service 


  

Re: REST not working after upgrade from 1.1.1 to 1.4.1

2009-02-26 Thread Ben Williams
Yep, my URL looks just like that. When I look at the OMElement that
gets passed to my service method, though, it is just an empty tag like
this:

http://myhost.com/rest/certify"; />

-Ben

On Thu, Feb 26, 2009 at 11:23 AM, keith chapman  wrote:
> Hi Ben,
>
> What is the URL you used when sending request (including the query
> parameters).
>
> According to your wsdl if you send a request to
> /certifyContact?clientUserID=someUserID&licenseID=someLicenseID&phoneNumbers=SomePhoneNumbers
> it should work.
>
> Thanks,
> Keith.
>
> On Thu, Feb 26, 2009 at 9:28 PM, Ben Williams 
> wrote:
>>
>> I'm not sure if my wsdl is generated or hand-written (I inherited this
>> project) but here's what it looks like.
>>
>> Operation definition:
>>
>> > type="tns:CertifyChannelPortType">
>>    
>>    
>>        
>>        
>>            
>>        
>>        
>>            
>>        
>>    
>> 
>>
>> Input message schema:
>>
>> 
>>    
>>        
>>            > minOccurs="0"/>
>>            
>>            > type="xsd:string">
>>        
>>    
>> 
>>
>> -Ben
>>
>> On Wed, Feb 25, 2009 at 10:18 PM, keith chapman 
>> wrote:
>> > Could you post some extracts from your generated wsdl please. The
>> > extracts
>> > that I need would be the segment defining the operation and the schema
>> > of
>> > the input message.
>> >
>> > Thanks,
>> > Keith.
>> >
>> > On Thu, Feb 26, 2009 at 2:08 AM, Ben Williams 
>> > wrote:
>> >>
>> >> Hi,
>> >> I'm upgrading my Axis2 1.1.1 based service to 1.4.1. REST behavior
>> >> seems to have changed in 1.4.1. When I made a GET request to my
>> >> service under 1.1.1 Axis would pass a simple XML OMElement to my
>> >> service method that looked something like this:
>> >>
>> >>
>> >>
>> >> blahblahblahblah99
>> >>
>> >> where licenseID, clientUserID, etc. were parameters in the query
>> >> string of my request. Under 1.4.1, Axis seems to pass a valid SOAP
>> >> request as an OMElement to my service method, but it's an empty one
>> >> and looks like this:
>> >>
>> >> > >> xmlns:axis2ns1="http://myhost.com/rest/certify";
>> >> />
>> >>
>> >> So the question is, what happened to my request parameters? Do I have
>> >> to do something special to get 1.4.1 to include the query parameters
>> >> in the OMElement that it constructs?
>> >>
>> >> Thanks,
>> >> -Ben
>> >
>> >
>> >
>> > --
>> > 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: File transported by AXIS2 SwA was added an extra CRLF

2009-02-26 Thread Andreas Veithen
This problem has been reported as WSCOMMONS-328 [1] and was fixed in
Axiom 1.2.8.

Andreas

[1] https://issues.apache.org/jira/browse/WSCOMMONS-328


On Thu, Feb 26, 2009 at 17:25, Colinhy  wrote:
>
> For certain size of file (plain text file), when uploaded by AXIS2 SwA,  an
> extra CRLF was added to the end of the file. Any hint? Thanks!
> --
> View this message in context: 
> http://www.nabble.com/File-transported-by-AXIS2-SwA-was-added-an-extra-CRLF-tp7784p7784.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


File transported by AXIS2 SwA was added an extra CRLF

2009-02-26 Thread Colinhy

For certain size of file (plain text file), when uploaded by AXIS2 SwA,  an
extra CRLF was added to the end of the file. Any hint? Thanks!
-- 
View this message in context: 
http://www.nabble.com/File-transported-by-AXIS2-SwA-was-added-an-extra-CRLF-tp7784p7784.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: REST not working after upgrade from 1.1.1 to 1.4.1

2009-02-26 Thread keith chapman
Hi Ben,

What is the URL you used when sending request (including the query
parameters).

According to your wsdl if you send a request to
/certifyContact?clientUserID=someUserID&licenseID=someLicenseID&phoneNumbers=SomePhoneNumbers
it should work.

Thanks,
Keith.

On Thu, Feb 26, 2009 at 9:28 PM, Ben Williams wrote:

> I'm not sure if my wsdl is generated or hand-written (I inherited this
> project) but here's what it looks like.
>
> Operation definition:
>
>  type="tns:CertifyChannelPortType">
>
>
>
>
>
>
>
>
>
>
> 
>
> Input message schema:
>
> 
>
>
> minOccurs="0"/>
>
> type="xsd:string">
>
>
> 
>
> -Ben
>
> On Wed, Feb 25, 2009 at 10:18 PM, keith chapman 
> wrote:
> > Could you post some extracts from your generated wsdl please. The
> extracts
> > that I need would be the segment defining the operation and the schema of
> > the input message.
> >
> > Thanks,
> > Keith.
> >
> > On Thu, Feb 26, 2009 at 2:08 AM, Ben Williams 
> wrote:
> >>
> >> Hi,
> >> I'm upgrading my Axis2 1.1.1 based service to 1.4.1. REST behavior
> >> seems to have changed in 1.4.1. When I made a GET request to my
> >> service under 1.1.1 Axis would pass a simple XML OMElement to my
> >> service method that looked something like this:
> >>
> >>
> >>
> blahblahblahblah99
> >>
> >> where licenseID, clientUserID, etc. were parameters in the query
> >> string of my request. Under 1.4.1, Axis seems to pass a valid SOAP
> >> request as an OMElement to my service method, but it's an empty one
> >> and looks like this:
> >>
> >> http://myhost.com/rest/certify
> "
> >> />
> >>
> >> So the question is, what happened to my request parameters? Do I have
> >> to do something special to get 1.4.1 to include the query parameters
> >> in the OMElement that it constructs?
> >>
> >> Thanks,
> >> -Ben
> >
> >
> >
> > --
> > 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: REST not working after upgrade from 1.1.1 to 1.4.1

2009-02-26 Thread Ben Williams
I'm not sure if my wsdl is generated or hand-written (I inherited this
project) but here's what it looks like.

Operation definition:














Input message schema:











-Ben

On Wed, Feb 25, 2009 at 10:18 PM, keith chapman  wrote:
> Could you post some extracts from your generated wsdl please. The extracts
> that I need would be the segment defining the operation and the schema of
> the input message.
>
> Thanks,
> Keith.
>
> On Thu, Feb 26, 2009 at 2:08 AM, Ben Williams  wrote:
>>
>> Hi,
>> I'm upgrading my Axis2 1.1.1 based service to 1.4.1. REST behavior
>> seems to have changed in 1.4.1. When I made a GET request to my
>> service under 1.1.1 Axis would pass a simple XML OMElement to my
>> service method that looked something like this:
>>
>>
>> blahblahblahblah99
>>
>> where licenseID, clientUserID, etc. were parameters in the query
>> string of my request. Under 1.4.1, Axis seems to pass a valid SOAP
>> request as an OMElement to my service method, but it's an empty one
>> and looks like this:
>>
>> http://myhost.com/rest/certify";
>> />
>>
>> So the question is, what happened to my request parameters? Do I have
>> to do something special to get 1.4.1 to include the query parameters
>> in the OMElement that it constructs?
>>
>> Thanks,
>> -Ben
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>


Location of constants

2009-02-26 Thread Richard Hu
Hi,

 

I'm looking for some constants that previously were accessible in Axis
and even earlier versions of Axis 2 and was wondering if anyone happen
to know where they are located in the new API or if they have been
renamed.  So far, I have been unable to find them.

 

Specifically, I am looking for Constants.MC_HOME_DIR and
MessageContext.AUTHUSER.

 

Also, how do I get the username and password from the message context in
Axis 2?  

 

Thanks,

Richard



RE: Problem using special character "<"

2009-02-26 Thread Manuel Lenz

Hi Developers,
I´ve got a hint for resolving the problem.
Axis ist changing "<" into "<".
So the webservice isn´t able to change "<" into "<".
Do you know how to prevent the change from "<" to "<"?

Thanks for your help,
M. Lenz



   
 Manuel Lenz   
  An
axis-user@ws.apache.org
 24.02.2009 13:59Kopie
   
 Thema
  Bitte antworten   Problem using special character
an  "<"
 axis-u...@ws.apac 
  he.org   
   
   
   
   




Hi Axis-Users,
I try to call a webservice with a search-request.
The search request includes the special character "<".
The webservice itself works with the html-writing "<".
So I´ve added this code for the search request:

MessageElement operator = new MessageElement();
operator.setName("operator");
operator.setValue("<");

But the webservice ignores the operator.
What is wrong with the search request?

Thanks for your interest,
Manuel

Ps: I´m using Axis 1.2.1






Viessmann IT Service GmbH
Geschäftsführer: Dirk Klöckner, Dr. Harald Dörnbach
Sitz der Gesellschaft: Allendorf (Eder) - Registergericht:
AG Marburg (Lahn) - HRB 5324 - USt-IdNr.: DE258558424







Viessmann IT Service GmbH
Geschäftsführer: Dirk Klöckner, Dr. Harald Dörnbach
Sitz der Gesellschaft: Allendorf (Eder) - Registergericht:
AG Marburg (Lahn) - HRB 5324 - USt-IdNr.: DE258558424
<><><>

Re: Memory problems using axis2 tomcat and ssl

2009-02-26 Thread Håkon Sagehaug
Hi

I did not want to just increase the heap size and other properties, because
this just as markus say often "just delay the error."

I now this error has something to do with classloading and, redeployment,
but since I dont do anything like this and everything works fine with out
ssl enabled for tomcat, I'm sort of lost. Does tomcat need more memory when
ssl is enabled, could this be the issue?

Håkon

2009/2/26 m4rkuz 

>
> Hello Martin,
>
> I've been down that path too, but extracted from the same blog:
>
> http://my.opera.com/karmazilla/blog/2007/03/15/permgen-strikes-back
>
> This solution only works fine in some cases, in other it just delay the
> error.
>
> Regards,
>
>
> Marcus V. Sánchez D.
> __
> Enterprise Developer.
> Sun Certified Java Programmer (SCJP)
>
>
> On Thu, Feb 26, 2009 at 8:54 AM, Martin Gainty wrote:
>
>>  Hakkon
>>
>> If you dont mind taking advice from a norsk please read
>>
>> http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror
>>
>> as this is related to the JVM and permgen settings you must tweak
>> JAVA_OPTS env parameter
>> please add these parameters to your JAVA_OPTS env variable
>>
>> switch garbage-collector to concurrent
>> -XX:+UseConcMarkSweepGC
>>
>> collect in permgen space
>> -XX:+CMSPermGenSweepingEnabled
>>
>> allow classes to be unloaded
>> -XX:+CMSClassUnloadingEnabled
>>
>> tweak the Max Perm Gen size up to 128M
>> -XX:MaxPermSize=128m
>>
>> SET JAVA_OPTS=-XX:UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled 
>> -XX:+CMSClassUnloadingEnabled
>>
>> -XX:MaxPermSize=128m
>>
>> Takk
>> 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: Thu, 26 Feb 2009 14:37:58 +0100
>> Subject: Memory problems using axis2 tomcat and ssl
>> From: hakon.sageh...@bccs.uib.no
>> To: axis-user@ws.apache.org
>>
>>
>> Hi all,
>>
>> I'm experimenting with web services deployed with axis2 in tomcat using
>> ssl for securing them and noticed something strange. I can call one of the
>> services many times and no problems, but when I want to call  another
>> service I get
>>
>> java.lang.OutOfMemoryError: PermGen space
>>
>> from tomcat. If I start tomcat without ssl enabled all services and
>> container behaves normally, calling them multiple times works as it should.
>> Have anyone experienced anything similar? I've not altered any of the web
>> services just added the tomcat ssl connector and configured it like this
>>
>>  >maxThreads="200" scheme="https" secure="true"
>>clientAuth="false" sslProtocol="TLS" enableLookups="true"
>>keystoreFile="${user.home}/my.jks"
>>keystorePass="password" acceptCount="100"
>> minSpareThreads="5" maxSpareThreads="75"
>> disableUploadTimeout="true"
>> />
>>
>> I'm usign axis2-1.4.1, tomat 6.0.18
>>
>> cheers, Håkon
>>
>>
>> --
>> Håkon Sagehaug, Scientific Programmer
>> Parallab, Bergen Center for Computational Science (BCCS)
>> UNIFOB AS (University of Bergen Research Company)
>>
>> --
>> Windows Live™: Discover 10 secrets about the new Windows Live. View 
>> post.
>>
>
>


-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Re: Memory problems using axis2 tomcat and ssl

2009-02-26 Thread m4rkuz
Hello Martin,

I've been down that path too, but extracted from the same blog:

http://my.opera.com/karmazilla/blog/2007/03/15/permgen-strikes-back

This solution only works fine in some cases, in other it just delay the
error.

Regards,


Marcus V. Sánchez D.
__
Enterprise Developer.
Sun Certified Java Programmer (SCJP)


On Thu, Feb 26, 2009 at 8:54 AM, Martin Gainty  wrote:

>  Hakkon
>
> If you dont mind taking advice from a norsk please read
>
> http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror
>
> as this is related to the JVM and permgen settings you must tweak JAVA_OPTS
> env parameter
> please add these parameters to your JAVA_OPTS env variable
>
> switch garbage-collector to concurrent
> -XX:+UseConcMarkSweepGC
>
> collect in permgen space
> -XX:+CMSPermGenSweepingEnabled
>
> allow classes to be unloaded
> -XX:+CMSClassUnloadingEnabled
>
> tweak the Max Perm Gen size up to 128M
> -XX:MaxPermSize=128m
>
> SET JAVA_OPTS=-XX:UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled 
> -XX:+CMSClassUnloadingEnabled
> -XX:MaxPermSize=128m
>
> Takk
> 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: Thu, 26 Feb 2009 14:37:58 +0100
> Subject: Memory problems using axis2 tomcat and ssl
> From: hakon.sageh...@bccs.uib.no
> To: axis-user@ws.apache.org
>
>
> Hi all,
>
> I'm experimenting with web services deployed with axis2 in tomcat using ssl
> for securing them and noticed something strange. I can call one of the
> services many times and no problems, but when I want to call  another
> service I get
>
> java.lang.OutOfMemoryError: PermGen space
>
> from tomcat. If I start tomcat without ssl enabled all services and
> container behaves normally, calling them multiple times works as it should.
> Have anyone experienced anything similar? I've not altered any of the web
> services just added the tomcat ssl connector and configured it like this
>
>  maxThreads="200" scheme="https" secure="true"
>clientAuth="false" sslProtocol="TLS" enableLookups="true"
>keystoreFile="${user.home}/my.jks"
>keystorePass="password" acceptCount="100"
> minSpareThreads="5" maxSpareThreads="75"
> disableUploadTimeout="true"
> />
>
> I'm usign axis2-1.4.1, tomat 6.0.18
>
> cheers, Håkon
>
>
> --
> Håkon Sagehaug, Scientific Programmer
> Parallab, Bergen Center for Computational Science (BCCS)
> UNIFOB AS (University of Bergen Research Company)
>
> --
> Windows Live™: Discover 10 secrets about the new Windows Live. View 
> post.
>


RE: Memory problems using axis2 tomcat and ssl

2009-02-26 Thread Martin Gainty

Hakkon

If you dont mind taking advice from a norsk please read
http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror

as this is related to the JVM and permgen settings you must tweak JAVA_OPTS env 
parameter
please add these parameters to your JAVA_OPTS env variable

switch garbage-collector to concurrent
-XX:+UseConcMarkSweepGC

collect in permgen space
-XX:+CMSPermGenSweepingEnabled

allow classes to be unloaded
-XX:+CMSClassUnloadingEnabled
tweak the Max Perm Gen size up to 128M
-XX:MaxPermSize=128m

SET JAVA_OPTS=-XX:UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled 
-XX:+CMSClassUnloadingEnabled 
-XX:MaxPermSize=128m
Takk
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: Thu, 26 Feb 2009 14:37:58 +0100
Subject: Memory problems using axis2 tomcat and ssl
From: hakon.sageh...@bccs.uib.no
To: axis-user@ws.apache.org

Hi all,

I'm experimenting with web services deployed with axis2 in tomcat using ssl for 
securing them and noticed something strange. I can call one of the services 
many times and no problems, but when I want to call  another service I get 


java.lang.OutOfMemoryError: PermGen space

from tomcat. If I start tomcat without ssl enabled all services and container 
behaves normally, calling them multiple times works as it should. Have anyone 
experienced anything similar? I've not altered any of the web services just 
added the tomcat ssl connector and configured it like this


 

I'm usign axis2-1.4.1, tomat 6.0.18

cheers, Håkon


-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)

_
Windows Live™: Discover 10 secrets about the new Windows Live.  
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!7540.entry?ocid=TXT_TAGLM_WL_t2_ugc_post_022009

Re: Memory problems using axis2 tomcat and ssl

2009-02-26 Thread m4rkuz
This exception usually apears when your code is messing with the
classloader, or you're making hot redeploys etc.

Ring a bell?


Regards,


Marcus V. Sánchez D.
__
Enterprise Developer.
Sun Certified Java Programmer (SCJP)
PD: if you know some spanish there is a really good explanation(at least
when the propblem is the code):
http://rubensa.wordpress.com/2008/02/11/java-classloader-permgen-exception/


On Thu, Feb 26, 2009 at 8:37 AM, Håkon Sagehaug
wrote:

> Hi all,
>
> I'm experimenting with web services deployed with axis2 in tomcat using ssl
> for securing them and noticed something strange. I can call one of the
> services many times and no problems, but when I want to call  another
> service I get
>
> java.lang.OutOfMemoryError: PermGen space
>
> from tomcat. If I start tomcat without ssl enabled all services and
> container behaves normally, calling them multiple times works as it should.
> Have anyone experienced anything similar? I've not altered any of the web
> services just added the tomcat ssl connector and configured it like this
>
>  maxThreads="200" scheme="https" secure="true"
>clientAuth="false" sslProtocol="TLS" enableLookups="true"
>keystoreFile="${user.home}/my.jks"
>keystorePass="password" acceptCount="100"
> minSpareThreads="5" maxSpareThreads="75"
> disableUploadTimeout="true"
> />
>
> I'm usign axis2-1.4.1, tomat 6.0.18
>
> cheers, Håkon
>
>
> --
> Håkon Sagehaug, Scientific Programmer
> Parallab, Bergen Center for Computational Science (BCCS)
> UNIFOB AS (University of Bergen Research Company)
>


Memory problems using axis2 tomcat and ssl

2009-02-26 Thread Håkon Sagehaug
Hi all,

I'm experimenting with web services deployed with axis2 in tomcat using ssl
for securing them and noticed something strange. I can call one of the
services many times and no problems, but when I want to call  another
service I get

java.lang.OutOfMemoryError: PermGen space

from tomcat. If I start tomcat without ssl enabled all services and
container behaves normally, calling them multiple times works as it should.
Have anyone experienced anything similar? I've not altered any of the web
services just added the tomcat ssl connector and configured it like this

 

I'm usign axis2-1.4.1, tomat 6.0.18

cheers, Håkon


-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Re: Retry: Axis2 - Retrieving SOAPBody through MessageContext versus OMException (WstxUnexpectedCharException)

2009-02-26 Thread Sagara Gunathunga
Hi Marinus,
I don't have exact idea about the exception you got , may be input
stream  is closed or in a invalid state  when the time of you access
it using getLastOperationContext() method, someone more knowledgeable
will share his insights regarding this .

Meanwhile try to access in coming SOAP message using the return object
(CancelBookingResponseDocument) as follows .

   output.getOMElement(null,null).serialize(System.out);

Instead of System.out you can use any OutPutStream  with serialize
method, Hope this will work with you.

Thanks ,

On Thu, Feb 26, 2009 at 3:20 PM, Geuze, Marinus
 wrote:
>> Dear Axis2 Users,
>>
>> I hope you can help me with this problem.
>>
>> This is the situation. I use the Axis2 framework for accessing a WebService. 
>> When I use the generated Stub then everything works perfectly fine. However 
>> I want to obtain the actual message which is sent to and received from the 
>> WebService. This is for logging reasons. Here the problem starts. See my 
>> code example below.
>>
>> //Create Stub
>> QuickCarRentalServiceStub testStub = new QuickCarRentalServiceStub(url);
>>
>> //Set Stub options (only those who are needed)
>> Options options = testStub._getServiceClient().getOptions();
>>
>> //Set http protocol version
>> options.setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,  
>> HTTPConstants.HEADER_PROTOCOL_11);
>>
>> //Set soap version (example: SOAP 1.1 (SOAP11Constants) or SOAP 1.2 
>> //(SOAP12Constants))
>> options.setSoapVersionURI(
>>   org.apache.axiom.soap.SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>>
>> //Set input of proxy method
>> CancelBookingDocument input = CancelBookingDocument.Factory.newInstance();
>> CancelBookingDocument.CancelBooking secondInput =
>>   CancelBookingDocument.CancelBooking.Factory.newInstance();
>> secondInput.setBookingId("1");
>> input.setCancelBooking(secondInput);
>>
>> //Execute Stub method
>> CancelBookingResponseDocument output = testStub.cancelBooking(input);
>>
>> //Get output of proxy method
>> String responseAsString = output.getCancelBookingResponse().getResponse();
>>
>> //Till now everything is fine. The responseAsString contains a valid value.
>>
>> MessageContext msgContextIn = 
>> testStub._getServiceClient().getLastOperationContext().getMessageContext("In");
>> SOAPEnvelope soapEnvIn = msgContextIn.getEnvelope();
>> SOAPBody soapBodyIn = soapEnvIn.getBody();
>> return soapBodyIn.toString();
>>
>> The soapBodyIn.toString() throws a OMException with the errormessage > '> 
>> com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'V' (code 
>> 86) in epilog; expected '<' at [row,col {unknown-source}]: [1,593]> '>
>>
>> The returned soap message is (obtained with use of TCPMON, and the message 
>> seems valid):
>>
>> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
>> xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
>> >> xmlns:rpl='urn:QuickCarRentalServiceVi'>1 
>> cancelled.
>>
>> My question is this: Why does the output object work and why does the 
>> soapBodyIn.toString() fails? I really hope someone can help.
>>
>> I use Axis version 1.4.1 and Axiom version 1.2.8.
>>
>> Thanks in advantage.
>>
>> Kind regards,
>> Marinus
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


way .mar(Module Archive) file generate

2009-02-26 Thread 김해현

How to generate .mar file?

and Can .mar file inside context see. because i want to modify existed .mar 
file


--
From: "sharath reddy" 
Sent: Thursday, February 26, 2009 7:49 PM
To: 
Subject: Re: How to create phase for axis2 handler?


Hi,

In your axis2.xml file, you will see the phases defined. You can either 
use one of the existing phases or add your own phase. If you want a 
handler for outgoing messages, use one of the phases in type="OutFlow">. For incoming messages, use .


For example, in Axis 1.4.1, there is a phase called OperationInPhase 
defined in the InFlow.


You would plug your handler into this phase with the following entry in 
your module.xml:



 




--- On Thu, 2/26/09, 김해현  wrote:


From: 김해현 
Subject: How to create phase for axis2 handler?
To: axis-user@ws.apache.org
Date: Thursday, February 26, 2009, 2:53 AM
How to create phase for axis2 handler?

I created new handler (extended AbstractHandler class).

The handler doesn't run. I think new phase class but i
don't know how to create and use phase class.







Re: Axis2 - the client side suitability for dynamic invocation of web services

2009-02-26 Thread Pradeep Fernando
hi Avi,

I'll be much obliged if someone can tell me that whether Axis2 is suitable
> for one who *does not care about building web services* but only in *consuming
> them dynamically*


may be what you are looking for is Axis2 dynamic client, where you can give
the WSDL of the service as a argument during service client creation. Please
refer to the article given [1] for more details. There is a sub heading
called "Creating Dynamic  client. ".
Note that service client only supports WSDL1.1 at the moment.

hope this helps,
Pradeep.

[1]
http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.htmlby
Deepal jayasinghe.


Re: [Axis2] JMS in axis2

2009-02-26 Thread Sagara Gunathunga
Hi Prasuna,
May be you can write a Axis2 Module for this , where in your in-phase
handler you can construct a JMS message from MessageContext and post
it to a JMS queue. in this case you  could use Module's init method to
initialize connection to a JMS broker , I'm not sure how  to optimize
JMS broker connectivity with this approach.please refer Axis2 modules
guide [1]

[1]- http://ws.apache.org/axis2/1_4_1/modules.html

Thanks ,

On Thu, Feb 26, 2009 at 2:10 PM, Prasuna Lanka  wrote:
> Thanks for the replies.
>
> I think i didnt put my query clear. I have exposed a webservice using axis2.
> The client will send the request. Up to this part, i dont require JMS. once
> i received the request, i want to post it to JMS before it reaches to
> ReceiverInout or Skeleton level. Is there any way to do this?
>
> Regards,
> Ps
>
> On 2/20/09, Prabath Siriwardena  wrote:
>>
>> Hi;
>>
>> This[1] may be helpful.
>>
>> Thanks & regards.
>> -Prabath
>>
>> [1]:http://blog.facilelogin.com/2008/12/enabling-jms-transport-for-axis2.html
>>
>> Prasuna Lanka wrote:
>>>
>>> We want to post the webservice request to JMS Queue. I found samples only
>>> exposing the service over JMS. How would we get access to connection
>>> instance in skeleton or receiverInout if we configure JMS parameters in
>>> axis2.xml?
>>>  Thanks in advance.
>>> 
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database:
>>> 270.11.1/1961 - Release Date: 02/19/09 18:45:00
>>>
>>>
>>
>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


Re: WSDL2Java - Skip Classes options

2009-02-26 Thread amit shah
Re-replying to the mail in case I was not clear in explaining the problem.

I want to generate java classes from a published wsdl file (exposed by
Microsoft SQL Reporting Services 2008). During the class generation, I want
to skip some of these classes (for e.g TrustedUserHeader).

Pasting a snippet of the wsdl file.

_

 http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices
">
  
 

  
   
 

   
 

  
  
 


* *
**
**

  ..
  ..


_

Are there any ways (may be a command option) of using wsdl2java.bat which
would skip the generation of *TrustedUserHeader *class?

Thanks in advance,
Amit Shah.


On 2/17/09, amit shah  wrote:
>
> Hi,
>   I am using axis2 1.4.1 to generate java classes from a wsdl file. The
> web services are exposed by the SQL Server 2008 Reporting Services. I
> wanted to know if there is any command line option while using
> wsdl2java.bat to skip generating some classes (In my case a soap
> header called TrustedUserHeader). I use the following command to
> convert wsdl to java
>
>   wsdl2java.bat -o E:\wsdl2java\ -p
> sqlserver.reporting.reportingexecutionservices -ss -g -ns2p
>
> http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices=sqlserver.reporting.reportingexecutionservices
> -uri http://v-sql-2k8/reportserver/ReportExecution2005.asmx
>
>   I want to skip generation of the TrustedUserHeader class. If anyone
> can provide any guidance it would be very helpful
>
> Note : The wsdl file has the same namespace for all the classes. Hence
> the namespace of the TrustedUserHeader class is also
>
> http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices
> .
>
> Thanks in advance,
> Amit Shah.
>


Re: How to create phase for axis2 handler?

2009-02-26 Thread sharath reddy
Hi,

In your axis2.xml file, you will see the phases defined. You can either use one 
of the existing phases or add your own phase. If you want a handler for 
outgoing messages, use one of the phases in . For 
incoming messages, use .

For example, in Axis 1.4.1, there is a phase called OperationInPhase defined in 
the InFlow.

You would plug your handler into this phase with the following entry in your 
module.xml:


   




--- On Thu, 2/26/09, 김해현  wrote:

> From: 김해현 
> Subject: How to create phase for axis2 handler?
> To: axis-user@ws.apache.org
> Date: Thursday, February 26, 2009, 2:53 AM
> How to create phase for axis2 handler?
> 
> I created new handler (extended AbstractHandler class).
> 
> The handler doesn't run. I think new phase class but i
> don't know how to create and use phase class.





Issue with Provider-based Jax-ws service and Wsdl

2009-02-26 Thread sharath reddy
Hi, 

I'm having trouble trying to deploy a Provider-based web service: 

@WebServiceProvider(
portName="SamplePort",
serviceName="SampleProvider",
targetNamespace="http://sample.org";,
wsdlLocation="META-INF/provider.wsdl"
)
@BindingType(value=SOAPBinding.SOAP11HTTP_BINDING)
@ServiceMode(value=javax.xml.ws.Service.Mode.PAYLOAD)

public class SampleProvider implements Provider{ ... 

I have provided a WSDL file at the location indicated above (WsdlLocation).

When I query the service with the '?wsdl' parameter, I want to see the WSDL 
above, and NOT generate the WSDL from the annotated class. In any case, we 
can't generate a WSDL from a Provider class since the class does not contain 
port type and operation information. 

In order to do so, I had to make the following 2 changes:
1. In order to display the user-provided WSLD, I had to hack this method in 
AxisService to always return TRUE, since I am not using services.xml file, need 
to come up with a way to handle this for JAX-WS services.

   /**
 * User can set a parameter in services.xml saying he want to show the
 * original wsdl that he put into META-INF once someone ask for ?wsdl so if
 * you want to use your own wsdl then add following parameter into
 * services.xml true
 */
   public boolean isUseUserWSDL() {

System.out.println("isUseUserWSDL: returning true");
return true;

/*Parameter parameter = getParameter("useOriginalwsdl");
if (parameter != null) {
String value = (String) parameter.getValue();
if ("true".equals(value)) {
return true;
}
}
return false;*/
}


2. If accessing user-defined WSDL, the run-time tries to retrieve the WSDL from 
an Axis parameter called  WSDLConstants.WSDL_4_J_DEFINITION. Since this 
parameter is not being populated for JAx-WS services, I had to modify  the code 
to stuff it in there. Currently, its a bit of a hack:

In DescriptionFactory.createAxisService() :

ServiceDescriptionImpl serviceDescriptionImpl = 
(ServiceDescriptionImpl) serviceDescription;

   Definition definition = serviceDescriptionImpl.getWSDLDefinition();
   if (definition != null)
  axisService.addParameter(WSDLConstants.WSDL_4_J_DEFINITION, definition);


Is there anything I am doing wrong? Are there any working examples of using 
Provider-type web services in Axis2? 

Regards,
Sharath



  


Retry: Axis2 - Retrieving SOAPBody through MessageContext versus OMException (WstxUnexpectedCharException)

2009-02-26 Thread Geuze, Marinus
> Dear Axis2 Users,
> 
> I hope you can help me with this problem.
> 
> This is the situation. I use the Axis2 framework for accessing a WebService. 
> When I use the generated Stub then everything works perfectly fine. However I 
> want to obtain the actual message which is sent to and received from the 
> WebService. This is for logging reasons. Here the problem starts. See my code 
> example below.
> 
> //Create Stub
> QuickCarRentalServiceStub testStub = new QuickCarRentalServiceStub(url);
> 
> //Set Stub options (only those who are needed)
> Options options = testStub._getServiceClient().getOptions();
>   
> //Set http protocol version
> options.setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,  
> HTTPConstants.HEADER_PROTOCOL_11);
>   
> //Set soap version (example: SOAP 1.1 (SOAP11Constants) or SOAP 1.2 
> //(SOAP12Constants))
> options.setSoapVersionURI(
>   org.apache.axiom.soap.SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>   
> //Set input of proxy method
> CancelBookingDocument input = CancelBookingDocument.Factory.newInstance();
> CancelBookingDocument.CancelBooking secondInput =
>   CancelBookingDocument.CancelBooking.Factory.newInstance();
> secondInput.setBookingId("1");
> input.setCancelBooking(secondInput);
> 
> //Execute Stub method
> CancelBookingResponseDocument output = testStub.cancelBooking(input);
>   
> //Get output of proxy method
> String responseAsString = output.getCancelBookingResponse().getResponse();
> 
> //Till now everything is fine. The responseAsString contains a valid value.
> 
> MessageContext msgContextIn = 
> testStub._getServiceClient().getLastOperationContext().getMessageContext("In");
> SOAPEnvelope soapEnvIn = msgContextIn.getEnvelope();
> SOAPBody soapBodyIn = soapEnvIn.getBody();
> return soapBodyIn.toString();
> 
> The soapBodyIn.toString() throws a OMException with the errormessage > '> 
> com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'V' (code 
> 86) in epilog; expected '<' at [row,col {unknown-source}]: [1,593]> '>  
> 
> The returned soap message is (obtained with use of TCPMON, and the message 
> seems valid): 
> 
> http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > xmlns:rpl='urn:QuickCarRentalServiceVi'>1 
> cancelled.
> 
> My question is this: Why does the output object work and why does the 
> soapBodyIn.toString() fails? I really hope someone can help.
> 
> I use Axis version 1.4.1 and Axiom version 1.2.8.
> 
> Thanks in advantage.
> 
> Kind regards, 
> Marinus 


Axis2 - the client side suitability for dynamic invocation of web services

2009-02-26 Thread Avi Grossbard
I am new to AXIS and was looking for* client side support classes* that will
enable easy *dynamic invocation* of WEB services.
At the beginning I found AXIS 1.4 and there I've found in the User's guide
an example which seemed to cover what I was looking for:

public class TestClient {
  public static void main(String [] args) {
try {
  String endpoint ="http://ws.apache.org:5049/axis/services/echo";;

  Service  service = new Service();
  Call call= (Call) service.createCall();
  call.setTargetEndpointAddress( new java.net.URL(endpoint) );
  call.setOperationName(new QName("http://soapinterop.org/";, "echoString"));

  String ret = (String) call.invoke( new Object[] { "Hello!" } );
  System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
   System.err.println(e.toString());

}
  }
}



But then I've learned that there is new version Axis2 version 1.4.1 and in
the user's guide they directed the reader on *migration *path from older
Axis version to the new one.
I was surprise to see that the above (seemingly) simple coding style  was
replaced by kind of 'low level' coding style of Soap using* Axiom*framework:

public class EchoBlockingClient {
private static EndpointReference targetEPR = new EndpointReference(

"http://127.0.0.1:8080/axis2/services/MyService";);

public static void main(String[] args) {
try {

OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace ns =
fac.createOMNamespace("http://soapinterop.org/";, "ns1");

OMElement payload =
fac.createOMElement("echoString", ns);
payload.setText("Hello!");
Options options = new Options();

ServiceClient client = new ServiceClient();

options.setTo(targetEPR);
client.setOptions(options);
//Blocking invocation

OMElement result = client.sendReceive(payload);

System.out.println("Sent Hello, got : " +
result.toString());

} catch (AxisFault axisFault) {

axisFault.printStackTrace();
}


}
}




And I wander why Axis2 V 1.4.1 eliminate the support to an invocation style
which centered on the signature (method name, arguments) of a service call
and instead prefer building Soap nodes?

I'll be much obliged if someone can tell me that whether Axis2 is suitable
for one who *does not care about building web services* but only in *consuming
them dynamically* (from Java based code) while the target services  will be
either Microsoft's ASMX or WCF based or anything else. If the answer is
affirmative, please let me know which set of classes are suitable to this
kind of mission.

The only assumptions I have in hand is that my client need to invoke various
web services upon request where for each web service I'm provided with it's
WSDL and a set of value parameters I (like operation name to invoke along
with its arguments) - Can I do it with AXIS2? If so, please let me know how.
- an example will be helpful here.

Thanks
/Avi


HashMap serialization problem with Axis2

2009-02-26 Thread Fabian Lambert

Dear Axis Users/Developers

I recently try Axis2 and I realised that something is missing comparing
to Axis1.
I have a web service class with a function like :

public String myFunction (HashMap map)

With both version of axis installed under a tomcat, it is generating
without problem a wsdl.
But when I try to implement a client to the web service, I have some
problem with Axis2

Axis1 serialized without problem the HashMap whereas Axis2 doesn't
serialize...
With Axis1 it was really simple, one just have to write in the service
client something like:

String ret = (String) call.invoke( new Object[] {map} );

with Axis2 I tried (in a RPC client)

QName opExecACommand = new QName("http://...";, "execACommand");
Object[] opExecACommandArgs = new Object[] {args};
Class[] returnTypes = new Class[] { String.class };
// Invoking the method
 Object[] response = rpcServiceClient.invokeBlocking(opExecACommand,
opExecACommandArgs,returnTypes);

But obviously, argument received by the web service is empty


What is the solution to serialize a HashMap correctly with Axis2 ?

Fabian Lambert
begin:vcard
fn:Fabian Lambert
n:Lambert;Fabian
org:LPSC - CNRS/IN2P3 - UJF Grenoble 1 - INPGTel. +33 (0)4 76 28 41 97http://ami3.in2p3.fr:8080/opencms/opencms/AMI/www"; style="text-decoration:none" >ATLAS Metadata Interface;Service Informatique
adr:;;53, avenue des Martyrs;Grenoble;;38000;France
email;internet:fabian.lamb...@lpsc.in2p3.fr
title;quoted-printable:Ing=C3=A9nieur d'=C3=A9tudes
tel;work:04 76 28 41 97
url:http://annuaire.in2p3.fr/ConsultPerson.php?button=print&cn=Lambert+Fabian&dn=ou=people,+ou=lpsc,+o=in2p3,c=fr
version:2.1
end:vcard



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Axis2] JMS in axis2

2009-02-26 Thread Prasuna Lanka
Thanks for the replies.

I think i didnt put my query clear. I have exposed a webservice using axis2.
The client will send the request. Up to this part, i dont require JMS. once
i received the request, i want to post it to JMS before it reaches to
ReceiverInout or Skeleton level. Is there any way to do this?

Regards,
Ps


On 2/20/09, Prabath Siriwardena  wrote:
>
> Hi;
>
> This[1] may be helpful.
>
> Thanks & regards.
> -Prabath
> [1]:
> http://blog.facilelogin.com/2008/12/enabling-jms-transport-for-axis2.html
>
> Prasuna Lanka wrote:
>
>> We want to post the webservice request to JMS Queue. I found samples only
>> exposing the service over JMS. How would we get access to connection
>> instance in skeleton or receiverInout if we configure JMS parameters in
>> axis2.xml?
>>  Thanks in advance.
>> 
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database:
>> 270.11.1/1961 - Release Date: 02/19/09 18:45:00
>>
>>
>>
>
>