RE: Generated client to connect to a https ws

2007-08-29 Thread Per Olesen
Hi Doug,

I think it was you, who left a comment on my blog about the same issue. I
have left you a response there.

http://techpolesen.blogspot.com/2007/08/using-ssl-with-xfirecxf-battling.html

Basically, I think you should try with this conduit name:

"{http://gov.nwcg.isuite.webservice}ConnectionAdmin";

In the client config, even though you are deploying on SSL.

/Per

doug.anderson wrote:
>
> I believe I am having the same problems connecting to a https web service
> as
> you were having.  I was wondering what the solution was that worked for
> you.
>
> I have a simple web service and client.  When I host it on Tomcat at
> http://localhost:8080/service/services, the client connects just fine, but
> it does not work when using https://localhost:8443/service/services.
>
> I am using spring.
>
> For connection on  http://localhost:8080/service/services
>
> here is the relevant portion of the spring config file on the server:
>
>  id="connectionAdmin"
>  implementor="#connectionAdminService"
>  address="/connectionAdminService" />
>
> here is the relevant portion of the spring file for the client:
> class="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminService"
> factory-bean="adminClientFactory" factory-method="create"/>
>
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> value="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminService"/>
> value="http://localhost:8080/service/services/connectionAdminService"/>
>
>
>
> The server page at http://localhost:8080/service/services/  returns:
> {http://gov.nwcg.isuite.webservice}ConnectionAdmin
>
> When I run the client, it connects to the web service and everything is
> fine
>
> now I want to connect on https
>
> I change the spring config on the client to have an http:conduit with SSL
> and change the address of the client factory.  It now reads:
>
> name="{https://gov.nwcg.isuite.webservice}ConnectionAdmin.http-conduit";>
>
>
>
>
> class="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminService"
> factory-bean="adminClientFactory" factory-method="create"/>
>
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> value="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminService"/>
> value="https://localhost:8443/service/services/connectionAdminService"/>
>
>
> The server page at https://localhost:8443/service/services/  returns:
> {http://gov.nwcg.isuite.webservice}ConnectionAdmin
>
> When the client runs, I get the same error you were getting:
>
> ..
> Caused by: java.io.IOException: Illegal Protocol https for HTTP
> URLConnection Factory.
>at
> org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnection(HttpURLConnectionFactoryImpl.java:44)
>at
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:468)
>at
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
>... 7 more
>
>
> Could you tell me what I am missing?
>
> Thanks for your help
>
>
> Doug Anderson
>
>
> Pirola Davide-2 wrote:
>>
>> Hi all,
>> I solved the problem... was my fault :(
>> Now I can contact adsense web services... BUT I have another issue.
>> When I call the service cxf give me this error:
>> org.apache.cxf.binding.soap.SoapFault: "null" is not a valid SOAP
>> version
>>
>> The reason is that all services give me a wrong http response (415
>> Unsupported Media Type).
>>
>> My request:
>> [EMAIL PROTECTED] pairs: {POST
>> /api/adsense/v2/AccountService HTTP/1.1: null}{Content-Type: text/xml;
>> charset=UTF-8}{developer_email: [EMAIL PROTECTED]:
>> ""}{developer_password: mypassword}{client_id: ignored}{Cache-Control:
>> no-cache}{Pragma: no-cache}{User-Agent: Java/1.6.0_01}{Host:
>> sandbox.google.com}{Accept: text/html, image/gif, image/jpeg, *; q=.2,
>> */*; q=.2}{Connection: keep-alive}{Transfer-Encoding: chunked}
>>
>> Google response:
>> [EMAIL PROTECTED] pairs: {null: HTTP/1.1 415
>> Unsupported
>> Media Type}{Content-Type: text/html; charset=UTF-8}{Cache-control:
>> private}{Content-Length: 167}{Date: Tue, 17 Jul 2007 17:09:38
>> GMT}{Server:
>> GFE/1.3}
>>
>>
>> Anyone have experience on this problem?
>> Sure, Is always my fault.. but where? :D
>>
>> Thanks
>> Davide
>>
>>
>> -Original Message-
>> From: Pirola Davide
>> Sent: venerdì 13 luglio 2007 10.12
>> To: 'cxf-user@incubator.apache.org'
>> Subject: RE: Generated client to connect to a https ws
>>
>> Hi Dan & Willem,
>> Thanks for your support!
>> The problem I have is in this peace of code
>> (AbstractHTTPTransportFactory):
>>
>>  /**
>>  * This static call creates a connection factory based on
>>  * the existence of the SSL (TLS) client side configuration.
>>  */
>> static HttpURLConnectionFactory getConnectionFactory(
>> HTTPConduit configuredConduit
>> ) {
>> HttpURLConnectionFactory fac = 

Re: Bus Features [was: Logging ...]

2007-08-29 Thread Sergey Beryozkin

Hi,


"I wonder can this be done through WS-Policy? I.e., I can make some assertions like this: " I want to apply this feature to endpoint 
A and B" or "I want this feature applied to all my endpoints by default if there is no overridden feature defined for the individual 
endpoint". Thoughts?"


CXF supports an external WS-Policy attachment mechanism, which should suffice...
It's briefly described here :

http://cwiki.apache.org/CXF20DOC/how-it-works.html

Using this approach you can apply a policy expression to one or more domain expressions, for ex, to EndpointReferences...There's an 
rm_external.xml file in a ws_policy system test, it shows how WS-Addresing and WS-RM policies are applied to a given endpoint...


Cheers, Sergey

- Original Message - 
From: "Liu, Jervis" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, August 29, 2007 7:17 AM
Subject: RE: Bus Features [was: Logging ...]


Hi Fred, I recalled we had a similar discussion before. In your code snippet below, the logging interceptors will be installed 
twice. I wont say  is a root scope configuration as there is no hierarchy relationships among bus, endpoints and bindings. 
Bus, endpoints and bindings are just individual components that can contribute interceptors, some times a same bus instance can be 
shared by multiple services but this wont necessarily make it a root configuration. Bindings can be shared by multiple services as 
well. What you required, "if a  feature is defined at endpoint granularity, that feature is the  effective feature in config, 
whereas if there is no such config at  endpoint granularity, the runtime would fall back to the Bus config", is really a scope-based 
configuration. This is no such thing existing yet in CXF. I wonder can this be done through WS-Policy? I.e., I can make some 
assertions like this: " I want to apply this feature to endpoint A and B" or "I want this feature applied to all my endpoints by 
default if there is no overridden feature defined for the individual endpoint". Thoughts?


Jervis


-Original Message-
From: Fred Dushin [mailto:[EMAIL PROTECTED]
Sent: 2007?8?29? 2:52
To: cxf-user@incubator.apache.org
Subject: Bus Features [was: Logging ...]



On Aug 24, 2007, at 11:36 AM, Daniel Kulp wrote:

> 
> 
> 
> 
> 

How do Bus-level features interact with endpoint- or client-level
features?  For example, if I have

{{{

 
 
 


http://foo.bar.com}FUBAR";>
 
 
 

}}}

and a servant is instantiated under the WSDL Port
{http://foo.bar.com}
FUBAR, is a feature instantiated twice, once for the Bus, qua
InterceptorProvider, and once for the Endpoint, qua
InterceptorProvider?

If it's instantiated twice, is there any way a feature
implementor to
traverse the interceptors on each InterceptorProvider, to see if a
feature has been installed, or are these interceptor lists
independent of one another?

(The reason I ask is, there might be a tendency to think of the
feature config on the Bus as a kind of default, such that if a
feature is defined at endpoint granularity, that feature is the
effective feature in config, whereas if there is no such config at
endpoint granularity, the runtime would fall back to the Bus
config.
But I'm guessing that's really not the behavior here, is it?)

Thanks!
-Fred




IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland 



IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


Re: Single JAR distribution?

2007-08-29 Thread Ray Krueger
Sorry, I wasn't very clear there...

I was talking about the maven repository distribution. There is an
org/apache/cxf/cxf/2.0.1-incubator out there, but it's just the pom
files.

On 8/28/07, Bozhong Lin <[EMAIL PROTECTED]> wrote:
> It has already been there since CXF 2.0 release, under "lib" directory.
> For example, for CXF 2.0 release, the file is lib/cxf-2.0-incubator.jar
>
> Cheers,
> Bo
>
> Ray Krueger wrote:
> > Are there any plans to have a single cxf-version.jar distribution?
> > There are just too many modules to figure out. I'm lazy and I don't
> > really care how big the jar is. Spring is available in modular jars,
> > or as one big spring-version.jar; any chance CXF would do something
> > similar?
> >
>


Re: Single JAR distribution?

2007-08-29 Thread Daniel Kulp
On Wednesday 29 August 2007, Ray Krueger wrote:
> Sorry, I wasn't very clear there...
>
> I was talking about the maven repository distribution. There is an
> org/apache/cxf/cxf/2.0.1-incubator out there, but it's just the pom
> files.

The jar is there (artifactId is cxf-bundle).   That said, I don't think 
the pom for it is completely usable for what you want as I don't think 
it will pull in all the dependencies.

Dan


> On 8/28/07, Bozhong Lin <[EMAIL PROTECTED]> wrote:
> > It has already been there since CXF 2.0 release, under "lib"
> > directory. For example, for CXF 2.0 release, the file is
> > lib/cxf-2.0-incubator.jar
> >
> > Cheers,
> > Bo
> >
> > Ray Krueger wrote:
> > > Are there any plans to have a single cxf-version.jar distribution?
> > > There are just too many modules to figure out. I'm lazy and I
> > > don't really care how big the jar is. Spring is available in
> > > modular jars, or as one big spring-version.jar; any chance CXF
> > > would do something similar?



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


Re: Single JAR distribution?

2007-08-29 Thread Ray Krueger
yeah I was using that before, it definitely makes a mess of things.
Especially if you're using "downloadSources" with the idea plugin.
Some of the classes are in bundle, but then it still downloads the
dependencies. So when  you click into a class from IDEA you end up
with a crapshoot of whether or not it will take you to the module
artifact with source, or the bundle artifact without source. It's
annoying.

I've got my pom.xml down to exactly what I need anyway, which is
great. The problem is that my company has a local jar repository and
getting jars into it is a pain. One big jar is easy to put in, lots of
little ones takes an aggravatingly long time...

Not a big deal, and definitely not a deal breaker for me using CXF at
this point :)


On 8/29/07, Daniel Kulp <[EMAIL PROTECTED]> wrote:
> On Wednesday 29 August 2007, Ray Krueger wrote:
> > Sorry, I wasn't very clear there...
> >
> > I was talking about the maven repository distribution. There is an
> > org/apache/cxf/cxf/2.0.1-incubator out there, but it's just the pom
> > files.
>
> The jar is there (artifactId is cxf-bundle).   That said, I don't think
> the pom for it is completely usable for what you want as I don't think
> it will pull in all the dependencies.
>
> Dan
>
>
> > On 8/28/07, Bozhong Lin <[EMAIL PROTECTED]> wrote:
> > > It has already been there since CXF 2.0 release, under "lib"
> > > directory. For example, for CXF 2.0 release, the file is
> > > lib/cxf-2.0-incubator.jar
> > >
> > > Cheers,
> > > Bo
> > >
> > > Ray Krueger wrote:
> > > > Are there any plans to have a single cxf-version.jar distribution?
> > > > There are just too many modules to figure out. I'm lazy and I
> > > > don't really care how big the jar is. Spring is available in
> > > > modular jars, or as one big spring-version.jar; any chance CXF
> > > > would do something similar?
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog
>


Oracle BPEL and CXF

2007-08-29 Thread ashley.mcconnell
Hi Folks,

I am having difficulty calling a CXF generated web-service with a JAX-WS
/ Spring generated WSDL (if that makes any difference) from Oracle BPEL
- part of the Oracle SOA suite.

My WSDL has an imported schema with another nested imported schema

For example for my audit WSDL: -

-Audit WSDL
-> imports audit.xsd
-> imports common.xsd

Oracle doesn't seem to find either schema, normally it would create
variables for the input and output parameters, but this doesn't happen.
Has anyone got CXF and BPEL to work together?  The service works fine
from SOAP UI, we had similar problems with Xfire and BPEL, we were
hoping the move to CXF would solve the problems.

Thanks for the help!
All the best,
Ash


Re: Generated client to connect to a https ws

2007-08-29 Thread Julio Arias

Hi guys -

U can take a look also at https://issues.apache.org/jira/browse/CXF-922

On Aug 29, 2007, at 1:12 AM, Per Olesen wrote:


Hi Doug,

I think it was you, who left a comment on my blog about the same  
issue. I

have left you a response there.

http://techpolesen.blogspot.com/2007/08/using-ssl-with-xfirecxf- 
battling.html


Basically, I think you should try with this conduit name:

"{http://gov.nwcg.isuite.webservice}ConnectionAdmin";

In the client config, even though you are deploying on SSL.

/Per

doug.anderson wrote:


I believe I am having the same problems connecting to a https web  
service

as
you were having.  I was wondering what the solution was that  
worked for

you.

I have a simple web service and client.  When I host it on Tomcat at
http://localhost:8080/service/services, the client connects just  
fine, but

it does not work when using https://localhost:8443/service/services.

I am using spring.

For connection on  http://localhost:8080/service/services

here is the relevant portion of the spring config file on the server:

   

here is the relevant portion of the spring file for the client:
   class="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminServic 
e"

factory-bean="adminClientFactory" factory-method="create"/>

   
   value="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminServic 
e"/>

   value="http://localhost:8080/service/services/ 
connectionAdminService"/>

   


The server page at http://localhost:8080/service/services/  returns:
{http://gov.nwcg.isuite.webservice}ConnectionAdmin

When I run the client, it connects to the web service and  
everything is

fine

now I want to connect on https

I change the spring config on the client to have an http:conduit  
with SSL

and change the address of the client factory.  It now reads:

   name="{https://gov.nwcg.isuite.webservice}ConnectionAdmin.http- 
conduit">

   
   
   

   class="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminServic 
e"

factory-bean="adminClientFactory" factory-method="create"/>

   
   value="gov.nwcg.isuite.service.webservice.admin.ConnectionAdminServic 
e"/>

   value="https://localhost:8443/service/services/ 
connectionAdminService"/>

   

The server page at https://localhost:8443/service/services/  returns:
{http://gov.nwcg.isuite.webservice}ConnectionAdmin

When the client runs, I get the same error you were getting:

..
Caused by: java.io.IOException: Illegal Protocol https for HTTP
URLConnection Factory.
   at
org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConn 
ection(HttpURLConnectionFactoryImpl.java:44)

   at
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java: 
468)

   at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage 
(MessageSenderInterceptor.java:46)

   ... 7 more


Could you tell me what I am missing?

Thanks for your help


Doug Anderson


Pirola Davide-2 wrote:


Hi all,
I solved the problem... was my fault :(
Now I can contact adsense web services... BUT I have another issue.
When I call the service cxf give me this error:
org.apache.cxf.binding.soap.SoapFault: "null" is not a valid SOAP
version

The reason is that all services give me a wrong http response (415
Unsupported Media Type).

My request:
[EMAIL PROTECTED] pairs: {POST
/api/adsense/v2/AccountService HTTP/1.1: null}{Content-Type: text/ 
xml;

charset=UTF-8}{developer_email: [EMAIL PROTECTED]:
""}{developer_password: mypassword}{client_id: ignored}{Cache- 
Control:

no-cache}{Pragma: no-cache}{User-Agent: Java/1.6.0_01}{Host:
sandbox.google.com}{Accept: text/html, image/gif, image/jpeg, *;  
q=.2,

*/*; q=.2}{Connection: keep-alive}{Transfer-Encoding: chunked}

Google response:
[EMAIL PROTECTED] pairs: {null: HTTP/1.1 415
Unsupported
Media Type}{Content-Type: text/html; charset=UTF-8}{Cache-control:
private}{Content-Length: 167}{Date: Tue, 17 Jul 2007 17:09:38
GMT}{Server:
GFE/1.3}


Anyone have experience on this problem?
Sure, Is always my fault.. but where? :D

Thanks
Davide


-Original Message-
From: Pirola Davide
Sent: venerdì 13 luglio 2007 10.12
To: 'cxf-user@incubator.apache.org'
Subject: RE: Generated client to connect to a https ws

Hi Dan & Willem,
Thanks for your support!
The problem I have is in this peace of code
(AbstractHTTPTransportFactory):

 /**
 * This static call creates a connection factory based on
 * the existence of the SSL (TLS) client side configuration.
 */
static HttpURLConnectionFactory getConnectionFactory(
HTTPConduit configuredConduit
) {
HttpURLConnectionFactory fac = null;

if (configuredConduit.getTlsClientParameters() != null) {
fac = new HttpsURLConnectionFactory(
  
configuredConduit.getTlsClientParameters());

} else {
fac = new HttpURLConnectionFactoryImpl();
}
return fac;
}

The "configuredCondu

Re: CFX and Servicemix

2007-08-29 Thread Ryan Moquin
Ok, so I can just change my servicemix-version property in my pom.xml and it
should all be configured properly?  Will 3.2 support the ability to have jar
files in the lib directory of a service unit picked up automatically?  I
find that to be a big hassle trying to keep the jars in my xbean.xml in sync
with changes to the pom

On 8/28/07, Nodet Guillaume <[EMAIL PROTECTED]> wrote:
>
> ServiceMix 3.2 is quite stable and should be released soon.
> So feel free to start using the snapshot versions and you will
> be able to upgrade to the released version when it is out.
> You should be able to use the two components with a 3.1 version
> too, but you may have to use the 3.2 version of the servicemix-shared
> shared library.
>
> Cheers,
> Guillaume Nodet
>
> On Aug 28, 2007, at 6:59 PM, Ryan Moquin wrote:
>
> > Are these components stable enough for use? Can we use them with
> > Servicemix
> > 3.1 or would I need to move to 3.2 (I'm not sure how stable that is
> > either).  We really aren't using servicemix for anything other than a
> > container to hold 3 webservices right now, so if it only supported
> > basic
> > functionality we'd most likely be fine.  I was hoping to take
> > advantage of
> > some of the CXF features if possible at this point.
> >
> > On 8/28/07, Nodet Guillaume <[EMAIL PROTECTED]> wrote:
> >>
> >> We are working on a better integration between ServiceMix and CXF.  I
> >> would encourage you to check the new ServiceMix components that we
> >> are working on as they will leverage all CXF features.  These are
> >> servicemix-cxf-bc and servicemix-cxf-se.  Unfortunately, they are not
> >> documented yet, so I would advise you to look at the junit tests to
> >> see how it works.  Basically, servicemix-cxf-se is a replacement of
> >> servicemix-jsr181 using CXF, and servicemix-cxf-bc is  a replacement
> >> of servicemix-http using CXF.
> >> These components are available at:
> >> http://people.apache.org/repo/m2-snapshot-repository/org/apache/
> >> servicemix/servicemix-cxf-bc/3.2-incubating-SNAPSHOT/
> >> http://people.apache.org/repo/m2-snapshot-repository/org/apache/
> >> servicemix/servicemix-cxf-se/3.2-incubating-SNAPSHOT/
> >>
> >> Cheers,
> >> Guillaume Nodet
> >>
> >> On Aug 28, 2007, at 4:27 PM, Ryan Moquin wrote:
> >>
> >>> Hi,  I decided to give CFX a try and upgrade from our XFire
> >>> codebase.  I'm
> >>> wondering though, is CFX compatible with Servicemix 3.1?  If so,
> >>> how do you
> >>> integrate it?  I thought I saw somewhere it was.  I did attempt to
> >>> use CFX
> >>> from within Servicemix, but the Jetty server that normally would
> >>> start
> >>> doesn't start, so I'm missing something with CFX.  Or is this more
> >>> of a
> >>> servicemix question?
> >>>
> >>> Thanks!
> >>
> >>
>
>


RE: SOAPBinding Use.ENCODED ?

2007-08-29 Thread trichter

HI,

I ran into the same problem, banging my head at why the Use.ENCODED setting
is not picked up. Does anyone know whether there are plans to include this
capability in CXF? Why would my alternatives be if I needed encoded?

Thanks.



bmargulies wrote:
> 
> CXF doesn't support Encoded.
> 
>> -Original Message-
>> From: Chris Campbell [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, August 22, 2007 5:22 PM
>> To: cxf-user@incubator.apache.org
>> Subject: SOAPBinding Use.ENCODED ?
>> 
>> I need encoded response, since some of my data has "Illegal
>> character (NULL, unicode 0) encountered"
>> 
>> I added
>> 
>> @SOAPBinding(style=Style.RPC, use=Use.ENCODED)
>> 
>> to my service interface, but the generated wsdl has use=literal, for
>> example
>> 
>> 
>> 
>>  
>> http://query.soap.quaris.com/"; use="literal"/>
>> 
>>  
>> http://query.soap.quaris.com/"; use="literal"/>
>> 
>> 
>> 
>> Am I missing something?
>> 
>> Thanks.
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Interceptor-Issue-tf4313110.html#a12388726
Sent from the cxf-user mailing list archive at Nabble.com.



Re: CFX and Servicemix

2007-08-29 Thread Nodet Guillaume

Maybe we should switch to servicemix mailing list...
And yes, 3.2 default classloaders for a service unit
includes all the jars in the lib dir, but this is a feature
inside servicemix-shared, not the core container.

On Aug 29, 2007, at 4:29 PM, Ryan Moquin wrote:

Ok, so I can just change my servicemix-version property in my  
pom.xml and it
should all be configured properly?  Will 3.2 support the ability to  
have jar
files in the lib directory of a service unit picked up  
automatically?  I
find that to be a big hassle trying to keep the jars in my  
xbean.xml in sync

with changes to the pom

On 8/28/07, Nodet Guillaume <[EMAIL PROTECTED]> wrote:


ServiceMix 3.2 is quite stable and should be released soon.
So feel free to start using the snapshot versions and you will
be able to upgrade to the released version when it is out.
You should be able to use the two components with a 3.1 version
too, but you may have to use the 3.2 version of the servicemix-shared
shared library.

Cheers,
Guillaume Nodet

On Aug 28, 2007, at 6:59 PM, Ryan Moquin wrote:


Are these components stable enough for use? Can we use them with
Servicemix
3.1 or would I need to move to 3.2 (I'm not sure how stable that is
either).  We really aren't using servicemix for anything other  
than a

container to hold 3 webservices right now, so if it only supported
basic
functionality we'd most likely be fine.  I was hoping to take
advantage of
some of the CXF features if possible at this point.

On 8/28/07, Nodet Guillaume <[EMAIL PROTECTED]> wrote:


We are working on a better integration between ServiceMix and  
CXF.  I

would encourage you to check the new ServiceMix components that we
are working on as they will leverage all CXF features.  These are
servicemix-cxf-bc and servicemix-cxf-se.  Unfortunately, they  
are not

documented yet, so I would advise you to look at the junit tests to
see how it works.  Basically, servicemix-cxf-se is a replacement of
servicemix-jsr181 using CXF, and servicemix-cxf-bc is  a  
replacement

of servicemix-http using CXF.
These components are available at:
http://people.apache.org/repo/m2-snapshot-repository/org/ 
apache/

servicemix/servicemix-cxf-bc/3.2-incubating-SNAPSHOT/
http://people.apache.org/repo/m2-snapshot-repository/org/ 
apache/

servicemix/servicemix-cxf-se/3.2-incubating-SNAPSHOT/

Cheers,
Guillaume Nodet

On Aug 28, 2007, at 4:27 PM, Ryan Moquin wrote:


Hi,  I decided to give CFX a try and upgrade from our XFire
codebase.  I'm
wondering though, is CFX compatible with Servicemix 3.1?  If so,
how do you
integrate it?  I thought I saw somewhere it was.  I did attempt to
use CFX
from within Servicemix, but the Jetty server that normally would
start
doesn't start, so I'm missing something with CFX.  Or is this more
of a
servicemix question?

Thanks!








--
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/



Sending big file attachments

2007-08-29 Thread Verachten Bruno
Hi,

I have a simple web service transforming a file into another.
As soon as the input file is bigger than 3M, I get this error on the
client :
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:186)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:57)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:206)
at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
onse(HTTPConduit.java:1830)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTP
Conduit.java:1698)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
nterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:206)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
at $Proxy28.processFile(Unknown Source)
at
test.WebServiceConverter.convert(WebServiceConverter.java:175)
at
org.apache.jsp.convertFile_jsp.processuploadForm(convertFile_jsp.java:19
7)
at
org.apache.jsp.convertFile_jsp._jspService(convertFile_jsp.java:435)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:298)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at
net.atos.mm.fwk.fw3.servlet.JSPServlet._service(JSPServlet.java:199)
at
net.atos.mm.fwk.fw3.servlet.JSPServlet.service(JSPServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
3)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:702)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
1)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:644)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte
0x20 (at char #846, byte #-1)
at
com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)
at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at
org.ap

Re: Method level authentication?

2007-08-29 Thread Daniel Kulp

Van,

On Tuesday 28 August 2007, Daniel Kulp wrote:
> 2 parts:
> 1) Issue of opName being null - I just checked the RPCInInterceptor
> and it isn't setting a bunch of stuff that the DocLitInInterceptor is
> setting.   WSDL_OPERATION is one that it's not setting. :-(I'll
> get those fixed tomorrow.

Fixed this on trunk.   However, there is a workaround:
message.getExchange().get(OperationInfo.class) will get the OperationInfo 
object from which you can get the name.

> 2) AuthorizationPolicy is null - not sure on that one.   That is
> provided but the transport if there is an Authorization header
> present.   Is there anyway you can TCPdump/wireshare the raw request
> and see if there is an Authorization header?   The code looks OK,
> although I must admit I've never done it that way.   I've always used
> the standard JAX-WS API for setting the username/password for basic
> auth:

Figured this out.   Your code is wrong:
> > policy.setPassword("vnguyen");
> > policy.setPassword("myPassword");

You're setting the password twice.   Thus, no username is being set.   We 
don't put any basic auth stuff on the wire unless there is a username.

Dan



>
> BindingProvider bp = (BindingProvider)port;
> bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "BJ");
> bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "pswd");
>
> Dan
>
> On Tuesday 28 August 2007, Van Nguyen wrote:
> > Dan,
> >
> > I'm giving this a shot and am having some difficulties with the
> > AuthorizationInterceptor finding the AuthorizationPolicy object.
> >
> > My Web Services looks something like this:
> >
> > @WebService(name = "productSearchService")
> > @SOAPBinding(style = Style.RPC, use = Use.LITERAL)
> > @WebFault(targetNamespace = "http://webservices.ur.com/types";, name
> > = "productSearchException", faultBean =
> > "com.ur.webservices.webfaults.ProductSearchServiceFault")
> > @InInterceptors(interceptors={"com.ur.webservices.security.Authoriza
> >ti on Interceptor"})
> > public interface ProductSearch
> > {
> > public Item getItem(String itemNumber)
> > }
> >
> > Using the wsdl2java command, it created the java classes needed to
> > call this web service:
> >
> > ProductSearchImplService ss = new
> > ProductSearchImplService(wsdlURL, SERVICE_NAME);
> > ProductSearchService port = ss.getProductSearchImplPort();
> >
> > Client client = ClientProxy.getClient(port);
> > HTTPConduit httpConduit = (HTTPConduit)client.getConduit();
> > AuthorizationPolicy policy = new AuthorizationPolicy();
> > policy.setPassword("vnguyen");
> > policy.setPassword("myPassword");
> > httpConduit.setAuthorization(policy);
> >
> > Calling port.getItem("1234"), brings me into the
> > AuthorizationInterceptor... but both the AuthorizationPolicy and
> > opName are null - I also assumed you meant to write:
> > String opName = (String)message.get(Message.WSDL_OPERATION);
> >
> > Any ideas?
> >
> > Thanks,
> >
> > Van Nguyen
> > United Rentals, Inc
> > [EMAIL PROTECTED]
> > (949) 225-6553
> >
> > -Original Message-
> > From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 28, 2007 10:27 AM
> > To: cxf-user@incubator.apache.org
> > Cc: Van Nguyen
> > Subject: Re: Method level authentication?
> >
> >
> > Van,
> >
> > The answer is both yes and no.
> >
> > CXF doesn't have anything "built in" that would provide that
> > capability.
> >
> > However, it would be very easy to write an interceptor that would:
> >
> >
> > public class AuthorizationInterceptor extends
> > AbstractPhaseInterceptor {
> >
> > public AuthorizationInterceptor() {
> > super(Phase.USER_LOGICAL);
> > }
> >
> > public void handleMessage(Message message) throws Fault {
> > AuthorizationPolicy policy =
> > message.get(AuthorizationPolicy.class);
> > String opName = (String)message.put(Message.WSDL_OPERATION);
> >
> > //use username/passwords from AuthorizationPolicy to validate.
> > //Throw a fault or similar if processing should not
> > continue. }
> > }
> >
> >
> > There is also:
> > message.get(SecurityContext.class);
> > which can provide the principal object and checks for isUserInRole
> > if your deployment environment (tomcat/etc...) supports
> > configurations of users and roles on that level.
> >
> > Dan
> >
> > On Tuesday 28 August 2007, vannguyen0 wrote:
> > > Hi,
> > >
> > > I'm fairly new to webservices and was wondering if CXF has the
> > > ability to restrict users to certain web services methods.  If I
> > > have PerformProductSearch and UpdateProductInformation, I want to
> > > allow user A (or users that is in user group A) permission to only
> > > PerformProductSearch. But user B (or users that are in user group
> > > B) can access to both methods.
> > >
> > > Thanks,
> > >
> > > Van



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

Re: cxf deployment to tomcat

2007-08-29 Thread Glen Mazza
Starting in the upcoming 2.0.2 version, I believe the samples will now
place the jars in the WAR file by default.  We had a recent commit to
that to the Subversion repository trunk.

Glen

Am Dienstag, den 28.08.2007, 13:56 -0400 schrieb Rich.Baldwin:
> Excellent!
> 
> Christopher Moesel said the following on 8/28/2007 1:54 PM:
> > Hi Rich,
> >
> > I have not tried Tomcat 6, but I have successfully packaged all the CXF
> > jars in the WEB-INF/lib of my war in Tomcat 5.5.  My shared/lib is
> > empty.  I would suspect that you could do this with Tomcat 6.
> >
> > So-- it's possible.  I don't know if it's the recommended approach, but
> > it's an approach that has worked fine for me thus far.
> >
> > -Chris
> >
> > -Original Message-
> > From: Rich.Baldwin [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, August 28, 2007 1:49 PM
> > To: cxf-user@incubator.apache.org
> > Subject: cxf deployment to tomcat
> >
> > Looking through the cxf samples and the build.xml files, I noticed that 
> > the target tomcat layout is 5.0 or 5.5.  At tomcat 6.0, by default the 
> > shared/lib goes away unless defined in properties files.  So my question
> >
> > concerns classloader issues and servlet engine dependencies.  Is the 
> > recommended deployment for TC 6 to dump all cxf.home/lib jars into the 
> > tomcat/lib directory or keep them in the project WEB-INF/lib or to 
> > configure properties such that shared/lib and common/lib are used?  Are 
> > there jars in cxf.home/lib which MUST be deployed to tomcat/lib for the 
> > cxf server stack to work?The tomcat folks have been strongly hinting
> >
> > for years that users avoid adding to tomcat/lib to avoid portability 
> > issues, classloader issues, package conflict issues, etc.
> >
> >
> > Tx, Rich
> >   



Soap - Namespace

2007-08-29 Thread sameh

I'm using CXF 2.0.1-incubator in weblogic 10
My WSDL imports a schema (xsd) which imports another schema (xsd) and it all
validates with no problems

when I get the response back the namespace alias is on every tag and I would
like to know if I can have it on the top level tag only

Current response:
http://schemas.xmlsoap.org/soap/envelope/";>http://www.synoran.com/ebx/v4/types";
xmlns:ns3="http://www.synoran.com/sde/se/types";>String2001-12-17T09:30:47.0Z

Expected response
http://schemas.xmlsoap.org/soap/envelope/";>http://www.synoran.com/sde/se/types";>http://www.synoran.com/ebx/v4/types";>String2001-12-17T09:30:47.0Z

my beans.xml:
http://www.springframework.org/schema/beans";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:jaxws="http://cxf.apache.org/jaxws";
  xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>

  
  
  

  


  
  
  

  



Is there a tag that I'm missing or is that something CXF cannot currently
accomplish?
-- 
View this message in context: 
http://www.nabble.com/Soap---Namespace-tf4348870.html#a12390726
Sent from the cxf-user mailing list archive at Nabble.com.



Re: SOAP Attachment question/problem

2007-08-29 Thread Glen Mazza
SwA is rather old; Microsoft in particular never supported it like they
do MTOM.  Both Metro and CXF provide MTOM samples only, but Apache
Axis2[1] might be of help for you.

Glen

[1] http://wso2.org/search/node/swa


Am Mittwoch, den 29.08.2007, 07:50 +0200 schrieb Pawel Janusz:
> Yes, this is a MTOM example, but as far as I know SOAP Attachments is 
> something different.
> 
> 
> Willem Jiang wrote:
> > Hi,
> >
> > You can take a look of the below two documents.
> > [1] http://cwiki.apache.org/CXF20DOC/mtom.html
> > [2]http://cwiki.apache.org/CXF20DOC/mtom-attachments.html
> >
> > And you can find the simple MTOM from CXF bin distribution .
> >
> > Willem.
> >



Re: SOAPBinding Use.ENCODED ?

2007-08-29 Thread Chris Campbell
FYI- I ended up using MTOM for this, works great.

trichter wrote:
> HI,
> 
> I ran into the same problem, banging my head at why the Use.ENCODED setting
> is not picked up. Does anyone know whether there are plans to include this
> capability in CXF? Why would my alternatives be if I needed encoded?
> 
> Thanks.
> 
> 
> 
> bmargulies wrote:
>> CXF doesn't support Encoded.
>>
>>> -Original Message-
>>> From: Chris Campbell [mailto:[EMAIL PROTECTED]
>>> Sent: Wednesday, August 22, 2007 5:22 PM
>>> To: cxf-user@incubator.apache.org
>>> Subject: SOAPBinding Use.ENCODED ?
>>>
>>> I need encoded response, since some of my data has "Illegal
>>> character (NULL, unicode 0) encountered"
>>>
>>> I added
>>>
>>> @SOAPBinding(style=Style.RPC, use=Use.ENCODED)
>>>
>>> to my service interface, but the generated wsdl has use=literal, for
>>> example
>>>
>>> 
>>> 
>>> 
>>> http://query.soap.quaris.com/"; use="literal"/>
>>> 
>>> 
>>> http://query.soap.quaris.com/"; use="literal"/>
>>> 
>>> 
>>>
>>> Am I missing something?
>>>
>>> Thanks.
>>>
>>
>>
> 


RE: SOAPBinding Use.ENCODED ?

2007-08-29 Thread Glen Mazza
Axis2 does not support RPC/encoded[1] apparently because it is not WS-I
compliant[2]--they tell their users to stay with the older Axis1 if they
must have RPC/encoded.  You may wish to consider Axis1 then (which
unfortunately will probably create other problems for you.)

Glen

[1] http://marc.info/?l=axis-user&m=118807112903325&w=2
[2] http://marc.info/?l=axis-user&m=118579681226453&w=2


Am Mittwoch, den 29.08.2007, 07:53 -0700 schrieb trichter:
> HI,
> 
> I ran into the same problem, banging my head at why the Use.ENCODED setting
> is not picked up. Does anyone know whether there are plans to include this
> capability in CXF? Why would my alternatives be if I needed encoded?
> 
> Thanks.
> 
> 
> 
> bmargulies wrote:
> > 
> > CXF doesn't support Encoded.
> > 
> >> -Original Message-
> >> From: Chris Campbell [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, August 22, 2007 5:22 PM
> >> To: cxf-user@incubator.apache.org
> >> Subject: SOAPBinding Use.ENCODED ?
> >> 
> >> I need encoded response, since some of my data has "Illegal
> >> character (NULL, unicode 0) encountered"
> >> 
> >> I added
> >> 
> >> @SOAPBinding(style=Style.RPC, use=Use.ENCODED)
> >> 
> >> to my service interface, but the generated wsdl has use=literal, for
> >> example
> >> 
> >> 
> >> 
> >>
> >> http://query.soap.quaris.com/"; use="literal"/>
> >> 
> >>
> >> http://query.soap.quaris.com/"; use="literal"/>
> >> 
> >> 
> >> 
> >> Am I missing something?
> >> 
> >> Thanks.
> >> 
> > 
> > 
> > 
> 



Re: SOAP Attachment question/problem

2007-08-29 Thread Daniel Kulp

We do support SOAP w/ Attachements (it's required by JAX-WS spec).   
Unfortunately, I don't know a lot about it.   You might want to check 
the JAX-WS spec to see what they say.  

For the most part, on the code side, you just use a DataHandler object 
for the parameter.   A WSDL with attachments would map into that.   

Dan

On Wednesday 29 August 2007, Pawel Janusz wrote:
> Yes, this is a MTOM example, but as far as I know SOAP Attachments is
> something different.
>
> Willem Jiang wrote:
> > Hi,
> >
> > You can take a look of the below two documents.
> > [1] http://cwiki.apache.org/CXF20DOC/mtom.html
> > [2]http://cwiki.apache.org/CXF20DOC/mtom-attachments.html
> >
> > And you can find the simple MTOM from CXF bin distribution .
> >
> > Willem.



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


Re: Soap - Namespace

2007-08-29 Thread Glen Mazza
Yes, that has come up before: 
http://issues.apache.org/jira/browse/CXF-884

CXF may have a flag turning off that in the future.  Preliminary
analysis of the matter has shown though that the change is not trivial
to do and would cascade through multiple parts of the code.

Glen

Am Mittwoch, den 29.08.2007, 09:33 -0700 schrieb sameh:
> I'm using CXF 2.0.1-incubator in weblogic 10
> My WSDL imports a schema (xsd) which imports another schema (xsd) and it all
> validates with no problems
> 
> when I get the response back the namespace alias is on every tag and I would
> like to know if I can have it on the top level tag only
> 
> Current response:
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> mlns:ns2="http://www.synoran.com/ebx/v4/types";
> xmlns:ns3="http://www.synoran.com/sde/se/types";>String2001-12-17T09:30:47.0Z
> 
> Expected response
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> mlns:ns="http://www.synoran.com/sde/se/types";> xmlns="http://www.synoran.com/ebx/v4/types";>String2001-12-17T09:30:47.0Z
> 
> my beans.xml:
> http://www.springframework.org/schema/beans";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xmlns:jaxws="http://cxf.apache.org/jaxws";
>   xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
> 
>   
>   
>   
> 
>implementor="com.synoran.sde.se.SDEServiceImpl"
> address="/SDEService">
> 
> 
>value="com.ctc.wstx.stax.WstxInputFactory" />
>value="com.ctc.wstx.stax.WstxOutputFactory" />
>value="com.ctc.wstx.stax.WstxEventFactory" />
> 
>   
> 
> 
> 
> Is there a tag that I'm missing or is that something CXF cannot currently
> accomplish?



Re: Soap - Namespace

2007-08-29 Thread Daniel Kulp

No, this issue is a bit different.   This is purely a JAXB runtime issue.   
In this case, the shema he is using is definitely "qualified" for the 
eBx type.   All the elements are definitely coming out qualified.   
However, what he would like is for the elements to set/use the default 
namespace instead of a namespace prefix.

I honestly don't know if that can be done or not.   We pretty much just 
pass the jaxb objects to the jaxb runtime and let it spit out whatever 
it spits out.  I don't know what level of control the runtime provides 
us to manipulate the prefixes.

Log a feature request.   Someone that is actually more familiar with the 
JAXB internals may be able to pick it up.  

Dan

On Wednesday 29 August 2007, Glen Mazza wrote:
> Yes, that has come up before:
> http://issues.apache.org/jira/browse/CXF-884
>
> CXF may have a flag turning off that in the future.  Preliminary
> analysis of the matter has shown though that the change is not trivial
> to do and would cascade through multiple parts of the code.
>
> Glen
>
> Am Mittwoch, den 29.08.2007, 09:33 -0700 schrieb sameh:
> > I'm using CXF 2.0.1-incubator in weblogic 10
> > My WSDL imports a schema (xsd) which imports another schema (xsd)
> > and it all validates with no problems
> >
> > when I get the response back the namespace alias is on every tag and
> > I would like to know if I can have it on the top level tag only
> >
> > Current response:
> >  > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> >s3:DocResponse mlns:ns2="http://www.synoran.com/ebx/v4/types";
> > xmlns:ns3="http://www.synoran.com/sde/se/types";> >s2:eBxRq> >ole>String >lientDt>2001-12-17T09:30:47.0Z >Rq>
> >
> > Expected response
> >  > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> >s:DocResponse
> > mlns:ns="http://www.synoran.com/sde/se/types";> > xmlns="http://www.synoran.com/ebx/v4/types";> >RecCHT>String >onRecCHT>2001-12-17T09:30:47.0Z >q>
> >
> > my beans.xml:
> > http://www.springframework.org/schema/beans";
> >   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >   xmlns:jaxws="http://cxf.apache.org/jaxws";
> >   xsi:schemaLocation="
> > http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans.xsd
> > http://cxf.apache.org/jaxws
> > http://cxf.apache.org/schemas/jaxws.xsd";>
> >
> >   
> >> /> 
> >
> >> implementor="com.synoran.sde.se.SDEServiceImpl"
> > address="/SDEService">
> >
> > 
> >> value="com.ctc.wstx.stax.WstxInputFactory" />
> >> value="com.ctc.wstx.stax.WstxOutputFactory" />
> >> value="com.ctc.wstx.stax.WstxEventFactory" />
> > 
> >   
> >
> > 
> >
> > Is there a tag that I'm missing or is that something CXF cannot
> > currently accomplish?



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


Re: Oracle BPEL and CXF

2007-08-29 Thread Glen Mazza
I would recommend trying GlassFish Metro[1].  If it works with Metro,
then the problem is most probably with CXF (if you can send us a bug
report it would be appreciated); but if it fails also with Metro then
you know you have an Oracle BPEL issue.

The Ant file here[2] at Step #5 is for a web service *client* (not
service), but it should show how similar it is to go back and forth
between the two web service stacks.  

HTH,
Glen

[1] https://jax-ws.dev.java.net/nonav/2.1.2m1/docs/wsimportant.html
[2] http://www.jroller.com/gmazza/entry/using_amazon_web_services_with


Am Mittwoch, den 29.08.2007, 14:08 +0100 schrieb
[EMAIL PROTECTED]:
> Hi Folks,
> 
> I am having difficulty calling a CXF generated web-service with a JAX-WS
> / Spring generated WSDL (if that makes any difference) from Oracle BPEL
> - part of the Oracle SOA suite.
> 
> My WSDL has an imported schema with another nested imported schema
> 
> For example for my audit WSDL: -
> 
> -Audit WSDL
>   -> imports audit.xsd
>   -> imports common.xsd
> 
> Oracle doesn't seem to find either schema, normally it would create
> variables for the input and output parameters, but this doesn't happen.
> Has anyone got CXF and BPEL to work together?  The service works fine
> from SOAP UI, we had similar problems with Xfire and BPEL, we were
> hoping the move to CXF would solve the problems.
> 
> Thanks for the help!
> All the best,
> Ash



Re: Soap - Namespace

2007-08-29 Thread Glen Mazza
Oh, OK.  Thanks also for the earlier correction on SwA being required by
the JAX-WS spec.  I'm still learning here too...  ;-)

Glen


Am Mittwoch, den 29.08.2007, 13:05 -0400 schrieb Daniel Kulp:
> No, this issue is a bit different.   This is purely a JAXB runtime issue.   
> In this case, the shema he is using is definitely "qualified" for the 
> eBx type.   All the elements are definitely coming out qualified.   
> However, what he would like is for the elements to set/use the default 
> namespace instead of a namespace prefix.
> 
> I honestly don't know if that can be done or not.   We pretty much just 
> pass the jaxb objects to the jaxb runtime and let it spit out whatever 
> it spits out.  I don't know what level of control the runtime provides 
> us to manipulate the prefixes.
> 
> Log a feature request.   Someone that is actually more familiar with the 
> JAXB internals may be able to pick it up.  
> 
> Dan
> 
> On Wednesday 29 August 2007, Glen Mazza wrote:
> > Yes, that has come up before:
> > http://issues.apache.org/jira/browse/CXF-884
> >
> > CXF may have a flag turning off that in the future.  Preliminary
> > analysis of the matter has shown though that the change is not trivial
> > to do and would cascade through multiple parts of the code.
> >
> > Glen
> >
> > Am Mittwoch, den 29.08.2007, 09:33 -0700 schrieb sameh:
> > > I'm using CXF 2.0.1-incubator in weblogic 10
> > > My WSDL imports a schema (xsd) which imports another schema (xsd)
> > > and it all validates with no problems
> > >
> > > when I get the response back the namespace alias is on every tag and
> > > I would like to know if I can have it on the top level tag only
> > >
> > > Current response:
> > >  > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> > >s3:DocResponse mlns:ns2="http://www.synoran.com/ebx/v4/types";
> > > xmlns:ns3="http://www.synoran.com/sde/se/types";> > >s2:eBxRq> > >ole>String  nPswd> > >lientDt>2001-12-17T09:30:47.0Z > >Rq>
> > >
> > > Expected response
> > >  > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> > >s:DocResponse
> > > mlns:ns="http://www.synoran.com/sde/se/types";> > > xmlns="http://www.synoran.com/ebx/v4/types";> > >RecCHT>String > >onRecCHT>2001-12-17T09:30:47.0Z > >q>
> > >
> > > my beans.xml:
> > > http://www.springframework.org/schema/beans";
> > >   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >   xmlns:jaxws="http://cxf.apache.org/jaxws";
> > >   xsi:schemaLocation="
> > > http://www.springframework.org/schema/beans
> > > http://www.springframework.org/schema/beans/spring-beans.xsd
> > > http://cxf.apache.org/jaxws
> > > http://cxf.apache.org/schemas/jaxws.xsd";>
> > >
> > >   
> > >> > /> 
> > >
> > >> > implementor="com.synoran.sde.se.SDEServiceImpl"
> > > address="/SDEService">
> > >
> > > 
> > >> > value="com.ctc.wstx.stax.WstxInputFactory" />
> > >> > value="com.ctc.wstx.stax.WstxOutputFactory" />
> > >> > value="com.ctc.wstx.stax.WstxEventFactory" />
> > > 
> > >   
> > >
> > > 
> > >
> > > Is there a tag that I'm missing or is that something CXF cannot
> > > currently accomplish?
> 
> 
> 



Re: Oracle BPEL and CXF

2007-08-29 Thread Daniel Kulp

This honestly sounds like a bug in BPEL.   If it works with SOAP UI, then 
it sounds like the service is working correctly.  BPEL just isn't 
interpretting the wsdl correctly.

One thing to try would be to suck all the schema into the wsdl types 
section directly so there is only the one giant wsdl.   Maybe it cannot 
handle the imports at all.   I don't really know.

Dan


On Wednesday 29 August 2007, [EMAIL PROTECTED] wrote:
> Hi Folks,
>
> I am having difficulty calling a CXF generated web-service with a
> JAX-WS / Spring generated WSDL (if that makes any difference) from
> Oracle BPEL - part of the Oracle SOA suite.
>
> My WSDL has an imported schema with another nested imported schema
>
> For example for my audit WSDL: -
>
> -Audit WSDL
>   -> imports audit.xsd
>   -> imports common.xsd
>
> Oracle doesn't seem to find either schema, normally it would create
> variables for the input and output parameters, but this doesn't
> happen. Has anyone got CXF and BPEL to work together?  The service
> works fine from SOAP UI, we had similar problems with Xfire and BPEL,
> we were hoping the move to CXF would solve the problems.
>
> Thanks for the help!
> All the best,
> Ash



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


Re: Acegi Security with CXF

2007-08-29 Thread vannguyen0

Fred,

Can I get a sample CFX config?

Thanks,

Van


Fred Dushin-3 wrote:
> 
> 
> I don't know a lot about acegi, but if you are only talking about  
> propagating a WS-Security UnsernameToken through a SOAP wss:Security  
> header, then yes, CXF is perfectly capable of doing this.
> 
> Note, however, that you will need to add some code on the consuming  
> side of the message to "validate" the username and password, via  
> WSS4J callback, which you'll also need to configure through Spring.   
> Like XFire, the CXF WS-Security interceptor is based not only on the  
> WSS4J toolkit, but also on the WSS4J Handler architecture (which Axis  
> uses, as well).  Not knowing much at all about XFire, I believe the  
> CXF configuration should be pretty strightforwardly mappable to CXF.
> 
> Shout if you need a sample CXF config.
> 
> -Fred
> 
> On Aug 27, 2007, at 3:44 PM, Kaleb Walton wrote:
> 
>> There is an example at that URL
>> as well but it is for XFire and I'm not sure how those concepts  
>> translate
>> over to CXF; additionally the example they use points out its own
>> inefficiency suggesting it should use a custom handler to read the  
>> contents
>> of the SOAP message via StAX.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Acegi-Security-with-CXF-tf4337860.html#a12391936
Sent from the cxf-user mailing list archive at Nabble.com.



Re: SOAPBinding Use.ENCODED ?

2007-08-29 Thread Daniel Kulp

Good question.   You'll probably be hard pressed to find any "modern" web 
service stacks the support it.   As Glen mentioned, the WSI-BP 
specifically discourages the use of encoded as it's very complex, under 
specified, and generally a pain to get to interoperate.  

If you NEED encoded, I would suggest either Axis 1 or google for other 
JAX-RPC based solutions.  Maybe even the JAX-RPC ref impl from Sun.  
That said, if you're developing a service, definitely stick with 
literal.


Dan


On Wednesday 29 August 2007, trichter wrote:
> HI,
>
> I ran into the same problem, banging my head at why the Use.ENCODED
> setting is not picked up. Does anyone know whether there are plans to
> include this capability in CXF? Why would my alternatives be if I
> needed encoded?
>
> Thanks.
>
> bmargulies wrote:
> > CXF doesn't support Encoded.
> >
> >> -Original Message-
> >> From: Chris Campbell [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, August 22, 2007 5:22 PM
> >> To: cxf-user@incubator.apache.org
> >> Subject: SOAPBinding Use.ENCODED ?
> >>
> >> I need encoded response, since some of my data has "Illegal
> >> character (NULL, unicode 0) encountered"
> >>
> >> I added
> >>
> >> @SOAPBinding(style=Style.RPC, use=Use.ENCODED)
> >>
> >> to my service interface, but the generated wsdl has use=literal,
> >> for example
> >>
> >> 
> >> 
> >>
> >> http://query.soap.quaris.com/";
> >> use="literal"/> 
> >>
> >> http://query.soap.quaris.com/";
> >> use="literal"/> 
> >> 
> >>
> >> Am I missing something?
> >>
> >> Thanks.



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


simple frontend client problem ( arg00 does not exist )

2007-08-29 Thread Chris Campbell
I am sure I am misunderstanding something here, but if I setup a
client with spring, all seems to be well. If I setup a client with
ClientProxyFactoryBean, I think I am missing some settings, but
cannot tell what.

ClassPathXmlApplicationContext context = new
ClassPathXmlApplicationContext(new String[]
{"com/quaris/soap/sample/client-beans.xml"});
Metadata client = (Metadata)context.getBean("Metadata");
NGramList list = client.getNGrams();

all is fine... However, now I cannot figure out how to change the
settings in client-beans.xml programatically, like the address of
the service, or username/password. So I try ClientProxyFactoryBean
as in the examples and I get this error:


ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(Metadata.class);
factory.setAddress("http://localhost:8080/qproxy/Metadata";);
Metadata client = (Metadata) factory.create();
NGramList list = client.getNGrams();

INFO: Creating Service {http://metadata.soap.quaris.com/}Metadata
from class com.quaris.soap.metadata.Metadata
Exception in thread "main" org.apache.cxf.binding.soap.SoapFault:
Parameter {http://metadata.soap.quaris.com/}arg00 does not exist!
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:69)
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:36)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:86)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:178)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1830)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1698)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
at $Proxy19.getNGrams(Unknown Source)
at com.quaris.soap.sample.Client2.main(Client2.java:16)


Re: Generated wsdl in XFire Versus CXF

2007-08-29 Thread Daniel Kulp
On Monday 27 August 2007, Jacob Marcus wrote:
> Hi all,
>
> I notice that in CXF, the xsd elements for method names have a type
> attribute. This was not the case in XFire.
> Here is an example of what I am talking about. My question is, is
> there a way to get CXF to spit out wsdl exactly as XFire?

Not that I know of.   The reasoning for outputting the schema this way 
centers around JAX-WS compliance and the JAX-WS tck.   I cannot go into 
much detail, but we did have problems when we didn't output the separate 
element.

PART of the reason is that you should get the same wsdl if your service 
is using "wrapped" mode (so the element and type are auto generated) or 
if you use a "bare" mode with a hand written class.   Since JAXB 
separates the two into an element and a type in that case, the wrapped 
case should as well.

Dan


>
> Thanks,
> Jacob
>
>
> XFire
> ==
> 
> 
> 
>   nillable="true" type="xsd:string"/>
>
> 
> 
>
>
> CXF
> 
> 
> 
> 
>
> 
>



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


Re: simple frontend client problem ( arg00 does not exist )

2007-08-29 Thread Daniel Kulp

Chris,

You didn't by any chance use a wsdlLocation or similar in the spring 
config?   Check the INFO level logging when running with spring and see 
if it says:
INFO: Creating Service {http://metadata.soap.quaris.com/}Metadata
 from class com.quaris.soap.metadata.Metadata
or "from WSDL".  (you didn't include the spring config fragment)

It looks like since a WSDL isn't available, it's using the default code 
first stuff, which with the simple frontend, names the args arg##.   The 
error suggests the server got arg00, but was expecting something else.

Dan



On Wednesday 29 August 2007, Chris Campbell wrote:
> I am sure I am misunderstanding something here, but if I setup a
> client with spring, all seems to be well. If I setup a client with
> ClientProxyFactoryBean, I think I am missing some settings, but
> cannot tell what.
>
> ClassPathXmlApplicationContext context = new
> ClassPathXmlApplicationContext(new String[]
> {"com/quaris/soap/sample/client-beans.xml"});
> Metadata client = (Metadata)context.getBean("Metadata");
> NGramList list = client.getNGrams();
>
> all is fine... However, now I cannot figure out how to change the
> settings in client-beans.xml programatically, like the address of
> the service, or username/password. So I try ClientProxyFactoryBean
> as in the examples and I get this error:
>
>
> ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
> factory.setServiceClass(Metadata.class);
> factory.setAddress("http://localhost:8080/qproxy/Metadata";);
> Metadata client = (Metadata) factory.create();
> NGramList list = client.getNGrams();
>
> INFO: Creating Service {http://metadata.soap.quaris.com/}Metadata
> from class com.quaris.soap.metadata.Metadata
> Exception in thread "main" org.apache.cxf.binding.soap.SoapFault:
> Parameter {http://metadata.soap.quaris.com/}arg00 does not exist!
>   at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>eMessage(Soap11FaultInInterceptor.java:69) at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>eMessage(Soap11FaultInInterceptor.java:36) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:206) at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessa
>ge(AbstractFaultChainInitiatorObserver.java:86) at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>essage(ReadHeadersInterceptor.java:178) at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>essage(ReadHeadersInterceptor.java:57) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:206) at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRe
>sponse(HTTPConduit.java:1830) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HT
>TPConduit.java:1698) at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66
>) at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndin
>gInterceptor.handleMessage(MessageSenderInterceptor.java:62) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:206) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204) at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
> org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68) at
> $Proxy19.getNGrams(Unknown Source)
>   at com.quaris.soap.sample.Client2.main(Client2.java:16)



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


Re: Acegi Security with CXF

2007-08-29 Thread Fred Dushin

How's this for the outbound side:

http://www.apache.org}SoapPort";  
createdFromAPI="true">





class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>









value="demo.hw.client.UTPasswordCallback"/>




 

-Fred

On Aug 29, 2007, at 1:31 PM, vannguyen0 wrote:



Fred,

Can I get a sample CFX config?

Thanks,

Van


Fred Dushin-3 wrote:



I don't know a lot about acegi, but if you are only talking about
propagating a WS-Security UnsernameToken through a SOAP wss:Security
header, then yes, CXF is perfectly capable of doing this.

Note, however, that you will need to add some code on the consuming
side of the message to "validate" the username and password, via
WSS4J callback, which you'll also need to configure through Spring.
Like XFire, the CXF WS-Security interceptor is based not only on the
WSS4J toolkit, but also on the WSS4J Handler architecture (which Axis
uses, as well).  Not knowing much at all about XFire, I believe the
CXF configuration should be pretty strightforwardly mappable to CXF.

Shout if you need a sample CXF config.

-Fred

On Aug 27, 2007, at 3:44 PM, Kaleb Walton wrote:


There is an example at that URL
as well but it is for XFire and I'm not sure how those concepts
translate
over to CXF; additionally the example they use points out its own
inefficiency suggesting it should use a custom handler to read the
contents
of the SOAP message via StAX.






--
View this message in context: http://www.nabble.com/Acegi-Security- 
with-CXF-tf4337860.html#a12391936

Sent from the cxf-user mailing list archive at Nabble.com.




Controlling http transport threads in CXF

2007-08-29 Thread Yadav, Yogendra \(IT\)
Hi,
I am using CXF dist out of the box. I have not specified any cxf.xml
config file of my own. I am using CXF's http transport which is Jetty by
default.
 
I understand that jetty is configured because of this extension present
in META-INF cxf-extension-http-jetty.xml.
 
I want to control the number of transport threads, I think they are
defaulted to 10. 
 
thanx
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


Executor thread pool not utilized by JAXWS SEI

2007-08-29 Thread Yadav, Yogendra \(IT\)
Hi,
I have configured / published the POJO service endpoint class using
JAXWS Endpoint API. I am providing executor thread pool to the Endpoint.
I don't see the executor thread pool being used by runtime. All I see is
Jetty transport threads in debugger in EclipseIDE.
 
POJOClass c = new POJOClass();
String address = "http://localhost:9000/POJOService";;
ep = Endpoint.create( c );
ExecutorService es = Executors.newFixedThreadPool( 4 );
ep.setExecutor( es );
ep.publish( address );

What am I missing here ?
 
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


Re: simple frontend client problem ( arg00 does not exist )

2007-08-29 Thread Chris Campbell
Thanks for the reply. Here is the spring logging for the service:

Aug 29, 2007 1:10:38 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service
{http://metadata.soap.quaris.com/}MetadataService from class
com.quaris.soap.metadata.Metadata

There is also this bit, could this be relevant?

INFO: Bean 'cxf' is not eligible for getting processed by all
BeanPostProcessors (for example: not eligible for auto-proxying)
Aug 29, 2007 1:10:37 PM
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is
not eligible for getting processed by all BeanPostProcessors (for
example: not eligible for auto-proxying)

The spring configuration is the following:



http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:jaxws="http://cxf.apache.org/jaxws";
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd";>




  
  http://localhost:8080/qproxy/Metadata"/>



Daniel Kulp wrote:
> Chris,
> 
> You didn't by any chance use a wsdlLocation or similar in the spring 
> config?   Check the INFO level logging when running with spring and see 
> if it says:
> INFO: Creating Service {http://metadata.soap.quaris.com/}Metadata
>  from class com.quaris.soap.metadata.Metadata
> or "from WSDL".  (you didn't include the spring config fragment)
> 
> It looks like since a WSDL isn't available, it's using the default code 
> first stuff, which with the simple frontend, names the args arg##.   The 
> error suggests the server got arg00, but was expecting something else.
> 
> Dan
> 
> 
> 
> On Wednesday 29 August 2007, Chris Campbell wrote:
>> I am sure I am misunderstanding something here, but if I setup a
>> client with spring, all seems to be well. If I setup a client with
>> ClientProxyFactoryBean, I think I am missing some settings, but
>> cannot tell what.
>>
>> ClassPathXmlApplicationContext context = new
>> ClassPathXmlApplicationContext(new String[]
>> {"com/quaris/soap/sample/client-beans.xml"});
>> Metadata client = (Metadata)context.getBean("Metadata");
>> NGramList list = client.getNGrams();
>>
>> all is fine... However, now I cannot figure out how to change the
>> settings in client-beans.xml programatically, like the address of
>> the service, or username/password. So I try ClientProxyFactoryBean
>> as in the examples and I get this error:
>>
>>
>> ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>> factory.setServiceClass(Metadata.class);
>> factory.setAddress("http://localhost:8080/qproxy/Metadata";);
>> Metadata client = (Metadata) factory.create();
>> NGramList list = client.getNGrams();
>>
>> INFO: Creating Service {http://metadata.soap.quaris.com/}Metadata
>> from class com.quaris.soap.metadata.Metadata
>> Exception in thread "main" org.apache.cxf.binding.soap.SoapFault:
>> Parameter {http://metadata.soap.quaris.com/}arg00 does not exist!
>>  at
>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>> eMessage(Soap11FaultInInterceptor.java:69) at
>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handl
>> eMessage(Soap11FaultInInterceptor.java:36) at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>> rChain.java:206) at
>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessa
>> ge(AbstractFaultChainInitiatorObserver.java:86) at
>> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>> essage(ReadHeadersInterceptor.java:178) at
>> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleM
>> essage(ReadHeadersInterceptor.java:57) at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>> rChain.java:206) at
>> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399) at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRe
>> sponse(HTTPConduit.java:1830) at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HT
>> TPConduit.java:1698) at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66
>> ) at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndin
>> gInterceptor.handleMessage(MessageSenderInterceptor.java:62) at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>> rChain.java:206) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253) at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:204) at
>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
>> org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68) at
>> $Proxy19.getNGrams(Unknown Source)
>>  at com.quaris.soap.sample.Clie

Re: Simple front-end and xs:anyType

2007-08-29 Thread Jacob Marcus
Hi,

How do you customize the JAXB when using the simple front end.? The article
talks about how to do it  with  the wsdl2ava tool, if I am not mistaken.

Has some one tried this with the simple front end?

Thanks,
Jacob


On 8/27/07, James Mao <[EMAIL PROTECTED]> wrote:
>
> You can customize the jaxb to use the java.util.Calendar or
> java.util.Date in case of jaxb databinding.
> Here's the documentation:
>
> http://cwiki.apache.org/confluence/display/CXF20DOC/WSDL+to+Java
> (grep: *Q: How to map xsd:dateTime to java.util.Date?*)
>
> Cheers,
> James
>
> > Thanks Dan! I have got it work.
> >
> > I notice one interesting thing though. If I send a Date from the client,
> it
> > is getting converted to an
> > XMLGregorianCalendarImpl at the server side. I see that there is an
> existing
> > JIRA issue open on this.
> > (https://issues.apache.org/jira/browse/CXF-369)
> >
> > I changed the data binding to use Aegis data binding and now see
> > java.util.GregorianCalendar.
> >
> > Is there a way I can customize this to get java.util.Date at the server?
> The
> > Jira issue says you can customise jaxb binding using an xml snippet. It
> is
> > not clear, where this xml snippet will fits in.
> >
> > Thanks,
> > J
> >
> >
> >
> >
> >
> >
> >
> >
> > On 8/27/07, Dan Diephouse <[EMAIL PROTECTED]> wrote:
> >
> >> Hi Jacob,
> >>
> >> You may have to turn on xsi:type writing for aegis. If you're using the
> >> API,
> >> it'll probably look something like this:
> >>
> >> ServerFactoryBean sf ...
> >> Map props = new HashMap();
> >> props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, "true");
> >> sf.setProperties(props);
> >>
> >> Or in XML form:
> >>
> >> 
> >>   
> >> true
> >>   
> >> 
> >>
> >> Hope that helps some. Cheers,
> >> - Dan
> >>
> >>
> >>
> >> On 8/27/07, Jacob Marcus <[EMAIL PROTECTED]> wrote:
> >>
> >>> Hi,
> >>>
> >>> Is there a way to support xs:anyType using the Simple frond end? I
> tried
> >>>
> >> a
> >>
> >>> method like
> >>> String push(Object obj) in my interface. The wsdl is successfully
> >>> generated.
> >>> However, when I try to call the method from my client, I get the
> >>>
> >> following
> >>
> >>> error. Any pointers would be great.
> >>>
> >>> org.apache.cxf.interceptor.Fault: object is not an instance of
> declaring
> >>> class
> >>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(
> >>> AbstractInvoker.java:92)
> >>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(
> >>> AbstractInvoker.java:62)
> >>> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(
> >>> ServiceInvokerInterceptor.java:56)
> >>> at org.apache.cxf.workqueue.SynchronousExecutor.execute(
> >>> SynchronousExecutor.java:37)
> >>> at
> >>> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(
> >>> ServiceInvokerInterceptor.java:92)
> >>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >>> PhaseInterceptorChain.java:207)
> >>> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(
> >>> ChainInitiationObserver.java:73)
> >>> at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage
> >>>
> >> (
> >>
> >>> ServletDestination.java:78)
> >>> at
> >>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(
> >>> ServletController.java:231)
> >>>
> >>>
> >>> Thanks,
> >>> Jacob
> >>>
> >>>
> >>
> >> --
> >> Dan Diephouse
> >> Envoi Solutions
> >> http://envoisolutions.com | http://netzooid.com/blog
> >>
> >>
> >
> >
>


WSS4JInInterceptor configuration

2007-08-29 Thread dmadunic

Hi all,
anoyne knows how can i configure multiple actions for WSS4JIn and Out
Interceptors?
For example signanin and UsernameToken
So far i have follwing lines in my applicationContext.xml:
















And i would also like to add signing action to WSS4JInInterceptor, any
suggestion how to doit?

thx
-- 
View this message in context: 
http://www.nabble.com/WSS4JInInterceptor-configuration-tf4351388.html#a12398844
Sent from the cxf-user mailing list archive at Nabble.com.



Re: SOAP Attachment question/problem

2007-08-29 Thread Freeman Fang

Hi Pawel,

You can refer to the system test ClientServerSwaTest to get more details 
about how cxf support SWA.

http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java?view=log

Cheers

Freeman

Daniel Kulp wrote:
We do support SOAP w/ Attachements (it's required by JAX-WS spec).   
Unfortunately, I don't know a lot about it.   You might want to check 
the JAX-WS spec to see what they say.  

For the most part, on the code side, you just use a DataHandler object 
for the parameter.   A WSDL with attachments would map into that.   


Dan

On Wednesday 29 August 2007, Pawel Janusz wrote:
  

Yes, this is a MTOM example, but as far as I know SOAP Attachments is
something different.

Willem Jiang wrote:


Hi,

You can take a look of the below two documents.
[1] http://cwiki.apache.org/CXF20DOC/mtom.html
[2]http://cwiki.apache.org/CXF20DOC/mtom-attachments.html

And you can find the simple MTOM from CXF bin distribution .

Willem.
  




  


Re: Controlling http transport threads in CXF

2007-08-29 Thread Willem Jiang

Hi,

If you use the jetty http transport,  jetty will use BoundedThreadPool 
as the default thread pool.
If you want to take control of the Jetty's thread number, here is a doc 
for it.


[1] http://cwiki.apache.org/CXF20DOC/jetty-configuration.html

Willem

Yadav, Yogendra (IT) wrote:

Hi,
I am using CXF dist out of the box. I have not specified any cxf.xml
config file of my own. I am using CXF's http transport which is Jetty by
default.
 
I understand that jetty is configured because of this extension present

in META-INF cxf-extension-http-jetty.xml.
 
I want to control the number of transport threads, I think they are
defaulted to 10. 
 
thanx

-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

  


Re: Executor thread pool not utilized by JAXWS SEI

2007-08-29 Thread Willem Jiang

Hi Yogen,

If you take a look at the code (ServiceInvokerInterceptor) , CXF just 
use the JAXWS specified executor when it dispatch the call to the 
implementor object.
And the most of the works ( marshaling/ unmarshaling the messages by the 
intercepter chain) are done in the transport thread.
So if you debug the code, you will find the  the Jetty transport thread 
most time.
But when you set the break point in the implementor method and run into 
it, you will get to see the ThreadPool which you set to the endpoint.


Willem.

Yadav, Yogendra (IT) wrote:

Hi,
I have configured / published the POJO service endpoint class using
JAXWS Endpoint API. I am providing executor thread pool to the Endpoint.
I don't see the executor thread pool being used by runtime. All I see is
Jetty transport threads in debugger in EclipseIDE.
 
POJOClass c = new POJOClass();

String address = "http://localhost:9000/POJOService";;
ep = Endpoint.create( c );
ExecutorService es = Executors.newFixedThreadPool( 4 );
ep.setExecutor( es );
ep.publish( address );

What am I missing here ?
 
-yogen



NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

  


Aegis databinding available in wsdl2java

2007-08-29 Thread Davide Gesino

Hello,

I'd like to know if in the CXF future releases  there will be a way to
automatically generate Aegis classes and xml files executing the wsdl2java
command.
And... approximatively when 2.1 version will be released?

Thanxx

Davide
-- 
View this message in context: 
http://www.nabble.com/Aegis-databinding-available-in-wsdl2java-tf4352162.html#a12401240
Sent from the cxf-user mailing list archive at Nabble.com.



Schema for namespace 'http://localhost/Service already contains type 'foo

2007-08-29 Thread Joe Sunday
I'm trying to migrate an existing framework from Xfire over to CXF  
(2.0.1 and tonight's 2.1 snapshot), and I can't get it to play nice.


There's a core framework that exports a web service interface of a  
few methods. We have an additional application that builds on top of  
that with it's own interface:


@WebService(...)
public interface CoreService {
@WebMethod(...)
Foo foo(...)
}

@WebService(...)
public interface AppService {
@WebMethod
 ServiceResult methodOne(...)

@WebMethod
ServiceResult methodTwo(...)
}

Then we aggregate them together with a new interface that we actually  
want exported:
@WebService(name = "MyService", targetNamespace = "http://localhost/ 
Service")

public interface PublicService extends CoreService, AppService {
}

Actually implementing methodXXX is handled by a JDK proxy class  
created by a factory in Spring that implements PublicService and the  
InvocationHandler maps them back to the right implementation. There  
is no actual Impl class to speak of.


If I setup my endpoint like this:


I get this during startup:
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'helloWorld': Invocation of init method  
failed; nested except
ion is java.lang.RuntimeException: Schema for namespace 'http:// 
localhost/Service' already contains type 'foo

Caused by:
java.lang.RuntimeException: Schema for namespace 'http://localhost/ 
Service' already contains type 'foo
at org.apache.ws.commons.schema.XmlSchema.addType 
(XmlSchema.java:229)
at  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createWrappe 
dMessageSchema(ReflectionServiceFactoryBean.java:660)
at  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createWrappe 
dSchema(ReflectionServiceFactoryBean.java:511)
at  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWr 
appedSchema(ReflectionServiceFactoryBean.java:430)
at  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService 
FromClass(ReflectionServiceFactoryBean.java:240)
at  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe 
rviceModel(ReflectionServiceFactoryBean.java:264)
at  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create 
(ReflectionServiceFactoryBean.java:143)
at  
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create 
(JaxWsServiceFactoryBean.java:89)
at  
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint 
(AbstractEndpointFactory.java:82)
at org.apache.cxf.frontend.ServerFactoryBean.create 
(ServerFactoryBean.java:107)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create 
(JaxWsServerFactoryBean.java:147)
at org.apache.cxf.jaxws.EndpointImpl.getServer 
(EndpointImpl.java:287)
at org.apache.cxf.jaxws.EndpointImpl.doPublish 
(EndpointImpl.java:227)
at org.apache.cxf.jaxws.EndpointImpl.publish 
(EndpointImpl.java:179)
at org.apache.cxf.jaxws.EndpointImpl.publish 
(EndpointImpl.java:340)

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:585)

I tried giving it a class to find the annotations on as well (though  
I didn't need this in XFire, it just read off the Interface correctly):

@WebService(endpointInterface = "com.myapp.PublicService")
public abstract class PublicServiceFake implements PublicService {
}

and pointing the endpoint to it in Spring:
  implementorClass="com.myapp.SnapManagerServiceFake"

with the same result. If I remove the "implements PublicService"  
part, it'll startup, but then the generated wsdl doesn't actually  
have any methods in it.


In XFire, my config looked like this (publicServiceProxy:

  class="org.codehaus.xfire.annotations.AnnotationServiceFactory">


  class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations" />



  

  class="org.codehaus.xfire.spring.remoting.XFireExporter">


value="com.myapp.PublicService" />
ref="xfire.annotationServiceFactory"/>


 

  

  
wsdlBuilder.generateImports
  
  true

  

  
--Joe