Hi, Ashwin,
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;
}
I got
http://han-zw.javaeye.com/blog/652289, which tells modify the startWeblogic.sh in my case should be startWeblogic.cmd, I am still in rosolving this.
Thanks,
Joelking