[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
Make sure you have META-INF/standard-jaxws-client-config.xml in the class path: | | | | | http://www.w3.org/2001/XMLSchema-instance"; xmlns:javaee="http://java.sun.com/xml/ns/javaee"; | xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd"> | | | Standard Client | http://org.jboss.ws/dispatch/validate | | http://org.jboss.ws/http#chunksize | 0 | | | | | HTTP 1.0 Client | http://org.jboss.ws/dispatch/validate | | | | Standard WSAddressing Client | | | ##SOAP11_HTTP | | WSAddressing Handler | org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler | | | | | | | Standard SOAP 1.2 WSAddressing Client | | | ##SOAP12_HTTP | | WSAddressing Handler | org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler | | | | | | | Standard WSSecurity Client | | | ##SOAP11_HTTP | | WSSecurityHandlerOutbound | org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient | | | | | | | | private static void moo() throws Exception { | MessageFactory factory = MessageFactory.newInstance(); | SOAPMessage request = factory.createMessage(); | MimeHeaders mimeHeaders = request.getMimeHeaders(); | mimeHeaders.addHeader("SOAPAction", "YOU SOAP ACTION"); | | String text = "YOUR PAYLOAD"; | | DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); | dbf.setNamespaceAware(true); | DocumentBuilder db = dbf.newDocumentBuilder(); | Document doc = db.parse(new ByteArrayInputStream(text.getBytes())); | request.getSOAPBody().addDocument(doc); | | SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance(); | SOAPConnection sc = scf.createConnection(); | | JAXWSClientMetaDataBuilder mdb = new JAXWSClientMetaDataBuilder(); | ServiceMetaData smd = mdb.buildMetaData(new QName("YOU SERVICE NS", | "YOUR SERVICE"), new URL("YOUR WSDL URL")); | EndpointMetaData emd = smd.getEndpoint(new QName("YOUR SERVICE NS", | "YOU PORT NAME")); | | SOAPMessageContextJAXWS mc = new SOAPMessageContextJAXWS(); | mc.setEndpointMetaData(emd); | MessageContextAssociation.pushMessageContext(mc); | SOAPMessage response = sc.call(request, new URL("YOUR ENDPOINT URL")); | MessageContextAssociation.popMessageContext(); | | SOAPBody sb = response.getSOAPBody(); | NodeList list = sb.getChildNodes(); | for (int i = 0; i < list.getLength(); i++) { | System.out.println(list.item(i)); | } | } | This works for me with jbossws-3.0.1-native-2.0.4.GA and JDK 5, but it is an ugly hack. I think I will try the RI and see if that works better. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143013#4143013 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143013 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
Just to keep this topic alive... Is there the possibility to fix it or should I use Metro stack instead? Thanx View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128301#4128301 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128301 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
I can see the problematic code in RemotingConnectionImpl createRemotingMetaData: populateHeaders(reqMessage, metadata); | clientConfig.put("chunkedLength", "1024"); | if(msgContext != null) | { | Properties epmdProps = msgContext.getEndpointMetaData().getProperties(); | String chunkSizeValue = epmdProps.getProperty("http://org.jboss.ws/http#chunksize";); | int chunkSize = chunkSizeValue == null ? -1 : Integer.valueOf(chunkSizeValue).intValue(); | if(chunkSize > 0) | { | clientConfig.put("http://org.jboss.ws/http#chunksize";, chunkSizeValue); | } else | { | clientConfig.remove("chunkedLength"); | } | } It automatically puts the chunkedLength property in place any only removes it if there is a MessageContext (non null) and that MessageContext does not have the EndPointMetaData property for chunking. The only problem is that if I'm just doing a simple SOAPMessage with a URL endpoint, I don't have a MessageContext and this code gets skipped. Heiko, any thoughts? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127091#4127091 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127091 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
Unfortunately, the message call that failed to me is from an API which is supposed to be used from standard JDK6, so I can not modify anything in it :-( View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127071#4127071 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127071 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
Yes but they have another config in there specifically for HTTP 1.0, so it leads me to believe you can use it. I'm just wondering if they didn't set it up so use it for a low level SOAPMessage example like I am doing. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127068#4127068 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127068 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
anonymous wrote : What can I do differently here to get the message to use the 'HTTP 1.0 Client' config? I think nothing. I think JBossWS (JAAS) should propagate this property to JBoss Remoting (HTTPClientInvoker), so once I remove "chunked" from the config: | | Standard Client | http://org.jboss.ws/dispatch/validate | | http://org.jboss.ws/http#chunksize | 2048 | | | it MUST take it into account... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127066#4127066 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127066 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
I too am in the same boat. I am constructing a SOAPMessage object from an XML string. The service I am posting the message to is choking on the chunked request data. I want to be able to disable this and the way seems to be by using the 'HTTP 1.0 Client' config from the standard-jaxws-client-config file. I just don't know how to get my message to use this different config. I am creating and sending my SOAPMessage as follows: SOAPMessageFactory messageFactory = MessageFactory.newInstance(); | SOAPConnectionFactory connFact = SOAPConnectionFactory.newInstance(); | SOAPMessage message = messageFactory.createMessage( | null, new ByteArrayInputStream(xmlString.getBytes())); | SOAPConnection conn = connFact.createConnection(); | URL url = new URL(FARELOGIX_URL); | SOAPMessage response = conn.call(message, url); What can I do differently here to get the message to use the 'HTTP 1.0 Client' config? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126864#4126864 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126864 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
"centecbertl" wrote : | You can use the tomcat Connector configuration to achieve this. Example given for jboss 4.0.5 restricts .net 2.0 clients to use HTTP 1.0: | Maybe I do not understand something, but I am THE client here. What you suggest is to disable chunking in RESPONSE to the buggy client (like MS one). In my case I'm using a JAAS to send a message to the buggy server so I have to disable chunking somehow. Maybe I'm wrong with the forum and should post it to JBoss Remoting instead? Ratoo View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126505#4126505 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126505 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
"Ratoo" wrote : | "[EMAIL PROTECTED]" wrote : | | HTTP 1.0 Client Did you try that one? | | | | Where is it? How can I configure it? | You can use the tomcat Connector configuration to achieve this. Example given for jboss 4.0.5 restricts .net 2.0 clients to use HTTP 1.0: | $ diff -U 5 server.xml~ server.xml | --- server.xml~ 2006-12-06 16:03:28.403259700 +0100 | +++ server.xml 2006-12-16 10:18:38.265625000 +0100 | @@ -11,16 +11,18 @@ | | | + connectionTimeout="2" disableUploadTimeout="true" | +restrictedUserAgents="^.*MS Web Services Client Protocol.*$"/> | | | + | | | | @@ -29,11 +31,12 @@ | | + keystorePass="centec" sslProtocol = "TLS" | + restrictedUserAgents="^.*MS Web Services Client Protocol.*$"/> | | | | |
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
You are right, the client is CGI, so http/1.0, but I just don't understand "[EMAIL PROTECTED]" wrote : | HTTP 1.0 Client Did you try that one? | Where is it? How can I configure it? I use jboss 4.2.2 and jbossws-native-2.0.2.GA (build=200711261155) the call itself is a simple | SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance(); | SOAPConnection conn = scf.createConnection(); | SOAPMessage response = conn.call(msg, endpoint); | I looked into the remoting code (HTTPClientInvoker) where setChunkedStreamingMode is called only when chunkedValue is set, so I thought that if it's 0 there is no chunking. So basically I will be happy to configure JBossWS (JAAS) not to use chunking. Thank you very much. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126134#4126134 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126134 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
Which basically means remove the feature, disable the chunked encoding. But you know what? There is a default config for that: HTTP 1.0 Client Did you try that one? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126118#4126118 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126118 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize
What JBossWS version is it? I just noticed there is bug in that piece of code, but it only affects setting the chunksize value, not removing it: | // chunksize settings | String chunkSizeValue = epmdProps.getProperty(EndpointProperty.CHUNKED_ENCODING_SIZE); | int chunkSize = chunkSizeValue != null ? Integer.valueOf(chunkSizeValue) : -1; | if (chunkSize > 0) | { |clientConfig.put(EndpointProperty.CHUNKED_ENCODING_SIZE, chunkSizeValue); | } | else | { |clientConfig.remove("chunkedLength"); | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126117#4126117 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126117 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user