This is strange cause Axis actually treated your request as SOAP 1.1 cause the response itself is soap 1.1 but with the wrong content-type header. May i know your axis2 version please?
Thanks, Keith. On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote: > > Here is the request/response with HTTP header. SOAP request was > transmitted after removing the messageBuilders from axis2.xml and > redeploying application. Please note that I've not included the complete > response in this email > > > Appreciate your help. > > Thanks > Chandru > > > REQUEST > > ============================================================================================ > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "POST > http://16.85.4.239:7001/axis2/rest/ProcessDocumentWebService/processRequestHTTP/1.1[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "Content-Length: 840[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "Content-Type: text/xml; charset="utf-8"[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "SOAPAction: ""[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "User-Agent: Jakarta Commons-HttpClient/2.0.1[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "Host: 16.85.4.239:7001[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "Proxy-Connection: Keep-Alive[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > >> "[\r][\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > "<SOAP-ENV:Envelope xmlns:SOAP-ENV=" > http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" > [\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > "xmlns:wsu=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" > >[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <SOAP-ENV:Header>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <wsse:Security>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <wsse:UsernameToken>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <wsse:Username>spml20admin</wsse:Username>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <wsse:Password > Type="wsse:PasswordText">PASSWORD</wsse:Password>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <wsse:Nonce>WScqanjCEAC4mQoBE07sAQ==</wsse:Nonce>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <wsu:Created>2003-07-16T01:24:32Z</wsu:Created> [\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " </wsse:UsernameToken>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " </wsse:Security>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " [\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <serviceHeader>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <serviceId>spml20</serviceId>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " </serviceHeader>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " </SOAP-ENV:Header>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <SOAP-ENV:Body>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " <listTargetsRequest xmlns="urn:oasis:names:tc:SPML:2:0"/>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > " </SOAP-ENV:Body>[\n]" > 104658 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- >> > "</SOAP-ENV:Envelope>[\n]" > > > RESPONSE > > ============================================================================================ > > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "HTTP/1.1 200 OK[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Via: 1.1 HOUWEBPROXY03[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Connection: Keep-Alive[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Proxy-Connection: Keep-Alive[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Transfer-Encoding: chunked[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Date: Tue, 02 Oct 2007 17:21:27 GMT[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Content-Type: application/xml; charset=utf-8[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Cache-Control: no-cache="set-cookie"[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "Set-Cookie: > JSESSIONID=LLvXHC2X8gyyQlTdR0QTwhXf0Ln5nR8MwJhSvS7SQyBm2bYTfc8h!-2076308598; > path=/[\r][\n]" > 117468 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.header - > << "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]" > 117515 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- << > "0" > 117515 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- << > "f" > 117515 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- << > "e" > 117515 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- << > "8" > 117515 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- << > "[\r]" > 117515 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- << > "[\n]" > 117515 DEBUG [ class ro.sync.ui.application.A.J ] httpclient.wire.content- << > "<SOAP-ENV:Envelope xmlns:tns=" > http://docWebService.axisWebServices.webservicefw.ovsi.hp.com" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><listTargetsResponse<http://www.w3.org/2001/XMLSchema%22%3E%3CSOAP-ENV:Body%3E%3ClistTargetsResponse>xmlns="urn:oasis:names:tc:SPML:2:0" > requestID="" status="success"><target > profile="urn:oasis:names:tc:SPML:2.0:profiles:XSD" > targetID="Attribute:Password"><schema><xs:schema xmlns:xs=" > http://www.w3.org/2001/XMLSchema" > xmlns="urn:hp:si:spml20:Attribute:Password" > targetNamespace="urn:hp:si:spml20:Attribute:Password"><xs:element > name="Password"><xs:complexType><xs:simpleContent><xs:extension > base="PasswordType"><xs:attribute name="AutoGenerateOnReset" > type="xs:boolean" > > Thanks > Chandru Ganesan > > > ------------------------------ > *From:* keith chapman [mailto:[EMAIL PROTECTED] > *Sent:* Tuesday, October 02, 2007 11:55 AM > *To:* [email protected] > *Subject:* Re: Axis 2.0 Content-type > > The reason you received the response as application/XML is because Axis2 > treated your request as REST. Can you send me the request and response (with > the http headers) taken after reverting the changes you did to the > axis2.xml . > > Thanks, > Keith. > > On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote: > > > > > > I'm using Oxygen 8.2, WSDL/SOAP Analyzer tool to send SOAP request to > > Axis 2 server. When I use HTTP client it doesn't complain about > > content-type=application/xml in the response. However, Oxygen is unable to > > understand the SOAP response and fails with following error message: > > > > > > Invalid Content-Type:application/xml. Is this an error message instead > > of a SOAP response? > > > > I tried sending a SOAP request with a dummy URI in the SOAPAction from > > Oxygen and still get above error message. > > > > This is the response I received from Oxygen support team: > > > > The axis server responds with a "Content-Type: application/xml; > > charset=utf-8" header. > > > > Unfortunately the "com.sun.xml.messaging.saaj.soap.MessageImpl" class > > from the "saaj-impl.jar" we are using to interpret the message tries to > > map the content type received from the server either as "text/xml" in which > > case it considers the SOAP response to be of version 1.1 or as > > "application/soap+xml" in which case it considers the response to be of > > version 1.2. > > > > As neither matches, the SOAP client throws the error message you > > received. > > > > Thanks > > Chandru Ganesan > > > > > > ------------------------------ > > *From:* keith chapman [mailto:[EMAIL PROTECTED] > > *Sent:* Tuesday, October 02, 2007 11:30 AM > > *To:* [email protected] > > *Subject: *Re: Axis 2.0 Content-type > > > > Hi, > > > > The SOAPaction is an attribute which can be used to dispatch a message. > > If a service advertises that it uses a SOAPAction you can set it in the > > client so that the client sends it in the request. As SOAPaction is > > mandatory in SOAP 1.1 request you should atleast have the following > > header > > > > SOAPAction: "" > > > > What is the client that your using. If its axis2 it does the above (Add > > an empty SOAPaction if its not specified) if the request is SOAP 1.1. > > > > Thanks, > > Keith > > > > On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi Keith > > > > > > Thanks for the quick response. > > > > > > As you've guessed correctly the request does not contain a SOAPAction. > > > I'm not quite clear about what should the value of SOAPAction be so that > > > Axis 2.0 treats it as SOAP 1.1 request. As I'm researching this topic, > > > appreciate your thoughts on it. > > > > > > Thanks > > > Chandru Ganesan > > > > > > > > > ------------------------------ > > > *From:* keith chapman [mailto:[EMAIL PROTECTED] > > > *Sent: *Tuesday, October 02, 2007 10:59 AM > > > *To:* [email protected] > > > *Subject:* Re: Axis 2.0 Content-type > > > > > > No you dont need to modify your axis2.xml leave it as it was. Can you > > > check the SOAP request you sent. I'm sure it does not contain the > > > SOAPAction > > > header. In SOAP 1.1 the SOAPAction is mandatory and axis2 uses this as > > > a key to differentiate between REST request and SOAP 1.1 request (As > > > some REST request uses text/xml as the contentType). The reason your > > > response was application/xml is because Axis2 treated your request as a > > > REST request and responded accordingly. > > > > > > Thanks, > > > Keith. > > > > > > On 10/2/07, Ganesan, Chandru <[EMAIL PROTECTED] > wrote: > > > > > > > > > > > > Hi > > > > > > > > When I send a SOAP request to Axis 2.0 service the response contains > > > > content-type=application/xml in the HTTP header. This causes > > > > WSDL/SOAP > > > > client tool to throw an exception as it doesn't understand the > > > > content-type of application/xml. For SOAP 1.1 it expects > > > > content-type=text/xml. I modified the Axis2.xml to include > > > > following > > > > lines. But this still doesn't return content-type=text/xml. Am I > > > > missing something in the Axis2.xml so that content-type of text/xml > > > > can > > > > be returned in the response. > > > > > > > > Appreciate your input very much. > > > > > > > > Modified Axis2.xml contains following lines for text/xml: > > > > ========================================================= > > > > <messageBuilders> > > > > <messageBuilder contentType="text/xml" > > > > class=""/> > > > > <messageBuilder contentType="" > > > > class=""/> > > > > <messageBuilder contentType="multipart/form-data" > > > > class=""/> > > > > </messageBuilders> > > > > > > > > > > > > SOAP response > > > > ============= > > > > "HTTP/1.1 200 OK[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Via: 1.1 HOUWEBPROXY03[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Connection: Keep-Alive[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Proxy-Connection: Keep-Alive[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Transfer-Encoding: chunked[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Date: Mon, 01 Oct 2007 19:37:41 GMT[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Content-Type: application/xml; charset=utf-8[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Cache-Control: no-cache="set-cookie"[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "Set-Cookie: > > > > > > > > JSESSIONID=zLGnHBMF7LRLqfr59qZ8TGWQXyHx6j7qh1BBTZyGQRXjsZn3Wb9n!16440382 > > > > 36; path=/[\r][\n]" > > > > 128708 DEBUG [ class ro.sync.ui.application.A.J ] > > > > httpclient.wire.header > > > > - << "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]" > > > > > > > > > > > > thanks > > > > Chandru Ganesan > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > Keith Chapman > > > WSO2 Inc. > > > Oxygen for Web Services Developers. > > > http://wso2.org/ > > > > > > > > > > > > -- > > Keith Chapman > > WSO2 Inc. > > Oxygen for Web Services Developers. > > http://wso2.org/ > > > > > > > -- > Keith Chapman > WSO2 Inc. > Oxygen for Web Services Developers. > http://wso2.org/ > > -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/
