Re: WSS4jInInterceptor properties

2007-10-23 Thread Bc. Jiří Mikulášek
Thanks,
 I know about this, but it is still not what I am searching for. Imagine that 
you would like to setup these properties through cxf configuration, then you 
need to know what are values of these constants (this information is not in 
javadoc). Ok still I can go through source of wss4j or printout all these 
constants in simple program. But in a normal world when somewhere is the 
possiblity to configure some properties, man expects there is a list of them 
available :-), which seems to be not this case.

On Tuesday 23 of October 2007 08:51:45 Mayank Mishra wrote:
> Bc. Jiří Mikulášek wrote:
> > Hi all,
> > is there any list of possible values and properties if wss4jinterceptors
> > available? I could not find it in the javadoc nor in user guide.
>
> Hi Jiri,
>
> Have a look at,
>
> http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/handler/WSHandler
>Constants.html
>
> This class list various configuration properties which can be passed to
> WSS4J In and Out interceptor configurations.
>
> With Regards,
> Mayank
>
> > Yes of course I haven't tried to go trough the source of the interceptor
> > or wss4j ;-(
> >
> > thanks for any advice



-- 
Jiri Mikulasek
-
Developer

AURA, s.r.o.
Uvoz 499/56; 602 00 Brno
ISO 9001 certified company
AQAP 2110 (ČOS 051622)
tel./fax: +420 544 508 115
e-mail: [EMAIL PROTECTED]
http://www.aura.cz
-


Re: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Piotr PiBis Berlowski
Hi, and thank you for your interest.

Regretfully, 2.0.3 does not work either. However, the problem appears to
be just a top of an iceberg. To be specific - we are naver able to tell
if an exception is gonna work or not. We have not found any rule in that
yet. Only rule is that when a wsdl is big, and has lots of operations
and lots of exceptions, some of them will not work for sure.

I attach the full wsdl, which causes the problem.

There is no apparent difference between neither wsdl nor the generated
classes for the exceptions that do work and that don't work. We are
currently working on catching the soap messages and checking if the
problem occurs on the client or on the server side.

Best regards,
Piotr Berlowski

> Any chance you could try the latest 2.0.3 SNAPSHOT?
> 
> I just tried with trunk and this worked fine.
> 
> Server code:
> public void removeXtmProjects(java.util.List 
> projectIds) throws IncorrectProjectIdsException{ 
> throw new IncorrectProjectIdsException("Exception on server", 
> projectIds.get(0));
> }
> 
> Client code:
> java.util.List _removeXtmProjects_projectIds = 
> new ArrayList();
> _removeXtmProjects_projectIds.add("hello");
> try {
> port.removeXtmProjects(_removeXtmProjects_projectIds);
> 
> } catch (IncorrectProjectIdsException e) {
> System.out.println("Expected exception: 
> IncorrectProjectIdsException has occurred.");
> System.out.println(e.toString());
> System.out.println(e.getFaultInfo());
> }
> 
> 
> What got printed out:
> Expected exception: IncorrectProjectIdsException has occurred.
> com.xmlintl.webservice.integration.IncorrectProjectIdsException: 
> Exception on server
> hello
> 
> 
> Thus, it looks like it's fixed.
> 
> Dan
> 
> 
> 
> On Monday 22 October 2007, Piotr PiBis Berlowski wrote:
>> Hi,
>>
>>  We consider this issue to be a huge blocker for a major project. When
>> a user-defined exception is thrown by the server, a client receives  
>> a SOAPExceptionFault (with the message that belonged to the
>> user-defined exception). CXF version is 2.0.2. You can find generated
>> exception class, exception details class and relevant parts od wsdl
>> attached to this message.
>>
>> If any more information is required, I will be more than happy to post
>> it. We are really stuck with this!
>>
>> Thanks in advance, and best regards!

> 
> 


http://integration.webservice.xmlintl.com/";
	xmlns:ns1="http://integration.webservice.xmlintl.com/";
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
	xmlns:xsd="http://www.w3.org/2001/XMLSchema";
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
	
		http://www.w3.org/2001/XMLSchema";
			xmlns="http://jaxb.dev.java.net/array";
			attributeFormDefault="unqualified" elementFormDefault="unqualified"
			targetNamespace="http://jaxb.dev.java.net/array";>
			

	

			
		
		http://www.w3.org/2001/XMLSchema";
			xmlns="http://integration.webservice.xmlintl.com/";
			attributeFormDefault="unqualified" elementFormDefault="qualified"
			targetNamespace="http://integration.webservice.xmlintl.com/";>
			
			

			
			
			

	

			
			
			

			
			
			

	

			
			
			

			
			
			

	

			
			
			

	

			
			
			

	

			
			
			

	
	

			
			
			

			
			
			

	
	
	
	
	
	

			
			
			

			
			
			

	
	
	

			
			
			

			
			
			

	

			
			
			

			
			

	
		
		
		
		
	

			
			

	

			
			

	

			
			

	

			
			
			

			
			
			

	
	

			
			
			

			
			
			

	
	

			
			

	
		
		
	

			
			

	
		
		
	

			
			

	
		
		
	

			
			

	
		
		
	

			

	
		
			
			
		
	


	
		
			
			
		
	


	
		
			
			
		
	


	
		
			
			
		
	


	
		
			
			
		
	


	
		
			
			
		
	




		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	

	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	
	
		
		
	

	
		
		
	

	
		
	
	
		
	
	
		
	
	

Re: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Piotr W. Berlowski

I believe that I don't understand what you mean. What I expect is that when I
declare a custom exception in my wsdl (and thus in my interface), and throw
it on the server side in the implementation class, the client that invokes a
method, will get exactly that declared exception.

To illustrate:

I have

@WebMethod...
public void foo() throws MyCustomException;

@WebException...
class MyCustomException extends Exception

And client invokes:

try {
 ws.foo();
catch (MyCustomException e) {
 do.failsafe();
}

I do expect my failsafe to work instead of client bailing out with a boom
and SoapFaultException stacktrace. And I have a good reason for the
expectations like that - it should work and moreover in some cases it works
fine.  But there is a set of situations, where it just breaks down. 

My problem is, that those situations happen more or less random and there is
no change (that I can locate) in WSDL nor in generated classes that would
sanction this different behaviour.

Best regards,
Piotr Berlowski


Glen Mazza-2 wrote:
> 
> 
> I'm missing something here.  What is it that you are expecting the
> client to receive instead--why is the above wrong?  You're not expecting
> a SOAP server to be sending Java exceptions to the SOAP client, right?
> 
> Glen
> 
> 
>> CXF version is 2.0.2. You can find generated exception
>> class, exception details class and relevant parts od wsdl attached to
>> this message.
>> 
>> If any more information is required, I will be more than happy to post
>> it. We are really stuck with this!
>> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JAX-WS-%2B-JAXB-problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-exception-tf4669782.html#a13360841
Sent from the cxf-user mailing list archive at Nabble.com.



RE: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Benson Margulies
How did you generate your client?

> -Original Message-
> From: Piotr W. Berlowski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 6:02 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: JAX-WS + JAXB problem -
javax.xml.ws.soap.SOAPFaultException
> thrown instead of custom exception
> 
> 
> I believe that I don't understand what you mean. What I expect is that
> when I
> declare a custom exception in my wsdl (and thus in my interface), and
> throw
> it on the server side in the implementation class, the client that
invokes
> a
> method, will get exactly that declared exception.
> 
> To illustrate:
> 
> I have
> 
> @WebMethod...
> public void foo() throws MyCustomException;
> 
> @WebException...
> class MyCustomException extends Exception
> 
> And client invokes:
> 
> try {
>  ws.foo();
> catch (MyCustomException e) {
>  do.failsafe();
> }
> 
> I do expect my failsafe to work instead of client bailing out with a
boom
> and SoapFaultException stacktrace. And I have a good reason for the
> expectations like that - it should work and moreover in some cases it
> works
> fine.  But there is a set of situations, where it just breaks down.
> 
> My problem is, that those situations happen more or less random and
there
> is
> no change (that I can locate) in WSDL nor in generated classes that
would
> sanction this different behaviour.
> 
> Best regards,
> Piotr Berlowski
> 
> 
> Glen Mazza-2 wrote:
> >
> >
> > I'm missing something here.  What is it that you are expecting the
> > client to receive instead--why is the above wrong?  You're not
expecting
> > a SOAP server to be sending Java exceptions to the SOAP client,
right?
> >
> > Glen
> >
> >
> >> CXF version is 2.0.2. You can find generated exception
> >> class, exception details class and relevant parts od wsdl attached
to
> >> this message.
> >>
> >> If any more information is required, I will be more than happy to
post
> >> it. We are really stuck with this!
> >>
> >
> >
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/JAX-WS-%2B-JAXB-
>
problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-
> exception-tf4669782.html#a13360841
> Sent from the cxf-user mailing list archive at Nabble.com.



Example java2ws maven plugin config?

2007-10-23 Thread Callum Haig
Could someone please post an example maven pom fragment that will help
me get started with the CXF java2ws maven plugin?

In the absence of documentation I have tried many variations of the
fragment below without success.


org.apache.cxf
cxf-java2ws-plugin
2.1-incubator-SNAPSHOT



org.apache.cxf

cxf-rt-frontend-jaxws

2.1-incubator-SNAPSHOT




generate-ws
process-classes


my.ws.target.class



${project.compileClasspathElements}



${basedir}/target/classes


true

true

true
true

${project}


java2ws





Regards,
Callum.


RE: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Piotr W. Berlowski

Classes are generated from wsdl using ant that i attached to my first post.
Then the client is used as follows:

public static void main(String args[]) throws Exception
{

if (args.length == 0)
{
System.out.println("please specify wsdl");
System.exit(1);
}
URL wsdlURL = null;
File wsdlFile = new File(args[0]);
try
{
if (wsdlFile.exists())
{
wsdlURL = wsdlFile.toURL();
}
else
{
wsdlURL = new URL(args[0]);
}
}
catch (MalformedURLException e)
{
e.printStackTrace();
}

IntegrationService ss = new IntegrationService(wsdlURL,
SERVICE_NAME);
Integration port = ss.getIntegrationPort();

((BindingProvider)
port).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
 true);

[...]

WSDL location is passed on the commandline as a parameter. I use either:

file:/my/project/resource/dir/Integration.wsdl

or

http://localhost:8080/integration/services/Integration?wsdl

both of them being the same wsdl, both of them producing the same effect.


bmargulies wrote:
> 
> How did you generate your client?
> 
>> I believe that I don't understand what you mean. What I expect is that
>> when I
>> declare a custom exception in my wsdl (and thus in my interface), and
>> throw
>> it on the server side in the implementation class, the client that
> invokes
>> a
>> method, will get exactly that declared exception.
>> 
>> To illustrate:
>> 
>> I have
>> 
>> @WebMethod...
>> public void foo() throws MyCustomException;
>> 
>> @WebException...
>> class MyCustomException extends Exception
>> 
>> And client invokes:
>> 
>> try {
>>  ws.foo();
>> catch (MyCustomException e) {
>>  do.failsafe();
>> }
>> 
>> I do expect my failsafe to work instead of client bailing out with a
> boom
>> and SoapFaultException stacktrace. And I have a good reason for the
>> expectations like that - it should work and moreover in some cases it
>> works
>> fine.  But there is a set of situations, where it just breaks down.
>> 
>> My problem is, that those situations happen more or less random and
> there
>> is
>> no change (that I can locate) in WSDL nor in generated classes that
> would
>> sanction this different behaviour.
>> 
>> Best regards,
>> Piotr Berlowski
>> 
>> 
>> Glen Mazza-2 wrote:
>> >
>> >
>> > I'm missing something here.  What is it that you are expecting the
>> > client to receive instead--why is the above wrong?  You're not
> expecting
>> > a SOAP server to be sending Java exceptions to the SOAP client,
> right?
>> >
>> > Glen
>> >
>> >
>> >> CXF version is 2.0.2. You can find generated exception
>> >> class, exception details class and relevant parts od wsdl attached
> to
>> >> this message.
>> >>
>> >> If any more information is required, I will be more than happy to
> post
>> >> it. We are really stuck with this!
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JAX-WS-%2B-JAXB-problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-exception-tf4669782.html#a13362683
Sent from the cxf-user mailing list archive at Nabble.com.



RE: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Benson Margulies
Someone needs to make a JIRA with all the bits and pieces in place.

> -Original Message-
> From: Piotr W. Berlowski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 8:06 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: JAX-WS + JAXB problem -
javax.xml.ws.soap.SOAPFaultException
> thrown instead of custom exception
> 
> 
> Classes are generated from wsdl using ant that i attached to my first
post.
> Then the client is used as follows:
> 
> public static void main(String args[]) throws Exception
> {
> 
> if (args.length == 0)
> {
> System.out.println("please specify wsdl");
> System.exit(1);
> }
> URL wsdlURL = null;
> File wsdlFile = new File(args[0]);
> try
> {
> if (wsdlFile.exists())
> {
> wsdlURL = wsdlFile.toURL();
> }
> else
> {
> wsdlURL = new URL(args[0]);
> }
> }
> catch (MalformedURLException e)
> {
> e.printStackTrace();
> }
> 
> IntegrationService ss = new IntegrationService(wsdlURL,
> SERVICE_NAME);
> Integration port = ss.getIntegrationPort();
> 
> ((BindingProvider)
>
port).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,
>  true);
> 
> [...]
> 
> WSDL location is passed on the commandline as a parameter. I use
either:
> 
> file:/my/project/resource/dir/Integration.wsdl
> 
> or
> 
> http://localhost:8080/integration/services/Integration?wsdl
> 
> both of them being the same wsdl, both of them producing the same
effect.
> 
> 
> bmargulies wrote:
> >
> > How did you generate your client?
> >
> >> I believe that I don't understand what you mean. What I expect is
that
> >> when I
> >> declare a custom exception in my wsdl (and thus in my interface),
and
> >> throw
> >> it on the server side in the implementation class, the client that
> > invokes
> >> a
> >> method, will get exactly that declared exception.
> >>
> >> To illustrate:
> >>
> >> I have
> >>
> >> @WebMethod...
> >> public void foo() throws MyCustomException;
> >>
> >> @WebException...
> >> class MyCustomException extends Exception
> >>
> >> And client invokes:
> >>
> >> try {
> >>  ws.foo();
> >> catch (MyCustomException e) {
> >>  do.failsafe();
> >> }
> >>
> >> I do expect my failsafe to work instead of client bailing out with
a
> > boom
> >> and SoapFaultException stacktrace. And I have a good reason for the
> >> expectations like that - it should work and moreover in some cases
it
> >> works
> >> fine.  But there is a set of situations, where it just breaks down.
> >>
> >> My problem is, that those situations happen more or less random and
> > there
> >> is
> >> no change (that I can locate) in WSDL nor in generated classes that
> > would
> >> sanction this different behaviour.
> >>
> >> Best regards,
> >> Piotr Berlowski
> >>
> >>
> >> Glen Mazza-2 wrote:
> >> >
> >> >
> >> > I'm missing something here.  What is it that you are expecting
the
> >> > client to receive instead--why is the above wrong?  You're not
> > expecting
> >> > a SOAP server to be sending Java exceptions to the SOAP client,
> > right?
> >> >
> >> > Glen
> >> >
> >> >
> >> >> CXF version is 2.0.2. You can find generated exception
> >> >> class, exception details class and relevant parts od wsdl
attached
> > to
> >> >> this message.
> >> >>
> >> >> If any more information is required, I will be more than happy
to
> > post
> >> >> it. We are really stuck with this!
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/JAX-WS-%2B-JAXB-
>
problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-
> exception-tf4669782.html#a13362683
> Sent from the cxf-user mailing list archive at Nabble.com.



RE: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Piotr W. Berlowski

I'll try to put it all together.


bmargulies wrote:
> 
> Someone needs to make a JIRA with all the bits and pieces in place.
> 
-- 
View this message in context: 
http://www.nabble.com/JAX-WS-%2B-JAXB-problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-exception-tf4669782.html#a13363084
Sent from the cxf-user mailing list archive at Nabble.com.



RE: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Benson Margulies
We won't know until we debug it :-)! Just pick one.

> -Original Message-
> From: Piotr W. Berlowski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 8:29 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: JAX-WS + JAXB problem -
javax.xml.ws.soap.SOAPFaultException
> thrown instead of custom exception
> 
> 
> I'll try to put it all together.
> Hmm... What category? JAXB or JAX-WS?
> 
> 
> bmargulies wrote:
> >
> > Someone needs to make a JIRA with all the bits and pieces in place.
> >
> --
> View this message in context: http://www.nabble.com/JAX-WS-%2B-JAXB-
>
problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-
> exception-tf4669782.html#a13363084
> Sent from the cxf-user mailing list archive at Nabble.com.



RE: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Piotr W. Berlowski

I have placed a bug on JIRA -> https://issues.apache.org/jira/browse/CXF-1131


Piotr W. Berlowski wrote:
> 
> I'll try to put it all together.
> Hmm... What category? JAXB or JAX-WS?
> 
> 
> bmargulies wrote:
>> 
>> Someone needs to make a JIRA with all the bits and pieces in place.
>> 
> 

-- 
View this message in context: 
http://www.nabble.com/JAX-WS-%2B-JAXB-problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-exception-tf4669782.html#a13363748
Sent from the cxf-user mailing list archive at Nabble.com.



Re: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Daniel Kulp

Quick question...

On the server side, where you create the fault, are you doing:

throw new 
IncorrectProjectIdsException("IncorrectProjectIdsException...");

or:
throw new IncorrectProjectIdsException("IncorrectProjectIdsException...",
"Detail string");

I think there is an issue if the detail is null.   I'm looking into that 
now.

Dan



On Tuesday 23 October 2007, Piotr PiBis Berlowski wrote:
> Hi, and thank you for your interest.
>
> Regretfully, 2.0.3 does not work either. However, the problem appears
> to be just a top of an iceberg. To be specific - we are naver able to
> tell if an exception is gonna work or not. We have not found any rule
> in that yet. Only rule is that when a wsdl is big, and has lots of
> operations and lots of exceptions, some of them will not work for
> sure.
>
> I attach the full wsdl, which causes the problem.
>
> There is no apparent difference between neither wsdl nor the generated
> classes for the exceptions that do work and that don't work. We are
> currently working on catching the soap messages and checking if the
> problem occurs on the client or on the server side.
>
> Best regards,
> Piotr Berlowski
>
> > Any chance you could try the latest 2.0.3 SNAPSHOT?
> >
> > I just tried with trunk and this worked fine.
> >
> > Server code:
> > public void removeXtmProjects(java.util.List
> > projectIds) throws IncorrectProjectIdsException{
> > throw new IncorrectProjectIdsException("Exception on
> > server", projectIds.get(0));
> > }
> >
> > Client code:
> > java.util.List
> > _removeXtmProjects_projectIds = new ArrayList();
> > _removeXtmProjects_projectIds.add("hello");
> > try {
> > port.removeXtmProjects(_removeXtmProjects_projectIds);
> >
> > } catch (IncorrectProjectIdsException e) {
> > System.out.println("Expected exception:
> > IncorrectProjectIdsException has occurred.");
> > System.out.println(e.toString());
> > System.out.println(e.getFaultInfo());
> > }
> >
> >
> > What got printed out:
> > Expected exception: IncorrectProjectIdsException has occurred.
> > com.xmlintl.webservice.integration.IncorrectProjectIdsException:
> > Exception on server
> > hello
> >
> >
> > Thus, it looks like it's fixed.
> >
> > Dan
> >
> > On Monday 22 October 2007, Piotr PiBis Berlowski wrote:
> >> Hi,
> >>
> >>We consider this issue to be a huge blocker for a major project.
> >> When a user-defined exception is thrown by the server, a client
> >> receives a SOAPExceptionFault (with the message that belonged to
> >> the user-defined exception). CXF version is 2.0.2. You can find
> >> generated exception class, exception details class and relevant
> >> parts od wsdl attached to this message.
> >>
> >> If any more information is required, I will be more than happy to
> >> post it. We are really stuck with this!
> >>
> >> Thanks in advance, and best regards!



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Piotr PiBis Berlowski
That was a VERY good question.

I did create them the first way. Second way proved to fix the problem.

Of course there's another related issue. I would like to create the
exceptions without additional parameters but if I specify "partless"
exception in my wsdl I hit against wsdl2java bug - exceptions that get
created do not override the "new Exception(message)" constructor... I
haven't investigated that yet so I don't know if someone already pointed
that out.

Neverthless, you helped me greatly. Thank you.

> Quick question...
> 
> On the server side, where you create the fault, are you doing:
> 
> throw new 
> IncorrectProjectIdsException("IncorrectProjectIdsException...");
> 
> or:
> throw new IncorrectProjectIdsException("IncorrectProjectIdsException...",
> "Detail string");
> 
> I think there is an issue if the detail is null.   I'm looking into that 
> now.
> 
> Dan
> 
> 
> 
> On Tuesday 23 October 2007, Piotr PiBis Berlowski wrote:
>> Hi, and thank you for your interest.
>>
>> Regretfully, 2.0.3 does not work either. However, the problem appears
>> to be just a top of an iceberg. To be specific - we are naver able to
>> tell if an exception is gonna work or not. We have not found any rule
>> in that yet. Only rule is that when a wsdl is big, and has lots of
>> operations and lots of exceptions, some of them will not work for
>> sure.
>>
>> I attach the full wsdl, which causes the problem.
>>
>> There is no apparent difference between neither wsdl nor the generated
>> classes for the exceptions that do work and that don't work. We are
>> currently working on catching the soap messages and checking if the
>> problem occurs on the client or on the server side.
>>
>> Best regards,
>> Piotr Berlowski
>>
>>> Any chance you could try the latest 2.0.3 SNAPSHOT?
>>>
>>> I just tried with trunk and this worked fine.
>>>
>>> Server code:
>>> public void removeXtmProjects(java.util.List
>>> projectIds) throws IncorrectProjectIdsException{
>>> throw new IncorrectProjectIdsException("Exception on
>>> server", projectIds.get(0));
>>> }
>>>
>>> Client code:
>>> java.util.List
>>> _removeXtmProjects_projectIds = new ArrayList();
>>> _removeXtmProjects_projectIds.add("hello");
>>> try {
>>> port.removeXtmProjects(_removeXtmProjects_projectIds);
>>>
>>> } catch (IncorrectProjectIdsException e) {
>>> System.out.println("Expected exception:
>>> IncorrectProjectIdsException has occurred.");
>>> System.out.println(e.toString());
>>> System.out.println(e.getFaultInfo());
>>> }
>>>
>>>
>>> What got printed out:
>>> Expected exception: IncorrectProjectIdsException has occurred.
>>> com.xmlintl.webservice.integration.IncorrectProjectIdsException:
>>> Exception on server
>>> hello
>>>
>>>
>>> Thus, it looks like it's fixed.
>>>
>>> Dan
>>>
>>> On Monday 22 October 2007, Piotr PiBis Berlowski wrote:
 Hi,

We consider this issue to be a huge blocker for a major project.
 When a user-defined exception is thrown by the server, a client
 receives a SOAPExceptionFault (with the message that belonged to
 the user-defined exception). CXF version is 2.0.2. You can find
 generated exception class, exception details class and relevant
 parts od wsdl attached to this message.

 If any more information is required, I will be more than happy to
 post it. We are really stuck with this!

 Thanks in advance, and best regards!



Re: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Daniel Kulp

One more thing, can you use wireshark/tcpdump/etc...  on the interaction 
to get the wire level traces for the exceptions that aren't working?   
I'd like to see the raw soap messages as well as the HTTP headers.   

Finally, if you could run with a logging.properties file that sets things 
to a "FINE" level, that would be great.   That would at least let me 
know if the ClientFaultConverter interceptor is getting called or not.

I'm really struggling trying to reproduce this.   Basically, if my server 
has:
public void removeXtmProjects(
java.util.List projectIds) 
throws IncorrectProjectIdsException{ 
throw new 
IncorrectProjectIdsException("IncorrectProjectIdsException...",
"Detail string");
}
it works fine.

If I have:
public void removeXtmProjects(
java.util.List projectIds) 
throws IncorrectProjectIdsException{ 
throw new 
IncorrectProjectIdsException("IncorrectProjectIdsException...");
}
it DOESN'T work, but the client side stack trace is very different than 
yours.   I get a NPE in the ClientFaultConverter.   Of course, that 
difference may be due to 2.0.2 -> 2.0.3 changes.


Dan



On Tuesday 23 October 2007, Daniel Kulp wrote:
> Quick question...
>
> On the server side, where you create the fault, are you doing:
>
> throw new
> IncorrectProjectIdsException("IncorrectProjectIdsException...");
>
> or:
> throw new
> IncorrectProjectIdsException("IncorrectProjectIdsException...",
> "Detail string");
>
> I think there is an issue if the detail is null.   I'm looking into
> that now.
>
> Dan
>
> On Tuesday 23 October 2007, Piotr PiBis Berlowski wrote:
> > Hi, and thank you for your interest.
> >
> > Regretfully, 2.0.3 does not work either. However, the problem
> > appears to be just a top of an iceberg. To be specific - we are
> > naver able to tell if an exception is gonna work or not. We have not
> > found any rule in that yet. Only rule is that when a wsdl is big,
> > and has lots of operations and lots of exceptions, some of them will
> > not work for sure.
> >
> > I attach the full wsdl, which causes the problem.
> >
> > There is no apparent difference between neither wsdl nor the
> > generated classes for the exceptions that do work and that don't
> > work. We are currently working on catching the soap messages and
> > checking if the problem occurs on the client or on the server side.
> >
> > Best regards,
> > Piotr Berlowski
> >
> > > Any chance you could try the latest 2.0.3 SNAPSHOT?
> > >
> > > I just tried with trunk and this worked fine.
> > >
> > > Server code:
> > > public void removeXtmProjects(java.util.List
> > > projectIds) throws IncorrectProjectIdsException{
> > > throw new IncorrectProjectIdsException("Exception on
> > > server", projectIds.get(0));
> > > }
> > >
> > > Client code:
> > > java.util.List
> > > _removeXtmProjects_projectIds = new ArrayList();
> > > _removeXtmProjects_projectIds.add("hello");
> > > try {
> > > port.removeXtmProjects(_removeXtmProjects_projectIds);
> > >
> > > } catch (IncorrectProjectIdsException e) {
> > > System.out.println("Expected exception:
> > > IncorrectProjectIdsException has occurred.");
> > > System.out.println(e.toString());
> > > System.out.println(e.getFaultInfo());
> > > }
> > >
> > >
> > > What got printed out:
> > > Expected exception: IncorrectProjectIdsException has occurred.
> > > com.xmlintl.webservice.integration.IncorrectProjectIdsException:
> > > Exception on server
> > > hello
> > >
> > >
> > > Thus, it looks like it's fixed.
> > >
> > > Dan
> > >
> > > On Monday 22 October 2007, Piotr PiBis Berlowski wrote:
> > >> Hi,
> > >>
> > >>  We consider this issue to be a huge blocker for a major project.
> > >> When a user-defined exception is thrown by the server, a client
> > >> receives a SOAPExceptionFault (with the message that belonged to
> > >> the user-defined exception). CXF version is 2.0.2. You can find
> > >> generated exception class, exception details class and relevant
> > >> parts od wsdl attached to this message.
> > >>
> > >> If any more information is required, I will be more than happy to
> > >> post it. We are really stuck with this!
> > >>
> > >> Thanks in advance, and best regards!



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Piotr PiBis Berlowski
I will do the debug for this issue anyway, I just need a while to adjust
 my project to the solution.

I'm afraid it's not a 2.0.2 -> 2.0.3 difference. I tried 2.0.3 today
morning and I got very similar if not identical traces. I will look into
it in a while.

Piotr
> One more thing, can you use wireshark/tcpdump/etc...  on the interaction 
> to get the wire level traces for the exceptions that aren't working?   
> I'd like to see the raw soap messages as well as the HTTP headers.   
> 
> Finally, if you could run with a logging.properties file that sets things 
> to a "FINE" level, that would be great.   That would at least let me 
> know if the ClientFaultConverter interceptor is getting called or not.
> 
> I'm really struggling trying to reproduce this.   Basically, if my server 
> has:
> public void removeXtmProjects(
> java.util.List projectIds) 
> throws IncorrectProjectIdsException{ 
> throw new 
> IncorrectProjectIdsException("IncorrectProjectIdsException...",
> "Detail string");
> }
> it works fine.
> 
> If I have:
> public void removeXtmProjects(
> java.util.List projectIds) 
> throws IncorrectProjectIdsException{ 
> throw new 
> IncorrectProjectIdsException("IncorrectProjectIdsException...");
> }
> it DOESN'T work, but the client side stack trace is very different than 
> yours.   I get a NPE in the ClientFaultConverter.   Of course, that 
> difference may be due to 2.0.2 -> 2.0.3 changes.
> 
> 
> Dan
> 
> 
> 
> On Tuesday 23 October 2007, Daniel Kulp wrote:
>> Quick question...
>>
>> On the server side, where you create the fault, are you doing:
>>
>> throw new
>> IncorrectProjectIdsException("IncorrectProjectIdsException...");
>>
>> or:
>> throw new
>> IncorrectProjectIdsException("IncorrectProjectIdsException...",
>> "Detail string");
>>
>> I think there is an issue if the detail is null.   I'm looking into
>> that now.
>>
>> Dan
>>
>> On Tuesday 23 October 2007, Piotr PiBis Berlowski wrote:
>>> Hi, and thank you for your interest.
>>>
>>> Regretfully, 2.0.3 does not work either. However, the problem
>>> appears to be just a top of an iceberg. To be specific - we are
>>> naver able to tell if an exception is gonna work or not. We have not
>>> found any rule in that yet. Only rule is that when a wsdl is big,
>>> and has lots of operations and lots of exceptions, some of them will
>>> not work for sure.
>>>
>>> I attach the full wsdl, which causes the problem.
>>>
>>> There is no apparent difference between neither wsdl nor the
>>> generated classes for the exceptions that do work and that don't
>>> work. We are currently working on catching the soap messages and
>>> checking if the problem occurs on the client or on the server side.
>>>
>>> Best regards,
>>> Piotr Berlowski
>>>
 Any chance you could try the latest 2.0.3 SNAPSHOT?

 I just tried with trunk and this worked fine.

 Server code:
 public void removeXtmProjects(java.util.List
 projectIds) throws IncorrectProjectIdsException{
 throw new IncorrectProjectIdsException("Exception on
 server", projectIds.get(0));
 }

 Client code:
 java.util.List
 _removeXtmProjects_projectIds = new ArrayList();
 _removeXtmProjects_projectIds.add("hello");
 try {
 port.removeXtmProjects(_removeXtmProjects_projectIds);

 } catch (IncorrectProjectIdsException e) {
 System.out.println("Expected exception:
 IncorrectProjectIdsException has occurred.");
 System.out.println(e.toString());
 System.out.println(e.getFaultInfo());
 }


 What got printed out:
 Expected exception: IncorrectProjectIdsException has occurred.
 com.xmlintl.webservice.integration.IncorrectProjectIdsException:
 Exception on server
 hello


 Thus, it looks like it's fixed.

 Dan

 On Monday 22 October 2007, Piotr PiBis Berlowski wrote:
> Hi,
>
>   We consider this issue to be a huge blocker for a major project.
> When a user-defined exception is thrown by the server, a client
> receives a SOAPExceptionFault (with the message that belonged to
> the user-defined exception). CXF version is 2.0.2. You can find
> generated exception class, exception details class and relevant
> parts od wsdl attached to this message.
>
> If any more information is required, I will be more than happy to
> post it. We are really stuck with this!
>
> Thanks in advance, and best regards!
> 
> 
> 



Re: JAX-WS + JAXB problem - javax.xml.ws.soap.SOAPFaultException thrown instead of custom exception

2007-10-23 Thread Daniel Kulp
On Tuesday 23 October 2007, Piotr PiBis Berlowski wrote:
> That was a VERY good question.
> I did create them the first way. Second way proved to fix the problem.

OK.  Then I'll probably have a fix in today.   

> Of course there's another related issue. I would like to create the
> exceptions without additional parameters but if I specify "partless"
> exception in my wsdl I hit against wsdl2java bug - exceptions that get
> created do not override the "new Exception(message)" constructor... I
> haven't investigated that yet so I don't know if someone already
> pointed that out.

Well, that's not valid.   The WSDL spec MANDATES that the fault points to 
a message with a single part.   It's actually very important.   That 
element that that part points to is the ONLY information on the wire to 
distinguish one exception from another.   If that is not there, or if 
two fault messages point to the same element, there will no way to 
reconstitute the proper exceptions on the client side.

Dan


> Neverthless, you helped me greatly. Thank you.
>
> > Quick question...
> >
> > On the server side, where you create the fault, are you doing:
> >
> > throw new
> > IncorrectProjectIdsException("IncorrectProjectIdsException...");
> >
> > or:
> > throw new
> > IncorrectProjectIdsException("IncorrectProjectIdsException...",
> > "Detail string");
> >
> > I think there is an issue if the detail is null.   I'm looking into
> > that now.
> >
> > Dan
> >
> > On Tuesday 23 October 2007, Piotr PiBis Berlowski wrote:
> >> Hi, and thank you for your interest.
> >>
> >> Regretfully, 2.0.3 does not work either. However, the problem
> >> appears to be just a top of an iceberg. To be specific - we are
> >> naver able to tell if an exception is gonna work or not. We have
> >> not found any rule in that yet. Only rule is that when a wsdl is
> >> big, and has lots of operations and lots of exceptions, some of
> >> them will not work for sure.
> >>
> >> I attach the full wsdl, which causes the problem.
> >>
> >> There is no apparent difference between neither wsdl nor the
> >> generated classes for the exceptions that do work and that don't
> >> work. We are currently working on catching the soap messages and
> >> checking if the problem occurs on the client or on the server side.
> >>
> >> Best regards,
> >> Piotr Berlowski
> >>
> >>> Any chance you could try the latest 2.0.3 SNAPSHOT?
> >>>
> >>> I just tried with trunk and this worked fine.
> >>>
> >>> Server code:
> >>> public void removeXtmProjects(java.util.List
> >>> projectIds) throws IncorrectProjectIdsException{
> >>> throw new IncorrectProjectIdsException("Exception on
> >>> server", projectIds.get(0));
> >>> }
> >>>
> >>> Client code:
> >>> java.util.List
> >>> _removeXtmProjects_projectIds = new ArrayList();
> >>> _removeXtmProjects_projectIds.add("hello");
> >>> try {
> >>> port.removeXtmProjects(_removeXtmProjects_projectIds);
> >>>
> >>> } catch (IncorrectProjectIdsException e) {
> >>> System.out.println("Expected exception:
> >>> IncorrectProjectIdsException has occurred.");
> >>> System.out.println(e.toString());
> >>> System.out.println(e.getFaultInfo());
> >>> }
> >>>
> >>>
> >>> What got printed out:
> >>> Expected exception: IncorrectProjectIdsException has occurred.
> >>> com.xmlintl.webservice.integration.IncorrectProjectIdsException:
> >>> Exception on server
> >>> hello
> >>>
> >>>
> >>> Thus, it looks like it's fixed.
> >>>
> >>> Dan
> >>>
> >>> On Monday 22 October 2007, Piotr PiBis Berlowski wrote:
>  Hi,
> 
>   We consider this issue to be a huge blocker for a major project.
>  When a user-defined exception is thrown by the server, a client
>  receives a SOAPExceptionFault (with the message that belonged to
>  the user-defined exception). CXF version is 2.0.2. You can find
>  generated exception class, exception details class and relevant
>  parts od wsdl attached to this message.
> 
>  If any more information is required, I will be more than happy to
>  post it. We are really stuck with this!
> 
>  Thanks in advance, and best regards!



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: cxf jms with java first

2007-10-23 Thread Christian Schneider

I also want to use java first with jms. Perhaps we can coordinate efforts.
Have you come any further?

Best regards

Christian

mule1 schrieb:

Hello,

I wanted to configure cxf jms in xml with my java first service
implementation. Can you provide me the sample cxf jms configuration?
  



--

Christian Schneider
---
http://www.liquid-reality.de



Migrating enums

2007-10-23 Thread Benson Margulies
In the interests of a less eventful life, I moved my production code to
JAXB from Aegis. My doc guy just pointed out to me that our WSDL has
rather less schema elements than expected. Indeed, there seems to have a
been a giant migration to the service TNS, at least of enums.

In the wsdl that is coming out of java2wsdl, I've got one schema.

http://www.w3.org/2001/XMLSchema";
xmlns:btrni="http://index.rnm.basistech.com";
xmlns:btrniws="http://ws.index.rnm.basistech.com";
xmlns:btrnm="http://rnm.basistech.com";
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://ws.index.rnm.basistech.com";>

I then have a reference to an enum type:



This already looks wrong, insofar as that enum lives in
com.basistech.util, not com.basistech.rnm.index.ws.

But it's at least consistent, since that is the tns and, sure enough,
the enum complexType is just sitting in the tns.

However, I now notice that the same thing is happening to all of the
beans. Everything is in the TNS, regardless of package-of-origin.




RE: Migrating enums

2007-10-23 Thread Benson Margulies
This turns out to be specific to java2wsdl usage. I'm running the tool
from ant, with:

   
 
 
 
 
 

 
  

The classpath there should contain all the relevant impediment. I guess
the first step is to change 'quiet' to 'verbose'.

> -Original Message-
> From: Benson Margulies [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 2:53 PM
> To: cxf-user@incubator.apache.org
> Subject: Migrating enums
> 
> In the interests of a less eventful life, I moved my production code
to
> JAXB from Aegis. My doc guy just pointed out to me that our WSDL has
> rather less schema elements than expected. Indeed, there seems to have
a
> been a giant migration to the service TNS, at least of enums.
> 
> In the wsdl that is coming out of java2wsdl, I've got one schema.
> 
> http://www.w3.org/2001/XMLSchema";
> xmlns:btrni="http://index.rnm.basistech.com";
> xmlns:btrniws="http://ws.index.rnm.basistech.com";
> xmlns:btrnm="http://rnm.basistech.com";
> attributeFormDefault="unqualified" elementFormDefault="unqualified"
> targetNamespace="http://ws.index.rnm.basistech.com";>
> 
> I then have a reference to an enum type:
> 
> 
> 
> This already looks wrong, insofar as that enum lives in
> com.basistech.util, not com.basistech.rnm.index.ws.
> 
> But it's at least consistent, since that is the tns and, sure enough,
> the enum complexType is just sitting in the tns.
> 
> However, I now notice that the same thing is happening to all of the
> beans. Everything is in the TNS, regardless of package-of-origin.
> 



Re: Migrating enums

2007-10-23 Thread Daniel Kulp

This is probably working "as designed" for JAX-WS tck/spec compliance.

Basically, in the absense of namespace attributes on the @XmlType 
annotations or on the @XmlSchema annotation in the package-info, we are 
supposed to map all the beans into schemas of the service namespace.  I 
know, kind of bizarre.

The easy fix is usually to create a package-info.java with the 
appropriate @XmlSchema annotation.Otherwise, add the namespace 
attribute to all the @XmlType annotations on all the beans.

Dan


On Tuesday 23 October 2007, Benson Margulies wrote:
> In the interests of a less eventful life, I moved my production code
> to JAXB from Aegis. My doc guy just pointed out to me that our WSDL
> has rather less schema elements than expected. Indeed, there seems to
> have a been a giant migration to the service TNS, at least of enums.
>
> In the wsdl that is coming out of java2wsdl, I've got one schema.
>
> http://www.w3.org/2001/XMLSchema";
> xmlns:btrni="http://index.rnm.basistech.com";
> xmlns:btrniws="http://ws.index.rnm.basistech.com";
> xmlns:btrnm="http://rnm.basistech.com";
> attributeFormDefault="unqualified" elementFormDefault="unqualified"
> targetNamespace="http://ws.index.rnm.basistech.com";>
>
> I then have a reference to an enum type:
>
> 
>
> This already looks wrong, insofar as that enum lives in
> com.basistech.util, not com.basistech.rnm.index.ws.
>
> But it's at least consistent, since that is the tns and, sure enough,
> the enum complexType is just sitting in the tns.
>
> However, I now notice that the same thing is happening to all of the
> beans. Everything is in the TNS, regardless of package-of-origin.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Maturity

2007-10-23 Thread Greg Thoenen
Hi, all.

I'm currently evaluating web service frameworks that might provide our
web services on the server side.  CXF is a top contender, but I'm a
little confused about its maturity.  It is still in the Apache
incubator, however it has releases that appear to me to be "production"
releases (e.g. 2.0.1, as opposed to 2.0-MC1 or 2.0-RC1, etc.).  

This leads me to some (related) questions:  Is CXF considered production
ready?  If so, is anyone using it in production systems, and what are
people's experiences regarding its production readiness?

An unrelated question that may be pretty ignorant (sorry) is why Apache
is sponsoring CXF rather than modifying the web service framework
(Axis2) that it already is invested in?  Was it deemed that it would
take more effort to modify Axis2 to support JAX-WS, etc., as to start
with XFire and do it?

Thanks in advance,
Greg



RE: Migrating enums

2007-10-23 Thread Benson Margulies
Oh, well, that's simple enough.

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 3:33 PM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: Migrating enums
> 
> 
> This is probably working "as designed" for JAX-WS tck/spec compliance.
> 
> Basically, in the absense of namespace attributes on the @XmlType
> annotations or on the @XmlSchema annotation in the package-info, we
are
> supposed to map all the beans into schemas of the service namespace.
I
> know, kind of bizarre.
> 
> The easy fix is usually to create a package-info.java with the
> appropriate @XmlSchema annotation.Otherwise, add the namespace
> attribute to all the @XmlType annotations on all the beans.
> 
> Dan
> 
> 
> On Tuesday 23 October 2007, Benson Margulies wrote:
> > In the interests of a less eventful life, I moved my production code
> > to JAXB from Aegis. My doc guy just pointed out to me that our WSDL
> > has rather less schema elements than expected. Indeed, there seems
to
> > have a been a giant migration to the service TNS, at least of enums.
> >
> > In the wsdl that is coming out of java2wsdl, I've got one schema.
> >
> > http://www.w3.org/2001/XMLSchema";
> > xmlns:btrni="http://index.rnm.basistech.com";
> > xmlns:btrniws="http://ws.index.rnm.basistech.com";
> > xmlns:btrnm="http://rnm.basistech.com";
> > attributeFormDefault="unqualified" elementFormDefault="unqualified"
> > targetNamespace="http://ws.index.rnm.basistech.com";>
> >
> > I then have a reference to an enum type:
> >
> > 
> >
> > This already looks wrong, insofar as that enum lives in
> > com.basistech.util, not com.basistech.rnm.index.ws.
> >
> > But it's at least consistent, since that is the tns and, sure
enough,
> > the enum complexType is just sitting in the tns.
> >
> > However, I now notice that the same thing is happening to all of the
> > beans. Everything is in the TNS, regardless of package-of-origin.
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


RE: Migrating enums

2007-10-23 Thread Benson Margulies
I've already got the following. I take it I need more?

@javax.xml.bind.annotation.XmlSchema(
xmlns = {
@javax.xml.bind.annotation.XmlNs(prefix = "btutil", 
 namespaceURI =
"http://util.basistech.com";)
}
)
package com.basistech.util;



> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 3:33 PM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: Migrating enums
> 
> 
> This is probably working "as designed" for JAX-WS tck/spec compliance.
> 
> Basically, in the absense of namespace attributes on the @XmlType
> annotations or on the @XmlSchema annotation in the package-info, we
are
> supposed to map all the beans into schemas of the service namespace.
I
> know, kind of bizarre.
> 
> The easy fix is usually to create a package-info.java with the
> appropriate @XmlSchema annotation.Otherwise, add the namespace
> attribute to all the @XmlType annotations on all the beans.
> 
> Dan
> 
> 
> On Tuesday 23 October 2007, Benson Margulies wrote:
> > In the interests of a less eventful life, I moved my production code
> > to JAXB from Aegis. My doc guy just pointed out to me that our WSDL
> > has rather less schema elements than expected. Indeed, there seems
to
> > have a been a giant migration to the service TNS, at least of enums.
> >
> > In the wsdl that is coming out of java2wsdl, I've got one schema.
> >
> > http://www.w3.org/2001/XMLSchema";
> > xmlns:btrni="http://index.rnm.basistech.com";
> > xmlns:btrniws="http://ws.index.rnm.basistech.com";
> > xmlns:btrnm="http://rnm.basistech.com";
> > attributeFormDefault="unqualified" elementFormDefault="unqualified"
> > targetNamespace="http://ws.index.rnm.basistech.com";>
> >
> > I then have a reference to an enum type:
> >
> > 
> >
> > This already looks wrong, insofar as that enum lives in
> > com.basistech.util, not com.basistech.rnm.index.ws.
> >
> > But it's at least consistent, since that is the tns and, sure
enough,
> > the enum complexType is just sitting in the tns.
> >
> > However, I now notice that the same thing is happening to all of the
> > beans. Everything is in the TNS, regardless of package-of-origin.
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


RE: Migrating enums

2007-10-23 Thread Benson Margulies
OK, I get it. Namespace="' as well.

> -Original Message-
> From: Benson Margulies [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 23, 2007 4:11 PM
> To: Daniel Kulp; cxf-user@incubator.apache.org
> Subject: RE: Migrating enums
> 
> I've already got the following. I take it I need more?
> 
> @javax.xml.bind.annotation.XmlSchema(
> xmlns = {
> @javax.xml.bind.annotation.XmlNs(prefix = "btutil",
>  namespaceURI =
> "http://util.basistech.com";)
> }
> )
> package com.basistech.util;
> 
> 
> 
> > -Original Message-
> > From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 23, 2007 3:33 PM
> > To: cxf-user@incubator.apache.org
> > Cc: Benson Margulies
> > Subject: Re: Migrating enums
> >
> >
> > This is probably working "as designed" for JAX-WS tck/spec
compliance.
> >
> > Basically, in the absense of namespace attributes on the @XmlType
> > annotations or on the @XmlSchema annotation in the package-info, we
> are
> > supposed to map all the beans into schemas of the service namespace.
> I
> > know, kind of bizarre.
> >
> > The easy fix is usually to create a package-info.java with the
> > appropriate @XmlSchema annotation.Otherwise, add the namespace
> > attribute to all the @XmlType annotations on all the beans.
> >
> > Dan
> >
> >
> > On Tuesday 23 October 2007, Benson Margulies wrote:
> > > In the interests of a less eventful life, I moved my production
code
> > > to JAXB from Aegis. My doc guy just pointed out to me that our
WSDL
> > > has rather less schema elements than expected. Indeed, there seems
> to
> > > have a been a giant migration to the service TNS, at least of
enums.
> > >
> > > In the wsdl that is coming out of java2wsdl, I've got one schema.
> > >
> > > http://www.w3.org/2001/XMLSchema";
> > > xmlns:btrni="http://index.rnm.basistech.com";
> > > xmlns:btrniws="http://ws.index.rnm.basistech.com";
> > > xmlns:btrnm="http://rnm.basistech.com";
> > > attributeFormDefault="unqualified"
elementFormDefault="unqualified"
> > > targetNamespace="http://ws.index.rnm.basistech.com";>
> > >
> > > I then have a reference to an enum type:
> > >
> > > 
> > >
> > > This already looks wrong, insofar as that enum lives in
> > > com.basistech.util, not com.basistech.rnm.index.ws.
> > >
> > > But it's at least consistent, since that is the tns and, sure
> enough,
> > > the enum complexType is just sitting in the tns.
> > >
> > > However, I now notice that the same thing is happening to all of
the
> > > beans. Everything is in the TNS, regardless of package-of-origin.
> >
> >
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727C: 508-380-7194
> > [EMAIL PROTECTED]
> > http://www.dankulp.com/blog


how to: cxf + rest + JaxWsProxyFactoryBean + multiple parameters

2007-10-23 Thread Erik Nijkamp
Hello folks,

currently I'm trying to setup a restful web service using cxf and spring.
The service itself is working smoothly, but the client is only working
for methods with 1 argument.

Here come's the interesting stuff:

@WebService
public interface ITestService {
 @Get @HttpResource(location="/two/{first}/{second}")
 String two(@WebParam(name = "first") String name,
@WebParam(name = "second") String 
name2) throws Exception;


}


http://localhost:8090/test";
 bindingUri="http://apache.org/cxf/binding/http";>
 
 
 




JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ITestService.class);
factory.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); 
factory.setAddress("http://localhost:8090/test/";);
ITestService client = (ITestService) factory.create();
System.out.println(client.two("1", "2"));


org.apache.cxf.binding.xml.XMLFault: Invalid URL/Verb combination. Verb: 
GET Path: /two/
 at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:142)
 at $Proxy18.two(Unknown Source)
 at 
com.ibm.ors.test.RestClientTest.runClient(RestClientTest.java:46)
 at 
com.ibm.ors.test.RestClientTest.main(RestClientTest.java:21)
Throwable thrown: Invalid URL/Verb combination. Verb: GET Path: /two/

Invoking two(...) directly using the url is working just fine.
I guess (hope) somebody is using a method with more than one argument ...

mit freundlichen Grüßen | kind regards

Erik Nijkamp 




Erik Nijkamp
Business Computing
Mobile: +49-(0)160 2153796
Kst: 6807 | GBS: 10178-80 

IBM Ausbildung Berlin
Karl-Liebknecht-Straße 29
D-10178 Berlin
University Education Berlin / IBM Germany 
Human Resources, IBM Sales & Distribution 

IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki
Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian 
Diedrich,
Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 14562
WEEE-Reg.-Nr. DE 99369940 




Re: Maturity

2007-10-23 Thread Christian Vest Hansen
We are using CXF to build an SSO and general intergration platform at
my workplace.

We initially started out with XFire but decided in the last minute
(and about three days after CXF 2.0 was released IIRC) to go with CXF
instead, even though it meant scraping some of work we already had
done on some general components.

We did this even though XFire is very mature and production ready,
because if you want to build software with a future, it's best to use
technologies that have a future as well; CXF is young and has its
kinks, but it also has momentum and a growing community as far as I
can tell, and this made it a better option for us then XFire.

I personally consider CXF production ready; we haven't got any CXF
services in production systems just yet, though we have some handfuls
in staging environments and they are humming along quite handsomly.

2007/10/23, Greg Thoenen <[EMAIL PROTECTED]>:
> Hi, all.
>
> I'm currently evaluating web service frameworks that might provide our
> web services on the server side.  CXF is a top contender, but I'm a
> little confused about its maturity.  It is still in the Apache
> incubator, however it has releases that appear to me to be "production"
> releases (e.g. 2.0.1, as opposed to 2.0-MC1 or 2.0-RC1, etc.).
>
> This leads me to some (related) questions:  Is CXF considered production
> ready?  If so, is anyone using it in production systems, and what are
> people's experiences regarding its production readiness?
>
> An unrelated question that may be pretty ignorant (sorry) is why Apache
> is sponsoring CXF rather than modifying the web service framework
> (Axis2) that it already is invested in?  Was it deemed that it would
> take more effort to modify Axis2 to support JAX-WS, etc., as to start
> with XFire and do it?
>
> Thanks in advance,
> Greg
>
>


-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.


Re: how to: cxf + rest + JaxWsProxyFactoryBean + multiple parameters

2007-10-23 Thread Erik Nijkamp
By the way wrapped mode does not fix the problem ...

mit freundlichen Grüßen | kind regards

Erik Nijkamp 




Erik Nijkamp
Business Computing
Mobile: +49-(0)160 2153796
Kst: 6807 | GBS: 10178-80 

IBM Ausbildung Berlin
Karl-Liebknecht-Straße 29
D-10178 Berlin
University Education Berlin / IBM Germany 
Human Resources, IBM Sales & Distribution 

IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki
Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian 
Diedrich,
Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 14562
WEEE-Reg.-Nr. DE 99369940 






Erik Nijkamp/Germany/[EMAIL PROTECTED] 
23.10.2007 14:10
Please respond to
cxf-user@incubator.apache.org


To
cxf-user@incubator.apache.org
cc

Subject
how to: cxf + rest + JaxWsProxyFactoryBean + multiple parameters







Hello folks, 

currently I'm trying to setup a restful web service using cxf and spring. 
The service itself is working smoothly, but the client is only working 
for methods with 1 argument. 

Here come's the interesting stuff: 

@WebService
public interface ITestService {
@Get @HttpResource(location="/two/{first}/{second}")
String two(@WebParam(name = "first") String name,
@WebParam(name = "second") String 
name2) throws Exception;


}


http://localhost:8090/test";
bindingUri="http://apache.org/cxf/binding/http";>

 





JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ITestService.class);
factory.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); 
factory.setAddress("http://localhost:8090/test/";);
ITestService client = (ITestService) factory.create();
System.out.println(client.two("1", "2"));


org.apache.cxf.binding.xml.XMLFault: Invalid URL/Verb combination. Verb: 
GET Path: /two/
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:142)
at $Proxy18.two(Unknown Source)
at 
com.ibm.ors.test.RestClientTest.runClient(RestClientTest.java:46)
at 
com.ibm.ors.test.RestClientTest.main(RestClientTest.java:21)
Throwable thrown: Invalid URL/Verb combination. Verb: GET Path: /two/ 

Invoking two(...) directly using the url is working just fine. 
I guess (hope) somebody is using a method with more than one argument ...

mit freundlichen Grüßen | kind regards

Erik Nijkamp 




Erik Nijkamp
Business Computing
Mobile: +49-(0)160 2153796
Kst: 6807 | GBS: 10178-80 

IBM Ausbildung Berlin
Karl-Liebknecht-Straße 29
D-10178 Berlin
University Education Berlin / IBM Germany 
Human Resources, IBM Sales & Distribution 

IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki
Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian 
Diedrich,
Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 14562
WEEE-Reg.-Nr. DE 99369940 




Serialization of XML attributes to Java Types

2007-10-23 Thread Brad O'Hearne

Hello,

I am using CXF HTTP RESTful invocations, and I have been successfully 
using the default serialization in CXF to convert XML such as the following:



   value 1
   value 2


to a Java object such as:

public class MyObject {

   private String myVar1;
   private String myVar2;

   // What I would like to do, is change the serialization so that attributes 
map to Java properties, so that using the same Java object above, the 
following XML would properly map using CXF:




Can someone enlighten me as to how this is done? That is step 1. The 
second step is to map other object types to properties, as in:



   
   value 1
   value 2
   



mapping to these Java classes:


public class MyObject {

   private MyChildObject myChildObject;

   // 

Still missing wsdl import elements for inline schemas, this time in jaxb with 2.0.3 snapshot

2007-10-23 Thread Benson Margulies
chema validation error on node xs:element
  
Error resolving component 'btutil:languageCode'. It was detected that
'btutil:languageCode' is in namespace 'http://util.basistech.com', but
components from this namespace are not referenceable from schema
document
'http://localhost:8080/rlpws/NameTranslation?wsdl&mindreefFragmentId=773
3258'. If this is the incorrect namespace, perhaps the prefix of
'btutil:languageCode' needs to be changed. If this is the correct
namespace, then an appropriate 'import' tag should be added to
'http://localhost:8080/rlpws/NameTranslation?wsdl&mindreefFragmentId=773
3258'.



can't generate war file from ant build

2007-10-23 Thread dara kok

Hi,

I build my wsdl file using eclipse and generate java code from this wsdl
file using wsdl2java -impl -ant -server

after filling in business logic to the generated implementation file, i can
build the code using the command: ant

the strange thing is: I can't build war file from the command: ant war
the error say "the target "war" doesn't exists."

Can you help me?


Thanks,

dara kok

-- 
View this message in context: 
http://www.nabble.com/can%27t-generate-war-file-from-ant-build-tf4681559.html#a13377667
Sent from the cxf-user mailing list archive at Nabble.com.



Re: can't generate war file from ant build

2007-10-23 Thread Jeff Yu

dara kok wrote:

Hi,

I build my wsdl file using eclipse and generate java code from this wsdl
file using wsdl2java -impl -ant -server

after filling in business logic to the generated implementation file, i can
build the code using the command: ant

the strange thing is: I can't build war file from the command: ant war
the error say "the target "war" doesn't exists."

Can you help me?


Thanks,

dara kok

  
I don't know whether you are working in the sample directory, but the 
"war" target doesn't exist in the build.xml itself,

it was defined in the common_build.xml in the $CXF_HOME/sample directory.

Thanks
Jeff


Re: can't generate war file from ant build

2007-10-23 Thread dara kok

I build a custom application not the one from the sample directory.

So please tell me how to generate war file from my custom application so i
can deploy it in tomcat?


Thanks,
-- 
View this message in context: 
http://www.nabble.com/can%27t-generate-war-file-from-ant-build-tf4681559.html#a13378292
Sent from the cxf-user mailing list archive at Nabble.com.



Re: can't generate war file from ant build

2007-10-23 Thread Jeff Yu

dara kok wrote:

I build a custom application not the one from the sample directory.

So please tell me how to generate war file from my custom application so i
can deploy it in tomcat?


Thanks,
  

Hi,

You need to write "war" target by yourself, you can refer to ANT manual 
for this target

and also you can see how cxf does in the "common_build.xml" file.

   
   
   
   
   
   
   
   
   
   
   
   
   
 
   

Thanks
Jeff


Re: how to: cxf + rest + JaxWsProxyFactoryBean + multiple parameters

2007-10-23 Thread Jervis Liu

Eoghan raised a similar question last week regarding client side support for
RESTful services[1]. The best way to summarize current status is as below:
 
a). We do not support using JAX-WS client proxy APIs (i.e., the
javax.xml.ws.Service package) to access RESTful services. Some simple stuff
might just happen to work, but I would presume most things wont work (eg,
your case...).
 
b). You can use JAX-WS Dispatch APIs to access RESTful services, this should
work. An example can be find from restful_dispatch demo.
 
Actually I wont recommend you ever giving JAX-WS client proxy APIs a try. A
RESTful service that is exposed using CXF HTTP binding happens to have a
WSDL contract, as internally we can always use CXF simple frontend to do a
Java-to-WSDL generation. However most RESTful services simply wont have a
WSDL. A more general JAVA client side API is needed to be defined, but it
simply not there yet. There is a discussion in JSR-311 group on this topic
[2] , the consensus reached there is that a REST client API can be helpful,
but it is a bit early to form such API, more experiments are needed. 
 
 
[1]
http://www.nabble.com/Using-verbs-other-than-GET-from-a-RESTful-client-application-tf4628659.html
[2] https://jsr311.dev.java.net/servlets/ReadMsg?list=dev&msgNo=716
 
Cheers,
Jervis

Erik Nijkamp-2 wrote:
> 
> By the way wrapped mode does not fix the problem ...
> 
> mit freundlichen Grüßen | kind regards
> 
> Erik Nijkamp 
> 
> 
> 
> 
> Erik Nijkamp
> Business Computing
> Mobile: +49-(0)160 2153796
> Kst: 6807 | GBS: 10178-80 
> 
> IBM Ausbildung Berlin
> Karl-Liebknecht-Straße 29
> D-10178 Berlin
> University Education Berlin / IBM Germany 
> Human Resources, IBM Sales & Distribution 
> 
> IBM Deutschland GmbH
> Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki
> Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian 
> Diedrich,
> Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan
> Sitz der Gesellschaft: Stuttgart
> Registergericht: Amtsgericht Stuttgart, HRB 14562
> WEEE-Reg.-Nr. DE 99369940 
> 
> 
> 
> 
> 
> 
> Erik Nijkamp/Germany/[EMAIL PROTECTED] 
> 23.10.2007 14:10
> Please respond to
> cxf-user@incubator.apache.org
> 
> 
> To
> cxf-user@incubator.apache.org
> cc
> 
> Subject
> how to: cxf + rest + JaxWsProxyFactoryBean + multiple parameters
> 
> 
> 
> 
> 
> 
> 
> Hello folks, 
> 
> currently I'm trying to setup a restful web service using cxf and spring. 
> The service itself is working smoothly, but the client is only working 
> for methods with 1 argument. 
> 
> Here come's the interesting stuff: 
> 
> @WebService
> public interface ITestService {
> @Get @HttpResource(location="/two/{first}/{second}")
> String two(@WebParam(name = "first") String name,
> @WebParam(name = "second") String 
> name2) throws Exception;
> 
> 
> }
> 
> 
>  address="http://localhost:8090/test";
> bindingUri="http://apache.org/cxf/binding/http";>
> 
>   class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" />
> 
> 
> 
> 
> 
> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> factory.setServiceClass(ITestService.class);
> factory.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); 
> factory.setAddress("http://localhost:8090/test/";);
> ITestService client = (ITestService) factory.create();
> System.out.println(client.two("1", "2"));
> 
> 
> org.apache.cxf.binding.xml.XMLFault: Invalid URL/Verb combination. Verb: 
> GET Path: /two/
> at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:142)
> at $Proxy18.two(Unknown Source)
> at 
> com.ibm.ors.test.RestClientTest.runClient(RestClientTest.java:46)
> at 
> com.ibm.ors.test.RestClientTest.main(RestClientTest.java:21)
> Throwable thrown: Invalid URL/Verb combination. Verb: GET Path: /two/ 
> 
> Invoking two(...) directly using the url is working just fine. 
> I guess (hope) somebody is using a method with more than one argument ...
> 
> mit freundlichen Grüßen | kind regards
> 
> Erik Nijkamp 
> 
> 
> 
> 
> Erik Nijkamp
> Business Computing
> Mobile: +49-(0)160 2153796
> Kst: 6807 | GBS: 10178-80 
> 
> IBM Ausbildung Berlin
> Karl-Liebknecht-Straße 29
> D-10178 Berlin
> University Education Berlin / IBM Germany 
> Human Resources, IBM Sales & Distribution 
> 
> IBM Deutschland GmbH
> Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki
> Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian 
> Diedrich,
> Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan
> Sitz der Gesellschaft: Stuttgart
> Registergericht: Amtsgericht Stuttgart, HRB 14562
> WEEE-Reg.-Nr. DE 99369940 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to%3A-cxf-%2B-rest-%2B-JaxWsProxyFactoryBean-%2B-multiple-parameters-tf4680403.html#a13379302
Sent from the cxf-user mailin

Re: Client can't receive the message due to read timed out

2007-10-23 Thread MtnAlps

Hi Willem,
Thank you so much for the info!!! The issue is fixed. We just migrated from
XFire 1.2.6 to CXF 2.0.2. A lot of issues we had with XFire 1.2.6 are gone.
Thanks!
-Miknsheng


Willem2 wrote:
> 
> Hi ,
> 
> FYI, you can find the how to set the timeout parameters here [1]
> [1] http://cwiki.apache.org/CXF20DOC/client-http-transport.html
> 
> 
> Willem.
> Glen Mazza wrote:
>> I'm not sure how to adjust the timeout parameters--someone else can
>> perhaps respond to that issue.
>>
>> But how long should it take your server to respond?  Can you greatly
>> simplify your server so it responds immediately (basically just mock it
>> out so it immediately returns something), to confirm that the 60-second
>> timeout is the real problem (as opposed to the client simply not being
>> able to access the server)?  
>>
>> The error you're getting:  "Caused by: org.apache.cxf.interceptor.Fault:
>> Could not send Message."  normally occurs to me when the server is
>> inaccessible for some reason, it can't be reached at all--not just a
>> time-out issue.  Are you sure the URL in the WSDL (which I assume your
>> client is reading) is correct?  If you call
>> http://localhost:8080/mywarfilename/myservice?wsdl, for example, do you
>> see the WSDL file in the browser?
>>
>> HTH,
>> Glen
>>
>> Am Sonntag, den 21.10.2007, 19:15 -0600 schrieb Shen, Minsheng
>> (MinSheng):
>>   
>>> Hi All,
>>> I am new to this mail list. 
>>> I am developing a web service using CXF 2.0.2. Everything is tested
>>> and
>>> works fine on the service side. I used wsdl2java to create a client.
>>> When I invoke the client, I got "Interceptor has thrown exception,
>>> unwinding now
>>> org.apache.cxf.interceptor.Fault: Could not send Message."
>>>  
>>> I believe on the client side the default time out for reading message
>>> is
>>> 60 seconds and this error is caused by read time out. The following is
>>> the stacktrace. Any help you can provide will be greatly appreciated!!
>>> Thank you in advance!
>>>  
>>> -Minsheng
>>>  
>>> INFO: Interceptor has thrown exception, unwinding now
>>>
>>> 
>>
>>   
>>> org.apache.cxf.interceptor.Fault: Could not send Message.
>>>
>>> 
>>
>>
>>   
>>> Caused by: java.net.SocketTimeoutException: Read timed out
>>>
>>> 
>>
>>
>>
>>   
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Client-can%27t-receive-the-message-due-to-read-timed-out-tf4668231.html#a13379530
Sent from the cxf-user mailing list archive at Nabble.com.



Re: can't generate war file from ant build

2007-10-23 Thread dara kok

Thanks so much Jeff Yu.

You're so helpful.



Jeff Yu wrote:
> 
> dara kok wrote:
>> I build a custom application not the one from the sample directory.
>>
>> So please tell me how to generate war file from my custom application so
>> i
>> can deploy it in tomcat?
>>
>>
>> Thanks,
>>   
> Hi,
> 
> You need to write "war" target by yourself, you can refer to ANT manual 
> for this target
> and also you can see how cxf does in the "common_build.xml" file.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> Thanks
> Jeff
> 
> 

-- 
View this message in context: 
http://www.nabble.com/can%27t-generate-war-file-from-ant-build-tf4681559.html#a13380045
Sent from the cxf-user mailing list archive at Nabble.com.