Hi Daniel,
you're right - the xml version tag is not required. I througt, the server
need it, because the anser included this tag.
The reason for the problem: wrong password was configurated on server and
wrong answer from the server ;-(
Thanks for help!
Otto
dkulp wrote:
>
>
>
> On Monday 27 October 2008 5:55:24 am Herr Otto wrote:
>> follow problems we have: I call a werbservice (createtd by cxf) - in the
>> soap message, which will created, ist the xml-version tag missing. The
>> server declines the message ....
>
> According to spec, the xml version tag it not required. It's basically
> just
> redundant information that consumes bandwidth and uses more CPU. Thus,
> this is technically a bug in whatever implementation you have on your
> server.
>
> That said, I believe you can do:
>
> ((BindingProvider)port).getRequestContext()
> .put("org.apache.cxf.stax.force-start-document", Boolean.TRUE)
>
> to force it. That may require one of the very recent versions of CXF.
>
> Dan
>
>
>
>> Tips are welcome to complete the soap message.
>>
>> Thos code will called:
>>
>>
>> File truststoreFile = new File("zertifikate/key.store");
>> TLSClientParameters tlsParams = new TLSClientParameters();
>> tlsParams.setSecureSocketProtocol("SSLv3");
>> tlsParams.setDisableCNCheck(true);
>>
>> try {
>> // Set Truststore
>> KeyStore truststore = KeyStore.getInstance("JKS");
>> truststore.load(new FileInputStream(truststoreFile),
>> truststorePassword.toCharArray());
>> TrustManagerFactory trustManagerFactory =
>> TrustManagerFactory.getInstance
>> (TrustManagerFactory.getDefaultAlgorithm());
>> trustManagerFactory.init(truststore);
>> TrustManager[] trustManager = trustManagerFactory.getTrustManagers();
>> tlsParams.setTrustManagers(trustManager);
>>
>> KeyStore keystore = KeyStore.getInstance("JKS");
>> keystore.load(new FileInputStream(truststoreFile),
>> truststorePassword.toCharArray());
>> KeyManagerFactory keyManagerFactory =
>> KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
>> char[] passphrase = "changeit".toCharArray();
>>
>> keyManagerFactory.init(keystore, passphrase);
>> KeyManager[] keyManagers = keyManagerFactory.getKeyManagers();
>> tlsParams.setKeyManagers(keyManagers);
>>
>> } catch (NoSuchAlgorithmException e) {
>> e.printStackTrace();
>> } catch (java.security.cert.CertificateException e) {
>> e.printStackTrace();
>> } catch (FileNotFoundException e) {
>> e.printStackTrace();
>> } catch (IOException e) {
>> e.printStackTrace();
>> } catch (KeyStoreException e) {
>> e.printStackTrace();
>> }
>>
>>
>>
>> JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
>> proxyFactory.setServiceClass(WsClass.class);
>> proxyFactory.setAddress(serverLocation);
>>
>> proxyFactory.setEndpointName(new QName("http://www.ip.wsdl", "WsClass"));
>>
>> // Set Filters
>> FiltersType filter = new FiltersType();
>> filter.getInclude().add("SSL_RSA_WITH_3DES_EDE_CBC_SHA");
>> filter.getInclude().add("SSL_RSA_EXPORT_WITH_RC4_40_MD4");
>> filter.getInclude().add("SSL_RSA_WITH_RC4_128_MD5");
>> filter.getInclude().add("SSL_RSA_WITH_DES_CBC_SHA");
>> filter.getInclude().add("SSL_RSA_WITH_RC4_128_SHA");
>> filter.getInclude().add("SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5");
>> filter.getInclude().add("SSL_RSA_WITH_NULL_SHA");
>> filter.getInclude().add("SSL_RSA_WITH_NULL_MD5");
>> filter.getInclude().add("SSL_NULL_WITH_NULL_NULL");
>> tlsParams.setCipherSuitesFilter(filter);
>>
>> WsPortType port = (WsPortType) proxyFactory.create();
>>
>> Client cxfClient = ClientProxy.getClient(port);
>> cxfClient.getInInterceptors().
>> HTTPConduit httpConduit = (HTTPConduit)cxfClient.getConduit();
>> httpConduit.setTlsClientParameters(tlsParams);
>>
>>
>> Return return1 = port.ping();
>
>
>
> --
> Daniel Kulp
> [EMAIL PROTECTED]
> http://dankulp.com/blog
>
>
--
View this message in context:
http://www.nabble.com/xml-version-missing-in-soap-message-tp20184595p20208753.html
Sent from the cxf-user mailing list archive at Nabble.com.