You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Warner Onstine <wo...@vmsinfo.com> on 2008/11/17 20:49:42 UTC
error when trying to send a soap message to MS WS
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/CreateSalesInvoice
"], 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
Re: error when trying to send a soap message to MS WS
Posted by Daniel Kulp <dk...@apache.org>.
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
> >>> dkulp@apache.org
> >>> http://dankulp.com/blog
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: error when trying to send a soap message to MS WS
Posted by Warner Onstine <wo...@vmsinfo.com>.
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'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.
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/CreateSalesInvoice
> "], 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-support.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/CreateSalesIn
>>>> 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
>>> dkulp@apache.org
>>> http://dankulp.com/blog
>>
>
Re: error when trying to send a soap message to MS WS
Posted by Warner Onstine <wo...@vmsinfo.com>.
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", "lpo-
nodev-02");
//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",
"DynGPDev");
jcifs.Config.setProperty("jcifs.smb.client.password",
"3edcvfr4");
//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/CreateSalesInvoice
"], 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-support.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/CreateSalesIn
>>> 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
>> dkulp@apache.org
>> http://dankulp.com/blog
>
Re: error when trying to send a soap message to MS WS
Posted by Warner Onstine <wo...@vmsinfo.com>.
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-support.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/CreateSalesIn
>> 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
> dkulp@apache.org
> http://dankulp.com/blog
Re: error when trying to send a soap message to MS WS
Posted by Daniel Kulp <dk...@apache.org>.
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-support.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/CreateSalesIn
>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
dkulp@apache.org
http://dankulp.com/blog
RE: [Jax-rs]How to get Request Header in webservice
Posted by Ragini Bajpai <ra...@coreobjects.com>.
Hi,
I want to get data from Request Header's attributes.
Before routing request to this Web Service class I am getting RequestHeader attributes in a filter. After authenticating this data using spring-Security framework I am forwarding this request to my webservice class.In that filter I am getting all desired data.But when I am forwarding that request to my webservice. In this webservice class I again wan't that Request Header Attributes.
Which I am not able to get from @HeaderParam.
Please help .
Regards,
Ragini
-----Original Message-----
From: Sergey Beryozkin [mailto:sergey.beryozkin@progress.com]
Sent: Thursday, November 27, 2008 9:22 PM
To: users@cxf.apache.org
Subject: Re: [Jax-rs]How to get Request Header in webservice
> Do you an HTTP header in the request body named 'userId' ?
I meant not the actual 'body' of the request, but the whole raw HTTP request..., sorry about the confusion if any
> Hi
>
> Do you an HTTP header in the request body named 'userId' ?
>
> CXF 2.2-SNAPSHOT supports 1.0 api
>
> Cheers, Sergey
>
> ----- Original Message -----
> From: "Ragini Bajpai" <ra...@coreobjects.com>
> To: <us...@cxf.apache.org>
> Sent: Thursday, November 27, 2008 3:44 PM
> Subject: [Jax-rs]How to get Request Header in webservice
>
>
>
> Hi,
>
> I want to access Request Header data in the following piece of code.This method is in webservice class which is mapped in
> cxf-webservice.xml under <jaxrs:server/> bean.
> @POST
> @Path("/placeOrder")
> public Response placeOrder(@HeaderParam("userId") String userId) {
> String userIdString = userId;
> }
>
> Here I am getting userId null.
> I am using CXF-2.1.2 which is supporting jsr311-api-0.8.
> When I tried to take jsr311-api-1.0.jar then my war is not getting deployed.
>
> Please help me. This is very urgent...
>
> Regards,
> Ragini
>
>
>
>
Re: [Jax-rs]How to get Request Header in webservice
Posted by Sergey Beryozkin <se...@progress.com>.
I'm sorry - I still don't understand.
Do you have an HTTP request header which is named 'RequestHeader' and looks like
RequestHeader : userId=foo ?
or is it something like
userId : foo
?
HeaderParam value has to match a header name
Cheers, Sergey
----- Original Message -----
From: "Ragini Bajpai" <ra...@coreobjects.com>
To: <us...@cxf.apache.org>
Sent: Thursday, November 27, 2008 5:04 PM
Subject: RE: [Jax-rs]How to get Request Header in webservice
Yes I have this userId in RequestHeader as an attribute which contains some value.
Regards,
Ragini
-----Original Message-----
From: Sergey Beryozkin [mailto:sergey.beryozkin@progress.com]
Sent: Thursday, November 27, 2008 9:22 PM
To: users@cxf.apache.org
Subject: Re: [Jax-rs]How to get Request Header in webservice
> Do you an HTTP header in the request body named 'userId' ?
I meant not the actual 'body' of the request, but the whole raw HTTP request..., sorry about the confusion if any
> Hi
>
> Do you an HTTP header in the request body named 'userId' ?
>
> CXF 2.2-SNAPSHOT supports 1.0 api
>
> Cheers, Sergey
>
> ----- Original Message -----
> From: "Ragini Bajpai" <ra...@coreobjects.com>
> To: <us...@cxf.apache.org>
> Sent: Thursday, November 27, 2008 3:44 PM
> Subject: [Jax-rs]How to get Request Header in webservice
>
>
>
> Hi,
>
> I want to access Request Header data in the following piece of code.This method is in webservice class which is mapped in
> cxf-webservice.xml under <jaxrs:server/> bean.
> @POST
> @Path("/placeOrder")
> public Response placeOrder(@HeaderParam("userId") String userId) {
> String userIdString = userId;
> }
>
> Here I am getting userId null.
> I am using CXF-2.1.2 which is supporting jsr311-api-0.8.
> When I tried to take jsr311-api-1.0.jar then my war is not getting deployed.
>
> Please help me. This is very urgent...
>
> Regards,
> Ragini
>
>
>
>
RE: [Jax-rs]How to get Request Header in webservice
Posted by Ragini Bajpai <ra...@coreobjects.com>.
Yes I have this userId in RequestHeader as an attribute which contains some value.
Regards,
Ragini
-----Original Message-----
From: Sergey Beryozkin [mailto:sergey.beryozkin@progress.com]
Sent: Thursday, November 27, 2008 9:22 PM
To: users@cxf.apache.org
Subject: Re: [Jax-rs]How to get Request Header in webservice
> Do you an HTTP header in the request body named 'userId' ?
I meant not the actual 'body' of the request, but the whole raw HTTP request..., sorry about the confusion if any
> Hi
>
> Do you an HTTP header in the request body named 'userId' ?
>
> CXF 2.2-SNAPSHOT supports 1.0 api
>
> Cheers, Sergey
>
> ----- Original Message -----
> From: "Ragini Bajpai" <ra...@coreobjects.com>
> To: <us...@cxf.apache.org>
> Sent: Thursday, November 27, 2008 3:44 PM
> Subject: [Jax-rs]How to get Request Header in webservice
>
>
>
> Hi,
>
> I want to access Request Header data in the following piece of code.This method is in webservice class which is mapped in
> cxf-webservice.xml under <jaxrs:server/> bean.
> @POST
> @Path("/placeOrder")
> public Response placeOrder(@HeaderParam("userId") String userId) {
> String userIdString = userId;
> }
>
> Here I am getting userId null.
> I am using CXF-2.1.2 which is supporting jsr311-api-0.8.
> When I tried to take jsr311-api-1.0.jar then my war is not getting deployed.
>
> Please help me. This is very urgent...
>
> Regards,
> Ragini
>
>
>
>
Re: [Jax-rs]How to get Request Header in webservice
Posted by Sergey Beryozkin <se...@progress.com>.
> Do you an HTTP header in the request body named 'userId' ?
I meant not the actual 'body' of the request, but the whole raw HTTP request..., sorry about the confusion if any
> Hi
>
> Do you an HTTP header in the request body named 'userId' ?
>
> CXF 2.2-SNAPSHOT supports 1.0 api
>
> Cheers, Sergey
>
> ----- Original Message -----
> From: "Ragini Bajpai" <ra...@coreobjects.com>
> To: <us...@cxf.apache.org>
> Sent: Thursday, November 27, 2008 3:44 PM
> Subject: [Jax-rs]How to get Request Header in webservice
>
>
>
> Hi,
>
> I want to access Request Header data in the following piece of code.This method is in webservice class which is mapped in
> cxf-webservice.xml under <jaxrs:server/> bean.
> @POST
> @Path("/placeOrder")
> public Response placeOrder(@HeaderParam("userId") String userId) {
> String userIdString = userId;
> }
>
> Here I am getting userId null.
> I am using CXF-2.1.2 which is supporting jsr311-api-0.8.
> When I tried to take jsr311-api-1.0.jar then my war is not getting deployed.
>
> Please help me. This is very urgent...
>
> Regards,
> Ragini
>
>
>
>
Re: [Jax-rs]How to get Request Header in webservice
Posted by Sergey Beryozkin <se...@progress.com>.
Hi
Do you an HTTP header in the request body named 'userId' ?
CXF 2.2-SNAPSHOT supports 1.0 api
Cheers, Sergey
----- Original Message -----
From: "Ragini Bajpai" <ra...@coreobjects.com>
To: <us...@cxf.apache.org>
Sent: Thursday, November 27, 2008 3:44 PM
Subject: [Jax-rs]How to get Request Header in webservice
Hi,
I want to access Request Header data in the following piece of code.This method is in webservice class which is mapped in
cxf-webservice.xml under <jaxrs:server/> bean.
@POST
@Path("/placeOrder")
public Response placeOrder(@HeaderParam("userId") String userId) {
String userIdString = userId;
}
Here I am getting userId null.
I am using CXF-2.1.2 which is supporting jsr311-api-0.8.
When I tried to take jsr311-api-1.0.jar then my war is not getting deployed.
Please help me. This is very urgent...
Regards,
Ragini
[Jax-rs]How to get Request Header in webservice
Posted by Ragini Bajpai <ra...@coreobjects.com>.
Hi,
I want to access Request Header data in the following piece of code.This method is in webservice class which is mapped in cxf-webservice.xml under <jaxrs:server/> bean.
@POST
@Path("/placeOrder")
public Response placeOrder(@HeaderParam("userId") String userId) {
String userIdString = userId;
}
Here I am getting userId null.
I am using CXF-2.1.2 which is supporting jsr311-api-0.8.
When I tried to take jsr311-api-1.0.jar then my war is not getting deployed.
Please help me. This is very urgent...
Regards,
Ragini
Re: error when trying to send a soap message to MS WS
Posted by Warner Onstine <wo...@vmsinfo.com>.
Ok, after looking at this a little bit more I think this is actually
an HTTP 411 error (Length required). But this one baffles me a bit as
there already is a content-length in the header before I send it.
Any help is greatly appreciated.
-warner
On Nov 17, 2008, at 12:49 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/CreateSalesInvoice
> "], 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