Hi, Dan, 
Thanks for kindly response. 
I have some "progress", by putting wsdl4j-1.6.1.jar and
geronimo-ws-metadata_2.0_spec-1.1.1.jar in the
{weblogichome}\jdk160_14_R27.6.5-32\jre\lib\ext 
I actually don't know why it will pass that exception(green), maybe you can
explain to me on that.... 

This piece of code is a WS client to transfer PDF file with MTOM, and add
security header into the request. 

and now I gone through that line of code and got another exception(stop at
red) for as below, and one link for solution, but I tried it it won't work
so far. and I got my code attatch as well, I may need your help on this
since this is another issue: 


INFO: No cxf.xml configuration file detected, relying on defaults. 
May 24, 2010 3:33:08 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryB 
ean buildServiceFromWSDL 
INFO: Creating Service
{http://v1.service.application.grantsolutions.gov/}Applic 
ationPDFImplService from WSDL:
http://stage.grantsolutions.gov/applicationprint/ 
ApplicationPDFV1?WSDL 
Invoking getApplicationPDF... 
May 24, 2010 3:33:09 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept 
WARNING: Interceptor has thrown exception, unwinding now 
java.lang.UnsupportedOperationException: This class does not support SAAJ
1.1 
at weblogic.webservice.core.soap.SOAPPartImpl.createElementNS(SOAPPartIm 
pl.java:820) 
at org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMS 
treamWriter.java:132) 
at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapE 
nvelopeStart(SoapOutInterceptor.java:118) 
at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMess 
age(SoapOutInterceptor.java:80) 
at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMess 
age(SoapOutInterceptor.java:61) 
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept 
orChain.java:236) 
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:472) 
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:302) 
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) 
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) 
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:12 
3) 
at $Proxy124.getApplicationPDF(Unknown Source) 
at com.lcgnet.games.webservices.applicationPDFService.ApplicationPDFClie 
nt.getApplicationPDFFile(ApplicationPDFClient.java:73) 
at com.lcgnet.games.web.actions.admin.RetrieveExtWSAppFileAction.execute 
(RetrieveExtWSAppFileAction.java:57) 


public static byte[] getApplicationPDFFile(final String wsdlUrl, final
String username, final int applicationId) throws Exception { 

final ApplicationPDFImplService applicationPDFImplService = new
ApplicationPDFImplService(new URL(wsdlUrl)); 
//final ApplicationPDF applicationPDF =
applicationPDFImplService.getApplicationPDFImplPort(); 
ApplicationPDF applicationPDF =
applicationPDFImplService.getApplicationPDFImplPort(); 

final Client client = ClientProxy.getClient(applicationPDF); 
final Endpoint cxfEndpoint = client.getEndpoint(); 

//handle the security stuff 
Map<String,Object> outProps = new HashMap<String,Object>(); 
outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); 
outProps.put(WSHandlerConstants.USER, username); 
outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST); 
outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS,
DigestCallbackHandler.class.getName()); 
WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
cxfEndpoint.getOutInterceptors().add(wssOut); 

System.out.println("Invoking getApplicationPDF..."); 
byte[] bs = applicationPDF.getApplicationPDF(applicationId); 

return bs; 
} 



which implementation like:


public byte[] getApplicationPDF( 
@WebParam(name = "arg0", targetNamespace = "") 
int arg0 
); 


 



I got 
http://han-zw.javaeye.com/blog/652289, which tells modify the
startWeblogic.sh in my case should be startWeblogic.cmd, but it won't work,
I am still in rosolving this. 

Thanks, 
Joelking 



dkulp wrote:
> 
> 
> You're probably picking up mixed versions of wsdl4j.   You MAY be able to
> get 
> rid of the version CXF has.   I'm not really sure as I'm not sure what
> version 
> weblogic may be using.   Either that, or you may need to endorse it.
> 
> Dan
> 
> 
> On Thursday 20 May 2010 2:46:34 pm joelking wrote:
>> Hi,
>> I am developing a web application, its a servlet which basically acts as
>> a
>> front end for a web service,
>> and I use CXF for the web service client, tested under a development
>> tomcat
>> instance and worked fine.
>> 
>> I have the spring framework and the rest jars in the lib:
>> 
>> wsdl4j-1.6.1.jar
>> wss4j-1.5.8.jar
>> jaxb-api-2.0.jar
>> cxf-2.2.3.jar
>> 
>> while I try to migrate to weblogic 10.3.2 follow the change as in
>> http://cxf.apache.org/docs/application-server-specific-configuration-guide.
>> html#ApplicationServerSpecificConfigurationGuide-WebLogic Then I got the
>> exception:
>> java.lang.IncompatibleClassChangeError: Class com.ibm.wsdl.DefinitionImpl
>> does not implement the requested interface
>> javax.wsdl.extensions.AttributeExtensible
>>      at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes(WSDLServic
>> eBuilder.java:137) at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.j
>> ava:277) ....
>> 
>> I have been research on this problem for a while, found some posts from
>> experts like Dan on Nable...
>> but I still didn't get it, could anyone help on this.
>> 
>> Joelking
>> 
>> 谷雨 wrote:
>> > wsdl4j-1.6.1.jar is packaged in apache-cxf-2.1.1 release. I have never
>> > replaced any jar files. Do you have any other suggestion?
>> > 
>> > 
>> > Hello 谷雨, are you using the IBM JDK?  I don't know if CXF works with
>> it.
>> > 
>> > Glen
>> > 
>> > 谷雨 wrote:
>> >> Caused by: java.lang.IncompatibleClassChangeError: Class
>> >> com.ibm.wsdl.DefinitionImpl does not implement the requested interface
>> >> javax.wsdl.extensions.AttributeExtensible
> 
> -- 
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog
> 
> 

-- 
View this message in context: 
http://old.nabble.com/A-runtime-exception-in-ws-security-scenario-tp18643136p28661501.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to