My suggestion would be to use something like wireshark or similar to get the 
raw HTTP streams off the wire.   That can be a HUGE help in diagnosing these.   
  
You would be able to see the actual URL the POST is going to, the raw http 
headers, etc.....

On Friday 21 November 2008 10:42:59 am Warner Onstine wrote:
> Ok, I've done some more testing and it appears that I'm not logging in
> at all. I just changed my password to something else that shouldn't
> work and I'm still getting the "Length Required" message. Here is some
> of my setup.
>
> calling [my domain] but login is only available on this part:
> http://[my domain]/DynamicsGPWebServices/
>
> Is there somewhere I can look to determine what url is being called on
> things (login, soap call, etc.).

I THINK if you setup the java.util.logging to log FINE level stuff, you will 
see more information about what it's connecting to and stuff.   That may log 
a TON of stuff though so sifting through it may be tough.   Maybe just setup 
FINE level logging for:
org.apache.cxf.transport.http.HTTPConduit
which is the information you probably want.

> I'm beginning to wonder if this is part of my problem. Additionally
> when I look at the outgoing message there is no content-length field,
> whether or not chunking is allowed.

In our LoggingOutInterceptor, it won't be there as we don't actually calculate 
it at all.   We just write to the URLConnection output stream and it will 
calculate it right when it does the final send. 


Dan


> Thanks for any assistance with this.
>
> -warner
>
> On Nov 20, 2008, at 11:02 AM, Warner Onstine wrote:
> > So, finally getting back to this and here is the code I have:
> > //Set the jcifs properties
> >        jcifs.Config.setProperty("jcifs.util.loglevel", "3");
> >        jcifs.Config.setProperty("jcifs.smb.client.domain", "[my
> > domain]");
> >        //jcifs.Config.setProperty("jcifs.netbios.wins",
> > "xxx.xxx.xxx.xxx");
> >        jcifs.Config.setProperty("jcifs.smb.client.soTimeout",
> > "300000"); //5 minutes
> >        jcifs.Config.setProperty("jcifs.netbios.cachePolicy",
> > "1200"); //20 minutes
> >
> >        jcifs.Config.setProperty("jcifs.smb.client.username",
> > "[user]");
> >        jcifs.Config.setProperty("jcifs.smb.client.password",
> > "[password]");
> >
> >        //Register the jcifs URL handler to enable NTLM
> >        jcifs.Config.registerSmbURLHandler();
> >
> >
> >        URL wsdlURL = DynamicsX0020GP.WSDL_LOCATION;
> >        if (args.length > 0) {
> >            File wsdlFile = new File(args[0]);
> >            try {
> >                if (wsdlFile.exists()) {
> >                    wsdlURL = wsdlFile.toURI().toURL();
> >                } else {
> >                    wsdlURL = new URL(args[0]);
> >                }
> >            } catch (MalformedURLException e) {
> >                e.printStackTrace();
> >            }
> >        }
> >
> >        DynamicsX0020GP ss = new DynamicsX0020GP(wsdlURL,
> > SERVICE_NAME);
> >        DynamicsX0020GPSoap port = ss.getDynamicsX0020GPSoap();
> >
> >
> >        Client client = ClientProxy.getClient(port);
> >        HTTPConduit http = (HTTPConduit) client.getConduit();
> >        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
> >        httpClientPolicy.setConnectionTimeout(36000);
> >        httpClientPolicy.setAllowChunking(false);
> >        http.setClient(httpClientPolicy);
> >
> > I was setting the chunking in the configuration but decided to try
> > it directly here to make sure. When I look at the logs there is no
> > content-length being passed.
> >
> > Encoding: UTF-8
> > Headers:
> > {SOAPAction=["http://schemas.microsoft.com/dynamics/gp/2006/01/CreateSale
> >sInvoice "], Accept=[*]}
> > Messages:
> > Payload: <Soap Payload>
> >
> > Anyone have any clues to this? Looks like I'm still getting a 411
> > from IIS.
> >
> > -warner
> >
> > On Nov 18, 2008, at 8:09 AM, Warner Onstine wrote:
> >> Yep, it's turned off. At least I'm fairly certain it is as I have
> >> it defined in the cxf.xml file and login failed until I did that.
> >>
> >> -warner
> >>
> >> On Nov 17, 2008, at 6:48 PM, Daniel Kulp wrote:
> >>> You probably need to turn off chunking.   Older versions of MS
> >>> stuff doesn't
> >>> properly support it.
> >>>
> >>> See:
> >>> http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-su
> >>>pport.html and look for AllowChunking settings.
> >>>
> >>> Dan
> >>>
> >>> On Monday 17 November 2008 2:49:42 pm Warner Onstine wrote:
> >>>> Ok, so we are trying to connect to a Microsoft Web Service called
> >>>> Dynamics GP. It currently is sitting behind NTLM authentication,
> >>>> which
> >>>> I think I have working now using JCIFS. I am now getting this error
> >>>> message when attempting to send a message to the web service.
> >>>>
> >>>> INFO: Outbound Message
> >>>> ---------------------------
> >>>> Encoding: UTF-8
> >>>> Headers: {Connection=[Keep-Alive],
> >>>> SOAPAction=["http://schemas.microsoft.com/dynamics/gp/2006/01/CreateSa
> >>>>lesIn voice "], Accept=[*]}
> >>>> Messages:
> >>>> Payload: <soap:Envelope
> >>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
> >>>> "><soap:Body><ns2:CreateSalesInvoice
> >>>> xmlns="http://schemas.microsoft.com/dynamics/2006/01 "
> >>>> xmlns:ns2="http://schemas.microsoft.com/dynamics/gp/2006/01";
> >>>> xmlns:ns3="http://schemas.microsoft.com/dynamics/security/
> >>>> 2006/01"><ns2:salesInvoice><ns2:Type
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:Date
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:MasterNumber
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:ExchangeRate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:ExchangeDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:RequestedShipDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:FreightTaxBasis
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:MiscellaneousTaxBasis
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:TransactionState
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:CreatedBy>GP Dynamics Web Service Test</
> >>>> ns2:CreatedBy><ns2:CreatedDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:ModifiedDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:CommissionBasedOn
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:ActualShipDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:FulfillDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:QuoteDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:IsIntrastatDocument
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:IsVoided
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:ShipCompleteOnly
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:IntegrationSource
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:InvoiceDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:BackorderDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:ReturnDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:GeneralLedgerPostingDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:PostedDate
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:IsDirectDebit
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/><ns2:WorkflowPriority
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/></ns2:salesInvoice><Context
> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >>>> xsi:nil="true"/></ns2:CreateSalesInvoice></soap:Body></
> >>>> soap:Envelope>
> >>>> --------------------------------------
> >>>> Nov 17, 2008 11:34:25 AM
> >>>> org.apache.cxf.interceptor.LoggingInInterceptor logging
> >>>> INFO: Inbound Message
> >>>> ----------------------------
> >>>> Encoding: UTF-8
> >>>> Headers: {Content-Length=[24], connection=[close], Date=[Mon, 17
> >>>> Nov
> >>>> 2008 18:34:24 GMT], content-type=[text/html]}
> >>>> Messages:
> >>>> Message:
> >>>>
> >>>> Payload: <h1>Length Required</h1>
> >>>>
> >>>> So, for some reason I'm not getting an XML response back, but a
> >>>> partial HTML response. Is there some config option in CXF that I'm
> >>>> missing?
> >>>>
> >>>> Thanks in advance!
> >>>>
> >>>> -warner
> >>>
> >>> --
> >>> Daniel Kulp
> >>> [EMAIL PROTECTED]
> >>> http://dankulp.com/blog



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog

Reply via email to