RE: Axis2c Support for WS-* Protocols

2009-02-03 Thread George Stanchev
WS-Security Policy was lacking the support for alternative policies (ie,
accept username token OR saml token) last time
I checked so unless this has been fixed, fully is not the right word
here for at least this standard.

-Original Message-
From: Manjula Peiris [mailto:manj...@wso2.com] 
Sent: Monday, February 02, 2009 9:28 PM
To: jayant_we...@yahoo.com
Cc: axis-c-user@ws.apache.org
Subject: Re: Axis2c Support for WS-* Protocols

WS -Security (Rampart/C), WS- Security Policy ,WS-UsernameToken, WS-
Addressing are fully supported. In addition WS-Reliable
messaging(Sandehsa2/C) and WS-Eventing (Savan/C) specs are fully
supported by Axis2/C. 

Thanks,
-Manjula.

On Mon, 2009-02-02 at 02:42 -0800, jayant wete wrote:
 Hi,
 
 I am implementing web service application using axis2c. The main
 requirement is the implementation has to be according to the WS -*
 protocols. Following protocols are mandatory. Please let me know is
 axis2c supports these protocols and if not are there any plans or any
 development is going on to support these protocols.
 WS Protocols required to support are:---
 a) WS - Security Framework
 
 b) WS - Discovery 
 
 c) WS - Addressing
 
 d) WS - Security Policy
 
 e) WS-Base Notification
 
 f)   WS-Topics 
 
 
 g)  WS-UsernameToken 
 
 
 Thanks in advance...
 
 Jayant  
 
 
 
 


**
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. Any 
unauthorized review, use, disclosure or distribution is prohibited. If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
**



Axis with UTF-8

2009-02-03 Thread McCullough, Ryan
We are using Axis1 checked out from subversion along with Xerces-C Version 
2.2.0.

We are having trouble using Axis to retrieve UTF-8 characters. Is there any 
additional setup needed?

Here is where we think things are going arye.

axis\xml\xerces\XMLParserXerces.cpp::parse(bool ignoreWhitespace, bool peekIt)
About line 125 there is this:
// parse next token
m_bCanParseMore = m_pParser-parseNext(m_ScanToken);

It looks like the parseNext() function is converting 3 bytes of Unicode 
characters to 1 byte.

Here is the hex data being returned from our web service:
0808h: EF A4 85; ï¤...

I have also attached the xml that was returned from the web service 
(xmlout14670.txt, this is logged on the server).


Ryan McCullough | RightNow Technologies | Integration Tools Engineer
406-556-3162 office | Bozeman, MT | 
rmccullo...@rightnow.commailto:rmccullo...@rightnow.com | 
http://www.rightnow.comhttp://www.rightnow.com/

soap:Envelope 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;
  soap:HeaderResponseHeader 
xmlns=urn:obj.api.rightnow.comVersion9.2.0.112/Version/ResponseHeader/soap:Header
 soap:Body
  exec_rv xmlns=urn:obj.api.rightnow.com 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
transaction_rv errlog_cnt=0
contact_get_rvaddr
country_id1/country_id
/addr
alt_name
/alt_name
banner
/banner
c_id159/c_id
created2009-01-30T23:58:59Z/created
custom_fieldcf_item
cf_id2/cf_id
data_type8/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id14/cf_id
data_type2/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id4/cf_id
data_type1/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id5/cf_id
data_type2/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id79/cf_id
data_type5/data_type
val_str xsi:nil=true /
/cf_item
cf_item
cf_id22/cf_id
data_type5/data_type
val_str xsi:nil=true /
/cf_item
cf_item
cf_id23/cf_id
data_type6/data_type
val_str xsi:nil=true /
/cf_item
cf_item
cf_id24/cf_id
data_type2/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id25/cf_id
data_type8/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id26/cf_id
data_type1/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id27/cf_id
data_type3/data_type
val_int xsi:nil=true /
/cf_item
cf_item
cf_id28/cf_id
data_type7/data_type
val_date xsi:nil=true /
/cf_item
cf_item
cf_id29/cf_id
data_type4/data_type
val_dttm xsi:nil=true /
/cf_item
/custom_field
disabled0/disabled
email
addrsm...@rightnow.com.invalid/addr
invalid0/invalid
/email
email_alt1
invalid0/invalid
/email_alt1
email_alt2
invalid0/invalid
/email_alt2
name
first串串/first
lastSmith/last
/name
rule_state73/rule_state
sourcelvl_id32002/lvl_id
lvl_id1002/lvl_id
/source
state
css1/css
ma0/ma
sa0/sa
/state
updated2009-02-02T23:34:48Z/updated
/contact_get_rv

/transaction_rv
/exec_rv
  /soap:Body
/soap:Envelope


RE: Axis with UTF-8

2009-02-03 Thread McCullough, Ryan
The xerces parser does not parse the 3 bytes of utf8 characters. It is supposed 
to return the 3 characters but returns 1 byte of uninitialized memory (0xcd).

From: McCullough, Ryan [mailto:rmccullo...@rightnow.com]
Sent: Tuesday, February 03, 2009 6:48 PM
To: Apache AXIS C User List
Cc: Antonczyk, Ryszard
Subject: Axis with UTF-8

We are using Axis1 checked out from subversion along with Xerces-C Version 
2.2.0.

We are having trouble using Axis to retrieve UTF-8 characters. Is there any 
additional setup needed?

Here is where we think things are going arye.

axis\xml\xerces\XMLParserXerces.cpp::parse(bool ignoreWhitespace, bool peekIt)
About line 125 there is this:
// parse next token
m_bCanParseMore = m_pParser-parseNext(m_ScanToken);

It looks like the parseNext() function is converting 3 bytes of Unicode 
characters to 1 byte.

Here is the hex data being returned from our web service:
0808h: EF A4 85; ï¤...

I have also attached the xml that was returned from the web service 
(xmlout14670.txt, this is logged on the server).


Ryan McCullough | RightNow Technologies | Integration Tools Engineer
406-556-3162 office | Bozeman, MT | 
rmccullo...@rightnow.commailto:rmccullo...@rightnow.com | 
http://www.rightnow.comhttp://www.rightnow.com/



AW: Axis2 consumer within Axis2 provider classpath issue

2009-02-03 Thread Matthias.Gaiser
Hi group,

 

I am jumping in as well.. I got the same question what the recommended
way is in such a case? I got problems that the handlers were used for my
service and my stub communications which confused me.

 

Any standard ways here?

 

Matthias.

 

Von: Paul French [mailto:paul.fre...@kirona.com] 
Gesendet: Mittwoch, 14. Januar 2009 10:41
An: axis-user@ws.apache.org
Betreff: RE: Axis2 consumer within Axis2 provider classpath issue

 

Apologies for jumping in on this thread but I too would be very
interested in the recommended way to provide an AXIS2 web service which
may contain AXIS2 client stubs to other web services.

 

I believe I read some where that you need to use the same
ConfigurationContext for both? This would only make sense to me if you
plan to provide the same handlers and modules for both.

 

For example I have a web service client stub that works great (as a jar
file) - the axis2.xml file is in the classpath

 

I have an AXIS2 web service which works great where the axis2.xml file
is in the WEB-INF directory. (axis2 included as part of the web
application)

 

How would you combine the two?

 



From: Hundtofte, Rex A [mailto:rex.hundto...@eds.com] 
Sent: 14 January 2009 05:43
To: axis-user@ws.apache.org
Subject: Axis2 consumer within Axis2 provider classpath issue

I am getting a NoClassDefFoundError when my Axis2 consumer code is
executed inside of an Axis2 provided web service.  I have an aar file
deployed to my web server, the consumer code and generated client stub
classes are in separate jar files under the WEB-INF/lib directory.  The
incoming request processes fine but apparently the classloader that
needs to load the consumer Axis2 classes cannot find the Axis2 classes.
I appreciate any tips on how I might resolve this issue?

Thanks, 
Rex Hundtofte 



__ NOD32 3763 (20090113) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



when are files unlocked by Tomcat if a local File variable leaves scope?

2009-02-03 Thread Stadelmann Josef
Hello Axis2 Community,
Hello Apache Tomcat for OpenVMS Experts

how do you explain the following File Locking Situation with my Axis2 web 
service running on top of Apache$Tomcat for Open and JVM 1.4.2? I have run my 
webservice to a successfull end, SCOPE=SOAP-Sessions, and as part of it a 
method login(OMElement e); called a File for
1. read  [wsit.deploy]SPg.wsi;207 then
2. write [wsit.deploy]SPg.wsi;208 then
3. read  [wsit.deploy]SPg.wsi;208

and then via a WSIT toolkit and some JNI's a detached running server 
WSI$MANAGER.EXE should read [wsit.deploy]SPg.wsi;208 unfortunately tis fails as 
the file is under full lock by. How do I release the lock prior to calling wsit 
services to launch an out-of-process server herby with a need to access the 
just patched file?
end login

next call is for fktmap(OMElement) for working


final call is for logout()

next call for login() does same sequence
4. read  [wsit.deploy]SPg.wsi;208 then
5. write [wsit.deploy]SPg.wsi;209 then
6. read  [wsit.deploy]SPg.wsi;209 then

and then via a WSIT toolkit and some JNI's a detached running server 
WSI$MANAGER.EXE should read [wsit.deploy]SPg.wsi;208 unfortunately tis fails as 
the file is under full lock by. How do I release the lock prior to calling wsit 
services to launch an out-of-process server herby with a need to access the 
just patched file?
end login

please watch the OpenVMS versions 

next call is for fktmap(OMElement) for working


final call is for logout()




I did show dev/file and the short list below is the result, this minutes after 
my web service login() has terminated and local variables such as File spg_wsi 
are all out of scope. So I can expect that underlying file resources should be 
freed to allow re-access by another VMS process. But nothing like that happens. 
appacht$tomcat or my code running on top of it keeps its fingers on it ... how 
long, I can just guess, because I went home after I used 
$ show device /files

This morning I returned and the first thing I did was at 

$ show device /files 

and see below, close to end of list they are all gone. Maybe something internal 
to Tomcat has time out, at least apache$tomcat has given them free to allow 
access by other VMS processes such as TYPE.EXE or EDIT.EXE.


can you please tell me how to tell appache$tomcat to free resources ASAP when a 
variable leaves local scope?


This is the reason why my hack, parsing a SPg.wsi (HP WSIT deployment xml file) 
into a dom modell, seeking account/account tags and patching the account 
text from i.e. nothing to SACHB, STADELMA or ADMINP ... to the account of the 
user does not work. i.e. the patching works perfectly but wsi$manager.exe is 
unable to access such a file. 

However this will only work when apache$tomcat releases underlaying resources 
for other processes ASAP when a variable like File spg_wsi leaves the scope of 
the method.

I have found that on such keept files you cant even do a $ TYPE because it ends 
in a % file is locked by another user 



1. 
AXP1show dev /file

TCPIP$FTPC00108 4421  [STADELMA]TCPIP$FTP_SERVER.LOG;510
TCPIP$FTPC00109 4422  [STADELMA]TCPIP$FTP_SERVER.LOG;511
TCPIP$FTPC0010A 4423  [STADELMA]TCPIP$FTP_SERVER.LOG;512
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212120SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212121SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212122SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212123SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212124SpezplaService.aar;2
APACHE$TOMCAT   441A  [wsit.deploy]SPg.wsi;201
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212125SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212126SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212127SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212128SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212129SpezplaService.aar;2
APACHE$TOMCAT   441A  
[APACHE.JAKARTA.TOMCAT.work.Catalina.localhost.axis2]axis212130SpezplaService.aar;2
APACHE$TOMCAT   441A  [wsit.deploy]SPg.wsi;207
APACHE$TOMCAT   441A  [wsit.deploy]SPg.wsi;208
APACHE$TOMCAT   441A  [wsit.deploy]SPg.wsi;208
APACHE$TOMCAT   441A  [wsit.deploy]SPg.wsi;208
APACHE$TOMCAT   441A  [wsit.deploy]SPg.wsi;209
APACHE$TOMCAT   441A  [wsit.deploy]SPg.wsi;209

2. the night after ...
AXP1show dev /file




Files accessed on device DSA5: on  3-FEB-2009 07:35:26.30

Process name  PID File name
  

Error while generating java client code from wsdl file

2009-02-03 Thread adisharma

I am trying to generate a java client code from WSDL file
um_workflowSaveCreateProfile.wsdl which includes
um_workflowSaveCreateProfile_interface.wsdl file, so I am keeping both the
files in the same folder and trying to generate the client code but it is
showing me the below error highlighted .

um_workflowSaveCreateProfile.wsdl 













um_workflowSaveCreateProfile_interface.wsdl







 




















































I am using WSDL2 Java for generating the client code .

Please suggest where am I wrong .

E:\axis2-1.4\binWSDL2Java -uri E:\DIPPWF\um_workflowSaveCreateProfile.wsdl
-p R
ND -d adb -s -o build\client--http-proxy-host 10.74.93.35 --http-proxy-port
80
Using AXIS2_HOME: E:\axis2-1.4
Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_02
Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl',
relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative
to 'f
ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd',
relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd',
relati
ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'navbar.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/workfl
owSaveCreateProfile.xsd'.
Retrieving schema at 'searchform.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/wo
rkflowSaveCreateProfile.xsd'.
Retrieving schema at 'component_basic.xsd', relative to
'file:/E:/DIPPWF/XMLSche
ma/workflowSaveCreateProfile.xsd'.
Retrieving schema at 'displaytype.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/c
omponent_basic.xsd'.
Retrieving schema at 'error.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/compone
nt_basic.xsd'.
Retrieving schema at 'component_workflowTicket.xsd', relative to
'file:/E:/DIPPW
F/XMLSchema/workflowSaveCreateProfile.xsd'.
Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl',
relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative
to 'f
ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd',
relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd',
relati
ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'navbar.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/workfl
owSaveCreateProfile.xsd'.
Retrieving schema at 'searchform.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/wo
rkflowSaveCreateProfile.xsd'.
Retrieving schema at 'component_basic.xsd', relative to
'file:/E:/DIPPWF/XMLSche
ma/workflowSaveCreateProfile.xsd'.
Retrieving schema at 'displaytype.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/c
omponent_basic.xsd'.
Retrieving schema at 'error.xsd', relative to
'file:/E:/DIPPWF/XMLSchema/compone
nt_basic.xsd'.
Retrieving schema at 'component_workflowTicket.xsd', relative to
'file:/E:/DIPPW
F/XMLSchema/workflowSaveCreateProfile.xsd'.
ERROR More than one part for message OblixIDXMLInput
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:
More than one part for message OblixIDXMLInput
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1162)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1085)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
ng(WSDL11ToAxisServiceBuilder.java:686)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
int(WSDL11ToAxisServiceBuilder.java:538)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
ints(WSDL11ToAxisServiceBuilder.java:489)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:363)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
llServices(WSDL11ToAllAxisServicesBuilder.java:107)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerat
ionEngine.java:147)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Exception in thread main
org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerat
ionEngine.java:153)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: More than one part for message
OblixIDXML
Input
at 

Problem with complex classes in POJO

2009-02-03 Thread Neil Youngman
I'm trying to deploy a small service as a POJO.

A method called getNotifications() should return an array of Strings and a 
boolean. Everything works just fine if I only return an array of Strings. To 
add a boolean I have created a bean that has the String array and the boolean 
as properties. This does not return any useful data.

The Version that works looks like

 public String [] PollForNotifications( String account,
 String user,
 String password,
 int maxResults )
throws Exception, SQLException
{
...
String [] results = new String[notifications.size()];
notifications.toArray( results );
return results;
}

To add the boolean I create the following bean class

public class PollForNotificationsResponse
{
private String[] notifications;
private boolean more;

public PollForNotificationsResponse()
{
notifications = new String [0];
more = false;
}

public String[] getNotifications()
{
return notifications;
}

public boolean isMore()
{
return more;
}

public void setNotifications( String[] p_Notifications )
{
notifications = p_Notifications;
}

public void setMore( boolean p_More )
{
more = p_More;
}
}

and change the method to 

public PollForNotificationsResponse PollForNotifications( String account,
 String user,
 String password,
 int maxResults )
throws Exception, SQLException
{
...
String [] results = new String[notifications.size()];
notifications.toArray( results );
PollForNotificationsResponse response =
new PollForNotificationsResponse();
response.setNotifications( results );
response.setMore( more  0 );
return response;
}

and I no longer get any data back

the result looks like 

ns:getResponse
ns:return type=uk.co.newslink.wsam.service.WMSSubmissionService$Address/
/ns:getResponse

Should this work? As far as I can see from the article 
http://www.developer.com/java/other/article.php/10936_3726461_2, I think it 
should work?

Can anyone tell me why it might not work and how I can fix or trace the problem.

Neil


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

inline: logo.jpg

WSDL2java : Duplicate global type error

2009-02-03 Thread Guo Tianchong
Hi, all

When I run WSDL2java in xmlbeans databinding. it's always report the following 
exception.

Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: 
project://local/soapenc.xsd:95:3: error: 
sch-props-correct.2: Duplicate global type: 
ar...@http://schemas.xmlsoap.org/soap/encoding/ (Original global type found in 
file: 
null)
at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
... 8 more
Caused by: org.apache.xmlbeans.XmlException: project://local/soapenc.xsd:95:3: 
error: sch-props-correct.2: Duplicate global type: 
ar...@http://schemas.xmlsoap.org/soap/encoding/ (Original global type found in 
file: null)
at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)


The soapenc.xsd file has been downloaded from 
http://schemas.xmlsoap.org/soap/encoding/, and has been saved in localhost.
My applications's wsdl import the soapenc.xsd file as this:

xs:import namespace=http://schemas.xmlsoap.org/soap/envelope/;
 schemaLocation=./soapenc.xsd/

Can anyone tell me how to resolve this problem?
Thanks

Guo










Re: Rampart dynamic configuration with axis2

2009-02-03 Thread Wishing Carebear
Nandana:Could you give me some pointers.

Thanks,
cbear

On Fri, Jan 30, 2009 at 11:04 PM, Wishing Carebear 
wishing.careb...@gmail.com wrote:

 Nandana:
 Thanks for your reply.

 1) is WS-Security Policy the preferred approach. If so where can I see some
 exampels on how to do dynamically using code. May be the policy examples has
 one for dynamic configuration.
 2) I guess you meant it is recommended not to use the OutflowConfiguration.

 3) Also could you point me to some good resource on WS Security policy. My
 requirement is to invoke Webservice using dynamic code ( no wsdl2java) with
 WS-Security.

 Regards,
 cabear
 On Fri, Jan 30, 2009 at 7:18 PM, Nandana Mihindukulasooriya 
 nandana@gmail.com wrote:

 Yes, In Rampart , there are two configurations. One used custom
 configuration language and the other option uses standard WS - Security
 Policy. You are looking in to the custom configuration one which is
 deprecated. Please look at the Rampart policy based samples (samples/policy)
 for policy based configuration. It also can be configured either using files
 or dynamically using code.

 thanks,
 nandana



 On Fri, Jan 30, 2009 at 6:43 AM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 OutflowConfiguration is deprecated.
 Right now I'm able to do dynamic invocation using OperationClient and
 OutflowConfiguration for WSSecurity. Is there any other equivalent for
 OutflowConfiguration that is recommended.


 On Thu, Jan 29, 2009 at 4:47 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Got the source code from Googling :)



 On Thu, Jan 29, 2009 at 2:08 PM, Wishing Carebear 
 wishing.careb...@gmail.com wrote:

 Hello: Read the following of sample 11 for dynamic configuration with
 axis2 for WSSeurity. But could not find the file in Rampart distribution.
 Could someone point me to the location where I can get it:


 http://blog.sweetxml.org/2007/12/rampart-basic-examples-how-you-add-ws.html
  11. Dynamic configuration : Get rid of the config files ... let's use
 code!

 Both client and servce are configured to first sign and then encrypt
 the outgoing message and to decrypt and verify the incoming message using
 their key pairs.

 Note that we don't use any parameters in the client.axis2.xml, see 
 org.apache.rampart.samples.sample11.Client's
 getOutflowConfiguration() and getInflowConfiguration() methods and
 their usage.
  Thanks, cabear






 --
 Nandana Mihindukulasooriya
 WSO2 inc.

 http://nandana83.blogspot.com/
 http://www.wso2.org





RE: Problem with complex classes in POJO

2009-02-03 Thread Minh-Hai Nguyen
Hi, Neil

Trying to change  class PollForNotificationsResponse to something else.
The reason may be when you generate client stub code, it may create same
class name again.

Also, I notice that you have private boolean more.  Try to use private
Boolean more.  By the way, what version of axis2 do you use?

I don't have any problem with the latest version.

 

Let's me know if you still have problems

 

 

 

 

From: Neil Youngman [mailto:neil.young...@wirefast.com] 
Sent: Tuesday, February 03, 2009 4:08 AM
To: axis-user@ws.apache.org
Subject: Problem with complex classes in POJO

 

I'm trying to deploy a small service as a POJO.

A method called getNotifications() should return an array of Strings and a
boolean. Everything works just fine if I only return an array of Strings. To
add a boolean I have created a bean that has the String array and the
boolean as properties. This does not return any useful data.

The Version that works looks like

 public String [] PollForNotifications( String account,
 String user,
 String password,
 int maxResults )
throws Exception, SQLException
{
...
String [] results = new String[notifications.size()];
notifications.toArray( results );
return results;
}

To add the boolean I create the following bean class

public class PollForNotificationsResponse
{
private String[] notifications;
private boolean more;

public PollForNotificationsResponse()
{
notifications = new String [0];
more = false;
}

public String[] getNotifications()
{
return notifications;
}

public boolean isMore()
{
return more;
}

public void setNotifications( String[] p_Notifications )
{
notifications = p_Notifications;
}

public void setMore( boolean p_More )
{
more = p_More;
}
}

and change the method to

public PollForNotificationsResponse PollForNotifications( String
account,
 String user,
 String password,
 int maxResults )
throws Exception, SQLException
{
...
String [] results = new String[notifications.size()];
notifications.toArray( results );
PollForNotificationsResponse response =
new PollForNotificationsResponse();
response.setNotifications( results );
response.setMore( more  0 );
return response;
}

and I no longer get any data back

the result looks like

ns:getResponse
ns:return type=uk.co.newslink.wsam.service.WMSSubmissionService$Address/
/ns:getResponse

Should this work? As far as I can see from the article
http://www.developer.com/java/other/article.php/10936_3726461_2, I think it
should work?

Can anyone tell me why it might not work and how I can fix or trace the
problem.

Neil 

 

Neil Youngman  
Developer
Wirefast Limited 



Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/

Please consider the environment.
Does this email or attachment need to be printed? 

This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

image001.jpg

How to prevent WSDL2Java from creating java.io.IOException

2009-02-03 Thread Richard Hu
Hi,

 

Is there a way to prevent WSDL2Java from creating its own version of
java.io.IOException and other basic exceptions?  It creates these basic
java exception classes but they don't implement java.lang.Throwable so
they aren't valid exceptions.  

 

Thanks,

Richard

richard...@jda.com



SOAP Header from Browser

2009-02-03 Thread rabelenda

Is there any way to make a request from a browser to a webservice and specify
in the GET or POST parameters values for attributes of soap headers? i.e.:
in the following format:
http://localhost:8080/app/services/MyService/myOp?headAttribute1=val1headAttribute2=val2myOpParam1=val3.
-- 
View this message in context: 
http://www.nabble.com/SOAP-Header-from-Browser-tp21813685p21813685.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: SOAP Header from Browser

2009-02-03 Thread Andreas Veithen
This is not supported out of the box by Axis2. This is a typical case
where you would implement a Web service mediation, i.e. create a new
service that transforms requests and responses to/from the target
service. You can e.g. use Apache Synapse to achieve this.

Andreas

On Tue, Feb 3, 2009 at 17:43, rabelenda rabele...@gmail.com wrote:

 Is there any way to make a request from a browser to a webservice and specify
 in the GET or POST parameters values for attributes of soap headers? i.e.:
 in the following format:
 http://localhost:8080/app/services/MyService/myOp?headAttribute1=val1headAttribute2=val2myOpParam1=val3.
 --
 View this message in context: 
 http://www.nabble.com/SOAP-Header-from-Browser-tp21813685p21813685.html
 Sent from the Axis - User mailing list archive at Nabble.com.




Help with SimpleDeserializer encountered a child element

2009-02-03 Thread Dilshener Tezcan (extern HVB IS - UniCredit Group)
Hi,

When my Axis client tries to parse the response it received from the 
WebService, it fails on an Array instance with the following exception.

org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which 
is NOT expected, in something it was trying to deserialize.

This occurs only when the array has more than one item!!! Otherwise it works 
fine.

I did a TCP/IP monitor and verified that the xml received is valid. 

3 things that makes it frustrating 
1-) another existing Axis WebService has the same method and returns the same 
type.
That works fine, when I compare the response with the one from the failure, I 
do not see any differences apart from order of attributes.

2-) this is Axis1.2RC1 and is for Italy. :-((( I have no source code to debug 
the  Axis code, JAD decompiler produces rubbish)

3-) Google search says I should upgrade to latest Axis, but cannot do due to 
infrastructure restrictions !

Anyway, I would be so thankful if someone can give me couple guides to where to 
start looking into before I go mad.


Tezcan Dilshener 
Satz Software  Consulting GmbH

HVB Information Services GmbH
Member of UniCredit Group 
HII3ES Development Services Client Server 
Am Tucherpark 12 
D-80538 München 

Tel: +49 89 378-42158
mailto:tezcan.dilshener.ext...@hvbis.com 
http://www.hvbis.com 

The legal obligation information of HVB Information Services GmbH can be found 
at: http://www.hvbis.com/is/de/pub/441.htm
Die gesetzlichen Pflichtangaben zur HVB Information Services GmbH finden Sie 
unter: http://www.hvbis.com/is/de/pub/441.htm

Important Note: 
This e-mail is only intended for the person or company/organisation named as 
recipient. It may contain trade secrets or undisclosed and
confidential information or information otherwise protected by work-product 
immunity or other legal regulations. If you have received this email by 
mistake, we kindly ask you not to copy this message or use it for any purpose 
nor disclose its contents to any other person. Please inform us immediately and 
delete the original document. In addition, please let us know if you or your 
company object to receiving e-mails for messages of this kind. 

Wichtiger Hinweis: 
Diese E-Mail ist nur für die Person oder die Firma/Organisation bestimmt, die 
in der Empfängeradresse benannt ist und enthält u. U. Geschäftsgeheimnisse oder 
vertrauliche Informationen, die dem Schutz von Arbeitsergebnissen unterliegen 
oder sonst rechtlich geschützt sind. Wenn Sie nicht der angegebene Empfänger 
sind, bitten wir Sie, uns unverzüglich zu informieren und diese Nachricht zu 
vernichten und sie insbesondere nicht zu kopieren oder sie für irgendwelche 
anderen Zwecke zu verwenden, noch den Inhalt dieser Nachricht dritten Personen 
zugänglich zu machen. Bitte informieren Sie uns auch unverzüglich, wenn Sie 
oder Ihr Arbeitgeber nicht mit E-Mail Nachrichten dieser Art einverstanden sein 
sollten. 




Missing value in return from autogenerated Jira SOAP service

2009-02-03 Thread simpsora

Hi,

I'm using SOAP to interact with a Jira instance.  I've generated the stubs
and a client with org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask (using
Axis 1.4).

I can connect to the remote service and interact with it just fine for the
most part, but I've run into a problem where a getter method in the client
returns null, even though the element is present in the SOAP response
(verified through the tcpmon tool).

The particular method returning null is RemoteIssue.getKey().  I've also
tested with soapUI, and can definitely confirm that the key element is being
returned in the SOAP response.  A copy of the response is attached.

I looked at the generate code, and I don't see anything obviously wrong. 
Has this issue come up before, or does anyone know why this might be
happening?  If more detail is needed, let me know.

Thanks,
Ross

http://www.nabble.com/file/p21807302/resp.xml resp.xml 
-- 
View this message in context: 
http://www.nabble.com/Missing-value-in-return-from-autogenerated-Jira-SOAP-service-tp21807302p21807302.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Passing And Returning Objects

2009-02-03 Thread Michael
Below please find the source code and reuntime results that demonstrates the 
problem I'm having.

This is not my actual application but what I'm doing is essentially the same 
thing.

WEB SERVICE CODE

package ws.pojo.data;

public class WSDataOnlyObj
{
 public String str = This is a data only object;
 public intnum = 1;
}



package ws.pojo.service;

import ws.pojo.data.*;

public class WS
{
 private String  str;
 private WSDataOnlyObj   objDataOnly;
 
 public String GetString( )
 {
  str = This is a string;
  
  return str;
 }
 
 public WSDataOnlyObj GetDataOnlyObj( )
 {
  objDataOnly = new WSDataOnlyObj( );
  return objDataOnly;
 }
}



CLIENT CODE
---
package ws.pojo.service;

import ws.pojo.data.*;

import java.rmi.RemoteException;
import javax.xml.namespace.QName;

import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.*;
import org.apache.axis2.client.*;
import org.apache.axis2.rpc.client.*;

public class WSClient
{
 public static void main(String[] args)
 {
  try
  {
   WSStub.GetStringResponse  getStringResp;
   WSStub.GetDataOnlyObjResponse getDOObjResp;
   
   WSStub stub = new 
WSStub(http://localhost:8080/Webservice/services/WS/ws/pojo/service;);
   
   getStringResp = stub.GetString();
   getDOObjResp  = stub.GetDataOnlyObj();
   
   System.out.println(RESULT Of Call To Web Service GetSting():  +
getStringResp.get_return());
   System.out.println(RESULT Of Call To Web Service GetDataOnlyObj().getStr(): 
 +  getDOObjResp.get_return().getStr());
   System.out.println(RESULT Of Call To Web Service GetDataOnlyObj().getNum(): 
 +   getDOObjResp.get_return().getNum());
  }
  catch(AxisFault axisEx)
  {
   System.out.println(axisEx.getMessage());
  }
  catch(RemoteException remEx)
  {
   System.out.println(remEx.getMessage());
  }
 }
}



RESULTS
---
RESULT Of Call To Web Service GetSting(): This is a string
RESULT Of Call To Web Service GetDataOnlyObj().getStr(): null
RESULT Of Call To Web Service GetDataOnlyObj().getNum(): -2147483648

  - Original Message - 
  From: Amila Suriarachchi 
  To: axis-user@ws.apache.org 
  Sent: Monday, February 02, 2009 1:02 AM
  Subject: Re: Passing And Returning Objects





  On Sun, Feb 1, 2009 at 9:34 PM, Michael mtarullo...@optonline.net wrote:

For the web services application I am developing I have designed my web 
services methods to accept objects and return objects.  To avoid any problems 
and follow best practices for web development I have designed these objects 
with only primitives as attributes for objects that are passed and returned.
  There is no requirement to use only primitives. you can use objects but those 
objects should be POJOs.
   


The stub code generated by Axis2 appears to provide everything needed to 
get and set the attributed for these objects.  I have tried several of my web 
service methods from a test client using the Axis2 generated client stub.  I am 
able to set the attributes of all passed objects and retrieve the attributes of 
all returned objects, but in both cases the attributes have no values

  Can you send your wsdl and request and response message xmls? 


I have debugged the code on both the server and client side to make sure 
the values were being set correctly going both ways, and they are.  It is as if 
when the objects are serialized and deserialized from client to server or 
server to client the attribute values of the passed and returned objects are 
being lost.

Can anyone explain?

Thanks,
Mike



  -- 
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/



--



  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.0.233 / Virus Database: 270.10.16/1930 - Release Date: 02/02/09 
07:51:00


Re: WSDL2Java 3 ports 1 service

2009-02-03 Thread keith chapman
If you use the -ap option (All Ports) it will generate code for all ports.

Thanks,
Keith.

On Tue, Feb 3, 2009 at 12:35 AM, Paul French paul.fre...@kirona.com wrote:

  The WSDL I have has one service defined with 3 ports (I use axis2 1.4.1)

 i.e.

  wsdl:service name=ServiceRequestConnectorService
   wsdl:port name=CommonConnectorSoapPort
 binding=tns:CommonConnectorSoapBinding
soap:address location=
 http://localhost/ServiceRequestConnectorService/ServiceRequestConnectorService.asmx/http://localhost/ServiceRequestConnectorService/ServiceRequestConnectorService.asmx%22/
 
   /wsdl:port
   wsdl:port name=ServiceRequestSoapPort
 binding=tns:ServiceRequestConnectorSoapBinding
soap:address location=
 http://localhost/ServiceRequestConnectorService/ServiceRequestConnectorService.asmx/http://localhost/ServiceRequestConnectorService/ServiceRequestConnectorService.asmx%22/
 
   /wsdl:port
   wsdl:port name=ServiceRequestUpdatesSoapPort
 binding=tns:ServiceRequestConnectorUpdatesSoapBinding
soap:address location=
 http://localhost/ServiceRequestConnectorService/ServiceRequestConnectorService.asmx/http://localhost/ServiceRequestConnectorService/ServiceRequestConnectorService.asmx%22/
 
   /wsdl:port
  /wsdl:service

 However when I generate a client stub using:

 WSDL2Java -u -uri MyWSDL -p MyPackage -d none -s

  ...I only get stub methods for one of the ports and not all three. Is
 there a reason for this? I would expect stub methods for all 3 ports? I can
 generate stub methods for each port in turn by removing the other 2 from the
 WSDL.

 Thanks,

 Paul




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

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