[jboss-user] [JBossWS] - Re: http://org.jboss.ws/http#chunksize

2008-04-09 Thread talekar
Make sure you have META-INF/standard-jaxws-client-config.xml in the class path:


  | ?xml version=1.0 encoding=UTF-8?
  | 
  | !-- $Id: standard-jaxws-client-config.xml 5034 2007-11-12 14:08:23Z [EMAIL 
PROTECTED] $ --
  | 
  | jaxws-config xmlns=urn:jboss:jaxws-config:2.0 
xmlns:xsi=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
  |   
  |   client-config
  | config-nameStandard Client/config-name
  | featurehttp://org.jboss.ws/dispatch/validate/feature
  | property
  |   property-namehttp://org.jboss.ws/http#chunksize/property-name
  |   property-value0/property-value
  | /property
  |   /client-config
  |   
  |   client-config
  | config-nameHTTP 1.0 Client/config-name
  | featurehttp://org.jboss.ws/dispatch/validate/feature
  |   /client-config
  |   
  |   client-config
  | config-nameStandard WSAddressing Client/config-name
  | post-handler-chains
  |   javaee:handler-chain
  | javaee:protocol-bindings##SOAP11_HTTP/javaee:protocol-bindings
  | javaee:handler
  |   javaee:handler-nameWSAddressing Handler/javaee:handler-name
  |   
javaee:handler-classorg.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler/javaee:handler-class
  | /javaee:handler
  |   /javaee:handler-chain
  | /post-handler-chains
  |   /client-config
  |   
  |   client-config
  | config-nameStandard SOAP 1.2 WSAddressing Client/config-name
  | post-handler-chains
  |   javaee:handler-chain
  | javaee:protocol-bindings##SOAP12_HTTP/javaee:protocol-bindings
  | javaee:handler
  |   javaee:handler-nameWSAddressing Handler/javaee:handler-name
  |   
javaee:handler-classorg.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler/javaee:handler-class
  | /javaee:handler
  |   /javaee:handler-chain
  | /post-handler-chains
  |   /client-config
  |   
  |   client-config
  | config-nameStandard WSSecurity Client/config-name
  | post-handler-chains
  |   javaee:handler-chain
  | javaee:protocol-bindings##SOAP11_HTTP/javaee:protocol-bindings
  | javaee:handler
  |   
javaee:handler-nameWSSecurityHandlerOutbound/javaee:handler-name
  |   
javaee:handler-classorg.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient/javaee:handler-class
  | /javaee:handler
  |   /javaee:handler-chain
  | /post-handler-chains
  |   /client-config
  |   
  | /jaxws-config
  | 



  | 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=bbop=viewtopicp=4143013#4143013

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-11 Thread Ratoo
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=bbop=viewtopicp=4128301#4128301

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-06 Thread Ratoo
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:


  |   client-config
  | config-nameStandard Client/config-name
  | featurehttp://org.jboss.ws/dispatch/validate/feature
  | property
  |   property-namehttp://org.jboss.ws/http#chunksize/property-name
  |   property-value2048/property-value
  | /property
  |   /client-config
  | 

it MUST take it into account...


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4127066#4127066

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-06 Thread CBax007
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=bbop=viewtopicp=4127068#4127068

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-06 Thread Ratoo
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=bbop=viewtopicp=4127071#4127071

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-06 Thread CBax007
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=bbop=viewtopicp=4127091#4127091

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-05 Thread centecbertl
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 @@
  |!-- A HTTP/1.1 Connector on port 8080 --
  |Connector port=8080 address=${jboss.bind.address}
  |   maxThreads=250 strategy=ms maxHttpHeaderSize=8192
  |   emptySessionPath=true
  |   enableLookups=false redirectPort=8443 acceptCount=100
  | - connectionTimeout=2 disableUploadTimeout=true/
  | + connectionTimeout=2 disableUploadTimeout=true
  | +restrictedUserAgents=^.*MS Web Services Client Protocol.*$/
  |  
  |!-- Add this option to the connector to avoid problems with 
  |.NET clients that don't implement HTTP/1.1 correctly 
  |   restrictedUserAgents=^.*MS Web Services Client Protocol 
1.1.4322.*$
  |--
  | +
  | 
  |!-- A AJP 1.3 Connector on port 8009 --
  |Connector port=8009 address=${jboss.bind.address}
  |   emptySessionPath=true enableLookups=false redirectPort=8443 
  |   protocol=AJP/1.3/
  | @@ -29,11 +31,12 @@
  |Connector port=8443 address=${jboss.bind.address}
  | maxThreads=100 strategy=ms maxHttpHeaderSize=8192
  | emptySessionPath=true
  | scheme=https secure=true clientAuth=false 
  | keystoreFile=${jboss.server.home.dir}/conf/centec.keystore
  | -   keystorePass=centec sslProtocol = TLS /
  | +   keystorePass=centec sslProtocol = TLS 
  | +  restrictedUserAgents=^.*MS Web Services Client Protocol.*$/
  |!-- --
  |  
  |Engine name=jboss.web defaultHost=localhost
  |  
  |   !-- The JAAS based authentication and authorization realm 
implementation
  | 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4126500#4126500

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4126500
___
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

2008-02-05 Thread Ratoo
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=bbop=viewtopicp=4126505#4126505

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-05 Thread CBax007
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=bbop=viewtopicp=4126864#4126864

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-04 Thread [EMAIL PROTECTED]
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=bbop=viewtopicp=4126117#4126117

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4126117
___
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

2008-02-04 Thread [EMAIL PROTECTED]
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=bbop=viewtopicp=4126118#4126118

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=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

2008-02-04 Thread Ratoo
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=bbop=viewtopicp=4126134#4126134

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4126134
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user