axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: ws-axis/c/tests/auto_build/testcases/tests DynUnrefAttachmentTest.xml DynamicAttachment.xml
Date Thu, 16 Jun 2005 15:59:44 GMT
whitlock    2005/06/16 08:59:44

  Modified:    c/src/soap SoapSerializer.cpp
               c/tests/auto_build/testcases/output
                        DynUnrefAttachmentTestRequest.out
               c/tests/auto_build/testcases unitTest.list
  Added:       c/tests/auto_build/testcases/output
                        DynamicAttachment.expected
                        DynamicAttachmentRequest.out
                        DynamicAttachment_ServerResponse.expected
               c/tests/auto_build/testcases/dynamic/DynamicAttachment
                        DynamicAttachment.cpp
               c/tests/auto_build/testcases/tests
                        DynUnrefAttachmentTest.xml DynamicAttachment.xml
  Log:
  More attachments fixes.
  Add two dashes to the start of each mime boundary and to the end of the last mime boundary.
  Add in dummy DynamicAttachment unit test
  Test request message for the DynUnrefAttachmentTest
  
  Revision  Changes    Path
  1.127     +3 -4      ws-axis/c/src/soap/SoapSerializer.cpp
  
  Index: SoapSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- SoapSerializer.cpp	16 Jun 2005 14:19:15 -0000	1.126
  +++ SoapSerializer.cpp	16 Jun 2005 15:59:44 -0000	1.127
  @@ -334,7 +334,7 @@
   					ctype += ">\"";
   					pStream->setTransportProperty( AXIS_CONTENT_TYPE, ctype.c_str());
   
  -					serialize("\n" MIMEBOUNDARY "\n", NULL);
  +					serialize("\n--" MIMEBOUNDARY "\n", NULL);
                       serialize(AXIS_CONTENT_TYPE ": text/xml; charset=UTF-8\n", NULL);
                       serialize(AXIS_CONTENT_TRANSFER_ENCODING ": binary\n", NULL);
   
  @@ -359,7 +359,6 @@
   
   			if( checkAttachmentAvailability())
   			{
  -				serialize( "\n" MIMEBOUNDARY, NULL);
   				serializeAttachments( *this);
   			}
   		}
  @@ -1143,11 +1142,11 @@
   	map<AxisXMLString, ISoapAttachment*>::iterator itCurrAttach= m_SoapAttachments.begin();
   	while( itCurrAttach != m_SoapAttachments.end())
       {        
  +		serialize( "\n--" MIMEBOUNDARY, NULL);
           ((SoapAttachment *) ((*itCurrAttach).second))->serialize(pSZ);
  -		pSZ.serialize("\n" MIMEBOUNDARY, NULL);
           itCurrAttach++;
       }
  -	pSZ.serialize("\n", NULL);
  +	pSZ.serialize("\n--" MIMEBOUNDARY "--\n", NULL);
   }
   
   void SoapSerializer::addAttachment( const AxisChar * achId, ISoapAttachment * pAttach)
  
  
  
  1.2       +8 -8      ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTestRequest.out
  
  Index: DynUnrefAttachmentTestRequest.out
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTestRequest.out,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DynUnrefAttachmentTestRequest.out	16 Jun 2005 15:06:09 -0000	1.1
  +++ DynUnrefAttachmentTestRequest.out	16 Jun 2005 15:59:44 -0000	1.2
  @@ -2,10 +2,10 @@
   Host: localhost:13260
   SOAPAction: "Trash"
   Content-Type: multipart/related; type="text/xml"; boundary="------=MIME_BOUNDARY"; start="<6>"
  -Content-Length: 1393
  +Content-Length: 1409
   
   
  -------=MIME_BOUNDARY
  +--------=MIME_BOUNDARY
   Content-Type: text/xml; charset=UTF-8
   Content-Transfer-Encoding: binary
   Content-Id: <6>
  @@ -19,39 +19,39 @@
   </SOAP-ENV:Envelope>
   
   
  -------=MIME_BOUNDARY
  +--------=MIME_BOUNDARY
   Content-Id: <2>
   Content-Type: text/plain
   Content-Transfer-Encoding: base64
   
   VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA=
   
  -------=MIME_BOUNDARY
  +--------=MIME_BOUNDARY
   Content-Id: <3>
   Content-Type: text/plain
   Content-Transfer-Encoding: base64
   
   VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA=
   
  -------=MIME_BOUNDARY
  +--------=MIME_BOUNDARY
   Content-Id: <4>
   Content-Type: text/plain
   Content-Transfer-Encoding: base64
   
   VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA=
   
  -------=MIME_BOUNDARY
  +--------=MIME_BOUNDARY
   Content-Id: <5>
   Content-Type: text/plain
   Content-Transfer-Encoding: base64
   
   VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA=
   
  -------=MIME_BOUNDARY
  +--------=MIME_BOUNDARY
   Content-Id: <HERES_MY_CONTENT_ID>
   Content-Type: text/plain
   Content-Transfer-Encoding: base64
   
   VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA=
   
  -------=MIME_BOUNDARY
  +--------=MIME_BOUNDARY--
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/output/DynamicAttachment.expected
  
  Index: DynamicAttachment.expected
  ===================================================================
  Invoking...
  ----------------------------TEST COMPLETE--------------------------------
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/output/DynamicAttachmentRequest.out
  
  Index: DynamicAttachmentRequest.out
  ===================================================================
  POST /DynamicAttachment/services/DynamicAttachment HTTP/1.1
  Host: localhost:13260
  Content-Type: text/xml; charset=UTF-8
  SOAPAction: "Trash"
  Content-Length: 346
  
  <?xml version='1.0' encoding='utf-8' ?>
  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
  <ns1:put xmlns:ns1="http://localhost/axis/DynamicAttachment">
  </ns1:put>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
  
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/output/DynamicAttachment_ServerResponse.expected
  
  Index: DynamicAttachment_ServerResponse.expected
  ===================================================================
  HTTP/1.1 200 OK
  Server: WebSphere Application Server/5.1
  Content-Type: text/xml; charset=utf-8
  Content-Language: en-GB
  Transfer-Encoding: chunked
  
  ###
  <?xml version="1.0" encoding="utf-8"?>
  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header/>
  <soapenv:Body>
  <putResponse xmlns="http://localhost/axis/DynamicAttachment">
  <putReturn>5</putReturn>
  </putResponse>
  </soapenv:Body>
  </soapenv:Envelope>
  0
  
  
  
  
  1.3       +1 -0      ws-axis/c/tests/auto_build/testcases/unitTest.list
  
  Index: unitTest.list
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/unitTest.list,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- unitTest.list	14 Jun 2005 16:47:21 -0000	1.2
  +++ unitTest.list	16 Jun 2005 15:59:44 -0000	1.3
  @@ -1,6 +1,7 @@
   AxisBench.xml
   ComplexLists.xml
   ComplexTypesAll.xml
  +DynamicAttachment.xml
   DynamicGet_AddAnyObjectTest.xml
   DynUnrefAttachmentTest.xml
   Enumeration.xml
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/dynamic/DynamicAttachment/DynamicAttachment.cpp
  
  Index: DynamicAttachment.cpp
  ===================================================================
  // Copyright 2003-2004 The Apache Software Foundation.
  // 
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  // 
  //        http://www.apache.org/licenses/LICENSE-2.0
  // 
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  #include <axis/AxisException.hpp>
  #include <axis/client/Call.hpp>
  #include <axis/AxisWrapperAPI.hpp>
  #include <axis/ISoapAttachment.hpp>
  #include <iostream>
  #include <string>
  #include <exception>
  using namespace std;
  AXIS_CPP_NAMESPACE_USE 
  
  int main(int argc, char* argv[])
  {
  	try
  	{
  		Call call;
  		call.setEndpointURI(argv[1]);
  
  		call.initialize(CPP_DOC_PROVIDER);
  		call.setSOAPVersion(SOAP_VER_1_1);
  		call.setTransportProperty(SOAPACTION_HEADER , "Trash");
  		call.setOperation("put", "http://localhost/axis/DynamicAttachment");
  
  		cout << "Invoking..." << endl;
  		if (AXIS_SUCCESS != call.invoke())
  		{
  			cout << "Invoke failed" << endl;
  			return 0;
  		}
  
  		if(AXIS_SUCCESS != call.checkMessage("putResponse", "http://localhost/axis/DynamicAttachment"))
  		{
  			cout << "Check message failed" << endl;
  			return 0;
  		}
  		call.unInitialize();
  	}
  	catch(AxisException& e)
  	{
  	     cout << "Exception : " <<  e.what()<< endl;		
  	}
  	catch(exception& e)
  	{
  	    cout << "Unknown exception has occured" << endl;
  	}
  	catch(...)
  	{
  		 cout << "Unspecified exception has occured" << endl;
  	}
  	cout << "----------------------------TEST COMPLETE--------------------------------"
<< endl;
  	return 0;
  }
  
  
  
  
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/tests/DynUnrefAttachmentTest.xml
  
  Index: DynUnrefAttachmentTest.xml
  ===================================================================
  <test>
      <name>DynUnrefAttachmentTest</name>
      <description>DynUnrefAttachmentTest</description>
  	<dynamicCode>true</dynamicCode>
  	<dynamicCodeDirectory>DynUnrefAttachmentTest</dynamicCodeDirectory>
      <clientLang>cpp</clientLang>
      <wsdl>CalculatorDoc.wsdl</wsdl>
      <expected>
          <output>
              DynUnrefAttachmentTest.expected
          </output>	 
          <request>
  		DynUnrefAttachmentTestRequest.out
  	  </request>	
          <serverResponse>
  		DynUnrefAttachment_ServerResponse.expected
          </serverResponse>
      </expected>
  	<endpoint>http://localhost:80/DynUnrefAttachment/services/DynUnrefAttachment</endpoint>
  </test>
  
  
  
  1.1                  ws-axis/c/tests/auto_build/testcases/tests/DynamicAttachment.xml
  
  Index: DynamicAttachment.xml
  ===================================================================
  <test>
      <name>DynamicAttachment</name>
      <description>DynamicAttachment</description>
  	<dynamicCode>true</dynamicCode>
  	<dynamicCodeDirectory>DynamicAttachment</dynamicCodeDirectory>
      <clientLang>cpp</clientLang>
      <wsdl>CalculatorDoc.wsdl</wsdl>
      <expected>
          <output>
              DynamicAttachment.expected
          </output>	 
          <request>
  		DynamicAttachmentRequest.out
  	  </request>	
          <serverResponse>
  		DynamicAttachment_ServerResponse.expected
          </serverResponse>
      </expected>
  	<endpoint>http://localhost:80/DynamicAttachment/services/DynamicAttachment</endpoint>
  </test>
  
  
  

Mime
View raw message