axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <>
Subject Re: AXIS httppost
Date Wed, 18 Jan 2006 13:11:27 GMT
OK, can you try a nightly build then pls to check that this is fixed. If 
it's not can you please raise a JIRA.

Primoz Führer <> 
18/01/2006 11:47
Please respond to
"Apache AXIS C User List" <>

"Apache AXIS C User List" <>

Re: AXIS httppost

i'm using axis-c-1-5-win32 binary.
----- Original Message ----- 
From: John Hawkins 
To: Apache AXIS C User List 
Sent: Wednesday, January 18, 2006 12:40 PM
Subject: Re: AXIS httppost

What version of the code are you using ?
We used to have issues with the content length in 1.5 but these have been 
fixed in the latest code - If you're not already can you try a nightly 
drop -> 

Primo? Führer <> 
18/01/2006 11:07 

Please respond to
"Apache AXIS C User List" <>


AXIS httppost

I'm using web services on tomcat. As client i use Visual studio 6.0 c++ 
with axis client stubs.

With wsdl2ws i generate client stubs from wsdl. When i tried out some 
simple web services which are published on Internet, work vs c++ with axis 
client stubs OK(RPc style). but when i tried to use web services on 
tomcat(complex types), the program gave exception in generated stub in 
line ...invoke() web service...

i looked with tcpmon and find out that in httppost header a parameter 
"Content-Length:" is set to a number which is smaller than the actual 
length of the envelope. so if i set this number from let's say 350 to 356 
and in tcpmon clik send to server, i get the correct answer else not. 
In ultra edit i see that some spaces are added at the end of lines in 

i'd like to know why the spaces are added in envelope or why ,when the 
content-length is calculated,is set wrong length in header?

yes and where code is actually generated header and envelope, so i could 
see what's wrong. Thanks for reply.... 
POST /idoc/services/Prijava HTTP/1.1 
Content-Type: text/xml; charset=UTF-8 
SOAPAction: "" 
Content-Length: 462 
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="">
<ns1:checkLogin xmlns:ns1="
<username xsi:type="xsd:string">primozf</username>
<pswd xsi:type="xsd:string">primozf</pswd>
HTTP/1.1 500 Internal Server Error 
Content-Type: text/xml; charset=utf-8 
Transfer-Encoding: chunked 
Date: Wed, 18 Jan 2006 11:02:53 GMT 
Server: Apache Coyote/1.0 
Connection: close 
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXParseException
: Premature end of file.</faultstring><detail><ns1:hostname xmlns:ns1="">lexus</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope
So if i replace Content-Length: 462 with Content-Length: 468 or put lines 
in envelope in one line: 
HTTP/1.1 200 OK 
Content-Type: text/xml; charset=utf-8 
Transfer-Encoding: chunked 
Date: Wed, 18 Jan 2006 11:04:23 GMT 
Server: Apache Coyote/1.0 
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""><soapenv:Body><ns1:checkLoginResponse

xsi:type="ns2:UserPrijava" xmlns:ns2="urn:Prijava"><idInstalacije 
xsi:type="soapenc:int" xmlns:soapenc="">0</idInstalacije><idUsr 
xsi:type="soapenc:int" xmlns:soapenc="">30</idUsr><jezik 
xsi:type="soapenc:int" xmlns:soapenc="">1</jezik><shema 
xsi:type="soapenc:string" xsi:nil="true" xmlns:soapenc=""/></checkLoginReturn></ns1:checkLoginResponse></soapenv:Body></soapenv:Envelope
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="" xmlns:apachesoap="" xmlns:impl="" xmlns:intf="" xmlns:soapenc="" xmlns:tns1="urn:Prijava" 
xmlns:wsdl="" xmlns:wsdlsoap="" xmlns:xsd="">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
 <schema targetNamespace="urn:Prijava" xmlns="">
  <import namespace=""/>
  <complexType name="UserPrijava">
    <element name="idInstalacije" nillable="true" type="soapenc:int"/>
    <element name="idUsr" nillable="true" type="soapenc:int"/>
    <element name="jezik" nillable="true" type="soapenc:int"/>
    <element name="shema" nillable="true" type="soapenc:string"/>
   <wsdl:message name="checkLoginResponse"> 
      <wsdl:part name="checkLoginReturn" type="tns1:UserPrijava"/> 
   <wsdl:message name="checkLoginRequest"> 
      <wsdl:part name="username" type="soapenc:string"/> 
      <wsdl:part name="pswd" type="soapenc:string"/> 
   <wsdl:portType name="Prijava"> 
      <wsdl:operation name="checkLogin" parameterOrder="username pswd"> 
         <wsdl:input message="impl:checkLoginRequest" 
         <wsdl:output message="impl:checkLoginResponse" 
   <wsdl:binding name="PrijavaSoapBinding" type="impl:Prijava"> 
      <wsdlsoap:binding style="rpc" transport=""/> 
      <wsdl:operation name="checkLogin"> 
         <wsdlsoap:operation soapAction=""/> 
         <wsdl:input name="checkLoginRequest"> 
            <wsdlsoap:body encodingStyle="" namespace="" use="encoded"/> 
         <wsdl:output name="checkLoginResponse"> 
            <wsdlsoap:body encodingStyle="" namespace="" use="encoded"/> 
   <wsdl:service name="PrijavaService"> 
      <wsdl:port binding="impl:PrijavaSoapBinding" name="Prijava"> 
         <wsdlsoap:address location=""/> 

View raw message