Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 63540 invoked from network); 6 Mar 2007 23:54:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2007 23:54:32 -0000 Received: (qmail 91937 invoked by uid 500); 6 Mar 2007 23:54:40 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 91920 invoked by uid 500); 6 Mar 2007 23:54:40 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 91909 invoked by uid 99); 6 Mar 2007 23:54:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 15:54:40 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [216.138.118.8] (HELO mail1.criticaltech.com) (216.138.118.8) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 15:54:28 -0800 Received: from OKC2.criticaltech.com ([172.17.8.7]) by mail1.criticaltech.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 6 Mar 2007 17:51:03 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7604A.BAB065FC" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: "Received content is fault" Date: Tue, 6 Mar 2007 17:49:17 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: "Received content is fault" Thread-Index: AcdgSg2b7+GVEznYTPaTrs8QajQhyA== From: "Scott McFadden" To: Cc: "David Miller" X-OriginalArrivalTime: 06 Mar 2007 23:51:03.0170 (UTC) FILETIME=[4C8FFE20:01C7604A] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C7604A.BAB065FC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have written a webservice in C# / .NET 1.1. I can use Axis C++ client (Visual Studio 2003 / axis-c-1.6b-Win32) to successfully invoke webmethods that return simple data types (strings, ints, etc.). When I invoke a webmethod that returns a complex data type, I catch an AxisException in my C++ code with the following error: =20 "Received content is fault" =20 Has anyone else had a similar problem? =20 =20 =20 Here is the client code (from Visual C++ 2003) =20 xsd__string message =3D NULL; ServiceSoap* pProxy =3D NULL; UploadSession* session =3D NULL; =20 try { =20 pProxy =3D new ServiceSoap("http://localhost/AxisTest/Service.asmx"); =20 //message =3D pProxy->HelloWorld(); //this invocation works fine because of simple return type =20 =20 //int repositoryId, int endPointId, string fileName, long fileLength, string fileHash, string fileMetaData session =3D pProxy->CreateUploadSession(421, 0, "File.xml", 123, "abc", "metadata"); //we error here =20 } catch(AxisException& ex) { printf("%s", ex.what()); //"Received content is fault" } =20 =20 Here is a HTTP trace of the request and the response... =20 POST /AxisTest/Service.asmx HTTP/1.1 Host: 127.0.0.1:81 Content-Type: text/xml; charset=3DUTF-8 SOAPAction: "http://criticaltech.com/webservices/CreateUploadSession" Content-Length: 605 =20 421 0 File.xml 123 abc metadata =20 HTTP/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Tue, 06 Mar 2007 23:37:04 GMT X-Powered-By: ASP.NET =20 HTTP/1.1 200 OK Server: Microsoft-IIS/5.1 Date: Tue, 06 Mar 2007 23:37:04 GMT X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private, max-age=3D0 Content-Type: text/xml; charset=3Dutf-8 Content-Length: 597 =20 0001-01-01T00:00:000001-01-01 T00:00:0000 00 =20 =20 =20 =20 =20 Here is the WSDL as generated by .NET / Internet Explorer =20 =20 =20 =20 ScottM ------_=_NextPart_001_01C7604A.BAB065FC Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I have written a webservice in C# / .NET = 1.1.   I can use Axis C++ client  (Visual Studio 2003 / axis-c-1.6b-Win32) to = successfully invoke webmethods that return simple data types (strings, ints, = etc.).

When I invoke a webmethod that returns a complex data = type, I catch an AxisException in my C++ code with the following = error:

 

"Received content is = fault"

 

Has anyone else had a similar = problem?

 

 

 

Here is the client code (from Visual C++ = 2003)

 

xsd__string message =3D NULL;

      ServiceSoap* pProxy =3D NULL;

      UploadSession* session =3D NULL;

 

      try

      {     =

            = pProxy =3D new ServiceSoap("http://localhost/AxisTest/Service.asmx");

 

            = //message =3D = pProxy->HelloWorld();  //this invocation works fine because of simple return = type        =

 

            = //int repositoryId, int = endPointId, string fileName, long fileLength, string fileHash, string = fileMetaData

            = session =3D pProxy->CreateUploadSession(421, 0, "File.xml", 123, "abc", "metadata"); //we error here =      

      }

      catch(AxisException& = ex)

      {

            = printf("%s", ex.what());      //"Received content is fault"  =

      = }

 

 

Here is a HTTP trace of the request and the = response…

 

<REQUEST>

POST /AxisTest/Service.asmx = HTTP/1.1

Host: 127.0.0.1:81

Content-Type: text/xml; = charset=3DUTF-8

SOAPAction: "http://criticaltech.com/webservices/CreateUploadSession"<= /o:p>

Content-Length: 605

 

<?xml version=3D'1.0' encoding=3D'utf-8' = ?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

<SOAP-ENV:Body>

<ns1:CreateUploadSession xmlns:ns1=3D"http://criticaltech.com/webservices/">

<ns1:repositoryId>421</ns1:repositoryId>

<ns1:endPointId>0</ns1:endPointId>

<ns1:fileName>File.xml</ns1:fileName>=

<ns1:fileLength>123</ns1:fileLength><= /o:p>

<ns1:fileHash>abc</ns1:fileHash>

<ns1:fileMetaData>metadata</ns1:fileMetaData&= gt;

</ns1:CreateUploadSession>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

<RESPONSE>

HTTP/1.1 100 Continue

Server: = Microsoft-IIS/5.1

Date: Tue, 06 Mar 2007 23:37:04 = GMT

X-Powered-By: ASP.NET

 

HTTP/1.1 200 OK

Server: = Microsoft-IIS/5.1

Date: Tue, 06 Mar 2007 23:37:04 = GMT

X-Powered-By: ASP.NET

X-AspNet-Version: = 2.0.50727

Cache-Control: private, = max-age=3D0

Content-Type: text/xml; = charset=3Dutf-8

Content-Length: 597

 

<?xml version=3D"1.0" encoding=3D"utf-8"?><soap:Envelope = xmlns:soap=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"><soap:Body= ><CreateUploadSessionResponse xmlns=3D"http://criticaltech.com/webservices/"><CreateUpl= oadSessionResult><LastModified>0001-01-01T00:00:00</LastModif= ied><CreationDate>0001-01-01T00:00:00</CreationDate><Fi= leSize>0</FileSize><EndPointId>0</EndPointId><Rep= ositoryId>0</RepositoryId><OffSet>0</OffSet></Cre= ateUploadSessionResult></CreateUploadSessionResponse></soap:B= ody></soap:Envelope>

 

 

 

 

 

Here is the WSDL as generated by .NET / Internet = Explorer

 

<?xml version=3D"1.0" encoding=3D"utf-8"?>

<wsdl:definitions xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm=3D"http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc=3D"http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime=3D"http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns=3D"http://criticaltech.com/webservices/" xmlns:s=3D"http://www.w3.org/2001/XMLSchema" xmlns:soap12=3D"http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http=3D"http://schemas.xmlsoap.org/wsdl/http/" targetNamespace=3D"http://criticaltech.com/webservices/" xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/"><= /span>

  = <wsdl:types>

    <s:schema elementFormDefault=3D"qualified" targetNamespace=3D"http://criticaltech.com/webservices/">

      <s:element name=3D"HelloWorld">

        = <s:complexType />

      = </s:element>

      <s:element name=3D"HelloWorldResponse">

        <s:complexType>

         = <s:sequence>

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"HelloWorldResult" type=3D"s:string" = />

         = </s:sequence>

        </s:complexType>

      = </s:element>

      <s:element name=3D"ThrowSoapException">

        = <s:complexType />

      = </s:element>

      <s:element name=3D"ThrowSoapExceptionResponse">

        = <s:complexType />

      = </s:element>

      <s:element name=3D"CreateUploadSession">

        <s:complexType>

         = <s:sequence>

         =    <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"repositoryId" type=3D"s:int" = />

         =    <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"endPointId" type=3D"s:int" = />

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"fileName" type=3D"s:string" = />

         =    <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"fileLength" type=3D"s:long" = />

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"fileHash" type=3D"s:string" = />

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"fileMetaData" type=3D"s:string" = />

         = </s:sequence>

        </s:complexType>

      = </s:element>

      <s:element name=3D"CreateUploadSessionResponse">

        <s:complexType>

         = <s:sequence>

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"CreateUploadSessionResult" = type=3D"tns:UploadSession" />

         = </s:sequence>

        </s:complexType>

      = </s:element>

      <s:complexType name=3D"UploadSession">

        <s:sequence>

         = <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"LastModified" type=3D"s:dateTime" = />

  =         <s:element minOccurs=3D"1" maxOccurs=3D"1" = name=3D"CreationDate" type=3D"s:dateTime" />

         = <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"FileHash" type=3D"s:string" = />

         = <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"FileMetaData" type=3D"s:string" = />

         = <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"TempPath" type=3D"s:string" = />

         = <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"FileSize" type=3D"s:int" = />

         = <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"FileName" type=3D"s:string" = />

   =        <s:element minOccurs=3D"0" maxOccurs=3D"1" = name=3D"Key" type=3D"s:string" />

         = <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"EndPointId" type=3D"s:int" = />

         = <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"RepositoryId" type=3D"s:int" = />

         = <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"OffSet" type=3D"s:long" = />

         = <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"DestinationPath" type=3D"s:string" = />

        </s:sequence>

      = </s:complexType>

      <s:element name=3D"SaveFileChunk">

        <s:complexType>

         = <s:sequence>

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"sessionKey" type=3D"s:string" = />

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"buffer" type=3D"s:base64Binary" = />

         = </s:sequence>

        = </s:complexType>

      = </s:element>

      <s:element name=3D"SaveFileChunkResponse">

=

        = <s:complexType />

      = </s:element>

      <s:element name=3D"CompleteUploadSession">

=

        <s:complexType>

         = <s:sequence>

         =    <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"sessionKey" type=3D"s:string" = />

         = </s:sequence>

        </s:complexType>

      = </s:element>

      <s:element name=3D"CompleteUploadSessionResponse">

        = <s:complexType />

      = </s:element>

    = </s:schema>

  = </wsdl:types>

  <wsdl:message name=3D"HelloWorldSoapIn">

    <wsdl:part = name=3D"parameters" element=3D"tns:HelloWorld" />

  = </wsdl:message>

  <wsdl:message name=3D"HelloWorldSoapOut">

    <wsdl:part = name=3D"parameters" element=3D"tns:HelloWorldResponse" = />

  = </wsdl:message>

  <wsdl:message name=3D"ThrowSoapExceptionSoapIn"><= /p>

    <wsdl:part = name=3D"parameters" element=3D"tns:ThrowSoapException" = />

  = </wsdl:message>

  <wsdl:message name=3D"ThrowSoapExceptionSoapOut">=

    <wsdl:part = name=3D"parameters" element=3D"tns:ThrowSoapExceptionResponse" = />

  = </wsdl:message>

  <wsdl:message name=3D"CreateUploadSessionSoapIn">=

    <wsdl:part = name=3D"parameters" element=3D"tns:CreateUploadSession" = />

  = </wsdl:message>

  <wsdl:message name=3D"CreateUploadSessionSoapOut">

    <wsdl:part = name=3D"parameters" element=3D"tns:CreateUploadSessionResponse" = />

  = </wsdl:message>

  <wsdl:message name=3D"SaveFileChunkSoapIn">

    <wsdl:part = name=3D"parameters" element=3D"tns:SaveFileChunk" = />

  = </wsdl:message>

  <wsdl:message name=3D"SaveFileChunkSoapOut">

    <wsdl:part = name=3D"parameters" element=3D"tns:SaveFileChunkResponse" = />

  = </wsdl:message>

  <wsdl:message name=3D"CompleteUploadSessionSoapIn">

    <wsdl:part = name=3D"parameters" element=3D"tns:CompleteUploadSession" = />

  = </wsdl:message>

  <wsdl:message name=3D"CompleteUploadSessionSoapOut">

    <wsdl:part = name=3D"parameters" element=3D"tns:CompleteUploadSessionResponse" = />

  = </wsdl:message>

  <wsdl:portType = name=3D"ServiceSoap">

    <wsdl:operation name=3D"HelloWorld">

      <wsdl:input message=3D"tns:HelloWorldSoapIn" = />

      <wsdl:output message=3D"tns:HelloWorldSoapOut" = />

    = </wsdl:operation>

    <wsdl:operation name=3D"ThrowSoapException">

      <wsdl:input message=3D"tns:ThrowSoapExceptionSoapIn" = />

      <wsdl:output message=3D"tns:ThrowSoapExceptionSoapOut" = />

    = </wsdl:operation>

    <wsdl:operation name=3D"CreateUploadSession">

      <wsdl:input message=3D"tns:CreateUploadSessionSoapIn" = />

      <wsdl:output message=3D"tns:CreateUploadSessionSoapOut" = />

    = </wsdl:operation>

    <wsdl:operation name=3D"SaveFileChunk">

      <wsdl:input message=3D"tns:SaveFileChunkSoapIn" = />

      <wsdl:output message=3D"tns:SaveFileChunkSoapOut" = />

    = </wsdl:operation>

    <wsdl:operation name=3D"CompleteUploadSession">

=

      <wsdl:input message=3D"tns:CompleteUploadSessionSoapIn" = />

      <wsdl:output message=3D"tns:CompleteUploadSessionSoapOut" = />

    = </wsdl:operation>

  = </wsdl:portType>

  <wsdl:binding = name=3D"ServiceSoap" type=3D"tns:ServiceSoap">

    <soap:binding transport=3D"http://schemas.xmlsoap.org/soap/http" = />

    <wsdl:operation name=3D"HelloWorld">

      <soap:operation soapAction=3D"http://criticaltech.com/webservices/HelloWorld" style=3D"document" />

      = <wsdl:input>

        = <soap:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

    <wsdl:operation name=3D"ThrowSoapException">

      <soap:operation soapAction=3D"http://criticaltech.com/webservices/ThrowSoapException= " style=3D"document" />

      = <wsdl:input>

        = <soap:body use=3D"literal" />

      = </wsdl:input>

  =     <wsdl:output>

        = <soap:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

    <wsdl:operation name=3D"CreateUploadSession">

      <soap:operation soapAction=3D"http://criticaltech.com/webservices/CreateUploadSessio= n" style=3D"document" />

      = <wsdl:input>

        = <soap:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

    <wsdl:operation name=3D"SaveFileChunk">

      <soap:operation soapAction=3D"http://criticaltech.com/webservices/SaveFileChunk"= ; style=3D"document" />

      = <wsdl:input>

        = <soap:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

    <wsdl:operation name=3D"CompleteUploadSession">

=

      <soap:operation soapAction=3D"http://criticaltech.com/webservices/CompleteUploadSess= ion" style=3D"document" />

      = <wsdl:input>

        = <soap:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

  = </wsdl:binding>

  <wsdl:binding = name=3D"ServiceSoap12" type=3D"tns:ServiceSoap">

    <soap12:binding transport=3D"http://schemas.xmlsoap.org/soap/http" = />

    <wsdl:operation = name=3D"HelloWorld">

      <soap12:operation soapAction=3D"http://criticaltech.com/webservices/HelloWorld" style=3D"document" />

      = <wsdl:input>

        = <soap12:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap12:body use=3D"literal" />

  =     </wsdl:output>

=

    = </wsdl:operation>

    <wsdl:operation name=3D"ThrowSoapException">

      <soap12:operation soapAction=3D"http://criticaltech.com/webservices/ThrowSoapException= " style=3D"document" />

      = <wsdl:input>

        = <soap12:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap12:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

    <wsdl:operation name=3D"CreateUploadSession">

      <soap12:operation soapAction=3D"http://criticaltech.com/webservices/CreateUploadSessio= n" style=3D"document" />

      = <wsdl:input>

        = <soap12:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap12:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

    <wsdl:operation name=3D"SaveFileChunk">

      <soap12:operation soapAction=3D"http://criticaltech.com/webservices/SaveFileChunk"= ; style=3D"document" />

      = <wsdl:input>

        = <soap12:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap12:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

    <wsdl:operation name=3D"CompleteUploadSession">

=

      <soap12:operation soapAction=3D"http://criticaltech.com/webservices/CompleteUploadSess= ion" style=3D"document" />

      = <wsdl:input>

        = <soap12:body use=3D"literal" />

      = </wsdl:input>

      = <wsdl:output>

        = <soap12:body use=3D"literal" />

      = </wsdl:output>

    = </wsdl:operation>

  = </wsdl:binding>

  <wsdl:service = name=3D"Service">

    <wsdl:port name=3D"ServiceSoap" = binding=3D"tns:ServiceSoap">

      <soap:address location=3D"http://localhost/axistest/service.asmx" = />

    = </wsdl:port>

    <wsdl:port name=3D"ServiceSoap12" = binding=3D"tns:ServiceSoap12">

      <soap12:address location=3D"http://localhost/axistest/service.asmx" = />

    = </wsdl:port>

  = </wsdl:service>

</wsdl:definitions>

=

 

 

 

ScottM

------_=_NextPart_001_01C7604A.BAB065FC--